Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get azimuth at parcel inverse report insted bearing or with it

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
momenrayyan
724 Views, 12 Replies

How to get azimuth at parcel inverse report insted bearing or with it

How to get azimuth at parcel inverse report insted bearing or with it .

12 REPLIES 12
Message 2 of 13
hippe013
in reply to: momenrayyan

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.

 

hippe013_0-1686779689415.png

 

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. 

 

Message 3 of 13
hippe013
in reply to: momenrayyan

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%">&#160;</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%">&#160;</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>

 

hippe013_0-1686839116011.png

 

 

 

Message 4 of 13
momenrayyan
in reply to: hippe013

hello i didnt under stand u because i didib=nt have knowledge about this
can u edit inverse report and make ir plz


notr i edit general_formaring .....but i'm not sure is it work




thx about all
Message 5 of 13
momenrayyan
in reply to: hippe013

Tis work tank u so much 

Message 6 of 13
momenrayyan
in reply to: hippe013

 

i have issue at this 

 

Namespace 'http://www.autodesk.com/land/civil/vcedit' does not contain function 'formatAzimuthDMS'.
...msxml3.dll

momenrayyan_0-1686992273083.png

 

 

Message 7 of 13
momenrayyan
in reply to: hippe013

its work ...thank u 

Message 8 of 13
hippe013
in reply to: momenrayyan

I am happy I was able to help and that you were able to get it to work.

 

Cheers!

Message 9 of 13
topland.eng.2021
in reply to: hippe013

can you give me the modified file of this ,because i cannot modified like you

Message 10 of 13
hippe013
in reply to: topland.eng.2021

@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. 

Message 11 of 13
topland.eng.2021
in reply to: hippe013

I did the steps as you explained and it worked perfectly, thank you

Message 12 of 13
Rodrigo_Abb
in reply to: hippe013

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?

 

 
 
 
Message 13 of 13
Jeff_M
in reply to: Rodrigo_Abb

@Rodrigo_Abb  It looks like you have an extra } at the end.

Jeff_M, also a frequent Swamper
EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report