Does anyone know how to catch the end of the Dynamic Block Visibility change event? Since this isn't a command I'm a bit foxed.
manupulating dynamic block by user (dragging/clicking grips) certainly triggers events that can be handled with .NET API.
You can write some code handle Documnet.CommandWillStart/CommandEnded, something like:
Editor.WriteMessage("\nCurrentCommand is: {0}.", e.GlobalCommandName);
and then munipulate a dynamic block iin a drawing to verify the code in the 2 event handlers running. You should see that the implicit command triggered when you drag/click a dynamic block's grip is either "GRIP_POPUP" or "GRIP_STRETCH".
I am not sure your purpose of catching these events, but it is likely that you need to start from handling these 2 events and filter out specific command name (GRIP_POPUP and GRIP_STRETCH, and maybe others), and then incorporate with other event handlers (such as Database.ObjectModified...), to eventually be able to do something meaningful.
Norman Yuan
Thanks Norman, you pointed me in the right direction.
I had to give up in the end though since I wasn't sure if the 'overhead' was worth the gains. It was a routine to grab the information of the visible entites in a dynamic block and add that information to the dynamic block itself. This works with a command reactor on the Save Event but not the dynamic Block change event. i bacame a bit "tangled" with code that I didn't fully understand...!
Additional information, although you may have decided not pursuing this route:
I have an article on handling dynamic block property being changed. Although it is about a "stretch" dynamic property, the logic of algrithm would be the same or very similar. I forgot to mention it in my previous reply. Here is the link, just in case you have not seen it or it may be of help:
http://drive-cad-with-code.blogspot.ca/2013/11/a-block-with-auto-pointing-leader.html
Norman Yuan