Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reactor for polyline creation, deletion, or copy?

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
276 Views, 6 Replies

Reactor for polyline creation, deletion, or copy?

I have never created a reactor function.

I would like tips to help me create a reactor function that notifies me (say
an alert message) if any of the following events happen:

a polyline (heavy or light) is created, is deleted, or is copied.

Len
--
To email reply, eradicate all threes in my SPAM guarded address.
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

A concern of mine is the bad reputation reactors have according to some
who've posted here. I certainly don't want to open some pandora's box.

But here is a snippet I've created by modifying some existing code I found
online. By the way, the drawings I'm creating this for contain nothing but
polylines, therefore the simplicity. Do you see any problems?

(defun cmdEND (reactor command_l)
(if (or
(member "PLINE" command_l)
(member "COPY" command_l)
(member "ERASE" command_l)
)
(alert "\n A polyline was drawn, copied, or erased.")
)
)
(defun c:reactorPline ()
(vl-load-com)
(vlr-editor-reactor nil '((:vlr-commandEnded . cmdEND)))
)
(c:reactorPline)


--
To email reply, eradicate all threes in my SPAM guarded address.
"Fatfreek" wrote in message
news:5434699@discussion.autodesk.com...
I have never created a reactor function.

I would like tips to help me create a reactor function that notifies me (say
an alert message) if any of the following events happen:

a polyline (heavy or light) is created, is deleted, or is copied.

Len
--
To email reply, eradicate all threes in my SPAM guarded address.
Message 3 of 7
EC-CAD
in reply to: Anonymous

Fatfreek,
IF Moved, doesn't fire.
IF Polyline is from Entmake.. doesn't fire.
IF object Erased or Copied is *not* a PLINE.. fires
when it should *not* fire.
Other than that, seems to work.

Bob
Message 4 of 7
Anonymous
in reply to: Anonymous

Thanks for that tip. I'll add MOVE and SCALE. I'll try to add Entmake but
will have to figure that out.

Len

--
To email reply, eradicate all threes in my SPAM guarded address.
wrote in message news:5434687@discussion.autodesk.com...
Fatfreek,
IF Moved, doesn't fire.
IF Polyline is from Entmake.. doesn't fire.
IF object Erased or Copied is *not* a PLINE.. fires
when it should *not* fire.
Other than that, seems to work.

Bob
Message 5 of 7
Anonymous
in reply to: Anonymous

Hmmm ... I see that each different command that I use dictates the
occurrences that the alert box pops up. How can I reset the counter back to
zero?

Len

--
To email reply, eradicate all threes in my SPAM guarded address.
wrote in message news:5434687@discussion.autodesk.com...
Fatfreek,
IF Moved, doesn't fire.
IF Polyline is from Entmake.. doesn't fire.
IF object Erased or Copied is *not* a PLINE.. fires
when it should *not* fire.
Other than that, seems to work.

Bob
Message 6 of 7
EC-CAD
in reply to: Anonymous

Close, re-open the drawing ?
As far as 'counter' .. I don't think there is one..
You might want to add "EXPLODE" to the list..

Bob
Message 7 of 7
Anonymous
in reply to: Anonymous

Yes, I will add "EXPLODE", thank you.

I was wrong about the cause of the instances.

The cause appears to coincide with the number of times I've edited and
reloaded the function.
Len
--
To email reply, eradicate all threes in my SPAM guarded address.
wrote in message news:5434748@discussion.autodesk.com...
Close, re-open the drawing ?
As far as 'counter' .. I don't think there is one..
You might want to add "EXPLODE" to the list..

Bob

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost