get_objects_by_material#

Modeler3D.get_objects_by_material(material: str | None = None) list#

Get a list of objects either of a specified material or classified by material.

Parameters:
materialstr

Name of the material. The default is None.

Returns:
list of class:ansys.aedt.core.modeler.cad.object_3d.Object3d

If a material name is not provided, the method returns a list of dictionaries where keys are material names of conductors, dielectrics, gases, and liquids respectively in the design and values are objects assigned to these materials. If a material name is provided, the method returns a list of objects assigned to the material.

References

>>> oEditor.GetObjectsByMaterial

Examples

>>> from ansys.aedt.core.modeler.cad.primitives import GeometryModeler
>>> obj = GeometryModeler()
>>> obj.get_objects_by_material(material="copper")