Hello,
I am writing an Addin application in C# for Microstation CONNECT Edition and I want to ask if in those .NET libraries is any way to convert earth location (lat/long) to MS Dpoint3dt? If yes could you provide some example?
Thanks in advance.
Hi Piotr,
Piotr Czyzyk said:for Microstation CONNECT Edition
it's not clear what MicroStation CE version do you use. Please follow the best practices and specify the used version exactly (there have been 18 CE versions released so far).
Piotr Czyzyk said:is any way to convert earth location (lat/long) to MS Dpoint3dt?
Are you asking about conversion based on GCS defined for active model or your question is about a general conversion between CAD and geo coordinates?
In MicroStation, the question has been discussed several times (did you try to search this forum?).
In MicroStation Interop, GeoGraphicCoordinateSystem class is available, providing several conversion methods. I think there is no equivalent in new NET API (yet?).
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
DgnModel activeModel = Session.Instance.GetActiveDgnModel(); DgnGCS cs = DgnGCS.FromModel(activeModel, true);
DgnGCS should have everything you need.
You may need to include reference to Bentley.GeoCoord2.dll
Thanks for the information, I missed this class it in NET documentation :-)
Regards,