How to get midpointx midpointy value for a crosssection

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

Hi , 

 

i need to get cross section values from the HM.

 

<?xml version="1.0" encoding="UTF-8"?>59b7d4451253c_Image1.thumb.PNG.f408c7910c6f737f3ca5a725d362d108.PNG

For your reference i attached the image,

 

from this image we can understand there details of the selected crosssection.

Image2.PNG.a35011ca6daa18eea367b99dc1cc1bde.PNG 

 

 

Used code to get the details 

 

Set SecID '320014'

set SectNam [hm_getcollectorname crosssections $SectID]  ##This giving the  name of the Cross Section ##

But while trying to get the midpointx ,midpointy ,midpointz its always giving 0

 

            set MidX [hm_getentityvalue crosssections $SectID midpointx 0]
            set MidY [hm_getentityvalue crosssections $SectID midpointy 0]
            set MidZ [hm_getentityvalue crosssections $SectID midpointz 0]
            set MidNode [hm_getentityvalue crosssections $SectID basenode.id 0]
            set NormalX [hm_getentityvalue crosssections $SectID normalx 0]
            set NormalY [hm_getentityvalue crosssections $SectID normaly 0]
            set NormalZ [hm_getentityvalue crosssections $SectID normalz 0]

 

for this i getting zero for all.

 

Kindly help me to solve this issue 

 

Thanks in Advance

 

Regards

 

Suresh Kumar V 

 

 

 

 

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • tinh
    tinh Altair Community Member
    edited September 2017

    Hi,

    crosssections do not have data names as midpointx, midpointy, midpointz

    for normal, you have to input data names 'Normal_x' 'Normal_y' 'Normal_z'

    refer to help document about data names of crosssections

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hi tinh, 

     

    there is no datanames as crosssections but i didnt get entity value using groups.

     

    how can i get details for cross section using getentityvalue 

     

    Kindly help me to find out this issue.

     

    Thanks & Regards 

     

    Suresh Kumar V

  • tinh
    tinh Altair Community Member
    edited September 2017

    What are details that you need?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hi Tinh,

     

    i need to change the nodes of the cross section i used this code to change the nodes but its not changing. 

     

    ##############################################################################

        #After Importing the Sections 
        
        #getting the sections in a list 
        
        *createmark crosssections 1 'all'
        set sec_ID_List [hm_getmark crosssections 1]
        
        #for createing the cross section need to select node first 
        
        foreach secID $sec_ID_List { 
        
            #giving user to select the N1
            
            *createmarkpanel nodes 1 'Select the Orgin Node'
            set Or_N1 [hm_getmark nodes 1]
            
            *createmarkpanel nodes 1 'Select the Axis Node N2'
            set Ax_N2 [hm_getmark nodes 1]
            
            *createmarkpanel nodes 1 'Select the Axis Node N3'
            set Ax_N3 [hm_getmark nodes 1]
            
            #setting the selected nodes 
            puts 'secID = $secID'
            puts 'Or_N1=$Or_N1'
            puts 'Ax_N2 = $Ax_N2'
            puts 'Ax_N3 = $Ax_N3'
            
            *setvalue crosssections id=$secID Axis_Origin_Node_N1= { nodes $Or_N1 }
            
            *setvalue crosssections id=$secID Axis_Node_N2= { nodes $Ax_N2 }
            
            *setvalue crosssections id=$secID Axis_Node_N3= { nodes $Ax_N3 }

     

    Kindly help me to change the data of the crosssection like 

    Three Nodes N1,N2,N3 and grshel_ID

     

    i attached image for your reference 

     

    <?xml version="1.0" encoding="UTF-8"?>59b935b3c34e8_IssueImage.thumb.PNG.4d8af8154cf49ed33ed80dbd43658efe.PNG

     

    Thanks & Regards 

     

    Suresh Kumar V 

     

  • tinh
    tinh Altair Community Member
    edited September 2017

    Please try changing {nodes $Or_N1} by 'nodes $Or_N1'

    And also for n2, n3

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Thanks a lot tinh , its working 

     

    Regards 

     

    Suresh 

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.