I have a mass print script and I have it save then close the drawing after it's done printing each one. The problem is the script updates the mass properties and some times drawings just update when opened. So when it saves different "warnings" can pop up, which pause the script until the pop up is taken care of. The warnings are typically for saving other files like the ipt linked to a drawing or if the drawing was saved in an old version. Is there a way to just accept those while running a script so it does puase?
How I save and then close the drawing.
ThisApplication.ActiveEditDocument.Save
ThisApplication.ActiveEditDocument.Close True
Solved! Go to Solution.
Solved by YuhanZhang. Go to Solution.
SilentOperation can suppress Inventor warnings, maybe you want to use this.
hi,
would you mind sharing your code.
i have the same problem.
can i do it in vb within inventor?
thanks
inventor 2011
vault 2012
And one word of warning. Make sure to set it to False by the time the script finishes. I have some exit subs in the script I did and the setting stayed on after the script was done, if it was exited via the exit sub. So I found an event that fired when the script was done, whether it exited or completed and put set it back to false there. Depending on what your script is like, you could just ignore what i've said.
Private Sub UserForm_Terminate()
ThisApplication.SilentOperation = False
End Sub