🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Coordinates of a node in hyperview using TCL

User: "Rachit Semalty"
Altair Community Member
Updated by Rachit Semalty

Hi. I want to know the coordinates of a node using TCL code in hyperview. My main task is to find a node attached to a component (not orphan nodes) that is farthest from the origin. I am planning to find coordinates of all the nodes, around 1000-2000, and then sort them. Is there any other better way? I want the node that has maximum value of the z coordinate.

 

Regards,

Rachit

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "Nagahashi Kouta"
    Altair Community Member
    Accepted Answer
    Updated by Nagahashi Kouta

    Hi, Rachit Semalty

    The following script will help you.

    hwi OpenStack
    hwi GetSessionHandle sess
    sess GetProjectHandle proj
    proj GetPageHandle page [proj GetActivePage]
    page GetWindowHandle win [page GetActiveWindow]
    win GetClientHandle cln
    cln GetModelHandle mdl [cln GetActiveModel ]

    set node_set [mdl AddSelectionSet node]
    mdl GetSelectionSetHandle node_sel $node_set
    node_sel Add "all"

     

    set node_coord_list [list ]

    mdl GetQueryCtrlHandle qry
    qry SetQuery "node.coords"
    qry SetSelectionSet $node_set
    qry GetIteratorHandle iter
    for {iter First} {[iter Valid]} {iter Next} {
         lappend node_coord_list [lindex [iter GetDataList] 0]
    }