Message 1 of 3
Drawing Document Events

Not applicable
05-04-2009
05:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to catch a delete on a drawing file using VB.NET; however, I've run into a number of dead ends. My overall goal is to notice when a note is being deleted from a sheet and remove the Automation dynamic rule that created it.
I began by catching the doc.OnChange; however, that only tells me that there's a delete event in progress. It doesn't give me the information I need to determine which item is being deleted. Next, I attempted to check the activeDocument.SelectSet before the delete event was fired; however, the selectSet was always returning a count of 0. I attempted to do the same thing in VBA and the selectSet had the correct number.
Next, I attempted to use the OnSelect event, but it never caught the select. Then, I tried using the OnMouseUp event, but it never caught the event.
Out of curiosity I switched from a drawing document to an assembly document and the events began firing.
Two questions: Do events work on drawing documents? Do you know of any way to determine information about things being deleted or items selected before a delete event fires?
Thank You,
D. Johnson
I'm trying to catch a delete on a drawing file using VB.NET; however, I've run into a number of dead ends. My overall goal is to notice when a note is being deleted from a sheet and remove the Automation dynamic rule that created it.
I began by catching the doc.OnChange; however, that only tells me that there's a delete event in progress. It doesn't give me the information I need to determine which item is being deleted. Next, I attempted to check the activeDocument.SelectSet before the delete event was fired; however, the selectSet was always returning a count of 0. I attempted to do the same thing in VBA and the selectSet had the correct number.
Next, I attempted to use the OnSelect event, but it never caught the select. Then, I tried using the OnMouseUp event, but it never caught the event.
Out of curiosity I switched from a drawing document to an assembly document and the events began firing.
Two questions: Do events work on drawing documents? Do you know of any way to determine information about things being deleted or items selected before a delete event fires?
Thank You,
D. Johnson