How to add materials from material library in Mechanical with ACT?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 444
250 Likes Solution Developer Community of Practice Member Ansys Employee First Anniversary
✭✭✭✭
edited June 2023 in Structures

How to add materials from material library in Mechanical with ACT?

enter image description here

Tagged:

Best Answer

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 444
    250 Likes Solution Developer Community of Practice Member Ansys Employee First Anniversary
    ✭✭✭✭
    Answer ✓
    cmd = """
    library1 = EngData.OpenLibrary(
        Name="Composite Materials",
        Source="Composite_Materials.xml")
    system1 = GetSystem(Name="SYS")
    engineeringData1 = system1.GetContainer(ComponentName="Engineering Data")
    matl1 = engineeringData1.ImportMaterial(
        Name="E-Glass",
        Source="Composite_Materials.xml")
    """
    
    ExtAPI.Application.ScriptByName('journaling').ExecuteCommand(cmd)
    ExtAPI.DataModel.Project.Model.RefreshMaterials()
    

Answers