10-28-2022
08:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-28-2022
08:12 AM
You could use something like this:
Try
oDoc.PropertySets.Item("Inventor User Defined Properties").Item("Panel Type").Value = PanelType
Catch
oDoc.PropertySets.Item("Inventor User Defined Properties").Add(PanelType, "Panel Type")
End Try
...or you could do it the more proper way, which would be to loop through all of the custom iProperties in that document, to see if the one you want to work with exists yet. If it is found, set its value, but if after the loop, it has not been found yet, then create it. But that would take a lot more code.
Wesley Crihfield
(Not an Autodesk Employee)