[c# .net CONNECT] remove GCS from model.

i must be missing it in the SDK. but i cant find how to remove a GCS (Geographic coordinate system) from a model.

i see Bentely.GeoCoordinateNET.DgnGCS  ToModel()  to set a GCS, but im missing for to just remove one. 

Parents
  • i only see the COM DeleteGCS call.

    im looping dgn files and loading them in the background and then looping the models. if i already have the file loaded and got the model from the .net side. is there a way to then get the Interop side (COM) to get that model? so if i have Bentley.DgnPlayformNET.DgnModel. is there a way to get my ComApp to find that DgnModel?? so i can then call the deleteGCS method. i dont think i can load the file from the COM side if i already loaded it from the .net side, can I?

    not sure how to properly handle that, it would be easy if i was just using the active model but im not.

  • so if i have Bentley.DgnPlayformNET.DgnModel. is there a way to get my ComApp to find that DgnModel?

    I am not sure it is possible, because plenty of COM features are available for active model only, not models loaded at background.

    but i cant find how to remove a GCS (Geographic coordinate system) from a model.

    Because GCS is stored as model application data (DgnGCS  inherits BaseGCS and DgnModelAppData classes in C++), maybe the workaround can be to delete proper application data. There is DgnModel.RemoveApplicationData() method available in NET, but it is not clear what should be used as "key".

    With regards,

      Jan

Reply Children
No Data