Can I delete an object in event handler
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Can I delete an object in event handler

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Stanley
Guest





Posted: Fri Jan 14, 2005 10:03 am    Post subject: Can I delete an object in event handler Reply with 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.

Back to top
Danny P.
Guest





Posted: Sat Jan 15, 2005 7:47 am    Post subject: Re: Can I delete an object in event handler Reply with quote

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.


Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB