Message 1 of 3

Not applicable
10-30-2019
06:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i have a rule that works just need to exclude any part that doesn't have a stock number
Dim oDoc As AssemblyDocument oDoc = ThisApplication.ActiveDocument oUOM = oDoc.UnitsOfMeasure Dim oOccs As ComponentOccurrencesEnumerator oOccs = oDoc.ComponentDefinition.Occurrences.AllLeafOccurrences Dim oMass As Double = 0 Dim oOcc As ComponentOccurrence For Each oOcc In oOccs If iProperties.MaterialOfComponent(oOcc.Name) = "Steel, Mild" Then If iProperties.Value(oOcc.Name, "Custom", "M/P") = "F" Or iProperties.Value(oOcc.Name, "Custom", "M/P") = "M" Or iProperties.Value(oOcc.Name, "Custom", "M/P") = "P" Then oMass = oMass + iProperties.MassOfComponent(oOcc.Name) End If End If Next sMass = oMass & " " & oUOM.GetStringFromType(oUOM.MassUnits) MessageBox.Show(sMass, "FABRICATED Steel, Mild")
.
Solved! Go to Solution.