×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Search for an Instance name in a product

Search for an Instance name in a product

Search for an Instance name in a product

(OP)
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!!

RE: Search for an Instance name in a product

(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

RE: Search for an Instance name in a product

(OP)
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!!!!!

RE: Search for an Instance name in a product

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

RE: Search for an Instance name in a product

(OP)
Hi Guys.

Thanks, both methods work!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources