Hi,
I'm looking to get/set the Geographic Coordinate System from an OpenRoads/OpenRail dgn through the c# api as a part of a keyin command.
communities.bentley.com/.../616645
I've found in the microstation SDK forum a post such as this that looks helpful.
DgnModel activeModel = Session.Instance.GetActiveDgnModel(); DgnGCS cs = DgnGCS.FromModel(activeModel, true);
However, if I reference the Bentley.GeoCoord2.dll distributed with OpenRoads/OpenRail Connect Edition, the class DgnGCS isn't found from my searching.
Can someone please advise if this is possible or an alternative technique?
Thanks,
Jon
Jon,
I couldn't get that method to work either, I did get the COM way to work using the following:
Bentley.Interop.MicroStationDGN.Application comApp = Bentley.MstnPlatformNET.InteropServices.Utilities.ComApp; Bentley.Interop.MicroStationDGN.GeographicCoordinateSystem gcs = comApp.ActiveModelReference.GetGCS(true);
Answer Verified By: Jon Mirtschin
Thanks for the reply, that's very helpful for getting the GCS (which is the more important requirement). Would be great if it's also possible to set it.