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