TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: pingoo666 on April 28, 2020, 02:57:03 AM

Title: Execute lisp on selectin an object
Post by: pingoo666 on April 28, 2020, 02:57:03 AM
Hello everyone,

I would like to execute a fonction when I select an object.

I think reactors can help, but the vlr-object-reactor function has no ":vlr-selected" parameter.

Any idea ?

Thanks by advance
Title: Re: Execute lisp on selectin an object
Post by: roy_043 on April 28, 2020, 03:29:16 AM
maybe this helps:
https://www.theswamp.org/index.php?topic=48575.msg537236#msg537236
Title: Re: Execute lisp on selectin an object
Post by: ribarm on April 28, 2020, 03:30:40 AM
You should look for reactor that monitors sys variables changes... Then write callback function to monitor 'pickfirst variable - with changes reactor should fire...
Title: Re: Execute lisp on selectin an object
Post by: Lee Mac on April 28, 2020, 12:00:07 PM
You can use a Miscellaneous Reactor, with callback function triggered on the pickfirstmodified event - here is an existing example: Selection Counter (http://lee-mac.com/selectioncounter.html)
Title: Re: Execute lisp on selectin an object
Post by: MP on April 28, 2020, 02:28:51 PM
Concise + well written + useful = win.
Title: Re: Execute lisp on selectin an object
Post by: Lee Mac on April 28, 2020, 03:42:42 PM
Thanks  :-)