Hi all,
I have tried different ways of obtaining the occurrences of an object but I only get connections. When I say occurrences I mean those seen on any object when right click:
I have tried different ways of bringing all the occurrences of an object, but the most I get is the relationships checked from the connections section.
My code:
var objConect = objOcc.getConnectedObjOccs (null, Constants.EDGES_INOUT);
for(var j=0; j<objConect.length; j++) {
objConect[j].getObjDefName(-1)
Thanks in advance, regards
That's because you're staying on the occurrence level of the object.
Of course a single occurrence can only tell you more about what surrounds it, within the same model.
Try replacing the line
var objConect = objOcc.getConnectedObjOccs (null, Constants.EDGES_INOUT);
with the line
var objConect = objOcc.ObjDef().OccList();
Described in words: From your single occurrence in some model, you hop to the object definition of the object. The object definition isn't part of any model, instead it resides inside the ARIS Explorer next to models.
The object definition is in a 1:n relationship with the occurrences, meaning there is one object definition that holds attribute values such as the object name and there can be n many occurrences that make use of the object defintion.
This object definition can tell you all about where those n many occurrences are located, and you can ask for that with the OccList() method.