Tcl Command Find Attached elements to an element

sanket_patil
sanket_patil Altair Community Member
edited October 2020 in Community Q&A

Hello All,

 

I want to select attached elements to a particular element. What is tcl command for this selection?

 

Regards,

Sanket 

 

Answers

  • sandeepballiwar
    sandeepballiwar New Altair Community Member
    edited November 2019

    you use appendmark

  • sanket_patil
    sanket_patil Altair Community Member
    edited November 2019

    @sandeepballiwar Hello Sandeep,

     

    Can you please elaborate it?

     

    Regards,

    Sanket 

  • sandeepballiwar
    sandeepballiwar New Altair Community Member
    edited November 2019

    Try something like this

     

    set elemID 1;
    *createmark elems 1 $elemID;
    *appendmark elems 1 'by adjacent'
    set lst_adjacent_elems [hm_getmark elems 1]

  • sanket_patil
    sanket_patil Altair Community Member
    edited November 2019

    @sandeepballiwarThanks for the help. 

     

    What to do if i want to select all elements attached to element as above commands are giving adjacent elements only..should i need to use for loop here?

     

    Regards,

    Sanket

     

  • sandeepballiwar
    sandeepballiwar New Altair Community Member
    edited November 2019

    try to use *appendmark elems 1 'by attached'

  • sanket_patil
    sanket_patil Altair Community Member
    edited November 2019

    @sandeepballiwarIts working perfect. Thank you so much!

     

    Regards,

    Sanket