Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VBA Check design doctor for errors in drawing

5 REPLIES 5
Reply
Message 1 of 6
pball
1680 Views, 5 Replies

VBA Check design doctor for errors in drawing

Is there a way to check in VBA if the design doctor has found errors in a drawing? I have a mass print script and it'd be handy to be able to skip printing any drawings that have errors like unatached dimensions and such.

5 REPLIES 5
Message 2 of 6
philippe.leefsma
in reply to: pball

Hi There,

 

Take a look at the "ErrorManager Interface" in the help files, you can find samples there.

 

Public Sub ErrorManager()

    Dim errorMng As ErrorManager
    Set errorMng = ThisApplication.ErrorManager
    
    Dim errors As String
    errors = errorMng.AllMessages
    
End Sub

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 6
pball
in reply to: philippe.leefsma

Thanks for the help. This should help me do exactly what I want to do.

Message 4 of 6

I tried this and all I get is <ErrorsAndWarnings/> even though I can see errors in the sketch doctor.  An suggestions?  Is there maybe a document error manager?

Message 5 of 6
pball
in reply to: ChristiPedersen

The method above apparently can only pick up errors that happen while your code is running. If you just want to see if a document has an error or not there is a solution in a more recent thread of mine.

 

https://forums.autodesk.com/t5/inventor-customization/bug-with-checking-errormanager-with-vba/m-p/49...

Message 6 of 6
ChristiPedersen
in reply to: pball

I read the thread.  Thank you so much.  I will test it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report