Author Topic: Execute lisp on selectin an object  (Read 1847 times)

0 Members and 1 Guest are viewing this topic.

pingoo666

  • Mosquito
  • Posts: 13
Execute lisp on selectin an object
« 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

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Execute lisp on selectin an object
« Reply #2 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...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Execute lisp on selectin an object
« Reply #3 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

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Execute lisp on selectin an object
« Reply #4 on: April 28, 2020, 02:28:51 PM »
Concise + well written + useful = win.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: Execute lisp on selectin an object
« Reply #5 on: April 28, 2020, 03:42:42 PM »
Thanks  :-)