PDA

View Full Version : 2014 Metes and Bounds Report angle and direction settings



twhatley
2014-03-14, 11:22 PM
I'm customizing the MetesBounds.xsl file to mach company standards for verbiage, units, etc. I'm nearly there but stuck trying to fix the angle and bearing format. The MetesBounds.xsl appears to be controlled by Parcel report settings, but there is no setting there for Angle or Direction.

There are settings in the Legal Description section, and those are set correctly (as are ambient drawing settings), but that seems to only affect General_Legal_Description_for_Parcels, it has no affect on Metes_and_Bounds. The settings have to be somewhere, I just can't seem to find them.

For Bearings I'm getting "S 2-10-21.908 E" What I want is South 2 degrees 10 minutes 22 second East
For Delta Angles I'm getting the right precision, but DMS instead of degrees, etc.

One other minor annoyance is that it formats LEFT or RIGHT in curves to all caps. Would like it to be lower case.

I'm also going to attempt to pull acreage/sq. ft. data into this report, so if you know how to customize the report for that data I'd greatly appreciate any tips

Opie
2014-03-17, 02:24 PM
Have you tried editing the Report Settings for the Delta Angles? I believe the default setting for that is DMS.

For the formatting of the bearing data, look into the General_Formating_JScript.xsl file. I wouldn't modify this file. I would recommend creating a new file with similar functions. You might name this "Custom_Formating_JScript.xsl" At about line 206, there is a function called formatAngleToDMS and then on about line 219, there is a function called formatBearingDMS. I would copy these two functions into your new file.

In the first function, you will need to change the output to your desired style. I think what you want is colored in red below.


function formatAngleToDMS(angle)
{
var degrees = Math.floor(angle);

var dMin = 60. * (angle - degrees);
var minutes = Math.floor(dMin);

var dSec = 60. * (dMin - minutes);
var seconds = formatAngleNumber(dSec);

return degrees + " degrees " + minutes + " minutes " + seconds + " seconds";
}

For the second function, spell out the cardinal directions.


function formatBearingDMS(angle)
{
// decimal degrees are E=0, N=90, W=180, S=270 (counter-clockwise)
var angNum;

if(angle >= 0 && angle <= 90)
{
angNum = 90. - angle;
var bearing = formatAngleToDMS(angNum);
return "North " + bearing + " East";
}
else if(angle > 90 && angle <= 180)
{
angNum = angle - 90.;
var bearing = formatAngleToDMS(angNum);
return "North " + bearing + " West";
}
else if(angle > 180 && angle < 270)
{
angNum = 270. - angle;
var bearing = formatAngleToDMS(angNum);
return "South " + bearing + " West";
}
else
{
angNum = angle - 270.;
var bearing = formatAngleToDMS(angNum);
return "South " + bearing + " East";
}
}


Now that those two functions are modified, let's move back to your MetesBounds.xsl file. You will need to add an xsl:include statement at the end of the JavaScript Includes section to call this new custom functions file.


<xsl:include href="Custom_Formating_JScript.xsl"/>

I have attached a copy of the Custom_Formating_JScript.xsl file.

There maybe some additional tweaks needed as I have not thoroughly tested this solution.

twhatley
2014-03-17, 05:59 PM
Thank you so much for your help, Opie. This gets me a lot closer to what I need.

I had to replace
<xsl:include href="General_Formating_JScript.xsl"/>
with
<xsl:include href="Custom_Formating_JScript.xsl"/>
instead of just adding the line at the bottom, but once I did that it worked.

I'm going to have to do more tweaking, as I'm still getting delta angles with ° ' ", and all caps for the direction, but I feel like I'm on the right track now. Thanks again for your help.

Opie
2014-03-17, 06:30 PM
There is more to the General_Formating_JScript.xsl file than what is included in the Custom_Formating_JScript.xsl file.

Would you mind attaching your MetesBounds.xsl file?

CadTex
2015-03-27, 07:49 PM
I too am trying to change the output settings for the metes & bounds report by modifying the General_Formating_JScript.xsl file. I have succeeded at adding the bearing directions as my boss prefers them, but I have not figured out where to change the precision of the bearing and distance. I want to set the bearing to the nearest second and the distance to two decimal places. Currently they are both coming out with three decimal places.
Here is a screen capture of what I get.
99309

Forgive me if the image doesn't show up. I am new to this.

Opie
2015-04-06, 04:41 PM
Have you checked the Report Settings button for this precision?