Migrating ACT extension: error message with CreateLoadObject()
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
in Structures
I'm migrating an ACT extension to a newer version of Ansys and I'm getting an error message that CreateLoadObject() takes 2 arguments and only 1 was given:
How do I resolve this?
Tagged:
0
Answers
-
CreateLoadObject() method used to take only one argument: the name of the object to be inserted:
The name of the object that is inserted is defined in the .xml file of the extension:
Now CreateLoadObject() method takes 2 arguments: the name of the custom object that will be inserted, and a reference to the extension. To resolve the error message, add
ExtAPI.ExtensionManager.CurrentExtension
as second argument:Once the extension is refreshed in Mechanical, the error disappears, and clicking on the toolbar button does insert the custom object:
0