How to get azimuth at parcel inverse report insted bearing or with it .
Solved! Go to Solution.
Solved by hippe013. Go to Solution.
Solved by momenrayyan. Go to Solution.
Solved by hippe013. Go to Solution.
I can point you in the right direction, but the rest is up to you. Make sure to make copies of the files so that you can revert back if need be. It requires modifying the xsl files.
They can be found in the following folder:
C:\ProgramData\Autodesk\C3D 2019\enu\Data\Reports\xsl
You can modify the Parcel_Inverse.xsl file.
You will find this area of the file.
Notice the formatBearingDMS($angle)
Now open the file: General_Formating_JScript.xsl
Look for the following:
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 + "-" + minutes + "-" + seconds;
}
This function returns a formatted angle similar to an Azimuth.
Copy this function, modify to return a formatted azimuth, and rename it to something like "formatAzimuthDMS". The code is in Java language.
Modify the Parcel_Inverse.xsl to point to this function.
Hope this helps.
Add this function to the General_Formating_JScript.xsl file.
The following is the function for formatting Azimuth.
function formatAzimuthDMS(angle)
{
// decimal degrees are E=0, N=90, W=180, S=270 (counter-clockwise)
var angNum;
if(angle >= 0 && angle <= 90)
{
angNum = 90. - angle;
}
else
{
angNum = 360. - (angle - 90.);
}
var azimuth = formatAngleToDMS(angNum);
return "N " + azimuth;
}
Now modify the Parcel_Inverse.xsl file
Original Columns:
<tr>
<td width="33%"> </td>
<xsl:variable name="Bearing" select="landUtils:formatBearingDMS($angle)"/>
<xsl:variable name="LineLength" select="landUtils:GetLineLength()"/>
<td>Bearing: <xsl:value-of select="$Bearing"/></td>
<td>Length: <xsl:value-of select="landUtils:FormatNumber(string($LineLength), string($SourceLinearUnit), string($Parcel.Line_Segment_Length.unit), string($Parcel.Line_Segment_Length.precision), string($Parcel.Line_Segment_Length.rounding))"/></td>
</tr>
Modified columns:
<tr>
<td width="33%"> </td>
<xsl:variable name="Azimuth" select="landUtils:formatAzimuthDMS($angle)"/>
<xsl:variable name="LineLength" select="landUtils:GetLineLength()"/>
<td>Azimuth: <xsl:value-of select="$Azimuth"/></td>
<td>Length: <xsl:value-of select="landUtils:FormatNumber(string($LineLength), string($SourceLinearUnit), string($Parcel.Line_Segment_Length.unit), string($Parcel.Line_Segment_Length.precision), string($Parcel.Line_Segment_Length.rounding))"/></td>
</tr>
i have issue at this
Namespace 'http://www.autodesk.com/land/civil/vcedit' does not contain function 'formatAzimuthDMS'.
...msxml3.dll
I am happy I was able to help and that you were able to get it to work.
Cheers!
can you give me the modified file of this ,because i cannot modified like you
@topland.eng.2021 What part of modifying the files are you having difficultly with? I am willing to help you with any questions that you may have.
Hello!
Sorry bothering you but I'm trying to use the function formaAzimuthDMS in Metes And Bounds report but it's not working.
I just replaced the formatBearingDMS sintax with yours, instead off adding a new function and make some mistakes, but the error says the line 223, col=0 is dislocated from the block or something like that!
Could you help me with this?
Can't find what you're looking for? Ask the community or share your knowledge.