Author Topic: Multiple commands assigned to a button???  (Read 3901 times)

0 Members and 1 Guest are viewing this topic.

bmandcc

  • Guest
Multiple commands assigned to a button???
« on: July 31, 2004, 09:03:07 PM »
Is it possible to setup a  toobar button to do multiple commands?

example:

 pline + 3p circle + trim + erase

If so, how???
I've seen some code previously posted with \....
what do the \'s represent... pause for user input???

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Multiple commands assigned to a button???
« Reply #1 on: July 31, 2004, 09:53:21 PM »
Yes, the \ is a pause for user input.

Setting up for multiple commands is similar to single, you just have to be VERY carefull with your spaces and ;'s.

A more productive option may be to load and run a lisp file.
Code: [Select]

[Do Lots of Good Stuff ] ^c^c(if (not (vl-symbol-value 'MC-01))(load "MultiCommands.lsp"))(MC-01)


Watch the word wrap ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

bmandcc

  • Guest
multiple commands
« Reply #2 on: August 01, 2004, 09:34:49 AM »
can you post some example code?

Andrew H

  • Guest
Multiple commands assigned to a button???
« Reply #3 on: August 05, 2004, 10:11:23 AM »
Here are a few I've made and use all the time.

Unlock All Layers:
Code: [Select]
^C^C_-layer;_U;*;;

Lock All Layers:
Code: [Select]
^C^C-layer;lo;*;;

Delete existing box around text, edit text, spell check, add new box, give the new box a thickness of .5:
Code: [Select]
^C^Cerase;\;ddedit;\;spell;\;tcircle;\;;r;c;b;pedit;m;\;w;.5;;

Lock View Port:
Code: [Select]
^C^C-vports;lock;on;/;

Unlock View Port:
Code: [Select]
^C^C-vports;lock;off;/;

Basically you type the commands as if they were being entered into the command prompt, but you use ";" as the ENTER button and "\" as a pause for user input. (Please also note the a space bar entry acts the same as ";" and ENTER button). Let me know if you need anything else.

Andrew H

  • Guest
Multiple commands assigned to a button???
« Reply #4 on: August 05, 2004, 10:13:04 AM »
Also please note that some of my buttons have the command options pre set to my needed settings, you may have to adjust them to suit your needs.

M-dub

  • Guest
Multiple commands assigned to a button???
« Reply #5 on: August 05, 2004, 10:16:18 AM »
Here are a couple of mine...

Change Text to Middle Left Justified
^C^Ccht;\\;j;ml;\
Change Text to Middle Right Justified
^C^Ccht;\\;j;mr;\
Change Text to Middle Justified
^C^Ccht;\\;j;m;\

M-dub

  • Guest
Multiple commands assigned to a button???
« Reply #6 on: August 05, 2004, 10:17:07 AM »
CHT is a lisp routine that I have in my startup suite....

Andrew H

  • Guest
Multiple commands assigned to a button???
« Reply #7 on: August 05, 2004, 10:20:15 AM »
Do you know about the tjust command? Express tools. The less extra lisps you have to load the better.

M-dub

  • Guest
Multiple commands assigned to a button???
« Reply #8 on: August 05, 2004, 10:37:37 AM »
I have had those little macros for at least 5 - 7 years...I guess I should check out what else ET has to offer...
Thanks Andrew.

hudster

  • Gator
  • Posts: 2848
Multiple commands assigned to a button???
« Reply #9 on: August 05, 2004, 10:41:22 AM »
if your command gets too big for the button, you can write a script routing, and have the button load it.

I've written scripts to set up drawings, attach xrefs and place the appropriate values into the title block all at the click of a button.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Andrew H

  • Guest
Multiple commands assigned to a button???
« Reply #10 on: August 05, 2004, 10:46:03 AM »
M-dub:
I completely understand. There are things which have always been in ACAD and after 7 years of using the program, I'm just now starting to know about them.

Hudster:
Will you post some examples of you buttons and script files?