Hello Guys,
I have generate corridor stake reports, everything is perfect except grade precision.
how to change precision of grade ?
I believe those are handled here
If not then it should be under the Drawing Setting, Ambient Setting.
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.
Can't find what you're looking for? Ask the community or share your knowledge.