lsp file path

Discussion in 'AutoCAD' started by Remyga, Jun 18, 2004.

  1. Remyga

    Remyga Guest

    Hi all,
    Sorry for maybe stupid question. I have lisp file for exapmple go.lsp and in code I need file path to it how can I get it?? lsp maybe not in support path.

    Thanks
     
    Remyga, Jun 18, 2004
    #1
  2. Remyga

    zeha Guest

    with
    (vl-load-com)
    (vla-get-supportpath (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))))
     
    zeha, Jun 18, 2004
    #2
  3. Remyga

    Remyga Guest

    Sorry maybe I asked not clear I dont need a Acad support path's I need only a path of my *.lsp file, because I have to read from file, which is in the same directory as my .lsp file.

    Thanks
     
    Remyga, Jun 18, 2004
    #3
  4. Remyga

    ECCAD Guest

    Look under Tools..Load Application..Loaded Applications (tab). Find your go.lsp, see the Path there.

    Bob
     
    ECCAD, Jun 18, 2004
    #4
  5. Remyga

    zeha Guest

    Try it with (dos_lisplist t) from Robert Mcneel

    DOSLib, or DOS Library, is a library of AutoLISP/Visual Lisp-callable functions that provides a variety of Windows operating system capabilities to AutoCAD. Written as an AutoCAD ObjectARX application, DOSLib extends the AutoLISP and Visual LISP programming languages by providing the following functionality:


    Example

    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")


    Good luck,

    Harrie
     
    zeha, Jun 18, 2004
    #5
  6. Remyga

    ECCAD Guest

    This uses older versions of DosLib, also works with R2004/R2005.

    (defun find_me ( fname / dir ddir dir_lst ddir_lst )
    (setq dir_lst (dos_subdir "C:")); get sub-directory list
    (foreach dir dir_lst
    (setq ddir_lst (dos_subdir (strcat "C:/" dir)))
    (if ddir_lst
    (progn
    (foreach ddir ddir_lst
    (setq cf nil)
    (setq cf (dos_search fname (strcat "C:/" dir "/" ddir)))
    (if cf
    (progn
    (princ (strcat "\n" cf))
    (setq return (cons cf return))
    ); progn
    ); if
    (if Return
    (setq return (reverse return))
    ); if
    ); foreach
    ); progn
    ); if
    ); foreach
    ); defun
    ;; Variable Return = 'list' of all folders containing matched filename
    ;;
    ;; Usage: (find_me "go.lsp")

    Cheers,
    Bob

    www.bobscadshop.com
     
    ECCAD, Jun 18, 2004
    #6
  7. Remyga

    Adesu Guest

    Try this
    Click tools > Options > Files > Support Files Search Path > Add > Create
    folder as you want find it.
    Generally if DCL file & LSP file not yet put in the folder "Support",it
    can't run.

    ????????????????????????????????????????????????> Sorry maybe I asked not
    clear I dont need a Acad support path's I need only a path of my *.lsp file,
    because I have to read from file, which is in the same directory as my .lsp
    file.
    (vlax-get-acad-object))))
     
    Adesu, Jun 23, 2004
    #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.