Message 1 of 2
change the quantity of a virtual part in a assembly, VB.net
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I was trying to add a virtual bolt part onto my BOM which i was able to do however i couldn't change the quantity of the bolts in the bom.
Dim VirtualBoltMatrix = _App.TransientGeometry.CreateMatrix
Dim VirtualBolt = MyAssyDef.Occurrences.AddVirtual("Bolt", VirtualBoltMatrix)
For Each pBomRow As BOMRow In MyAssyDef.BOM.BOMViews(1).BOMRows
Dim oCompDef = pBomRow.ComponentDefinitions(1)
Dim PartName = oCompDef.PropertySets.Item("Design Tracking Properties").Item("Description")
If PartName <> "Bolt" Then
Else
Dim pBoltQuantity As [Property] = oCompDef.PropertySets.Item("Design Tracking Properties").Item("Quantity")
pBoltQuantity.Value = .Flange_NU
End If
Next
This is what i tried but i get a error when looking for property set on the component definition i found
HII