Dear community, good day!
I have encountered an unknown error when using the Neighbour() method. Here's the issue: I have two arrays with instances of objects, functionArr and rolesArr. I want to check if there is a connection between each object from the arrays. I am using the following code (example):
for (var i=0;i<SubModelObj.functionsOccs.length;i++){
for(j=0;j<SubModelObj.rolesOccs.length;j++){
Dialogs.MsgBox(SubModelObj.modelInstance.Neighbour(SubModelObj.functionsOccs[i],SubModelObj.rolesOccs[j]).getDefinition().TypeNum());
}
}
The inner loop only runs once, displaying the relationship type number, and then throws an error "An error occurred while executing the script: An error has occurred in the report object model. Cannot save modified objects in read-only mode.".
What could be causing this error and how can I resolve it?