API to find elements connected to node in Hyperview

Jouher_20819
Jouher_20819 Altair Community Member
edited June 2022 in Community Q&A

HI Team,

Please provide API to find elements connected to node in Hyperview

Answers

  • Ben Buchanan
    Ben Buchanan
    Altair Employee
    edited October 2021

    There are a couple commands that will do this.

    First *findmark:

    https://2021.help.altair.com/2021/hwdesktop/hwd/topics/reference/hm/_findmark.htm

     

    hm_createmark can also do this by using the "by node" option. Something like this:

    *createmarkpanel nodes 1 (user selects node or some other method of picking node)

    hm_createmark elems 1 "by node" [hm_getmark nodes 1]

    set elemList [hm_getmark elems 1]

  • Nagahashi Kouta
    Nagahashi Kouta Altair Community Member
    edited June 2022

    Hello,Jouher

    Good evening

    I think the following few lines of commands can help you.

    set node_set [mdl_handle AddSelectionSet node]
    mdl_handle GetSelectionSetHandle node_select_handle $node_set
    node_select_handle Add "id $nodeid"
    set elems_set [mdl_handle AddSelectionSet element]
    mdl_handle GetSelectionSetHandle elems_select_handle $elems_set
    elems_select_handle Add "selectionset == [node_select_handle GetID]"

     

    Just for your reference