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: 

customize data to show in corridor report

2 REPLIES 2
Reply
Message 1 of 3
gurulal.singh
166 Views, 2 Replies

customize data to show in corridor report

Hello Guys,

I have generate corridor stake reports, everything is perfect except grade precision.
how to change precision of grade ? 



gurulalsingh_0-1652101806518.png

 

2 REPLIES 2
Message 2 of 3
cwr-pae
in reply to: gurulal.singh

I believe those are handled here

cwr_0-1652129457222.png

 

If not then it should be under the Drawing Setting, Ambient Setting.

 

cwr_1-1652129567770.png

 

Message 3 of 3
Jeff_M
in reply to: gurulal.singh

The slopestake report is a .NET report and the precision for the slope percentage is hardcoded into the report. Why they obtained all of the other precision settings from the drawing's ambient settings but not this one is a mystery. If you know how to edit VB.NET files and recompile them you can change this to suit. The source code for the reports is found in the C:\ProgramData\Autodesk\C3D 20XX\enu\Data\Reports\Net\Source\C3DReports\ folder. The file to edit is CorridorSlopeStake_ExtractData.vb and this is the function:

    Private Shared Function GetSlopeData(ByVal curOff As Double, ByVal lastOff As Double, _
                                ByVal curElev As Double, ByVal lastElev As Double) As String
        Dim deltaX As Double
        Dim deltaY As Double
        Dim slope As Double
        Const percent2Slope As Double = 0.5
        deltaX = Math.Abs(curOff - lastOff)
        deltaY = curElev - lastElev

        If (deltaX <> 0) Then
            slope = deltaY / deltaX
            Dim roundedSlope As Double
            roundedSlope = Math.Floor(Math.Abs(slope) * 10000 + 0.5) / 10000
            If (roundedSlope < percent2Slope) Then
                GetSlopeData = slope.ToString("p") ''This defaults to 2 decimal places. CHange to "p4" for 4 decimals, or "p1" for just one.
            Else
                GetSlopeData = "1:" + slope.ToString("0.00")
            End If
        Else
            GetSlopeData = "0.00"
        End If

    End Function

 

You could make it use the drawings setting for slopes by using the Functions at the beginning of that file as a guide to get them from the drawing.

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