PhysicalMaterial Class

class NXOpen.PhysicalMaterial

Bases: NXOpen.Material, NXOpen.CAE.IExportableFEEntity

Represents Physical Material

New in version NX5.0.0.

Properties

Property Description
IsOccurrence Returns whether this object is an occurrence or not.
JournalIdentifier Returns the identifier that would be recorded in a journal for this object.
Name Returns the custom name of the object.
OwningComponent Returns the owning component, if this object is an occurrence.
OwningPart Returns the owning part of this object
Prototype Returns the prototype of this object if it is an occurrence.
Tag Returns the Tag for this object.

Methods

Method Description
AssignObjects Assigns the material to solid bodies
AssignToAllBodies Assigns the material to all solid bodies
AssignToBodiesNotUsingPreferredMaterial Assigns the material to all solid bodies not using the preferred material.
AssignToBodiesWithoutMaterials Assigns the material to all solid bodies without a material already assigned.
Copy Creates new (copied) material with same properties as the original material.
CopyLibMatlToPart Copies a library material to a part.
CreateAttributeIterator Create an attribute iterator
Delete Deletes a material from the part.
DeleteAllAttributesByType Deletes all attributes of a specific type.
DeleteAttributeByTypeAndTitle Deletes an attribute by type and title.
DeleteOrphanedUserMaterialModels Deletes Orphaned User Material (UMAT) Models and Properties from a material.
DeleteUserAttribute Deletes the first attribute encountered with the given Type, Title.
DeleteUserAttributes Deletes the attributes on the object, if any, that satisfy the given iterator
DeleteUserMaterialModels Deletes User Material (UMAT) Model Property Values from a material.
FindObject Finds the NXOpen.NXObject with the given identifier as recorded in a journal.
GetAlternatename Returns the material alternate name
GetAttributeTitlesByType Gets all the attribute titles of a specific type.
GetBooleanUserAttribute Gets a boolean attribute by Title and array Index.
GetCategory Returns the material category
GetComputationalTimeUserAttribute Gets a time attribute by Title and array Index.
GetDescription Returns the material description
GetId Returns the material id
GetIntegerAttribute Gets an integer attribute by title.
GetIntegerUserAttribute Gets an integer attribute by Title and array Index.
GetLibraryName Returns the library name if the material was loaded from a library
GetMaterialCategory Returns the material category using international character set
GetMaterialEditable Returns whether the material can be modified or not
GetMaterialType Returns the material type
GetNextUserAttribute Gets the next attribute encountered on the object, if any, that satisfies the given iterator.
GetParentlibrarymaterial Returns the parent libary material information
GetParentmaterial Returns the parent material that the material was copied from
GetPdmReferenceAttributeValue Gets the value of PDM Reference attribute for given object.
GetPropTable Returns the property table that contains the properties for this material.
GetRealAttribute Gets a real attribute by title.
GetRealUserAttribute Gets a real attribute by Title and array Index.
GetReferenceAttribute Gets the reference string (not the calculated value) of a string attribute that uses a reference string.
GetSolverCardSyntax Returns the solver card syntax strings for this entity.
GetStringAttribute Gets a string attribute value by title.
GetStringUserAttribute Gets a string attribute by Title and array Index.
GetSubcategory Returns the material sub-category
GetTeamcenterMaterialItem Returns the Teamcenter item if the material was loaded from Teamcenter
GetTimeAttribute Gets a time attribute by title.
GetTimeUserAttribute Gets a time attribute by Title and array Index.
GetUsage Finds the objects using this material
GetUserAttribute Gets the first attribute encountered on the object, if any, with a given Title, Type and array Index.
GetUserAttributeAsString Gets the first attribute encountered on the object, if any, with a given title, type and array index.
GetUserAttributeCount Gets the count of set attributes on the object, if any, that satisfy the given iterator.
GetUserAttributeLock Determine the lock of the given attribute.
GetUserAttributeSize Gets the size of the first attribute encountered on the object, if any, with a given Title and Type.
GetUserAttributeSourceObjects Returns an array of objects from which this object presents attributes.
GetUserAttributes Gets all the attributes that have been set on the given object, if any, that satisfy the given iterator.
GetUserAttributesAsStrings Gets all the attributes that have been set on the given object.
GetVersion Returns the material version
HasParentlibrarymaterial Returns whether the material was copied from a library material
HasParentmaterial Returns whether the material was copied from another material
HasUserAttribute Determines if an attribute exists on the object, that satisfies the given iterator
InfoMaterial Displays the property values for the material in the information window.
InfoMaterialToFile Writes the property values for the material to a file.
IsLoadedLibraryMaterial Returns true if the material is loaded from a library (not Teamcenter)
IsLoadedTeamcenterMaterialItem Returns true if the material is loaded from Teamcenter
IsNonlibraryMaterial Returns true if the material is locally defined (not a library/Teamcenter material)
Print Prints a representation of this object to the system log file.
ReplaceMaterialAssignment Replaces all assignments of one material with another material in the part where the material is assigned.
ResyncWithLibraryDefinition Re-synchronizes a loaded library material to match its latest library definition.
SetAlternatename Sets the material alternate name
SetAttribute Creates or modifies an integer attribute.
SetBooleanUserAttribute Creates or modifies a boolean attribute with the option to update or not.
SetCategory Sets the material category
SetDescription Sets the material description
SetId Sets the material id
SetMaterialCategory Sets the material category using international character set
SetMaterialEditable Sets whether a material can be modified or not.
SetName Sets the custom name of the object.
SetPdmReferenceAttribute Sets the value of PDM Reference attribute on the object.
SetReferenceAttribute Creates or modifies a string attribute which uses a reference string.
SetSubcategory Sets the material sub-category
SetTimeAttribute Creates or modifies a time attribute.
SetTimeUserAttribute Creates or modifies a time attribute with the option to update or not.
SetUserAttribute Creates or modifies an attribute with the option to update or not.
SetUserAttributeLock Lock or unlock the given attribute.
UnassignAllObjects Removes the material assignment from all the objects that has it currently assigned
UpdateMaterialProperties Re-synchronizes a material with its definition.

Enumerations

PhysicalMaterialAssignWarning Enumeration Indicates the underlying issues when trying to assign material
PhysicalMaterialCategory Enumeration The different categories of materials.
PhysicalMaterialType Enumeration The different types of materials.

Property Detail

IsOccurrence

PhysicalMaterial.IsOccurrence

Returns whether this object is an occurrence or not.

-------------------------------------

Getter Method

Signature IsOccurrence

Returns:This object is an occurrence
Return type:bool

New in version NX3.0.0.

License requirements: None.

JournalIdentifier

PhysicalMaterial.JournalIdentifier

Returns the identifier that would be recorded in a journal for this object.

This may not be the same across different releases of the software.

-------------------------------------

Getter Method

Signature JournalIdentifier

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

Name

PhysicalMaterial.Name

Returns the custom name of the object.

-------------------------------------

Getter Method

Signature Name

Returns:
Return type:str

New in version NX3.0.0.

License requirements: None.

OwningComponent

PhysicalMaterial.OwningComponent

Returns the owning component, if this object is an occurrence.

-------------------------------------

Getter Method

Signature OwningComponent

Returns:
Return type:NXOpen.Assemblies.Component

New in version NX3.0.0.

License requirements: None.

OwningPart

PhysicalMaterial.OwningPart

Returns the owning part of this object

-------------------------------------

Getter Method

Signature OwningPart

Returns:The owning part of this object or null if it does not have an owner
Return type:NXOpen.BasePart

New in version NX3.0.0.

License requirements: None.

Prototype

PhysicalMaterial.Prototype

Returns the prototype of this object if it is an occurrence.

-------------------------------------

Getter Method

Signature Prototype

Returns:The prototype of this object or null if this object is not an occurrence
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

Method Detail

AssignObjects

PhysicalMaterial.AssignObjects

Assigns the material to solid bodies

Signature AssignObjects(objects)

Parameters:objects (list of NXOpen.NXObject) – objects to assign this material to

New in version NX6.0.0.

License requirements: None.

AssignToAllBodies

PhysicalMaterial.AssignToAllBodies

Assigns the material to all solid bodies

Signature AssignToAllBodies()

New in version NX7.5.3.

License requirements: None.

AssignToBodiesNotUsingPreferredMaterial

PhysicalMaterial.AssignToBodiesNotUsingPreferredMaterial

Assigns the material to all solid bodies not using the preferred material.

Invalid bodies are skipped and a warning code will be returned.

Signature AssignToBodiesNotUsingPreferredMaterial()

Returns:Returns a warning code if any
Return type:NXOpen.PhysicalMaterialAssignWarning

New in version NX7.5.3.

License requirements: None.

AssignToBodiesWithoutMaterials

PhysicalMaterial.AssignToBodiesWithoutMaterials

Assigns the material to all solid bodies without a material already assigned.

Invalid bodies are skipped and a warning code will be returned.

Signature AssignToBodiesWithoutMaterials()

Returns:Returns a warning code if any
Return type:NXOpen.PhysicalMaterialAssignWarning

New in version NX7.5.3.

License requirements: None.

Copy

PhysicalMaterial.Copy

Creates new (copied) material with same properties as the original material.

The name of the new (copied) material will be unique and based on the name of the original material.

Signature Copy(partObject)

Parameters:partObject (NXOpen.NXObject) – object in part where to copy material to
Returns:the new material copied from this material
Return type:NXOpen.PhysicalMaterial

New in version NX6.0.0.

License requirements: None.

CopyLibMatlToPart

PhysicalMaterial.CopyLibMatlToPart

Overloaded method CopyLibMatlToPart

  • CopyLibMatlToPart(partObject)
  • CopyLibMatlToPart(partObject, editable)

-------------------------------------

Copies a library material to a part.

Signature CopyLibMatlToPart(partObject)

Parameters:partObject (NXOpen.NXObject) – object in part where to copy material to
Returns:the new material copied from this material
Return type:NXOpen.PhysicalMaterial

New in version NX6.0.2.

License requirements: None.

-------------------------------------

Copies a library material to a part. The copied (local) material can either be set to be editable or non-editable which determines whether the material can be modified or not.

Signature CopyLibMatlToPart(partObject, editable)

Parameters:
  • partObject (NXOpen.NXObject) – object in part where to copy material to
  • editable (bool) – when true, creates a local material ready for user editting. When false, it creates an exact copy of a loaded library material. The difference between loading and copying with this set to false is loading will get the latest library version whereas if the library material passed in is not synchronized with the latest version, the copy will also not be synchronized with the latest version.
Returns:

the new material copied from this material

Return type:

NXOpen.PhysicalMaterial

New in version NX8.5.0.

License requirements: None.

-------------------------------------

Delete

PhysicalMaterial.Delete

Deletes a material from the part.

Signature Delete()

New in version NX6.0.0.

License requirements: None.

DeleteOrphanedUserMaterialModels

PhysicalMaterial.DeleteOrphanedUserMaterialModels

Deletes Orphaned User Material (UMAT) Models and Properties from a material.

A model or property is considered orphaned if it exists on the material, but doesn’t exist in the current environment.

Signature DeleteOrphanedUserMaterialModels()

New in version NX11.0.0.

License requirements: None.

DeleteUserMaterialModels

PhysicalMaterial.DeleteUserMaterialModels

Deletes User Material (UMAT) Model Property Values from a material.

Signature DeleteUserMaterialModels()

New in version NX11.0.0.

License requirements: None.

FindObject

PhysicalMaterial.FindObject

Finds the NXOpen.NXObject with the given identifier as recorded in a journal.

An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.

An exception will be thrown if no object can be found with the given journal identifier.

Signature FindObject(journalIdentifier)

Parameters:journalIdentifier (str) – Journal identifier of the object
Returns:
Return type:NXOpen.INXObject

New in version NX3.0.0.

License requirements: None.

GetAlternatename

PhysicalMaterial.GetAlternatename

Returns the material alternate name

Signature GetAlternatename()

Returns:the alternate name for the material
Return type:str

New in version NX8.5.0.

License requirements: None.

GetCategory

PhysicalMaterial.GetCategory

Returns the material category

Signature GetCategory()

Returns:the category for the material
Return type:str

New in version NX6.0.0.

License requirements: None.

GetDescription

PhysicalMaterial.GetDescription

Returns the material description

Signature GetDescription()

Returns:the description for the material
Return type:str

New in version NX6.0.0.

License requirements: None.

GetId

PhysicalMaterial.GetId

Returns the material id

Signature GetId()

Returns:the id for the material
Return type:int

New in version NX7.5.0.

License requirements: None.

GetLibraryName

PhysicalMaterial.GetLibraryName

Returns the library name if the material was loaded from a library

Signature GetLibraryName()

Returns:the name of the library or None for nonlibrary materials
Return type:str

New in version NX7.5.3.

License requirements: None.

GetMaterialCategory

PhysicalMaterial.GetMaterialCategory

Returns the material category using international character set

Signature GetMaterialCategory()

Returns:the category for the material
Return type:str

New in version NX8.5.0.

License requirements: None.

GetMaterialEditable

PhysicalMaterial.GetMaterialEditable

Returns whether the material can be modified or not

Signature GetMaterialEditable()

Returns:
Return type:bool

New in version NX10.0.0.

License requirements: None.

GetMaterialType

PhysicalMaterial.GetMaterialType

Returns the material type

Signature GetMaterialType()

Returns:the type for the material
Return type:NXOpen.PhysicalMaterialType

New in version NX6.0.0.

License requirements: None.

GetParentlibrarymaterial

PhysicalMaterial.GetParentlibrarymaterial

Returns the parent libary material information

Signature GetParentlibrarymaterial()

Returns:a tuple
Return type:A tuple consisting of (parentName, parentLibraryName) parentName is a str. parentLibraryName is a str.

New in version NX8.5.0.

License requirements: None.

GetParentmaterial

PhysicalMaterial.GetParentmaterial

Returns the parent material that the material was copied from

Signature GetParentmaterial()

Returns:material that the material was originally copied from (parent)
Return type:NXOpen.PhysicalMaterial

New in version NX8.5.0.

License requirements: None.

GetPropTable

PhysicalMaterial.GetPropTable

Returns the property table that contains the properties for this material.

Signature GetPropTable()

Returns:
Return type:NXOpen.BasePropertyTable

New in version NX7.5.3.

License requirements: None.

GetSolverCardSyntax

PhysicalMaterial.GetSolverCardSyntax

Returns the solver card syntax strings for this entity.

Signature GetSolverCardSyntax()

Returns:
Return type:list of str

New in version NX8.5.0.

License requirements: None.

GetSubcategory

PhysicalMaterial.GetSubcategory

Returns the material sub-category

Signature GetSubcategory()

Returns:the subcategory for the material
Return type:str

New in version NX8.5.0.

License requirements: None.

GetTeamcenterMaterialItem

PhysicalMaterial.GetTeamcenterMaterialItem

Returns the Teamcenter item if the material was loaded from Teamcenter

Signature GetTeamcenterMaterialItem()

Returns:the Teamcenter item or None for non-Teamcenter materials
Return type:str

New in version NX7.5.3.

License requirements: None.

GetUsage

PhysicalMaterial.GetUsage

Finds the objects using this material

Signature GetUsage()

Returns:the objects using the material
Return type:list of NXOpen.NXObject

New in version NX6.0.0.

License requirements: None.

GetVersion

PhysicalMaterial.GetVersion

Returns the material version

Signature GetVersion()

Returns:the material version or None for non-versioned materials
Return type:str

New in version NX7.5.3.

License requirements: None.

HasParentlibrarymaterial

PhysicalMaterial.HasParentlibrarymaterial

Returns whether the material was copied from a library material

Signature HasParentlibrarymaterial()

Returns:true if it is a copy of a library material and false if it is not
Return type:bool

New in version NX8.5.0.

License requirements: None.

HasParentmaterial

PhysicalMaterial.HasParentmaterial

Returns whether the material was copied from another material

Signature HasParentmaterial()

Returns:true if it is a copy of another (parent) material and false if it is not
Return type:bool

New in version NX8.5.0.

License requirements: None.

InfoMaterial

PhysicalMaterial.InfoMaterial

Displays the property values for the material in the information window.

Signature InfoMaterial()

New in version NX7.5.3.

License requirements: None.

InfoMaterialToFile

PhysicalMaterial.InfoMaterialToFile

Writes the property values for the material to a file.

Signature InfoMaterialToFile(bOverride, pcFileName)

Parameters:
  • bOverride (bool) – if the file already exists, true override the file, false append to the file
  • pcFileName (str) – the full path including filename of file where the information should be written

New in version NX7.5.3.

License requirements: None.

IsLoadedLibraryMaterial

PhysicalMaterial.IsLoadedLibraryMaterial

Returns true if the material is loaded from a library (not Teamcenter)

Signature IsLoadedLibraryMaterial()

Returns:true if it a loaded library material and false if it is a local material or a Teamcenter item revision
Return type:bool

New in version NX7.5.3.

License requirements: None.

IsLoadedTeamcenterMaterialItem

PhysicalMaterial.IsLoadedTeamcenterMaterialItem

Returns true if the material is loaded from Teamcenter

Signature IsLoadedTeamcenterMaterialItem()

Returns:true if it a loaded Teamcenter material and false if it is a local material or a loaded library material
Return type:bool

New in version NX7.5.3.

License requirements: None.

IsNonlibraryMaterial

PhysicalMaterial.IsNonlibraryMaterial

Returns true if the material is locally defined (not a library/Teamcenter material)

Signature IsNonlibraryMaterial()

Returns:true if it is a locally defined material and false if it is a loaded library material or Teamcenter item revision
Return type:bool

New in version NX7.5.3.

License requirements: None.

Print

PhysicalMaterial.Print

Prints a representation of this object to the system log file.

Signature Print()

New in version NX3.0.0.

License requirements: None.

ReplaceMaterialAssignment

PhysicalMaterial.ReplaceMaterialAssignment

Replaces all assignments of one material with another material in the part where the material is assigned.

The part needs to be fully loaded, the new material needs to be in the same part as the original material and the material type needs to be a valid material assignment target.

Signature ReplaceMaterialAssignment(newMatl)

Parameters:newMatl (NXOpen.PhysicalMaterial) – the new material tag, None is not allowed.

New in version NX10.0.0.

License requirements: None.

ResyncWithLibraryDefinition

PhysicalMaterial.ResyncWithLibraryDefinition

Re-synchronizes a loaded library material to match its latest library definition.

Signature ResyncWithLibraryDefinition()

New in version NX7.5.2.

License requirements: None.

SetAlternatename

PhysicalMaterial.SetAlternatename

Sets the material alternate name

Signature SetAlternatename(materialAlternatename)

Parameters:materialAlternatename (str) – the alternate name for the material

New in version NX8.5.0.

License requirements: None.

SetCategory

PhysicalMaterial.SetCategory

Sets the material category

Signature SetCategory(materialCategory)

Parameters:materialCategory (str) – the category for the material

New in version NX6.0.0.

License requirements: None.

SetDescription

PhysicalMaterial.SetDescription

Sets the material description

Signature SetDescription(materialDescription)

Parameters:materialDescription (str) – the description for the material

New in version NX6.0.0.

License requirements: None.

SetId

PhysicalMaterial.SetId

Sets the material id

Signature SetId(materialId)

Parameters:materialId (int) – the id for the material

New in version NX7.5.0.

License requirements: None.

SetMaterialCategory

PhysicalMaterial.SetMaterialCategory

Sets the material category using international character set

Signature SetMaterialCategory(materialCategory)

Parameters:materialCategory (str) – the category for the material

New in version NX8.5.0.

License requirements: None.

SetMaterialEditable

PhysicalMaterial.SetMaterialEditable

Sets whether a material can be modified or not.

Note: library materials cannot be set to be able to be modified.

Signature SetMaterialEditable(isEditable)

Parameters:isEditable (bool) –

New in version NX10.0.0.

License requirements: None.

SetName

PhysicalMaterial.SetName

Sets the custom name of the object.

NOTE: This method should not be used to edit a read-only object such as a Mirrored PMI object. If it is, the changes will be overridden when the part is updated.

Signature SetName(name)

Parameters:name (str) –

New in version NX3.0.0.

License requirements: None.

SetSubcategory

PhysicalMaterial.SetSubcategory

Sets the material sub-category

Signature SetSubcategory(materialSubcategory)

Parameters:materialSubcategory (str) – the subcategory for the material

New in version NX8.5.0.

License requirements: None.

UnassignAllObjects

PhysicalMaterial.UnassignAllObjects

Removes the material assignment from all the objects that has it currently assigned

Signature UnassignAllObjects()

New in version NX6.0.0.

License requirements: None.

UpdateMaterialProperties

PhysicalMaterial.UpdateMaterialProperties

Re-synchronizes a material with its definition.

The definition could be a library definition or a parent material’s (from a copy) definition.

Signature UpdateMaterialProperties()

New in version NX8.5.0.

License requirements: None.