I am hoping someone in the community has an easy answer to this question.
I am trying to obtain all external relationships between models. These are the ones that do NOT have a checkmark next to them in the relationship column of Properties^Relationships. E.g. I only want the bottom three relationships.
I am currently using this code:
aCnxOcc = aObjOcc[j].Cxns(Constants.EDGES_IN); // CxnOcc[] in model; don't care about both directions.
// determine each relationship from an object.
for(var k=0; k < aCnxOcc.length; k++) {
// determine if target object is within the same model use ObjDef from TargetObjDef()
var myObjOccSource = aCnxOcc[k].getSource().getObjDefName(g_nloc); //ObjOcc
var myObjOccTarget = aCnxOcc[k].getTarget().getObjDefName(g_nloc); //ObjOcc
var myCxnDef = aCnxOcc[k].getDefinition();
Thanks,
MR
Hello,
well, if you are reading the cxnoccs of an objocc, you only get those connections of the single occurrence (in this model). If you want to have all connections, you either have to go through the occurrences of the object definition or get the connections of the object definition itself...