Code Red > AutoLISP (Vanilla / Visual)
GRIP_STRETCH Command | Get Active Entity
(1/1)
BlackBox:
I am aware of the SSGETFIRST function, but this only returns a selection set of those entities which are currently selected.
Is it possible for one to identify the entity being actively GRIP_STRETCHed using LISP?
TIA
irneb:
Nope, that piece of document is a LIE! The 2nd item returned by ssgetfirst is the selected objects, the first is ALWAYS nil, the 2nd never varies between what is selected and what is griped. And no matter what you do, the actively gripped objects is never seperated from the selected ones (as the help tries to "say"). E.g.:
--- Code: ---Command: Specify opposite corner or [Fence/WPolygon/CPolygon]:
Command: (SETQ SS1 (SSGETFIRST))
(nil <Selection set: bef>)
Command:
** STRETCH **
Specify stretch point or [Base point/Copy/Undo/eXit]: (SETQ SS (SSGETFIRST))
(nil <Selection set: c05>)
Point or option keyword required.
Specify stretch point or [Base point/Copy/Undo/eXit]: X
Command: (SSLENGTH (CADR SS))
2
Command: (SSLENGTH (CADR SS1))
2
--- End code ---
It was 2 lines and I gripped the middle on one of them - then during the "stretch" I typed the ssgetfirst - still gives the 2 lines in the selection set.
I think this "used" to work in some older version ... something like R14 ... can't remember exactly when ADesk decided to simply "fix what wasn't broken".
BlackBox:
I conducted a similar test prior to posting this thread, which is what prompted me to seek advice.
So just to confirm... Be it by Entity Data (DXF), or by VLA-OBJECT Properties, there is no way currently for LISP to identify the entity being actively GRIP_STRETCHed?
Admittedly, I rarely have multiple entities selected, when using GRIP_STRETCH, but it's going to happen at some point, if not by me, then by a user. :|
irneb:
The only thing I can imagine to work is add the selected objects to a vlr-object-reactor (:vlr-openedForModify) then cons each to a global list which holds the griped and about to be stretched set of objects.
Though where to apply the reactor setup and where to release the reactor is something I simply cannot figure.
BlackBox:
Interesting... I already use Command Reactors; having coded nothing yet (I don't have time), perhaps I can experiment with using the CommandWillStart Event to fire the Object Reactor(s), seek the OpenForModify Event (if that's possible), then use the CommandCancelled, CommandEnded, and CommandFailed Callback (I use one Callback for all three Events) to vlr-Remove the Object Reactor(s).
Cheers, bru... When I get to South Africa (or wherever you are at the time), I owe you a few dops. :kewl:
Navigation
[0] Message Index
Go to full version