AssignMaterial

Assigns a material to specified object(s).

UI Access Modeler > Assign Material.
Parameters
Name Type Description
<SelectionsArray> Array Structured array. See: SelectionsArray.
<AttributesArray> Array

Structured array. See: AttributesArray.

This script supports the following attributes: 

  • MaterialValue
  • SolveInside
  • ShellElement
  • ShellElementThickness
  • IsMaterialEditable
  • UseMaterialAppearance
  • IsLightweight
Return Value None.

Python Syntax

AssignMaterial(<SelectionsArray>, <AttributesArray>)

Python Example

oEditor.AssignMaterial(

["NAME:Selections",

"AllowRegionDependentPartSelectionForPMLCreation:=", True,

"AllowRegionSelectionForPMLCreation:=", True,

"Selections:=" , "Box1"

],

["NAME:Attributes",

"MaterialValue:=" , "diamond",

"SolveInside:=" , False,

"ShellElement:=" , False,

"ShellElementThickness:=" , "nan",

"IsMaterialEditable:=" , True,

"UseMaterialAppearance:=" , False,

"IsLightweight:=" , False

])