vlr-object-reactor (element modification)

vlr-object-reactor (element modification)

jerzy.bajor
Contributor Contributor
341 Views
6 Replies
Message 1 of 7

vlr-object-reactor (element modification)

jerzy.bajor
Contributor
Contributor

Hello

I want to get entity an element on which I made a double-click. I suspect that I have to use the rector 'VLR-Object-Reactor' in combination with ': VLR-MODIFIED'. I tried something below, but I don't mean. Can someone help me how to do it. My English is not very good to seek efficiently in help, hence this request

(defun Reacto ()
  (if (= *EndReacto* nil)
    (vlr-object-reactor nil '((:vlr-modified . GetHandent)))
    )
  )

(Reacto)

(defun GetHandent (A)
  (setq dadas 1)
  )

Jerzy

0 Likes
342 Views
6 Replies
Replies (6)
Message 2 of 7

annoisscary
Advocate
Advocate

Perhaps its just the language barrier but this sounds like you could just do (entsel).

0 Likes
Message 3 of 7

jerzy.bajor
Contributor
Contributor

As I wrote, it is to start after a double click, not by indicating the element.

0 Likes
Message 4 of 7

annoisscary
Advocate
Advocate

Just redefine the double click action to use (entsel) or whatever you need

0 Likes
Message 5 of 7

jerzy.bajor
Contributor
Contributor

And how to define that after a double click on this element that I want (e.g. a red line with a thickness of 50) is to start my code?

0 Likes
Message 6 of 7

annoisscary
Advocate
Advocate

It kind of sounds like you just want to start a lisp by double clicking on an object. Which you could do by changing the double click action to call the function. You would just write "^C^Cyour-command" in the macro line

0 Likes
Message 7 of 7

jerzy.bajor
Contributor
Contributor

We are heading in the right direction.
I use the AutoCAD overlay, which has its own elements.
I have already done something that after the command I check what element it was edited. And if it was part of this overlay, then it makes my code.
The problem is that each time I search the whole drawing in search of these 'foreign' elements and I am looking for changes in them. With a small amount it goes somehow, but with a large amount it is already with trouble with time.
That is why I want to catch at the very beginning, what an element is, catch it before the change and compare after the change.

0 Likes