Jump to content
JCEP2019

ACAD.DVB File will not load on initial ACAD startup in 2018 ACAD

Recommended Posts

JCEP2019

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

Share this post


Link to post
Share on other sites
bigr1822

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? 

 

image.png.eff124d25dedc6c88d90aea2c9456c77.png

image.png.9d591ed4cacdbf688b0c1ad78f90ef18.png

 

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

 

image.png

Share this post


Link to post
Share on other sites
RougeJedi

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

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...