I'm working on an add-on for AC24.
The base of our add-on is the Browser_Control example.
We are selecting an element in the model and we are importing properties information for the selected element.
We cannot create a new Property Group like its done with Property_Test.
API_PropertyGroup group;group.guid = APINULLGuid;group.name = "PROPERTY GROUP NAME" + guid.ToUniString();ACAPI_Property_CreatePropertyGroup(group);
is not working.
Moreover, we would like to set property definition default value to Undefined:
definition.defaultValue.basicValue.variantStatus = API_VariantStatusUserUndefined;
Thank you for your help.
Please make sure that you are calling ACAPI_Property_CreatePropertyGroup in an undoable command scope (ACAPI_CallUndoableCommand).
More information here (check the Undo Scope) section:
Thank you for your answer.
Well I think so. Please find below our code:
This function only shows the palette, it doesn't do any modification in the database. After the palette is opened, the undo scope closes.
You have to wrap the code with ACAPI_CallUndoableCommand where the real modification happens.