When a list is passed as an argument, only the first item is considered for the operation. How to fix this issue?
In Hypermesh, when using *createmark, I am trying to use the "by all nodes" option to select elements
I stored a list of nodes in a variable named lst_nodes, and further I use this variable in the command below
*createmark elems 1 "by all nodes" $lst_nodes
When this statement is executed, the elements associated with the first node item in the list 'lst_nodes' is added to the mark.
All other elements associated with the other node items in the list are not added to the mark.
I would like to know how to fix this issue.
Thanks in advance
Regards,
Akash P
Answers
-
try hm_createmark instead
or use:
eval "*createmark. ........"
0 -
Adriano A. Koga_21884 said:
try hm_createmark instead
or use:
eval "*createmark. ........"
I tried both.. And it does not work.
lst_nodes has 420 nodes and a total of 400 elements need to be selected in the model.
But as you can see only 4 elements get selected.
0 -
Akash Purushothaman said:
I tried both.. And it does not work.
lst_nodes has 420 nodes and a total of 400 elements need to be selected in the model.
But as you can see only 4 elements get selected.
there's no option 'by all nodes'...that's why this doesn't work.
https://2021.help.altair.com/2021/hwdesktop/hwd/topics/reference/hm/_createmark.htm
In order to do that you could use the '*findmark' command, to find the attached elements to your input nodes.
0 -
Adriano A. Koga_21884 said:
there's no option 'by all nodes'...that's why this doesn't work.
https://2021.help.altair.com/2021/hwdesktop/hwd/topics/reference/hm/_createmark.htm
In order to do that you could use the '*findmark' command, to find the attached elements to your input nodes.
From the help link you shared, I could find the option "by all nodes" under Supported Options. Attached image for your reference
Link - Supported Options
0 -
Akash,
I think the easiest way to do this is with the expand notation in TCL.
https://wiki.tcl-lang.org/page/%7B*%7D
*createmark elems 1 "by all nodes" {*}$lst_nodes
1