Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Search for an Instance name in a product

Status
Not open for further replies.

CheeseMaker13

Aerospace
Sep 25, 2012
42
GB
Hi Guys,

Another little problem I can't for the life of me figure out.

I want to search for a specific Instance of something, for example "Apple.2". I have a SearchString Var with "Apple.2" in it.

How do I then search for that in a product?

I've tried:

oSelection.Search "CATAsmSearch.Name=SearchString,all"
oSelection.Search "'Assembly Design'.Product.'Part Number'=SearchString,all"

And numerous others off the internet with no success.

Thoughts?

Thanks!!
 
Replies continue below

Recommended for you

(Name='Apple.2' & (((((((((('Product Structure'.Product + 'Systems Routing'.Product) + 'HVAC Design'.Product) + 'Assembly Design'.Product) + 'Waveguide Diagrams'.Product) + 'HVAC Diagrams'.Product) + 'Systems Space Reservation'.Product) + 'Process Applications'.Product) + 'Tubing Diagrams'.Product) + 'Plant Layout'.Product) + 'Piping and Instrumentation Diagrams'.Product));all


You can decrease number of considered types of product , for e.g. only to product structure and assembly design

(Name='Apple.2' & ('Product Structure'.Product 'Assembly Design'.Product));all

LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
 
What would the full string be?

oSelection.Search (Name='Apple.2' & ('Product Structure'.Product 'Assembly Design'.Product));all

[That doesn't work :p]

(I should have said I want to select the found item!!)

Many Thanks!!!!!
 
Code:
oSelection.Clear
Dim InstanceName 'as String
Dim SelectionQuery 'as String
InstanceName = "Przekladnia_MASTER.1"
SelectionQuery="(Name='"& InstanceName &"' & (CATProductSearch.Product + CATAsmSearch.Product)),all"

oSelection.Search SelectionQuery

Dim FoundedInstance 'as Product

MsgBox oSelection.Count & " Items of" & InstanceName &"has been founded"

Set FoundedInstance=oSelection.Item(1).Value

LukaszSz. Poland, Warsaw University of Technology, Faculty of Power and Aeronautical Engineering : MEchanical Engineering. BsC - 2013
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top