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!

ACAPI_CallUndoableCommand()

Anonymous
Not applicable
Hi there!
In my code, ACAPI_CallUndoableCommand(undoBuffer,
[&]() -> GSErrCode {
*************************
return GS::GSErrCodes::NoError;
});
function returns always with " -2130312312 " error code, where undoBuffer is "char[256]" set by ACAPI_Resource_GetLocStr() function.
Have you got an idea what can cause that type of error?
I couldn't get closer by checking API documentation of ACAPI_CallUndoableCommand.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Ralph Wessel
Mentor
In what context are you making the call, e.g. in response to a menu callback?
Ralph Wessel BArch
Software Engineer Speckle Systems

View solution in original post

2 REPLIES 2
Solution
Ralph Wessel
Mentor
In what context are you making the call, e.g. in response to a menu callback?
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Hi!
I reallised that my function call going through on a ACAPI_CallUndoableCommand() before the second call. I belive that the second call is unnecessary and it cause the error. You highlighted the point, thanks for that.

Have a good day!