What would be the best way to check if a product exist in active model?
Would be ok like below, or there are better ways?
Would be ok like below, or there are better ways?
Code:
Sub CATMain()
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim selection1 As Selection
Set selection1 = productDocument1.Selection
selection1.Search "(Name=*test* & CATProductSearch.Product),all"
If selection1.Count >= 1 Then
msgbox "Exist"
End If
End Sub