Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Macro_searching a Geo Set item by name - help

Status
Not open for further replies.

l3obAero

Aerospace
Joined
Jan 23, 2009
Messages
13
Location
US
I have a script that finds a Geo Set by a certain name, and proceeds to extract information from that set. The problem I discovered is that the code - 'Set Level1 = OriginPart.HybridBodies.Item("Fasteners")' will actually find the first set with the string "Fasteners" in the name; such as "Upper_Fasteners_Bolts". Since it is finding the first occurance of the string "Fasteners" in the name, I my not get to the Set I'm looking for. I have added code to catch when the set is not correct by name; however, I have not figured out how to move on past that 'false set'
Is there a way to make it find just the set that is called "Fasteners" and ignore sets with the string "Fasteners" within a longer name?
Or,.... is there a way to make it proceed past that 'false item' and move on to the next occurance of "Fasteners" in a name? If I go back to search the item name again in the script, it just finds the first occurance in the tree again....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top