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.
can you people any one is having idea about get the line numbers in a perticular component in hypermesh using tcl/tk
Hi Kiran,
please post questions about macros in the Hypermesh macros section.
I don't understand what you want to do. To get the thickness of a component you can use:
set compT [ hm_getcompthickness $cid ]
compT... result, thickness
cid... component id
Regards,
Mario
Hi mario ,
Thanks for your reply . by using set compT [ hm_getcompthickness $cid ] , we can get the thickness only if its assigned . what I want is I want a macro that should calculate the thickness by finding out the distance between the two lines. Hope you got my point
thats not so easy.
I can post you a short macro to get the distance between two lines. Try to adapt it...
proc distLineLine {} {
set selectedLineA ''
set selectedLineB ''
*clearmark lines 1
*createmarkpanel lines 1 'choose line to measure distance from'
set selectedLines [hm_getmark lines 1]
set selectedLineA [lindex $selectedLines 0]
*clearmark lines 2
*createmarkpanel lines 2 'choose line to measure normal to'
set selectedLines [hm_getmark lines 2]
set selectedLineB [lindex $selectedLines 0]
set listValues [hm_getclosestpointsbetweentwolines $selectedLineA $selectedLineB]
set xDistance [expr {abs([lindex $listValues 0]-[lindex $listValues 3])}]
set yDistance [expr {abs([lindex $listValues 1]-[lindex $listValues 4])}]
set zDistance [expr {abs([lindex $listValues 2]-[lindex $listValues 5])}]
set distance [expr sqrt(pow($xDistance,2)+pow($yDistance,2)+pow($zDistance,2))]
tk_messageBox -message 'Distance Line - Line: $distance'
}
distLineLine;
thanxs for Reply. But I dont want this . I want to select that lines automatically in a component.
thanks
Hi,
sometimes you have to do a little bit by youself ;-)
Hi, do you mean that we have to select the line manually in HM. Or We have to try to modify somthing in this program. Please clarify.
you have to replace the manual selection by a routine for automatic selection...
Regards
Hi KIRAN PUTTA123
I also think it is not easy to automatically measure thickness because it irregularly depends on CAD.
For a long time I've developed a tcl procedure to do this but it was not exactly in some cases
We cannot do anything we want. So just try to simplify your tasks first
rgds,
tinh
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…