PDA

View Full Version : Create commands to Lock / Unlock viewports



Rico
2005-10-27, 04:22 PM
If a guy were to want to create a new command in the CUI (Specifically, a command that locks and unlocks Viewports) and that guy didn't wanna use a LISP routine (beause he had no idea how they worked or what they really were - aside from the fact that the guy knew that it was a programming language within AutoCAD), how would he go about that?

Ok fine. You found me out. I am THAT guy and I wanna create that command in my CAD. Can anyone help?

tyshofner
2005-10-27, 06:10 PM
Well without using lisp and assuming you know how to create the "commands", "buttons", etc. from within the CUI editor. The two command macros you would need are:

;lock
^C^C-vports;l;on;all;;

;unlock
^C^C-vports;l;off;all;;

Ty :mrgreen:

Rico
2005-10-27, 06:19 PM
Well without using lisp and assuming you know how to create the "commands", "buttons", etc. from within the CUI editor. The two command macros you would need are:

;lock
^C^C-vports;l;on;all;;

;unlock
^C^C-vports;l;off;all;;

Ty :mrgreen:
OK ... Cool! I know what ^C^C means and everything else is cool .... but what does ; mean when entering command macros?

tyshofner
2005-10-27, 06:59 PM
The semi-colon is a "Return" or "Enter". You could also use a space but I Grrr the way it makes the macro look.

;this
^C^C-vports;l;on;all;;

;or this
^C^C-vports l on all

It is much easier to tell where the "Returns" are when you use semi-colon's instead of spaces. The best example is the last two "Returns". In the macro with spaces you would never even know they were there unless you highlighted the entire string. It also hard to tell how may "spaces" you have. So I stick with semi-colon's.

Ty :mrgreen:

bbapties
2005-10-27, 07:03 PM
OK ... Cool! I know what ^C^C means and everything else is cool .... but what does ; mean when entering command macros?
looks like you already knew ;)

Rico
2005-10-27, 07:11 PM
looks like you already knew ;) Yeah ... I sure DID already know ....... I was just ....... testing you guys ...... to see if people in here actually KNOW AutoCAD ...... and you all passed ....... so ....... congratulations ...... ;)

(Thanks Ty)