Isolate an include by Include Name
I would like to create a TCL script to isolate an include by an 'include name' in hypermesh.
I'm currently able to isolate by include ID. Could you please provide syntax (example) to isolate an include by first 3 digits of an include.
I'm expecting something like this.
User Input: 500
Searches for an include name which starts with 500_xxxxx. Isolates the include contents.
Regards,
Gokul
Answers
-
what about the filtering option in the top area of the browser?
If you are in the include view of the browser, you could filter by a keyword and get them available.
0 -
Thanks for your reply. Wanted to know if there are any commands to solve this purpose as the user need not switch views to isolate an include.
0 -
I'm sorry, now i saw that you want a script.
I believe you will need to use some combination of commands:
hm_getincludes -byfullname >> gives you a list of include names in your model
from this list, i would use regular TCL commands to find the particular expression/keyword. (google must have this)
Then, to select all the contents of an include, use hm_getincludeentities, as the example below.
Example
To find all of the entities in include 1 and delete them:
hm_markclearall 1 set ent_types [hm_getincludeentities 1 1] foreach ent_type $ent_types { catch {*deletemark $ent_type 1} }
0