Script: name for bolts

Alex.01
Alex.01 Altair Community Member
edited October 2020 in Community Q&A

Hi all,

 

I want to do an script which makes this:

I have a model with a lot of bolts which are formed for 4 or 5 bar2 elements. I want to do an script which groupes each bolt (with its bar2 elements) and generates a tag or name for it (i.e. Bolt 1, Bolt 1001). The input would be 1 bar2 element, and I think I could do it by using *findmark command but I don't know how to carry on.

Do you have any ideas to help me ?

 

Thanks in advance.

 

Regards,

Alex

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited March 2018

    Can you take a photo to shows what you had, and another that shows what you want?

    I can't understand your description

  • Alex.01
    Alex.01 Altair Community Member
    edited March 2018

    Hi tinh, thanks for your answer but finally I could do the script.

    Anyway, what I had was this (bolt made with several 1d elements):

    image.png.51a46c4da373d605e56963ec07479cfd.png

     

    And what I wanted was this (a tag with a ID for the bolt, i.e.5003) :

    image.png.a934ffd0afcf5c427b89d7805de5b5d7.png

     

    But as I said before I could develop de script.

    You can delete this topic if you want considering it doesn't contribute to the forum.

    Many thanks.

  • tinh
    tinh Altair Community Member
    edited March 2018

    Hi, It's good

    so you will input 1 bar elem, and then use *findmark to find attached bar elems to group them?

    you also can use *createmark with option 'by attached'.