Message 1 of 7

Not applicable
03-18-2016
01:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Here is my code to cycle through each unique instance of a part in an assembly. My goal is to change the "Category" field in the "Summary" section of iProperties to "Custom." I'm doing this to streamline an annoyance with loading new assemblies and parts into Vault.
' Get the active assembly document. Dim oAsmDoc As AssemblyDocument oAsmDoc = ThisApplication.ActiveDocument ' Iterate through all of the documents referenced by the assembly. Dim oDoc As Document For Each oDoc In oAsmDoc.AllReferencedDocuments ' Verify that the document is a part. If oDoc.DocumentType = kPartDocumentObject Then Dim oPartDoc As PartDocument = oDoc 'Manipulate part Dim fileName As String = ThisDoc.FileName Dim model As String = fileName & ".ipt" 'iProperties.Value(oPartDoc,"Summary", "Category") = "Custom" iProperties.Value(model,"Summary", "Category") = "Custom" End If Next
The issue is after 'Manipulate part. I'm not sure what the proper code is to access the iProperty of the referenced part.
Any help is appreciated! Thanks.
Brian Daley...
Solved! Go to Solution.