ACISOUT with vla-sendcommand

ACISOUT with vla-sendcommand

EnM4st3r
Advocate Advocate
222 Views
1 Reply
Message 1 of 2

ACISOUT with vla-sendcommand

EnM4st3r
Advocate
Advocate

 

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)
)

 

0 Likes
Accepted solutions (1)
223 Views
1 Reply
Reply (1)
Message 2 of 2

EnM4st3r
Advocate
Advocate
Accepted solution

ok im just using insert now.. much easier than doing stuff in a new drawing

0 Likes