hi
I am trying to place an element in C# Addin .Net, but since the default global origin of the seed file is not (0,0,0). I am unable to place the element at the correct coordinates. I tried to change the global origin with this code, but it didn't work. Could anyone help me with this problem?
Thanks
DgnModel dgnModel = Session.Instance.GetActiveDgnModel(); dgnModelRef.GetModelInfo().GlobalOrigin.Set(0,0,0); dgnModel.SaveModelSettings();
Hi Nina,
at first, please be aware you choose general Developers and Programming forum, but your question is about MicroStation, so I recommend to move the question to MicroStation Programming forum. To move existing discussion to another forum, use More > Move tool, available under your original post.
Nina Shepel said:since the default global origin of the seed file is not (0,0,0). I am unable to place the element at the correct coordinates.
Where exactly global origin causes the problem?
Nina Shepel said:I tried to change the global origin with this code, but it didn't work.
I think it is expected result. From GetModelInfo documentation (in C++ API documentation):
To modify the modelinfo you must create a copy of the returned one, modify it, and call SetModelInfo () with the changed version.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point