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

Customising Report Query

2 REPLIES 2
Reply
Message 1 of 3
steviek68
224 Views, 2 Replies

Customising Report Query

Hi,

 

I am attempting to customise a Pipes and Structures report but am having difficulty changing the % slope column to run over rise. I have attached a screen grab to hopefully illustrate.

 

Any help would be most appreciated as I'm pulling out what's left of my hair here!

 

SK

2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: steviek68

You will need to edit 2 XSL files located in (change the 2012 to the version you are using):

C:\ProgramData\Autodesk\C3D 2012\enu\Data\Reports\xsl

 

First one is the Pipes and Structures.xsl. Open with Notepad, search for "% Slope" (don't use the quotes), replace that with "Rise/Run" or "1:XX" or whatever heading you desire. Next, search for "getSlope" (again, don't use the quotes) and replace that with "getGrade". Save and close.

 

Next, open the Pipework_Layout.xsl file. Search for getSlope, you will find this:

function getSlope(start, elev1,end, elev2)
{
    
    var xDiff = Number(getEasting(start))-Number(getEasting(end));
    var yDiff = Number(getNorthing(start))-Number(getNorthing(end));
    var zDiff = Number(elev1)-Number(elev2);
    
    var xyDiff = Math.sqrt(Math.pow(xDiff,2)+Math.pow(yDiff, 2));
    
    var slope = 100*(zDiff/xyDiff);
    
    return slope;	
	
}

 Select and Copy this block of code, paste it back in immediately after that same block, so you will have 2 functions exactly the same. Now edit the second to look like this:

function getGrade(start, elev1,end, elev2)
{
    
    var xDiff = Number(getEasting(start))-Number(getEasting(end));
    var yDiff = Number(getNorthing(start))-Number(getNorthing(end));
    var zDiff = Number(elev1)-Number(elev2);
    
    var xyDiff = Math.sqrt(Math.pow(xDiff,2)+Math.pow(yDiff, 2));
    
    var grade = 1/(zDiff/xyDiff);
    
    return grade;	
	
}

Save and close. Your report should now look like you want.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
steviek68
in reply to: Jeff_M

Thanks Jeff, look forward to having a bash at that. Will let you know how I get on.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report