scotty595's picture

Hi All,

I'm trying to understand ARIS script a little more, I've been looking through the Script help file and have come across:

getParentObjOcc()

According to the help this is: "Objects in objects: Returns the object in which this object occurrence is contained."

I'm trying to understand how a object gets "contained" within another? I've imported some visio diagrams, and I've created a simple report to try and automatically create connections based on the objects contained in another object. 

The code so far is as follows:

  var objects = ArisData.getSelectedObjOccs();
 for(var i=0; i<objects.length; i++ )
 {
        objects[i].ObjDef().CreateCxnDef(objects[i].getParentObjOcc().ObjDef(), 283) 
 }

 

The issue I have is that it works on some of the diagrams which I have previously played around with, but on the freshly imported models it doesn't return an ObjDef from getParentObjOcc().

Any ideas?