BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

definition Default Value

poco2013
Mentor
Just completed a snippet which changes the Default Value of some Definitions.

I used the function ACAPI_Property_ChangePropertyDefinition, however, that function failed. i seems it has to be wrapped in a undoable callback. ACAPI_callUndoableCommand.

As i look at the other examples in Property_Test none of the other functions need this call back, even to change the definition name.

Wondering why this particular restriction is necessary and is there any work around if I don't need to undo?
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Ralph Wessel
Mentor
I took a quick look and it appeared that all the property tests are called from within APIMenuCommandProc_Main, which embeds all these tests in ACAPI_CallUndoableCommand
Ralph Wessel BArch

View solution in original post

2 REPLIES 2
Solution
Ralph Wessel
Mentor
I took a quick look and it appeared that all the property tests are called from within APIMenuCommandProc_Main, which embeds all these tests in ACAPI_CallUndoableCommand
Ralph Wessel BArch
poco2013
Mentor
Hey Ralph:

Thanks for the heads up. I would of never thought to look there.

Learned something today --- Thanks
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Learn and get certified!