2023-01-23 05:38 PM
Dear GS-Community,
I've been working on an AddOn, but im having trouble with the Palettes in ArchiCAD. I tried to copy code from DG_Test Example AddOn where a Palette was built (->OwnerDrawnListBox). But when i execute my AddOn, the Palette instantly disappears. When I compile and execute the example AddOn it works fine, but for my AddOn it doesn't. I copied the Code for "FreeData()" and "Initialize()" into the AddOnMain, but that also didn't make a difference.
How can the Example AddOn work but when i copy everything into my AddOn, it just disappears.
Did anyone had the same problem or knows whats going on?
I put my Code in a zip, you'll find my AddOnMain, my DialogTable and Graphisofts OwnerDrawnListBoxPalette.
Thanks for any Help
Kind Regards
Dayiz
Solved! Go to Solution.
2023-01-23 10:15 PM
I would try to replace the return value of CheckEnvironment from APIAddon_Normal to APIAddon_Preload. This will make your add-on preloaded which means it will be kept in the memory during the entire Archicad session. Normal add-ons are loaded/unloaded every time they used, so this can be the cause of your palette disappearing immediately (the add-on is just unloaded after the call).
2023-01-23 10:15 PM
I would try to replace the return value of CheckEnvironment from APIAddon_Normal to APIAddon_Preload. This will make your add-on preloaded which means it will be kept in the memory during the entire Archicad session. Normal add-ons are loaded/unloaded every time they used, so this can be the cause of your palette disappearing immediately (the add-on is just unloaded after the call).
2023-01-25 11:27 AM
That worked, thank you!