Hello everybody,
sorry if it this is a trivial question, but I think I looked everywhere for an answer without success.
I know how to get data from Objects, Models or Groups that user selects, as seen here (for people who do not know):
http://www.ariscommunity.com/users/edwv/2011-03-23-which-symbolsconnections-are-used-model
In my report, from these 3 options I always get an array of ObjDef-initions.
From ObjDef I would like to get all its ObjOccurences
and then get an array of Models where this ObjDef occurs. (Preferably filter these models by type if possible.)
This is a bit different approach. Everywhere else I see people listing data from already selected models.
Do you have an ideas?
Thank you for your time.
Martin
Hello Ilya,
with this script I can get only Object Occurences on various models.
My question was if I am able to get list of Model data types (or at least Model GUID) where the ObjDef has occurence.
Judging by the ARIS Script help, this seems to be impossible (using 7.2).
Martin
Hello.
Sorry. This is my mistake. See bold string.
var aModels = [];
var aObjDefs = ArisData.getSelectedObjDefs
For (
var
i=0; i<aObjDefs.length; i++)
{
var oDef =aObjDefs[i];
var aOccs = oDef.OccList();
For (
var
j=0; j <aOccs.length; j++)
{
aModels.push(aOccs[j].Model());
}
}
aModels = ArisData.Unique(
aModels);