Example Usage

The following example can be used as a basis of either the solve or evaluate script.

def runClassDemo_SectionData():
    #Loop around all element data objects.
    for ElementIterator in DesignAssessment.MeshData.Elements():
        #Cross Section Data is only available for beams.
        #First test to see if it's a beam as they support it.
        if 'Beam' in ElementIterator.Description:
            XSectionData = ElementIterator.CrossSectionData
            print XSectionData.Description
            if 'Tube' in XSectionData.Description:
                print "Diameter = " + str(XSectionData.TubeDiameter)
                print "Thickness = " + str(XSectionData.TubeThickness)
                
            if 'Beam' in XSectionData.Description:
                print "Web Thickness = " + str(XSectionData.BeamWebThickness)
                print "Flange Thickness = " + str(XSectionData.BeamFlangeThickness)
                print "Fillet Radii = " + str(XSectionData.BeamFilletRadii)
                print "Height = " + str(XSectionData.BeamHeight)
                print "Width = " + str(XSectionData.BeamWidth)
runClassDemo_SectionData()

Release 18.2 - © ANSYS, Inc. All rights reserved.