10-14-2021
07:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-14-2021
07:26 AM
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)