Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

*cancel* command in a script

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
stephengibson76
7569 Views, 3 Replies

*cancel* command in a script

In normal AutoCAD we have a load of scripts that run, then end with a *cancel* or *escape*, you type (command) on the last line of the script and it escapes you from whatever command was running.

 

We have found this useful for bringing blocks, layers, dimension styles etc into our current drawings, if you type Insert, select a drawing where these types of items are found, get to the point where you are just about to drop the drawing into your current drawing but instead of dropping it, press escape...  no geometry is dropped into your drawing but all of the layers, dim styles blocks etc are now availiable in your current drawing

 

below is an example of one of these scripts

 

-insert
"h:/design department/cad/cad standards/autocad blocks/gm quick tools/gm ga blocks.dwg"
(command)

Stephen Gibson



View stephen gibson's profile on LinkedIn


3 REPLIES 3
Message 2 of 4

Is this a question if it can be done in LT ('cause it can't... "(command)" is a lisp function that is not available in LT)?  Or something else?

 

(if ("mysolution"=answer) then (click "Accept As Solution"))

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich
Message 3 of 4

thanks for the reply...  we have a load of customization on AutoCAD that we were hoping to port over to AutoCAD LT, (command) does not work in an LT script, I knew LT didnt support lisp which is why we went the script route when we were customizing AutoCAD...  lets see what else needs fixing...

Stephen Gibson



View stephen gibson's profile on LinkedIn


Message 4 of 4

I know that if you put this in a button macro (instead of a separate .scr file)  that "^C" can be substituted for "(command)" to cancel.  It does the same thing.  Wonder if it works in a script...?

 

Just some reading to get you started.  Diesel is pretty powerful if you know how to use it.  This post is a little more advanced in LT customization. 

 

(if ("mysolution"=answer) then (click "Accept As Solution"))

─────────────────────────────────────────────────────────────────────────────────────────────
Brandon Gingerich

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost