The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hello,
I need to access the distance between two nodes using a tcl file.
How can I do it ?
Thanks
Hi Benoit,
you can use the command hm_getdistance to do that
Hello Toan,
Thanks for your help.
Hi
It is hm command
Replace ( and ) and , by space to get tcl commands
If you are searching for closest node on surf, use hm_measureshortestdistance, do not use loops which will slow down program
Hi Benoit, you can use the command hm_getdistance to do that
Hello
When I use the command hm_getdistance HyperMesh returns 4 values and I need to put the fist one in a variable distance.
(Documents) 4 % hm_getdistance nodes 3723 5317 0 0 68.91864249631689 41.6426000000006 54.90046920132 -1.2694999999999936
How can I isolate the first value in a variable?
thanks
For what you want, you need to use TCL command: lindex.
this command is used to return the element from a list.
Try the following code.
Cheers
set distance_list [hm_getdistance nodes 3723 5317 0]. set distance [lindex $distance_list 0]
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…