AutoCAD Architecture Customization

Reply
Valued Mentor
mdhutchinson
Posts: 2,288
Registered: ‎11-18-2003
Message 1 of 5 (299 Views)
Accepted Solution

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

299 Views, 4 Replies
04-24-2012 05:28 AM

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?

*Expert Elite*
David_W._Koch
Posts: 2,423
Registered: ‎12-09-2003
Message 2 of 5 (297 Views)

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

04-24-2012 04:13 PM 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
Valued Mentor
mdhutchinson
Posts: 2,288
Registered: ‎11-18-2003
Message 3 of 5 (291 Views)

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

04-25-2012 05:44 AM 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!

 

 

Valued Mentor
mdhutchinson
Posts: 2,288
Registered: ‎11-18-2003
Message 4 of 5 (288 Views)

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

04-25-2012 06:38 AM 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.

 

 

*Expert Elite*
David_W._Koch
Posts: 2,423
Registered: ‎12-09-2003
Message 5 of 5 (285 Views)

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

04-25-2012 09:33 AM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community