MIN\MAX nodes in a defines range
Dear team,
I am interested in finding out the MIN\MAX node number(in my case nodes are randomly numbered and i want to find min\max from a defined range of node number). For that I have used
::hwat::utils::CreateMark 'nodes' 1 all;
set h [hm_getmark nodes 1]
set maxall [::tcl::mathfunc::max {*}$h]
This works fine for small geometries. but it takes high time for large one's. While the Min\Max button does it very fast. So can you please suggest any code\script do it in faster way..or command for min\max (blue color) button..
Answers
-
Use hm_entityminid and hm_entitymaxid
0 -
thanks for your reply.
hm_entitymaxid is giving the max for *all* the nodes.
i was looking for the max for nodes only in a certain range of nodes.
this would be similar to choosing nodes by id and then using the 'min/max' blue button.
0 -
Use lsort to sort the ID list then extract 1st and end items
0