2024-01-26 03:39 PM - last edited on 2024-09-17 01:13 PM by Doreena Deng
Is there a possibility to start an update process or an automatic update?
That means the add-on actually is installed to
c:\Program Files\GRAPHISOFT\Archicad 27\Add-Ons\MyAddOn\MyAddOn.apx
Pressing a button in the AddOn I like to start a process, that replaces the MyAddOn.apx and copies some files to the same folder. After that the Add On should be reloaded and work as before, but with a newer version of the MyAddOn.apx
Is this possible?
2024-01-26 04:29 PM
That's what I am doing right now : )
2024-02-20 06:16 PM - edited 2024-02-20 06:20 PM
Because I have a few utilities that are event driven and that process is captured when anyone on the network starts ArchiCAD, a random 'copy' at a random time during the day will likely result in 'access denied' because that file is being used by another process (ArchiCAD).
How we handle this:
- - put updated .apx files ready for production environment in 'staging' folders (by AC version number) on the network
- - automatically reboot all machines on the network at midnight on Friday night/Saturday morning (which we were doing anyway)
- - at 1:00am on Saturday morning, a scheduled task runs a VB Script file that scans for .apx files in the 'staging' folders and copies anything found to the appropriate version of the production folders (on the network), after making an archive of the previous version.
This relies on nobody working in ArchiCAD in the middle fo the night on Friday night. And so far, has been successful.
All the best -
Chris
2024-02-22 11:00 AM
Hi Martin,
I would say it's not impossible but could be quite tricky. As Chris has already mentioned, it can be especially hard if your Add-On is kept in memory by Archicad for some reason (Event handlers etc.). If you have an Add-On that is automatically unloaded (no event handlers, palettes etc.) then it would be easier probably. Otherwise you have to do some unwinding there maybe. Also I'm not sure how far you can force Archicad to unload certain handlers and palettes. (I have problems unregistering the CatchNewElement handler for example).
With that said, I think the following procedure could work (but I've not tried it myself yet):
Hope that helps,
Bernd
2024-02-28 10:32 PM
Archicad updates are done manually - you have to check if there is new version of the app and/or the library (go to Help --> Check for Updates...). On the other hand Visual Studio does this automatically - you see a notification like this
In both cases you have to close the app and then make the update.
More details on the update - later.