Skip to main content

Mechanical scripting interface

MaterialCombination

Last update: 14.01.2025

class Ansys.ACT.Automation.Mechanical.MaterialCombination

Bases: object

MaterialCombination class.

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()

Activate the current object.

MaterialCombination.AddComment()

Creates a new child Comment.

MaterialCombination.AddFigure()

Creates a new child Figure.

MaterialCombination.AddImage(filePath: str)

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)

Add a material to the combination.

MaterialCombination.AddMaterialAssignment()

Run the AddMaterialAssignment action.

MaterialCombination.AddMaterialByName(name: str)

Add a material to the combination by name.

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

Copies all visible properties from this object to another.

MaterialCombination.CreateMaterialAssignment()

Run the CreateMaterialAssignment action.

MaterialCombination.CreateParameter(propName: str)

Creates a new parameter for a Property.

MaterialCombination.Delete()

Delete the MaterialCombination.

MaterialCombination.Duplicate()

Creates a copy of the current DataModelObject.

MaterialCombination.GetAsDictionary()

Returns material as a python dictionary

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

Gets the list of children, filtered by type.

MaterialCombination.GetParameter(propName: str)

Gets the parameter corresponding to the given property.

MaterialCombination.GroupAllSimilarChildren()

Run the GroupAllSimilarChildren action.

MaterialCombination.GroupSimilarObjects()

Run the GroupSimilarObjects action.

MaterialCombination.PropertyByAPIName(name: str)

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)

Get a property by its unique name.

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

Remove material from the combination.

MaterialCombination.RemoveMaterialByName(name: str)

Remove material from the combination by name.

MaterialCombination.RemoveParameter(propName: str)

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