Programming & Web Design > General Programming Queries
Using one selection set for two different commands
(1/1)
longj4:
Is there a way to execute two commands on the same group of selected items? The sequence of events will go like this:
1. User selects items they want to export to .MAJ
2. User runs custom command called "CAMREPORT"
3. CAMREPORT will execute two commands using the SAME selected items:
a. CREATECAM
b. CSVEXPORT
cadbyken:
Lisp allows you to run more than script. There are examples on here regarding that.
Here is one:
http://www.xtracad.com/forum/index.php/topic,2293.msg12385.html#msg12385
Darren Young:
--- Quote from: longj4 on Apr 12, 2017, 14:40:51 PM ---Is there a way to execute two commands on the same group of selected items? The sequence of events will go like this:
1. User selects items they want to export to .MAJ
2. User runs custom command called "CAMREPORT"
3. CAMREPORT will execute two commands using the SAME selected items:
a. CREATECAM
b. CSVEXPORT
--- End quote ---
When you run the second command and you're prompted to select items, type "P" which selected the "Previous" selection set.
cyan:
--- Quote from: Darren Young on Apr 12, 2017, 14:49:37 PM ---
When you run the second command and you're prompted to select items, type "P" which selected the "Previous" selection set.
--- End quote ---
Yep. This is actually something detailers ought to be told more often. Once you know it, you use it all the time.
Darren Young:
Unless you're an AutoCAD Old timer, most folks aren't aware of all the options available at the "Select Objects" prompt. Back in the day, they were all listed with the "Select Objects" prompt but as they've slowly added more over the years, they don't typically display unless you type something invalid and even then, they aren't all listed.
Here's the list....
A = Add
R = Remove
P = Previous
ALL = Everything
C = Crossing
W = Window
CP = Crossing Polygon
WP = Window Polygon
L = Last
G = Group
M = Multiple
U = Undo
Si = Single
AU = Auto
SU = Sub-Object
O = Object
Navigation
[0] Message Index
Go to full version