Change a customer Iproperties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am using frame generator and using the attached code to change some properties
but I would like to also change a Custom Iproperties at the same time
Dim oAsm As AssemblyDocument = ThisDoc.Document
Dim oTransaction As Transaction = ThisApplication.TransactionManager.StartTransaction(oAsm, "FG base unit to each") 'Make this a single transaction
For Each oDoc As Document In oAsm.AllReferencedDocuments 'Traverse all referenced documents
If oDoc.DocumentInterests.HasInterest("{AC211AE0-A7A5-4589-916D-81C529DA6D17}") _'Frame generator component
AndAlso oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject _'Part
AndAlso oDoc.IsModifiable _ 'Modifiable (not reference skeleton)
AndAlso oAsm.ComponentDefinition.Occurrences.AllReferencedOccurrences(oDoc).Count > 0 'Exists in assembly (not derived base component)
oDoc.ComponentDefinition.BOMQuantity.SetBaseQuantity(BOMQuantityTypeEnum.kEachBOMQuantity)
End If
Next
oTransaction.End 'End the trasaction
Thank you Ron