cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad C++ API
About Archicad add-on development using the C++ API.

ACAPI_Automate returning REFUSEDCMD error

Anonymous
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?
2 REPLIES 2
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi,

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);


Best,
Tibi
Anonymous
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.

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!