open on specific folder

Discussion in 'AutoCAD' started by n.almeida, Mar 1, 2005.

  1. n.almeida

    n.almeida Guest

    I have this for making a block
    "wblock" "~" "" "NON" "0,0,0" "previous" ""
    ~ open the dialog box but: can I force it to open on a specific folder, instead of the last used?

    Thanks, n__o
     
    n.almeida, Mar 1, 2005
    #1
  2. n.almeida

    dblaha Guest

    You can do this pretty easily with DOSLIB.

    You can find it at: www.mcneel.com

    Dave
     
    dblaha, Mar 1, 2005
    #2
  3. n.almeida

    n.almeida Guest

    Sorry for a basic question
    How do I "install" it?
    What's the difference between doslib15 and 16?
    The help file only have help on the functions.

    thanks
     
    n.almeida, Mar 2, 2005
    #3
  4. n.almeida

    Vxc Guest

    Oi N.Almeida és Português ?
     
    Vxc, Mar 2, 2005
    #4
  5. n.almeida

    dblaha Guest

    You install DOSLIB by placing the ARX file somewhere in your AutoCAD search path (such as in the SUPPORT subfolder) and then load it from within AutoCAD via the ARX command. As far as versions are concerned, I always recommend using the most recent unless it is not compatible with your version of AutoCAD.

    Dave
     
    dblaha, Mar 2, 2005
    #5
  6. n.almeida

    n.almeida Guest

    Sim
     
    n.almeida, Mar 3, 2005
    #6
  7. n.almeida

    n.almeida Guest

    Hi Dave
    Thanks.
    I have really basic knowledge.
    This is what I was trying to do:
    (DEFUN C:XAA ()
    (COMMAND "XREF" "overlay" "~"
    "0,0,0" "1" "1" "0"))
    the "~" calls for the dialog box. What I wished is that it opens on a specific folder(say C:\Project1\Xref).
    Maybe you can help me?

    Thanks

    I am not really sure how to use the DOSLIB features.
     
    n.almeida, Mar 3, 2005
    #7
  8. n.almeida

    dblaha Guest

    I just realized that DOSLIB is not necessary to do what you're looking for. DOSLIB has many functions that are very handy for AutoLisp programmers, but in this case all you need it the GETFILED autolisp function. Try this:

    (DEFUN C:XAA ()
    (COMMAND "XREF" "overlay" (getfiled "Select the Xref" "C:\Project1\Xref/" "dwg" 8) "0,0,0" "1" "1" "0")
    )


    Dave
     
    dblaha, Mar 3, 2005
    #8
  9. n.almeida

    n.almeida Guest

    Dave
    I was looking on the wrong chapter, it seems to work like this. Could you (or some one) have a look for mistakes.
    (DEFUN C:XAA ()
    (PROMPT "XREF special Arnhem Algemeen - insertion point= 0,0,0 in UCS-World")
    (COMMAND "Undo" "Be"
    "UCS" "WORLD"
    "OSNAP" "NON")
    (setq xaa (dos_getfiled "Select xref" "N:\\Project1\\Xrefs\\" "Drawing files (*.dwg)|*.dwg|All files (*.*)|*.*||"))
    (COMMAND "XREF" "overlay" xaa
    "0,0,0" "1" "1" "0"
    "OSNAP" "END,INT,MID,NOD"
    "UCS" "PREV"
    "Undo" "E"))
     
    n.almeida, Mar 3, 2005
    #9
  10. n.almeida

    n.almeida Guest

    Thanks
    Sorry I hadn't refreshed my web browser before I posted the other message.
    This seems indeed easier and I can share it with my colleagues without having to tell them to load DOSLIB.

    Thanks again.
     
    n.almeida, Mar 3, 2005
    #10
  11. n.almeida

    hmsilva Guest

    Hi n.almeida

    Try this

    (DEFUN C:XAA ()
    (COMMAND "XREF" "overlay" (getfiled "file name" "C:\\Project1\\Xref\\" "dwg" 8)
    "0,0,0" "1" "1" "0")
    (PRINC)
    )

    Cumprimentos

    Henrique
     
    hmsilva, Mar 3, 2005
    #11
  12. n.almeida

    n.almeida Guest

    Henrique
    Percebo pouco destas coisas. para que serve o Princ no fim?
     
    n.almeida, Mar 8, 2005
    #12
  13. n.almeida

    hmsilva Guest

    Vai ao
    Já ajuda...

    Henrique
     
    hmsilva, Mar 8, 2005
    #13
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.