Path of loaded application

Discussion in 'AutoCAD' started by WBaxter, Aug 13, 2003.

  1. WBaxter

    WBaxter Guest

    Is there a function in either lisp or vlisp which will report the pathname
    that a given app was loaded from. In VB6 it is simply 'Path = App.Path'. I
    want to be able to have external configuration files residing with the
    program, but with all the ways to load a program, I don't know where to have
    the program look for the configuration files if they are not in a directory
    that is specifically on the Autocad search path.

    I found the 'FullName Property' on ActiveX - VBA help but is there a way to
    access that from Lisp or Vlisp?
     
    WBaxter, Aug 13, 2003
    #1
  2. WBaxter

    Murph Guest

    (findfile filename)

    Murph
     
    Murph, Aug 13, 2003
    #2
  3. WBaxter

    WBaxter Guest

    What if it is in a directory not specifically included on the Autocad search
    path? Like it was loaded with the Load Application dialog using the
    file-browse technique.
     
    WBaxter, Aug 13, 2003
    #3
  4. WBaxter

    Murph Guest

    We have to wait and see if anyone else replies that the only one I can think
    of right now.

    Murph
     
    Murph, Aug 13, 2003
    #4
  5. No but there is a function in ObjectARX that wil ldo this for you.
    Fortunately, it's already been gift-wrapped in DOSLIB.ARX.
     
    Frank Oquendo, Aug 13, 2003
    #5
  6. WBaxter

    WBaxter Guest

    I found it.

    From the DosLib help:

    Command: (dos_lisplist t)

    ("C:\\Program Files\\AutoCAD 2002\\express\\acetutil.fas" "C:\\Program
    Files\\AutoCAD 2002\\express\\acetauto.LSP" "C:\\Program Files\\AutoCAD
    2002\\support\\acettest.fas" "C:\\Program Files\\AutoCAD
    2002\\support\\legacy\\dwfout\\dwfout.lsp" "C:\\Program Files\\AutoCAD
    2002\\support\\acad2000.FAS" "C:\\Program Files\\AutoCAD
    2002\\support\\acad2000doc.FAS" "C:\\Program Files\\AutoCAD
    2002\\Support\\acad.mnl" "C:\\Program Files\\AutoCAD
    2002\\express\\acetmain.mnl")

    I haven't tried it yet but DosLib has never let me down yet.

    Thank you

    By the way, if anyone is a binary person they will agree that your statement
    is clever.
     
    WBaxter, Aug 13, 2003
    #6
  7. Simply finding a file in a given location with a matching name is no
    guarantee you've found the file that was actually loaded.
     
    Frank Oquendo, Aug 13, 2003
    #7
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.