We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

[SOLVED] Creating property group error -2130312312

Anonymous
Not applicable
Hello,

I'm trying to create a new property group and I get this errorcode -2130312312. I checked the code and it corresponds to this error - "The passed identifier is not subject to the operation."

I'm using the example code from this page - http://archicadapi.Graphisoft.com/documentation/acapi_property_createpropertygroup

Thanks in advance,
Julian
6 REPLIES 6
Regina Judak
Graphisoft Alumni
Graphisoft Alumni
Hi,
Which version of ARCHICAD are you using? I think the problem will be that this function must be undoable and it wasn’t called from an undoable scope. Please check it in your code!
Best, Regina
Anonymous
Not applicable
I'm using Archicad 20, and the problem occurs only in my addin. The function works fine on the Property_test example addin ....
Regina Judak
Graphisoft Alumni
Graphisoft Alumni
Thanks. Have you checked the undoable scope in your addin? In ARCHICAD 20 this error code is returned if there is no undoable scope and you call a function which needs undoable scope. You can check it in the Property_Test example.
Anonymous
Not applicable
Could you please tell if you know how can I check this undoable scope on my add-in, because i'm newbie on archicad and xcode ? : )
Anonymous
Not applicable
Regina, I've resolved this issue by adding ACAPI_CallUndoableCommand() in my MenuCommandHandler(), so this thread can be closed now. Thanks very much for the help !!!!
Regina Judak
Graphisoft Alumni
Graphisoft Alumni
I'm glad that it works now!
Best, Regina