Getting the length of multiple RBE2 elements at a time

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

I have created an assembly model with around 200 RBE2 connections.

My requirement is to measure the length of all the RBE2 element and save it as text or excel file.

The number of RBE2 elements will vary from project to project.

Is there any TCL script to measure the length of displayed RBE2 element and save the details as required.

Or is there any other method to make the process simple by displaying the length of all the RBE2 element on screen, so that the length can be checked visually.

 

Thanks,

Prabhu P

 

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited July 2018

    Hi,

    Try:

    *createmark elems 1 'by config' rigid rigidlink

    set ElemLengthValues [hm_getmarkvalue elems 1 length 0]

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    Hi Tinh,

     

    That worked really good. Thank you.

    But it is giving the output of all the RBE2 elements.

    Is it possible to get the values of on screen displayed elements alone.

  • tinh
    tinh Altair Community Member
    edited July 2018

    Hi

    the code is like this

    *createmark elems 1 'by config' rigid rigidlink

    *createmark elems 2 displayed

    *markintersection elems 1 elems 2

    set ElemLengthValues [hm_getmarkvalue elems 1 length 0]

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    Tinh,

     

    That's really awesome. Very helpful.

    I have one more request.

    Is it possible to tag the values to the respective element.

    Sample image is provided. In this image, the element number is displayed near to the respective element.

    Like wise, is it possible to get the values near to the respective element..

    <?xml version="1.0" encoding="UTF-8"?>sample.PNG

  • tinh
    tinh Altair Community Member
    edited July 2018

    Yes, it is possible.

    The code is like this:

    *createmark elems 1 'by config' rigid rigidlink

    *createmark elems 2 displayed

    *markintersection elems 1 elems 2

    set ElemLengthValues [hm_getmarkvalue elems 1 length 0]

    set ElemList [hm_getmark elems 1]

    foreach LengthValue $ElemLengthValues ElemID $ElemList {

         *tagcreate elems $ElemID [format %.3f $LengthValue] $ElemID 2

    }

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    Hi Tinh,

     

    This worked perfectly.....

     

    Thank you for the support....