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!

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

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
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!
Learn and get certified!