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.

ACAPI_Automate returning REFUSEDCMD error

Not applicable
I'm calling
err = ACAPI_Automate(APIDo_CloseID, NULL, NULL, NULL);
from my menu handler with a new plan open from a template and it returns APIERR_REFUSEDCMD

Is there a way to close the current file?
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni

Unfortunately you can't use APIDo_CloseID from an AddOn, it's not a public operation. That's why it was refused.

I don't know why do you need to close, but maybe the following function can help you:
ACAPI_Database (APIDb_CloseWindowID, API_WindowInfo* windowPars, NULL, NULL);

Not applicable
Thank you.

The Document Management System I'm interfacing with has a close after checkin option which I was trying to honour.
However as the Addon is disabled if the file is closed I've decided to not honour the option.

Thanks again.
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!