What happens is that values equal to zero are not internal user parameters of the part file. The values that you have equal to zero in your file are custom iproperties, in order to eliminate the component with the criteria you need you should have an ilogic rule like the following.
Dim AssyDoc As AssemblyDocument = ThisDoc.Document
Dim oCD As AssemblyComponentDefinition = AssyDoc.ComponentDefinition
Dim oLength As String, oWidth As String, oThick As String
For Each oCc As ComponentOccurrence In oCD.Occurrences
Dim doc As Document = oCc.Definition.Document
Try
oLength = doc.PropertySets("Inventor User Defined Properties").Item("Length").Value
oWidth = doc.PropertySets("Inventor User Defined Properties").Item("Width").Value
oThick = doc.PropertySets("Inventor User Defined Properties").Item("Thickness").Value
If oLength = "0 mm" And oWidth = "0 mm" And oThick = "0 mm" Then oCc.Delete
Catch
End Try
Next
With this rule I have been able to remove from the assembly the component that has the three iproperties values at zero.
I hope this helps with your problem. Cheers
Please accept as solution and give likes if applicable.
I am attaching my Upwork profile for specific queries.
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn