Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I try to use ACISOUT on another drawing, wich im opening with my lisp.
Here is the code i have:
(defun c:test123 (/ doc)
(setq doc (myOpen "Z:\\Temp\\Drawing3.dwg"))
(vla-sendcommand doc "(command \"ACISOUT\" \"_all\" \"\" (getfiled \"Save file\" \"\" \"sat\" 1)) ")
(princ)
)
(defun myOpen (filename) ;opens drawing
(vla-open
(vla-get-documents (vlax-get-acad-object))
filename
(if (fileOpenp filename)
:vlax-true
:vlax-false
)
)
)
(defun fileOpenp (file / f) ; cecks if file is Opened
(if (setq f (open file "a"))
(close f)
t
)
);defun
Problem is this line is not working:
(vla-sendcommand doc "(command \"ACISOUT\" \"_all\" \"\" (getfiled \"Save file\" \"\" \"sat\" 1)) ")
i have also tried using getfiled before vla-sendcommand and then put it together like a script within vla-sendcommand wich looked like this but also didnt work correctly.
(defun c:test123 (/ *error* filedia doc file)
(defun *error* (msg)
(if filedia (setvar "Filedia" filedia))
(princ (strcat) "Error: " msg)
(princ)
)
(setq fieldia (getvar "filedia"))
(setvar "filedia" 0)
(setq doc (myOpen "Z:\\Temp\\Drawing3.dwg"))
(setq file (getfiled "Save file" "" "sat" 1))
(vla-sendcommand doc (strcat "ACISOUT " "_all " file " "))
(setvar "filedia" filedia)
(princ)
)
Solved! Go to Solution.