JCEP2019 Posted February 7, 2019 Posted February 7, 2019 We have some customized printing buttons and lisp routines that load during our ACAD startup for our users here. This was working fine in our previous rollout (2014 ACAD, I know, it's been a while). We are in the process of trying to roll out 2018 and when we open ACAD either by running the program, or opening a drawing, the customizations called for in the ACAD.DVB file simply won't load. However, when we then open another drawing, either by opening a new drawing in ACAD, or opening another existing CAD file, the ACAD.DVB processes and loads all our stuff just fine. We simply cannot get it to load on initial startup for some reason. I can provide logs/info or anything else that will help us get this ironed out (as long as you tell me what logs/info you are looking for).. Some stuff we have tried already- ACAD.DVB is located- "C:\Program Files\Autodesk\AutoCAD 2018\Support\ACAD.DVB" "C:\Program Files\" was located in the Trusted Paths list, but I also just tried adding "C:\Program Files\Autodesk\AutoCAD 2018\Support\" and this did not correct the issue. I then moved the "c:\program files\autodesk\autocad 2018\support\" from #2 position to #1 position in the Support File Search Path and this also did not correct the issue. If we load the dvb using VBAMAN, then go to Tools>References, no references show as MISSING. Thanks! Josh Quote
bigr1822 Posted April 3, 2019 Posted April 3, 2019 Hi, couple questions. After you launch Autocad, go to "Load Applications". Select the Contents button in the lower right corner. Do you see your DVB file? I sounds to me like you might be using a lisp routine when it works after you open a drawing. Check to see if you have a lisp file called acaddoc.lsp in your support folder. That gets called every time a drawing gets opened. acad.lsp gets called at initial launch of Autocad. Hope I didn't misunderstand your question. Rod Quote
RougeJedi Posted June 10, 2019 Posted June 10, 2019 If you want to automate this open your acaddoc.lsp file and add the following... (vl-load-com) (defun _CheckAddTrustedPath (newPath / trusted) (if (and (setq trusted (getvar 'trustedpaths)) (not (vl-string-search newPath trusted)) ) (setvar 'trustedpaths (strcat (vl-string-right-trim ";" trusted) ";" newPath) ) ) ) (defun vl-unload-com ( ) (mapcar (function (lambda (a) (set a nil))) (vl-remove-if-not (function (lambda (a) (wcmatch (strcase (vl-symbol-name a)) "VLAX-*,VLA-*,VLR-*"))) (atoms-family 0) ) ) (princ "\nYour VBA Module is now unloaded.") (princ) ) This only needs to be added once. I believe I got these from Lee Mac. Thanks, dude! These are the functions that load and unload your DVB files. Next, paste the following code in the same file after the functions above. (defun C:acad () 'Defines the command (vl-load-com) 'calls the load function above (vl-vbarun "acad.dvb!Show_Userform") 'loads your DVB file and shows the userform (princ) (vl-unload-com) 'when your command ends the function is unloaded ) That's it for your acaddoc file. The last thing is a function in your DVB file. Sub Show_Userform() Show_Userform1.show End Sub this is the function that gets called from the load function. HTH Quote
Arthurian Posted October 22, 2019 Posted October 22, 2019 See the ADD button in the "Startup Suite" window? You can use it to add ACAD.DVB, and bypass all the LISP file stuff. But, oh man, it took me all afternoon to figure that out! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.