Hi,
I would like to find an expression that I can use in the calculated properties of a definition. I want to return the coordinates of the associated item. In this case its lights that I want the coordinates for. It would certainly save me a huge amount of time automating this.
Fantastic, but how to limit the number of digits? Tried following but doesn't work: System.String.Format("{0:D3}", this.GetElement().Origin.x) & " , " & System.String.Format("{0:D3}", this.GetElement().Origin.y)
Mikkel Bennedbaek said:How to limit the number of digits?
I believe that the D formatter is applicable only to integer numbers. Try something like the following...
D
System.String.Format ("{0:#.##}, {1:#.##}", this.GetElement().Origin.X, this.GetElement().Origin.Y)
Adjust the number of pound (#) signs to vary the precision.
#
Regards, Jon Summers LA Solutions
Thanks! Works like a charm.. while I was waiting for a response I came up with:
System.Math.Round(this.GetElement().Origin.x,3) & "," & System.Math.Round(this.GetElement().Origin.y,3)
Think it does the same but your expression looks cooler and more technical :)
Would it be possible to add the stationing as well if I install OpenRoads/OpenRail?
Mikkel Bennedbaek said:Would it be possible to add the stationing as well if I install OpenRoads/OpenRail?
You're deviating from the original question. Prefer to post a new question about Stationing.