You can use SolverData
APIs to get the maximum element ID,
maximum node ID, and maximum element type for the Ansys solver target.
To get the maximum element ID:
solver_data.MaxElementId
To get the maximum node ID:
solver_data.MaxNodeId
To get the maximum element type:
solver_data.MaxElementType
To get the node IDs associated with a material ID:
solver_data.NodeIdsByMaterialId(int matId)
To get the element IDs associated with a material ID:
solver_data.ElementIdsByMaterialId(int matId)
Important: The following functions should be used with the background thread.
NodeIdsByMaterialId
ElementIdsByMaterialId
To use these functions with a Mechanical callback, such as OnSolve, OnGenerate, or Evaluate, the callback must be used with the tag: InvokeUIThread=False.