Hi,
I've been trying to delete the connection definitions that do not have any occs from the DB via scripts. While I tested that it works in the normal cases, my piece of code below doesnt work when the connection definitions are due to the connections created in matrix models!
var ObjDefs = ArisData.getSelectedObjDefs();
for(var i=0; i<ObjDefs.length; i++){
var CxnDefs = ObjDefs[i].CxnList();
for(var j=0; j<CxnDefs.length;j++){
var res = CxnDefs[j].Delete(true);
}
}
In case of matrices, this piece of code deletes the cxn definitions even though the occ is in the matrix model.
Anybody who could help me ? ASAP would be great :)
Amol Patil on
Hi Nidhi,
In Matrix model there are no occurrences. Matrix model shows relationships between Object Definitions, and the connections between them are Connection Definitions. This is why your code is deleting the connections. You should add one more check, if the connection equals to the any connection in Matrix model, don't delete it.
Regards,
Amol Patil