Skip to main content

Mechanical scripting interface 2025

`MaterialCombination`

Last update: 09.03.2026

class Ansys.ACT.Automation.Mechanical.MaterialCombination

Bases: object

Overview

Methods

Name Description
Activate Activate the current object.
AddComment Creates a new child Comment.
AddFigure Creates a new child Figure.
AddImage Creates a new child Image.
AddMaterial Add a material to the combination.
AddMaterialAssignment Run the AddMaterialAssignment action.
AddMaterialByName Add a material to the combination by name.
CopyTo Copies all visible properties from this object to another.
CreateMaterialAssignment Run the CreateMaterialAssignment action.
CreateParameter Creates a new parameter for a Property.
Delete Delete the MaterialCombination.
Duplicate Creates a copy of the current DataModelObject.
GetAsDictionary Returns material as a python dictionary
GetChildren Gets the list of children, filtered by type.
GetParameter Gets the parameter corresponding to the given property.
GroupAllSimilarChildren Run the GroupAllSimilarChildren action.
GroupSimilarObjects Run the GroupSimilarObjects action.
PropertyByAPIName Get a property by its API name.
PropertyByName Get a property by its unique name.
RemoveMaterial Remove material from the combination.
RemoveMaterialByName Remove material from the combination by name.
RemoveParameter Removes the parameter from the parameter set corresponding to the given property.

Properties

Name Description
AssignedBodies Gets the AssignedBodies.
Children Gets the list of children.
Comments Gets the list of associated comments.
DataModelObjectCategory Gets the current DataModelObject’s category.
Figures Gets the list of associated figures.
Images Gets the list of associated images.
InternalObject Gets the internal object. For advanced usage only.
MaterialModels Returns a collection of the material models that this material is made up of.
Materials Dictionary of Material to Fraction in Combination.
Properties Gets the list of properties for this object.
Suppressed Suppress or unsuppress the MaterialCombination.
VisibleProperties Gets the list of properties that are visible for this object.

Property detail

property MaterialCombination.AssignedBodies : int | None

Gets the AssignedBodies.

property MaterialCombination.Children : List[Ansys.Mechanical.DataModel.Interfaces.IDataModelObject] | None

Gets the list of children.

property MaterialCombination.Comments : Iterable[Ansys.ACT.Automation.Mechanical.Comment] | None

Gets the list of associated comments.

property MaterialCombination.DataModelObjectCategory : Ansys.Mechanical.DataModel.Enums.DataModelObjectCategory | None

Gets the current DataModelObject’s category.

property MaterialCombination.Figures : Iterable[Ansys.ACT.Automation.Mechanical.Figure] | None

Gets the list of associated figures.

property MaterialCombination.Images : Iterable[Ansys.ACT.Automation.Mechanical.Image] | None

Gets the list of associated images.

property MaterialCombination.InternalObject : Ansys.Common.Interop.DSObjectsAuto.IDSMaterialCombinationAuto | None

Gets the internal object. For advanced usage only.

property MaterialCombination.MaterialModels : List[Any] | None

Returns a collection of the material models that this material is made up of.

property MaterialCombination.Materials : Ansys.ACT.Automation.Mechanical.MaterialFractionDictionary | None

Dictionary of Material to Fraction in Combination.

property MaterialCombination.Properties : tuple[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties for this object.

property MaterialCombination.Suppressed : bool | None

Suppress or unsuppress the MaterialCombination.

property MaterialCombination.VisibleProperties : tuple[Ansys.ACT.Automation.Mechanical.Property] | None

Gets the list of properties that are visible for this object.

Method detail

MaterialCombination.Activate() → None

Activate the current object.

MaterialCombination.AddComment() → Ansys.ACT.Automation.Mechanical.Comment

Creates a new child Comment.

MaterialCombination.AddFigure() → Ansys.ACT.Automation.Mechanical.Figure

Creates a new child Figure.

MaterialCombination.AddImage(filePath: str) → Ansys.ACT.Automation.Mechanical.Image

Creates a new child Image.
If a filePath is provided, the image will be loaded from that file,
if not, the image will be a screen capture of the Geometry window.

MaterialCombination.AddMaterial(material: Ansys.ACT.Automation.Mechanical.Material) → None

Add a material to the combination.

MaterialCombination.AddMaterialAssignment() → Ansys.ACT.Automation.Mechanical.MaterialAssignment

Run the AddMaterialAssignment action.

MaterialCombination.AddMaterialByName(name: str) → None

Add a material to the combination by name.

MaterialCombination.CopyTo(other: Ansys.ACT.Automation.Mechanical.DataModelObject) → None

Copies all visible properties from this object to another.

MaterialCombination.CreateMaterialAssignment() → Ansys.ACT.Automation.Mechanical.MaterialAssignment

Run the CreateMaterialAssignment action.

MaterialCombination.CreateParameter(propName: str) → Ansys.ACT.Interfaces.Mechanical.IParameter

Creates a new parameter for a Property.

MaterialCombination.Delete() → None

Delete the MaterialCombination.

MaterialCombination.Duplicate() → Ansys.Mechanical.DataModel.Interfaces.IDataModelObject

Creates a copy of the current DataModelObject.

MaterialCombination.GetAsDictionary() → dict[Any, Any]

Returns material as a python dictionary

MaterialCombination.GetChildren(recurses: bool, children: List[ChildrenType]) → List[ChildrenType]

Gets the list of children, filtered by type.

MaterialCombination.GetParameter(propName: str) → Ansys.ACT.Interfaces.Mechanical.IParameter

Gets the parameter corresponding to the given property.

MaterialCombination.GroupAllSimilarChildren() → None

Run the GroupAllSimilarChildren action.

MaterialCombination.GroupSimilarObjects() → Ansys.ACT.Automation.Mechanical.TreeGroupingFolder

Run the GroupSimilarObjects action.

MaterialCombination.PropertyByAPIName(name: str) → Ansys.ACT.Automation.Mechanical.Property

Get a property by its API name.
If multiple properties have the same API Name, only the first property with that name will be returned.

MaterialCombination.PropertyByName(name: str) → Ansys.ACT.Automation.Mechanical.Property

Get a property by its unique name.

MaterialCombination.RemoveMaterial(material: Ansys.ACT.Automation.Mechanical.Material) → None

Remove material from the combination.

MaterialCombination.RemoveMaterialByName(name: str) → None

Remove material from the combination by name.

MaterialCombination.RemoveParameter(propName: str) → None

Removes the parameter from the parameter set corresponding to the given property.

Connect with Ansys