cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

Is there a way for an addon to unload itself?

Anonymous
Not applicable
Hi guys.

I was looking to unload the addon itself. But the apx file is locked while the addon is loaded. How could I unload the addon in that case?
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Anonymous
Not applicable
I have found a way: rename the apx. As you can see, ARCHICAD will lock the apx to prevent it from being deleted while running but it WON'T prevent it from being renaming. You can rename it into something like *.apx.old. When ARCHICAD restart, it won't load the *.apx.old but the new apx you download from the server last time. Remember to rename it at the time when ARCHICAD quits.

View solution in original post

8 REPLIES 8
Barry Kelly
Moderator
Use the Add-on Manager in Archicad.
This will allow you to load or un-load add-ons without actually removing the files.

Or close Archicad and you should have full control of the actual file.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Barry wrote:
Use the Add-on Manager in Archicad.
This will allow you to load or un-load add-ons without actually removing the files.

Or close Archicad and you should have full control of the actual file.

Barry.
Is there an API to unload it?
Barry Kelly
Moderator
scandi wrote:
Is there an API to unload it?

Try the Add-on Manager - it is part of Archicad.


It may depend on the add-on you are trying to stop.
If it can't be done here you have to close Archicad and delete or move the file from the add-on folder manually.


Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Barry wrote:
scandi wrote:
Is there an API to unload it?

Try the Add-on Manager - it is part of Archicad.


add_on_manager_2.jpg


It may depend on the add-on you are trying to stop.
If it can't be done here you have to close Archicad and delete or move the file from the add-on folder manually.


Barry.
Thank you! Maybe I haven't explain it clearly: I am writing an addon which should update itself. However, I couldn't find an api to do that. Is there a way to achieve that goal using the given apis?
Barry Kelly
Moderator
scandi wrote:
Thank you! Maybe I haven't explain it clearly: I am writing an addon which should update itself. However, I couldn't find an api to do that. Is there a way to achieve that goal using the given apis?

Yes, sorry I missed that this was in the developer's forum.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Ralph Wessel
Mentor
I don't know any way to do this. Given the way Archicad calls the sequence of CheckEnvironment, RegisterInterface and Initialize during startup, I suspect you wouldn't be able to integrate the update into an active session anyway.

We've written our installer to check if the target version of Archicad is running and ask them to quit first if it is. In the current application structure, I don't think self-updating is possible.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Ralph wrote:
I don't know any way to do this. Given the way Archicad calls the sequence of CheckEnvironment, RegisterInterface and Initialize during startup, I suspect you wouldn't be able to integrate the update into an active session anyway.

We've written our installer to check if the target version of Archicad is running and ask them to quit first if it is. In the current application structure, I don't think self-updating is possible.
OK. Thank you.
Solution
Anonymous
Not applicable
I have found a way: rename the apx. As you can see, ARCHICAD will lock the apx to prevent it from being deleted while running but it WON'T prevent it from being renaming. You can rename it into something like *.apx.old. When ARCHICAD restart, it won't load the *.apx.old but the new apx you download from the server last time. Remember to rename it at the time when ARCHICAD quits.