How do I retrieve SurfaceCoating Elements?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 454
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭
edited June 2023 in Structures

How do I retrieve SurfaceCoating Elements?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 454
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    Answer ✓

    Currently there is no direct function. This can however be done by retrieving the Elements associated with the MaterialId of the surface coating:

    scs = ExtAPI.DataModel.GetObjectsByType(Ansys.ACT.Automation.Mechanical.SurfaceCoating)
    sc_1 = scs[0]
    solution = Model.Analyses[0].Solution
    solver_data = solution.SolverData
    coating_data = solver_data.GetObjectData(sc_1)
    matid_sc_1 = coating_data.MaterialId.ToString()
    
    # Get list of surface coating Elements
    solver_data.ElementIdsByMaterialId(matid_sc_1)