How to get node id from coordinates?
Altair Forum User
Altair Employee
Answers
-
Hi
sure, hm_getclosestnode is not working with local coordinate, you have to provide global coordinate
maybe, there is some commands to calculate global coordinate, please search them
below I will create a node at that position, and retrieve its global coordinate to provide to hm_getclosestnode
*createnode 0 0 25 658001 ; #create a node at the coordinate
set NodeId [hm_latestentityid nodes]
set gx [hm_getentityvalue nodes $NodeId globalx 0]
set gy [hm_getentityvalue nodes $NodeId globaly 0]
set gz [hm_getentityvalue nodes $NodeId globalz 0]
*createmark nodes 1 -1
*nodemarkcleartempmark
puts [hm_getclosestnode $gx $gy $gz]
0 -
Hi tinh,
Thanks for your suggestion.
Regards
Gopal
0