Hi,
I need help with this: I'm trying to create a new occurrence from an object definition like this
var newOccurrence = model.createObjOcc(symbol,objDef,origOcc.X(),origOcc.Y());
All those variables exist and are, I think, correct. But my occurrences are not created. And debugging I realized that my variable, new Occurrence, is invalid. It is like this: Aris Object (invalid).
So I think that something is wrong with the creation, maybe with one of my parameters. Anyone have experienced something like this?
thanks in advance,
Rafael
Hi Rafael,
you have to check if the symbol type is allowed for your object definition and model. Next check if the object type of the object definition is allowed for the model type of your model definition. Use the ARIS method help.
Last. Try to set the position parameters to zero or 1:
var newOccurrence = model.createObjOcc(symbol,objDef,1,1);
Regards,
Jens
Hi Jens, thanks for your response. I verified what you said. But I think everything is allright, because my symbolNum() is coming from another occurrence of an object which is exactly the same that I'm trying to create. And The object definition is fine, cause I'm also creating it via script, and it is created fine.
I tried setting the position to (1,1), but I still get the (invalid) thing.
My scenario is like this: I have to create, via script, an "AND" object in an "EPC" model. Besides, I have to create an occurrence of this new object, based on another occurrence within the same model. Later, I will remove the old occurrence. So the symbolNum and the position parameters are coming from this old occurrence. I'm getting the symbolNum like this: "oldOccurrence.SymbolNum()", which appears to be correct.
Any ideas?
Hello,
I came across the same issue. I have a script that is working well evaluating some objects, On process interfaces however it gave me partly above issue.
Who knows what might be additional reasons for not being able to create occurrences apart from the above mentioned?
I am using ARIS version 97.0.0.958093. Thanks for your answers!
Christian