I have a question regarding IModel_DG. I need to add object from an .mdg file to the scene in my application.
I do loading like:
Code: Select all
IDIObjGenerator iGener = _iModel as IDIObjGenerator;
IModel iModelAnother = (IModel)iGener->Create(EObjectType.eObjTypeModelGenerator);
IModelEx iModelEx = iModelAnother as IModelEx;
iModelEx.Load( modelPath);
A neat way would be to use
Code: Select all
IEntityArray_DG entities = iModelAnother.GetEntityArray(includeDescendents);
_iModel.Add(entities, -1);
Thank you