.NET

Reply
Valued Contributor
yaqiz
Posts: 86
Registered: ‎07-14-2010
Message 1 of 5 (207 Views)

How to do this effect? after ReDo command

207 Views, 4 Replies
02-13-2012 03:04 AM

Hi Guys,

 

I use AutoCAD 2011, VB.net

 

I have done a form docked on the left side of drawing dynamicly display all block in the drawing. What I have done is select all block druing drawing open process and put them into listview in the form and display them.

 

Once I delete some of the block, they will be removed from my form as well.

 

Now is my question. If I send redo command(Ctrl+Z), those deleted block will be put back to drawing, I wonder how to update my form at the same time? I could get all blocks again and refresh the listview. But I think that will take sometime if I have  lots blocks in the drawing.

 

Any ideas?

 

Thanks

 

Yaqi

*Expert Elite*
Alfred.NESWADBA
Posts: 9,417
Registered: ‎06-29-2007
Message 2 of 5 (204 Views)

Re: How to do this effect? after ReDo command

02-13-2012 03:51 AM in reply to: yaqiz

Hi,

 

>> Now is my question. If I send redo command(Ctrl+Z)

Check for event "CommandEnded" or for "ObjectAdded" (I think it will be raised when you do a _REDO)

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Contributor
yaqiz
Posts: 86
Registered: ‎07-14-2010
Message 3 of 5 (203 Views)

Re: How to do this effect? after ReDo command

02-13-2012 03:56 AM in reply to: Alfred.NESWADBA

Thanks for the hint. Do you know where is ObjectAdded?

 

T

*Expert Elite*
Alfred.NESWADBA
Posts: 9,417
Registered: ‎06-29-2007
Message 4 of 5 (199 Views)

Re: How to do this effect? after ReDo command

02-13-2012 04:24 AM in reply to: yaqiz

Hi,

 

>> Do you know where is ObjectAdded?

It's an event in the Autodesk.AutoCAD.DatabaseServices.Database - object.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Contributor
yaqiz
Posts: 86
Registered: ‎07-14-2010
Message 5 of 5 (155 Views)

Re: How to do this effect? after ReDo command

02-28-2012 06:54 AM in reply to: Alfred.NESWADBA

Hi Alfred,

 

I just did a test. It didn't trigger objectadded when I use redo.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!