Product(s): | MicroStation | ||
Version(s): | 10.17.02.61 | ||
Environment: | N\A | ||
Area: | Properties | ||
Subarea: | Item Types |
Item Type Expression to Get Latitude / Longitude
Request from User:
Is it possible to get Latitude and Longitude in an Item type via expression.
Coordinates.GCS is available with the following functions.
GetLatitude (Point)
GetLongtitude (Point)
GetElevation (Point)
In the following expressions we are passing Cell Origin to extract Latitude, Longitude and Elevation values.
Coordinates.GCS.GetLatitude(this.GetElement().Origin)
Coordinates.GCS.GetLongitude(this.GetElement().Origin)
Coordinates.GCS.GetElevation(this.GetElement().Origin)
Following expressions can be used for Line, Point elements.
Coordinates.GCS.GetLatitude(this.GetElement().Segments[0].Start)
Coordinates.GCS.GetLongitude(this.GetElement().Segments[0].Start)
Coordinates.GCS.GetElevation(this.GetElement().Segments[0].Start)
Sample File: communities.bentley.com/.../GCS_5F00_IT_5F00_Exp.dgn
Original Author: | Leonard Jones |