Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jdasilvaS39UQ
in reply to: WCrihfield

I'm currently on Inventor 2022 and using openwithoptions.

 

Do model states need to be set up for each assembly?

 

Here's my actual code:

                ' Catch errors and set silent operation back to false
                On Error GoTo ERROR_PART_DESCRIPTION
                ThisApplication.SilentOperation = True
                ThisApplication.ScreenUpdating = False
                Dim openOption As NameValueMap
                Set openOption = ThisApplication.TransientObjects.CreateNameValueMap
                'Call openOption.Add("DeferUpdates", True)
                Call openOption.Add("SkipAllUnresolvedFiles", True)
                Dim oDoc As Document
                Set oDoc = ThisApplication.Documents.OpenWithOptions(File.Path, openOption, False)
                'Set oDoc = ThisApplication.Documents.Open(File.Path, False)

                Dim SumProp As PropertySet
                Set SumProp = oDoc.PropertySets.item("Design Tracking Properties")

                Set att = documento.createAttribute("description")
                att.nodeValue = SumProp.item("Description").value
                Call eCurrentFile.setAttributeNode(att)