I am creating a macro to delete notes containing certain keywords. I realized recently that there are some drawings that contain these notes within Blocks.
What I was trying to do before I realized this:
- Use GetViews to get all views (and sheets) on a drawing
- Loop through each item, use GetNotes to get all associated notes
- Check if note contains keyword, if so add to selection
- At the end of the loop, delete all selected notes.
The problem is, GetNotes seems to only apply to notes, so the blocks don't get detected. I was going to switch it out with GetAnnotations and do a bit of refining, but when I tried doing that, it did not seem like the the macro actually detected when I placed a block on the drawing.
So my question: Can this method actually detect blocks? If so, is there a particular way to do it? If not, what would be a better way to accomplish what I am after?