Dim CATIA As Object
Set CATIA = CreateObject("CATIA.Application")
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim products1 As Products
Set products1 = product1.Products
Text5.Text = products1.Count
Dim i As Integer
Dim ElementName(1 To 100), ElementPath(1 To 100)
For i = 1 To products1.Count
ElementName(i) = products1.Item(i).ReferenceProduct.Parent.Name//
ElementPath(i) = products1.Item(i).ReferenceProduct.Parent.Path //
MsgBox products1.Item(i).GetMasterShapeRepresentationPathName //这3句都报错:调用失败
Next