Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A question about reactors...

14 views
Skip to first unread message

Kevin Mullinax

unread,
Jul 18, 2002, 11:16:26 AM7/18/02
to
I have a reactor set up to trigger when an object has been modified.
However, in case of its deletion, there is a piece of information I need to
get from it's xdata. I thought that if Visual Lisp had a command similar to
the ENTDEL command, I could use the objname to undelete it, extract the
info, then re-delete it, all within the same reaction.
Is this possible? Is there a better way?
Thanks in advance for any input.

Kevin Mullinax


LE

unread,
Jul 18, 2002, 11:26:47 AM7/18/02
to
Kevin,

What are your first lines of code?

vla-delete = entdel

For what I just read, you are doing some "code salad", there are activex
methods available to do the same as in plain autolisp, and reactors required
(not everything) to be of use of those activex stuff.

Luis.

"Kevin Mullinax" <ke...@edingerdesign.com> wrote in message
news:6FFE78136052E90E...@in.WebX.maYIadrTaRb...

Kevin Mullinax

unread,
Jul 18, 2002, 11:56:10 AM7/18/02
to
Actually, vla-delete /= entdel... not exactly, anyway...
"entdel e" will un-delete entity "e" if the entity was previously erased.
vla-delete, on the other hand, will not un-delete entities.
The problem lies in the fact that reactors return vla-objects in their
argument list, and I haven't found a way to convert the vla-object into an
ename that can be run through the entdel command to un-delete it, because
the command to convert the entity only works if the entity hasn't been
erased.
Other suggestions?

"LE" <www.arqcom.com.mx> wrote in message
news:DE9FD3E969C5F36C...@in.WebX.maYIadrTaRb...

LE

unread,
Jul 18, 2002, 12:11:26 PM7/18/02
to
Can not help you since I do not understand what are you doing.


Mike Weaver

unread,
Jul 18, 2002, 2:52:56 PM7/18/02
to
<Snip>

>>I haven't found a way to convert the vla-object into an
> ename
<\Snip>


(vlax-vla-object->ename obj)

Arguments

obj

A VLA-object.

Return Values

An AutoLISP entity name (ename data type).

Mike Weaver

Kevin Mullinax

unread,
Jul 18, 2002, 3:25:06 PM7/18/02
to
I guess I am not describing myself accurately....
I know how to convert a vla-object to an ename...
the problem is -- this does not work with objects that have been deleted.
The standard AutoLisp command to "undelete" an entity is ENTDEL.
Unfortunately, I cannot give this command an ename, because the reactor only
returns vla-objects... and the vla-object it is returning has been deleted.
So, is there a corresponding VLA- command which will "undelete" an object if
given its vla-object name?


"Mike Weaver" <mwe...@bettisworth.com> wrote in message
news:599C416CE0043012...@in.WebX.maYIadrTaRb...

Pavlos Katsonis

unread,
Jul 20, 2002, 2:26:36 AM7/20/02
to
How about using some AutoCAD commands instead of vlisp ones?
Couldn't you issue an UNDO or OOPS, get the data you need and then issue a
REDO ?


Mike Weaver

unread,
Jul 22, 2002, 2:04:46 PM7/22/02
to
Kevin,
I didn't try it, but my thought was to do something like:
(entdel (vlax-vla-object->ename obj))

My only other thought is to use the copy method of the deleted object.

Mike Weaver


"Kevin Mullinax" <ke...@edingerdesign.com> wrote in message

news:419FE39C18FD6700...@in.WebX.maYIadrTaRb...

per

unread,
Oct 24, 2002, 11:36:15 AM10/24/02
to
This probably seems like such a simple question to most but I'm just
beginning to see a glimmer of light about how reactors work.... <smile>
1. When a rector is created is it something that is saved permanently within
a drawing? It doesn't have to be set each time a drawing is opened does it?
I'm using the vlr-docmanager-reactor so that I can run a routine each time
the document becomes the current drawing.
2. If my assumption is correct, that it IS saved inside each drawing, is
there a way of "testing" the drawing to see if it exists?
Thanks in advance for your help.
--
Phillip


0 new messages