Format stations like Civil 3D using, for instance, 3+1.00 for a number like 61.00, can be easy with .NET, and even more easier with .NET Extensions. Here it is: first define a module class that contains your utility functions, something like
Public Module Utils <System.Runtime.CompilerServices.Extension()> Public Function ToStationString(station As Double) As String Dim fractionPart As Double = station Mod 20
Dim integerPart As Double = (station - fractionPart) / 20
Return String.Format("{0:0}+{1:0.00}", integerPart, fractionPart)
End Function
End Module
The above code assumes the distance between stations as 20 and, for simplicity, this number was hard coded. Note the Extension attribute that does the trick to add it for all doubles. Now we can use like:
Dim stationDouble As Double = ' some number here Dim stationString As String = stationDouble.ToStationString()
Isn’t that nice?
Hope you enjoyed.
Important: this simple code is not taking Civil 3D styles into consideration, but can be a nice addition to it.