Drawing opening

Discussion in 'AutoCAD' started by Marcel Goulet, Nov 17, 2004.

  1. Hi,

    I can open a drawing using that function: (command "vbastmt" "AcadApplication.Documents.Open \"C:\\Drawing4.dwg\"")

    If I want to use a variable containing the drawing name, how should I write the expression ?

    Thanks
     
    Marcel Goulet, Nov 17, 2004
    #1
  2. Marcel Goulet

    Jeff Mishler Guest

    (setq dwgName "\"C:\\Drawing4.dwg\"")
    (command "vbastmt" (strcat "AcadApplication.Documents.Open " dwgName))
     
    Jeff Mishler, Nov 17, 2004
    #2
  3. Marcel Goulet

    T.Willey Guest

    Here is one I got from this group. I think I might have changed it, but I'm not sure, so I didn't mention that I did in the lisp.

    Tim
    ps. So after posting I noticed I changed the name.


    (defun xr-open-dwg (FileName /)
    ;by Luis Esquivel

    (vl-cmdf "._vbastmt"
    (strcat "AcadApplication.Documents.Open \""
    FileName
    "\"")
    )
    (princ)
    )
     
    T.Willey, Nov 17, 2004
    #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.