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

Lisp macro Select items for a Schedule... issue with Previous selection set.

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
mdhutchinson
773 Views, 4 Replies

Lisp macro Select items for a Schedule... issue with Previous selection set.

Manual select items with QSelect to build a selection set does no good... when you select the schedule and right click > Select > Add, Remove, Reselect with 'P' for previous selection set does NOT access the previous selection set... because then the schedule selection already replaces it.

 

How would a lisp be structured to to somehow keep a reference to the selection set built from Qselect look - so that they could then be added to the schedule?

4 REPLIES 4
Message 2 of 5
David_W_Koch
in reply to: mdhutchinson

The Previous option can be used when modifying the selection set of a Schedule Table.  The problem is that using QSELECT to select objects and then escaping to clear the grips does not make the selected objects the Previous selection.  If you run the SELECT command after using QSELECT, those objects will become the Previous selection set and, if the Schedule Table applies to the selected objects, Previous can be used to add/remove them from the Schedule Table's selection set.

 

That said, you could also create a LISP function that allows the user to build a selection set and saves it to a global variable (one not local to the LISP function).  When prompted to select objects to add/remove/etc from the Schedule Table, the user can invoke the selection set stored in that global variable by typing an exclamation point in front of the variable name.  For example, if the selection set variable name is ss1, typing !ss1 at the prompt will evaluate the ss1 variable and provide the objects in the selection set to the command in progress.


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 3 of 5
mdhutchinson
in reply to: David_W_Koch

I stand corrected... I don't know what I was smoking. I tried this again...

perhaps there was some small nuance that got me thinking that selecting 'P' to access AutoCAD's Previous Selection Set would not work. It does seem to work now.

Thanks!

 

 

Message 4 of 5
mdhutchinson
in reply to: mdhutchinson

Can I take back the 'mark as a solution'...

I cannot get it to work now.

 

There is definitely something going on... I have two viewports setup on the Model Space tab... The Schedule has the focus in one viewport... and a southwest isometric in the other. I use the southwest isometric to build AutoCAD's previous seletion set... and double check that... Yes indeed.... the objects are in the Previous Select Set.

Then move focus to the other viewport... select the schedule, right-click > Selection > Reselect... then 'P' for previous... and I get 0 selected.

The below is the command line output.

 

 

 

 

Command: select
3 found

Command: *Cancel*

Command: select

Select objects: p
3 found

Select objects: *Cancel*

Command:
Command: ScheduleSelectionReselect

 


Select objects or Enter to schedule external drawing: p
0 found


Select objects or Enter to schedule external drawing:

Nothing selected.

 

 

Message 5 of 5
David_W_Koch
in reply to: mdhutchinson

Using ACA 2010, with two viewports on the Model tab, the the scheduled items visible in one viewport (SW isometric) and the Schedule Table visible in the other,  I had the same results I had last night with one viewport on the Model tab.

 

Using QSELECT alone did not put the selected objects into the "Previous" selection set.  (It might appear to do so, if the objects were already there.)  If I execute a command after using QSELECT (with PICKFIRST set to 1) - such as SELECT, then those objects do get added to the Previous selection set and I can add them to the Schedule Table in the other viewport using "P" when prompted for objects.

 

Command: _.QSELECT 2 item(s) selected.

Command: SELECT 2 found

Command: _AecScheduleSelectionAdd

 

Select objects or Enter to schedule external drawing: p 2 found

Select objects or Enter to schedule external drawing:

2 object(s) added. Command:


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

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

Post to forums  

Autodesk Design & Make Report

”Boost