Autolisp open file

Status
Not open for further replies.

VL

Usenet Archive
Joined
Jan 10, 2002
Messages
33
Reaction score
0
IS anyone can give me some comment on how to open and read a file to Autocad through AutoLISP

VL
 
Which version of AutoCAD? There's quite a difference, whether you're using R14 or earlier, or A2K or later, with MDI enabled.
___

"VL" wrote:

IS anyone can give me some comment on how to open and read a file to
Autocad
through AutoLISP
 
It is possible if SDI is set to 1; but then you can't open multiple drawings in a single session. Another solution, originally suggested by Frank Whaley of Autodesk, I believe, would be the following:

(defun cmdOpen (name)
(vl-load-com)
(if (= 0 (getvar "SDI"))
(vla-activate (vla-open (vla-get-documents (vlax-get-acad-object)) name)) (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) (strcat "(command \"_.OPEN\")\n" name "\n") ) )
)

"VL" wrote:

IS anyone can give me some comment on how to open and read a file to
Autocad
through AutoLISP

VL
 
Status
Not open for further replies.

Latest threads

Back
Top