Getting selected objects during a command

Getting selected objects during a command

Anonymous
Not applicable
286 Views
1 Reply
Message 1 of 2

Getting selected objects during a command

Anonymous
Not applicable
I'm trying to intercept the objects a user selects during an erase
command to determine if there are any database links attached.
I have explored different permutations of the ActiveSelectionSet
during BeginCommand, EndCommand and SelectionChanged.
(If they pick the objects first, the PickfirstSelectionSet during a
SelectionChanged event seems to do what I need).

Is there anyway to do what I'm asking without rewriting the erase
command? It seems like the hooks should be there but I can't find
them.
0 Likes
287 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
You seem to have the PickFirst=On event thing figured out.
If PickFirst=OFF, use the BeginCommand event. To interrupt the command use
a SendCommand with the Esc character; in AutoLisp it's (chr 27). This
procedure will probably work only on the commands that require additional
user command-line input. "Quit" is a typical command where it won't work.

--
John Uhden, Cadlantic/formerly CADvantage
--> mailto:juhden@cadlantic.com
--> http://www.cadlantic.com
2 Village Road
Sea Girt, NJ 08750
Tel. 732-974-1711
FAX 732-528-1332

wrote in message
news:3c137c26.61778765@discussion.autodesk.com...
> I'm trying to intercept the objects a user selects during an erase
> command to determine if there are any database links attached.
> I have explored different permutations of the ActiveSelectionSet
> during BeginCommand, EndCommand and SelectionChanged.
> (If they pick the objects first, the PickfirstSelectionSet during a
> SelectionChanged event seems to do what I need).
>
> Is there anyway to do what I'm asking without rewriting the erase
> command? It seems like the hooks should be there but I can't find
> them.
>
0 Likes