Does someone have a quick solution for converting this old lisp routine to arx?
(if (member (quote "My_Acad.arx") (arx)) (arxunload "My_Acad"))
Is there a better way than looping through a resbuf from acedArxLoaded() then using acedArxUnload()?
Thanks,
Ed
Solved! Go to Solution.
Solved by owenwengerd. Go to Solution.
There are other ways, but not necessarily better. If you know the module name, you don't need to check whether it's loaded. If the module registers a service, you can check for the service registration to determine whether or not it's loaded. There is no "best" way.
I've updated what I have, and some of you may find this handy so I'm attaching some files. I use this to unload my ARX applications, usually and mostly when I'm adding new code or otherwise debugging. My ARX files all start with "EMD13_", and the one I use for this application is "EMD13_Utilities.arx". You'll have to edit those lines to make it work for you. I'm including "EMDUnload.cpp.txt", "EMDUnload.h.txt" (remove the .txt - this post won't accept .h and .cpp) and a file called "MyDialog.txt" which is a cut and paste from my *.rc file which you can use to quickly create the dialog. It has a CListCtrl for the file names, a "Select All" button, an "Unload Selected Applications" button, and OK and Cancel.
I welcome any and all comments, criticisms, suggestions and improvements.
Enjoy,
Ed