Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Property UserUndefined

guillaumeks1
Participant

Hello,

 

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;

is not working.

 

Thank you for your help.

3 REPLIES 3

Viktor Kovacs
Graphisoft
Graphisoft

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:

https://archicadapi.graphisoft.com/Archicad-maze-generator-add-on-tutorial-part-1

Thank you for your answer.

Well I think so. Please find below our code:

guillaumeks1_0-1634303872029.png

 

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.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!