How do I retrieve SurfaceCoating Elements?

Options
Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 419
5 Likes First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

How do I retrieve SurfaceCoating Elements?

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 419
    5 Likes First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓
    Options

    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)