vla-sendcommand in a script

vla-sendcommand in a script

gcsjlewis
Collaborator Collaborator
869 Views
1 Reply
Message 1 of 2

vla-sendcommand in a script

gcsjlewis
Collaborator
Collaborator

Can someone help me with the following:

 

;;file#1 is a notepad document

 

(princ   (strcat "\"" (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "resume") "\"") File#1)

 

I'm getting an error for a bad string, what i want to see in my script file is:

....

open
"T:\Acad_Autolisps\Testing\Test_project\000-00-10.dwg"
(c:120vac2)

(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "resume")
audit
Y
_.qsave
_.close

....

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

hencoop
Advisor
Advisor
Accepted solution

You need to quote the (vlax.... stuff and show the internal quotes as \".

 

i.e. (princ   "(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) \"resume\")" File#1)

 

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
0 Likes