Stanley
Guest
|
Posted:
Fri Jan 14, 2005 10:03 am Post subject:
Can I delete an object in event handler |
|
|
Hi everybody,
I'm trying to write an event handler to edit block attributes while user
double-clicked specific type of block.
Within the double-click event handler, I access the block by using the
Pickfirst selection set, then check the object type that match what I want.
For example a Block named "CAP SCREW" have 4 attributes:
NO , REMARK, LENGTH, BORE_DEPTH.
But because there may be some block with old definition which just have
the 1st 2 attributes. In this case I need to redefine the block and then
insert
a newly defined block at the same position. Finally the old block needs to
be deleted.
**** NOW I HAVE THE PROBLEM TO DELETE THE OLD BLOCK
WITHIN THE EVENT HANDLER ****
Can anyone teach me how to solve the problem.
Or even don't have to delete the old block, may be there is a way to
redefine
my existing block but I don't know.
|
|
Danny P.
Guest
|
Posted:
Sat Jan 15, 2005 7:47 am Post subject:
Re: Can I delete an object in event handler |
|
|
I'm not sure you can do this. You can't delete an object that fired an
event. Have you considered just updating all the blocks?
Hope that helps,
Danny Polkinhorn
WATG
Honolulu
Stanley wrote:
| Quote: | Hi everybody,
I'm trying to write an event handler to edit block attributes while user
double-clicked specific type of block.
Within the double-click event handler, I access the block by using the
Pickfirst selection set, then check the object type that match what I want.
For example a Block named "CAP SCREW" have 4 attributes:
NO , REMARK, LENGTH, BORE_DEPTH.
But because there may be some block with old definition which just have
the 1st 2 attributes. In this case I need to redefine the block and then
insert
a newly defined block at the same position. Finally the old block needs to
be deleted.
**** NOW I HAVE THE PROBLEM TO DELETE THE OLD BLOCK
WITHIN THE EVENT HANDLER ****
Can anyone teach me how to solve the problem.
Or even don't have to delete the old block, may be there is a way to
redefine
my existing block but I don't know.
|
|
|