button to open a specify path

Discussion in 'AutoCAD' started by Sepultallica, Mar 15, 2005.

  1. Sepultallica

    Sepultallica Guest

    how I can make a button that can open a specify directory...like if I want to click a button and open C:\Windows
    I've to add a macro into the button settings..wich macro?

    PS: I use Autocad 2005

    Thanks

    Chris
     
    Sepultallica, Mar 15, 2005
    #1
  2. Sepultallica

    TRJ Guest

    What application would you want to have open the folder? AutoCAD, Firefox,
    Oracle???

    to click a button and open C:\Windows
     
    TRJ, Mar 15, 2005
    #2
  3. Sepultallica

    Sepultallica Guest

    make a button into Autocad to open a path..(Autocad 2005)
     
    Sepultallica, Mar 15, 2005
    #3
  4. Sepultallica

    hmsilva Guest

    Hi
    Try this:

    (DEFUN C:eek:penx ()
    (setq FILNAM (getfiled "Open File" "C:\\Teste2\\" "dwg" 2 ))
    (command "_.VBASTMT" (strcat "AcadApplication.Documents.Open \"" FILNAM
    "\""))
    )

    Then create a button: ^C^C_openx

    cheers

    Henrique
     
    hmsilva, Mar 15, 2005
    #4
  5. ^C^Cstart c:/01-Paul;
     
    Paul Richardson, Mar 15, 2005
    #5
  6. Sepultallica

    doug k Guest

    or my personal favorite

    (STARTAPP(strcat "EXPLORER c:"))

    change the "c:" to the desired drive/folder
     
    doug k, Mar 15, 2005
    #6
  7. if anyone wants to do the same from
    a Desktop icon...I got sick of going
    to "Documents and Settings...."

    %SystemRoot%\explorer.exe /e, c:\01-Paul
     
    Paul Richardson, Mar 15, 2005
    #7
  8. Sepultallica

    Sepultallica Guest

    thanks to all for the replies...

    Just tried (STARTAPP(strcat "EXPLORER c:"))

    But this doesn't work if I change C: with the directory I need, because it's a LAN directory on an HD on LAN.
    It's normal that doesn't work?
     
    Sepultallica, Mar 16, 2005
    #8
  9. Sepultallica

    hmsilva Guest

    Hi...

    See my post...

    Then change:

    (DEFUN C:eek:penx ()
    (setq FILNAM (getfiled "Open File" "//COMPUTER NAME ON LAN/HD SHARE NAME/FOLDER/FOLDER/" "dwg" 2 ))
    (command "_.VBASTMT" (strcat "AcadApplication.Documents.Open \"" FILNAM
    "\""))
    )

    It works

    Cheers

    Henrique
     
    hmsilva, Mar 16, 2005
    #9
  10. Sepultallica

    Sepultallica Guest

    Hi there, thanks again for the reply...

    Just tried your macro...but doesn't work (for me)...

    THe directory I've to add it's this:

    N:\ITC\ATG-GbC\5000 Progetto appalto\Lotto 851 - Opere sotterranee FIS CAOP\Bozza 2\III C

    N: is the HD on the server...the ITC directory have this path if I look under the LAN resources

    \\NAS\Dati NAS\DATI\ITC

    So I tried to modify your macro like this:

    ^C^C(DEFUN C:eek:penx ()^M;(setq FILNAM (getfiled "Open File" "//NAS/Dati NAS/DATI/ITC/ATG-GbC/5000 Progetto appalto/Lotto 851 - Opere sotterranee FIS CAOP/Bozza 2/III C" "dwg" 2 ))^M;(command "_.VBASTMT" (strcat "AcadApplication.Documents.Open \"" FILNAM^M;"\""))^M;)

    But that's what I get on Autocad..:

    Comando: (DEFUN C:eek:penx ()
    (_>
    (_> (setq FILNAM (getfiled "Open File" "//NAS/Dati NAS/DATI/ITC/ATG-GbC/5000
    Progetto appalto/Lotto 851 - Opere sotterranee FIS CAOP/Bozza 2/III C" "dwg" 2
    ))
    (_>
    (_> (command "_.VBASTMT" (strcat "AcadApplication.Documents.Open


    And finally I can't open the directory...what I've to do?

    Thanks
    Chris
     
    Sepultallica, Mar 16, 2005
    #10
  11. Sepultallica

    hmsilva Guest

    Hi Chris

    You have to create a lisp file “openx.lsp like this:

    (DEFUN C:eek:penx ()
    (setq FILNAM (getfiled "Open File" "//N:/ITC/ATG-GbC/5000 Progetto appalto/Lotto 851 - Opere sotterranee FIS CAOP/Bozza 2/III C/" "dwg" 2 ))
    (command "_.VBASTMT" (strcat "AcadApplication.Documents.Open \"" FILNAM
    "\""))
    )

    Then you have to put the lisp file in your “startup suiteâ€

    Then create a button with this macro ^C^C_openx

    Cheers

    Henrique
     
    hmsilva, Mar 16, 2005
    #11
  12. Sepultallica

    jlspartz Guest

    Maybe you just need to use the UNC path. That means, not H:\CAD\ but rather \\cadserver\cad where cadserver is the name of the computer on the network. To get the UNC path, go through network neighborhood and find it and then use THAT path.
     
    jlspartz, Mar 18, 2005
    #12
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.