need your help: extract Ids from elements
dear for all
i need to extract nodes from several comp like green elements in ordered way:
the idea is to extract nodes from begin 1 to end 1 and from begin 2 to end 2 separately
i used [hm_getvalue comps id=$compid dataname=nodes.id] --> no ordred Ids
any propositions?
thx
Answers
-
I don't if there's a function to do that quickly.
If not, you can build a ordered list yourself with Tcl.
0 -
I guess, if hm generates free edges, it will create them ordered
so try:
*createmark elems 1 'by comp id' $compid
*findloops elems 1
*createmark elems 1 'by comp name' ^loops
set OrderedNodes [hm_getmarkvalue elems 1 nodes 0]
puts $OrderedNodes
0 -
From version 2017 please try this command:
hm_formnodelistsfrommark
Or command:
hm_getedgeloops
0 -
thank you for your reply,
for the first post: it is equivalent to: hm_getvalue comps id=$compid dataname=nodes.id
for the second we use version 13 or 14
i'm trying with *markintersection
0 -
'for the first post: it is equivalent to: hm_getvalue comps id=$compid dataname=nodes.id'
Are them output ordered?
As I tested, they are.
0 -
-
you can extract them by
set index1 [lsearch $nodelist 353389]
set index2 [lsearch $nodelist 352605]
set ligne1 [lrange $nodelist $index1 $index2]
set index3 [lsearch $nodelist 364500]
set index4 [lsearch $nodelist 364593]
set ligne2 [lrange $nodelist $index3 $index4]
0