Getting a Directory Name

Discussion in 'AutoCAD' started by markash, Apr 7, 2005.

  1. markash

    markash Guest

    Hello All:

    Can anyone share a way that (using LISP) you can prompt a user for a folder (directory) name from a tree similar to the way you'd use getfiled to select a file?

    Thanks...Mark
     
    markash, Apr 7, 2005
    #1
  2. markash

    T.Willey Guest

    T.Willey, Apr 7, 2005
    #2
  3. markash

    Adesu Guest

    Hi markash,you can test my script

    ; od is stand for open drawing
    ; Design by Ade Suharna <>
    ; 8 April 2005
    ; Program no.227/04/2005
    ; Edit by
    (defun c:eek:d (/ fol1 fol2 fil file ao doc vgd)
    (vl-load-com)
    (prompt "C:/YBI/Adesu....example type YBI")
    (setq fol1 (getstring T "\nENTER MAIN FOLDER NAME: "))
    (prompt "C:/YBI/Adesu....example type Adesu")
    (setq fol2 (getstring T "\nENTER SUB FOLDER NAME: "))
    (prompt "C:/YBI/Adesu/title.dwg....example type title")
    (setq fil (getstring T "\nENTER FILE NAME: "))
    (setq file (strcat "c:\\" fol1 "\\" fol2 "\\" fil))
    (setq ao (vlax-get-acad-object))
    (setq doc (vla-get-activedocument ao))
    (setq vgd (vla-get-documents ao))
    (vla-open vgd file)
    (princ)
    )



    folder (directory) name from a tree similar to the way you'd use getfiled to
    select a file?
     
    Adesu, Apr 8, 2005
    #3
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.