Hello Community,
I have a question regarding to the retrieval of parent model.
If I have a ObjDef now and I would like to get the model to which the object belongs, how should I do that ?
Thanks in advance!
Best
Hello Community,
I have a question regarding to the retrieval of parent model.
If I have a ObjDef now and I would like to get the model to which the object belongs, how should I do that ?
Thanks in advance!
Best
The parent models are models in which occurrences exist that have your ObjDef as an object definition, aren't they?
Since your ObjDef can have multiple occurrences in multiple different models, there isn't "the" parent model, instead it's a list of models that can contain
The way I would solve your problem:
Should work something like this
var selObjDefs = ArisData.getSelectedObjDefs(); for each (var singleObjDef in selObjDefs){ var arrayForModelCollection = []; var occList = singleObjDef.OccList(); for each(var singleObjOcc in occList){ arrayForModelCollection.push(singleObjOcc.Model()); } var arrayOfUniqueModels = ArisData.Unique(arrayForModelCollection) }