cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum
GDL coding questions, Python and add-on development using the API Dev Kit.

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
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 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

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 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

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 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

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

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.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!