Hypermesh - selecting components with names containing a certain string
Hi all,
Am trying to find a line of code which will select a component / assembly / set etc, when the name contains a certain string... for instance the assembly name may read 'apples-001001a' but I want a script to select that assembly if the name contains 'apples' as the number could change in the future.
Any ideas?
Cheers
Andy
Answers
-
Below cmd could work:
*createmark comps 1 'contains value' name apples* 1
puts [hm_getmark comps 1]
0 -
Awesome Ting,
Many thanks again.
Cheers
Andy
0 -
What I would like to do is createmark elements by assembly name where assemblies contain the word Apples...
*createmark elements 1 'by assembly name' Apples
I've tried *createmark elements 1 'by assembly name' 'contains value' Apples* 1 but that's not it....
Any ideas?
0 -
This is it:
*createmark assems 1 'contains value' name Apples* 1
*createmark elems 1 'by assem id' {*}[hm_getmark assems 1]
0 -
Ah got ya. Thanks again Tinh (apologies, I realise that I actually mis-spelt your name earlier)
0