How to add a layer to layered section in mechanical?

Vishnu
Vishnu Member, Employee Posts: 198
Name Dropper First Anniversary Solution Developer Community of Practice Member First Comment
edited June 2023 in Structures

You may need to add layers to the layered section object like below:

Layered Section

Tagged:

Answers

  • Vishnu
    Vishnu Member, Employee Posts: 198
    Name Dropper First Anniversary Solution Developer Community of Practice Member First Comment
    Answer ✓
    my_layered_section = ExtAPI.DataModel.Project.Model.Geometry.AddLayeredSection()
    my_layered_section.Name = "my_layered_section"
    
    first_layer_material = 'Structural Steel'
    first_layer_thickness = 10
    first_layer_angle_in_degrees = 30
    
    second_layer_material = 'Structural Steel'
    second_layer_thickness = 15
    second_layer_angle_in_degrees = 25
    
    #Now add the layers like below
    my_layered_section.Layers.AddThicknessLayer(first_layer_material,first_layer_thickness,first_layer_angle_in_degrees)
    my_layered_section.Layers.AddThicknessLayer(second_layer_material,second_layer_thickness,second_layer_angle_in_degrees)