Xem kết hợp Flat Xem Xem cây
Luồng thảo luận [ Trước | Tiếp theo ]
toggle
Error when trying to CREATE_OBJ
Câu trả lời
13:13 06/08/2019
Hello, 

I encountered the following problem when using the CREATE_OBJ command.
1CC "Modeling" GET_ACT_MODEL   
2CC "Core" debug CREATE_OBJ modelid: (modelid) class: (holdsAt_classid)

The holdsAt_classid is set in the "AppInitialized" event as a global variable. I have used it succesfully in other places in the code when I wanted to generate an Instance of the class HoldsAt. The class HoldsAt is included in 2 different modeltypes. On the first of those 2 modeltypes, the command CREATE_OBJ has run succesfully, but on the second modeltype, when I execute the above, it throws the following error - INSTANCEOWNER_NOT_EXISTING:

Is there any suggestion as to what might be the problem?
Đính kèm

Các đính kèm: error.png (4,8k)

RE: Error when trying to CREATE_OBJ
Câu trả lời
08:33 12/08/2019 gửi bài phản hồi tới Nena Basina.
Dear Nena,

In your case the error message is because the parameters for the CREATE_OBJ function are incomplete. The parameters for the CREATE_OBJ functions are modelid, classid and objname (see: https://www.adoxx.org/AdoScriptDoc/files/Message_Ports/Manipulation_APIs/Core/CREATE_OBJ-js.html#CREATE_OBJ). Furthermore this error can also occur if you try to create an object of a class which is not included in the specific modeltype.

RE: Error when trying to CREATE_OBJ
Câu trả lời
11:53 26/08/2019 gửi bài phản hồi tới Mateusz Dziedzic.
OK, I feel stupid right now. No matter how many times I looked at it, I didn't notice the misspell. emoticon 

Thank you, a second pair of eyes is much needed sometimes!