- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am making a VBA macro that performs some updates and checks of Inventor drawings when saved, currently in Inventor 2020. One of the things to check is if there are any Inventor errors in the drawing, i.e if the red cross is lit (Typically pink dimensions, pink center lines etc). After tips from this forum I am using the following to check if red cross is lit:
ThisApplication.UserInterfaceManager.Ribbons.Item("Drawing").QuickAccessControls.Item("AppDesignDoctorCmd").ControlDefinition.Enabled
I need to check each individual sheet, but that's no problem. The challenge is that the Red Cross seems to be turned off when a drawing is saved even for sheets with errors. The challenge is to get it updated to be lit again. I have tried a few ways:
- document.update / document.update2
- sheet.update
- I noticed that if i manually move a view in a sheet with errors, I can manually update it via the lightening bolt, and the Red Cross is lit. Replicated this is VBA, but then it still doesn't trigger the Red Cross.
- I noticed that if I set all views imprecise, then back to precise the Red Cross is lit. Replicated this in VBA, and if this is done once for each sheet the Red Cross for the sheet is actually lit and the check works.
The challenge with this workaround is that it is time consuming for larger drawings, you can imagine that it is a bit slow to imprecise/precise all views x 10 in a 10 sheet drawing with 100 views.
So the question; do anyone have a tip for a more effective way to find the sheets with inventor errors?
Torbjørn
Solved! Go to Solution.