VLX Loading

Discussion in 'AutoCAD' started by tstright, Mar 23, 2005.

  1. tstright

    tstright Guest

    I've done a search and am still confused....

    I have a .mnl that autoloads a few lisp routines, I'm trying to load a .vlx and I can't seem to get it to load.

    I've tried (autoload "xxxx.vlx" '(xxxx")) and (load "xxxx.vlx" "") and am still batting zip.....


    Any help would be welcomed...
     
    tstright, Mar 23, 2005
    #1
  2. (load "xxxx.vlx") should work, but the file must be in your search path, otherwise you must include the path (load "c:/dir/xxxx.vlx").

    Jesse
     
    Jesse_Pickrum, Mar 23, 2005
    #2
  3. tstright

    tstright Guest

    I have the vlx in the same folder as my other lisps and that folder is in the search path. So I'm confused why it's not loading.
     
    tstright, Mar 23, 2005
    #3
  4. Is the mnl file loading?
     
    Jesse_Pickrum, Mar 23, 2005
    #4
  5. tstright

    tstright Guest

    Yes, everything else is working just like it should.

    This is my first time working with vlx files
     
    tstright, Mar 23, 2005
    #5
  6. Does it load and work if you load it at the command line?
     
    Jesse_Pickrum, Mar 23, 2005
    #6
  7. tstright

    tstright Guest

    Works fine if I use the appload command
     
    tstright, Mar 23, 2005
    #7
  8. I'm confused also. Using appload forces you to choose the physical location. Try typing this at the command line (load "xxxx.vlx"), press enter then press "F2" and see if it loaded or if there were any errors.
     
    Jesse_Pickrum, Mar 23, 2005
    #8
  9. tstright

    tstright Guest

    This is what I get


    Command: (load"xxxx.vlx")
    ; error: LOAD failed: "xxxx.vlx"
     
    tstright, Mar 23, 2005
    #9
  10. Then the file is not in your search path. Is "xxxx.vlx" the actual file name?
     
    Jesse_Pickrum, Mar 23, 2005
    #10
  11. tstright

    tstright Guest

    xxxx.vlx is not the name but the file is in a folder that is in the working and support directories. Autocad finds the other .lsp files that are in this very folder.
     
    tstright, Mar 23, 2005
    #11
  12. try (load"actualfilename.vlx) at the command line.
     
    Jesse_Pickrum, Mar 23, 2005
    #12
  13. tstright

    tstright Guest

    Ok, I got to start working......

    I moved the (load"filename.VLX" "") up in the list above the (AUTOload "file" '("file")) line and it seems to be loading fine now.

    Thanks for your help. I was ready to shoot someone here....lol
     
    tstright, Mar 23, 2005
    #13
  14. tstright

    Tom Smith Guest

    I moved the (load"filename.VLX" "") up in the list above the (AUTOload "file" '("file")) line and it seems to be loading fine now.

    That implies to me that your autoload line is failing, otherwise it shouldn't matter if a load is after an autoload. You still need to look at that autoload line.

    As far as autoloading a vlx, it's been discussed before. Up through 2004 at least. Acaad still hasn't fixed a significant oversight -- the autoload function doesn't accomodate fas or vlx files.

    What you need to do is redefine one function from the acad####doc.lsp file to allow autoloading these files. Somewhere in your startup sequence (I do it in an mnl file) add the following:

    (defun ai_ffile (app)
    (or (findfile (strcat app ".lsp"))
    (findfile (strcat app ".exp"))
    (findfile (strcat app ".exe"))
    (findfile (strcat app ".arx"))
    (findfile (strcat app ".fas"))
    (findfile (strcat app ".vlx"))
    (findfile app)))

    Then you can autoload fas and vlx files just like lsp files.
     
    Tom Smith, Mar 23, 2005
    #14
  15. tstright

    tstright Guest

    Thanks for the tip.

    I added that to my .mnl
     
    tstright, Mar 23, 2005
    #15
  16. I just include the extension in the autoload file. Instead of just "myvlx" simply use "myvlx.vlx"
     
    Jesse_Pickrum, Mar 23, 2005
    #16
  17. tstright

    Tom Smith Guest

    I'll have to search my memory on this -- apparently that will indeed work in Acad 2004, but I'm pretty sure it didn't in previous versions, otherwise there would have been no need for this workaround. Then, autoload would choke in a nasty way if you fed it a fas or vlx extension. This came about when vlisp appeared with the new file types, and it was discussed in NG's for whatever version that was.
     
    Tom Smith, Mar 23, 2005
    #17
  18. another form to load a VLX and not having it on the support search path is
    to make it as a protected separate namespace [standard] and place the
    following on the top of the primary file loaded [project list - prj]

    (vlax-ldata-get "mydictionaryname" "mykeyname" nil t)

    then load the vlx... save the drawing, and the next time that drawing is
    opened, it will load automatically the vlx.

    note: make a back-up of a drawing to perform a test first... study on how to
    get rid of this type of dictionaries, once you feel comfortable.... and like
    it.... try it on normal drawings..


    hth
    LE


    in Acad 2004, but I'm pretty sure it didn't in previous versions, otherwise
    there would have been no need for this workaround. Then, autoload would
    choke in a nasty way if you fed it a fas or vlx extension. This came about
    when vlisp appeared with the new file types, and it was discussed in NG's
    for whatever version that was.
     
    Luis Esquivel, Mar 23, 2005
    #18
  19. tstright

    tstright Guest

    A big thanks to all....

    This NG has taught me alot in the last few months...
     
    tstright, Mar 24, 2005
    #19
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.