Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA Macro: search parts and products by partnumber 1

Status
Not open for further replies.

elmundo777

Automotive
Jun 23, 2020
93
Hello. I am trying to implement a search by part number. In the previous topics, they suggested how to search by instance name.
For example:
Code:
 selection1.Search( "Name=" & nameNew & ".1" & ",all")
But this is an instance name lookup. I want to search by part number.
In pseudocode something like this:
selection1.Search( "Part Number=" & nameNew & ",all")
How to implement this? And where to read about search parameters in Catia?
 
Replies continue below

Recommended for you

Code:
Sub CATMain()

Dim newName As String
newName = "PartNumber"

Dim uSel As Selection
Set uSel = CATIA.ActiveDocument.Selection

uSel.Search "('Assembly Design'..'Part Number'=" & newName & "),all"


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor