0

I have a problem. I can import feature types in catia vba with the following codes

 Set document1 = CATIA.Documents.Item("Product1.CATProduct")
 Set products1 = document1.Product.Products

 For i = 1 To products1.Count

    MsgBox TypeName(products1.Item(i).ReferenceProduct.Parent)

 Next i

but it also shows "Compenent" elements as "ProductDocument". If component is, I want to make a separate operation.

How can I find out that an element is a "Component" ?

enter image description here

msu0384
  • 5
  • 3

1 Answers1

0

I found solution

For Each prd In products1
  If prd.ReferenceProduct.Parent.Product.PartNumber <> prd.PartNumber Then
   '... this is a component
  End If
Next
onlyphantom
  • 8,606
  • 4
  • 44
  • 58
msu0384
  • 5
  • 3