TCL Code Force Components in Local System

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

Hello Everyone,

 

I am writing TCL script.

 

I am facing problem to retrieve the information of Force components defined in the Local Co-ordinate Systems.

 

I am able to acces the Components in Global Cordinates with code:-

 

hm_getentityvalue loads $loadid comp1 0 -byid -> in three axes  of Global System

 

but what can be the code for Local System ?

 

Thanks !!

 

BR Ashish

Answers

  • tinh
    tinh Altair Community Member
    edited October 2017

    Hi, you have to convert components to local system

    like this:

    set X [hm_getentityvalue loads $loadid baselocationx 0]

    set Y [hm_getentityvalue loads $loadid baselocationy 0]

    set Z [hm_getentityvalue loads $loadid baselocationz 0]

    set C1 [hm_getentityvalue loads $loadid comp1 0]

    set C2 [hm_getentityvalue loads $loadid comp2 0]

    set C3 [hm_getentityvalue loads $loadid comp3 0]

    set Sid [hm_getentityvalue loads $loadid inputsystemid 0]

    set localC1 [hm_xpointvectorlocal $Sid $X $Y $Z $C1 $C2 $C3]

    set localC2 [hm_ypointvectorlocal $Sid $X $Y $Z $C1 $C2 $C3]

    set localC3 [hm_zpointvectorlocal $Sid $X $Y $Z $C1 $C2 $C3]

  • Ashish_MEXPERT
    Ashish_MEXPERT Altair Community Member
    edited October 2017

    Thank your so much Tinh , my problem is solved :-)

     

    BR 

     

    Ashish