Material Methods

An opening ID is an entry point used to customize business logic. The I3DxMdMaterialEKLPackage package provides functions on server side for Product Modeler you can use to understand the consumption of various resources.

This page discusses:

GetMaterialReference

This function allows you to retrieve a material reference from a connection.

Signature

GetMaterialReference()

Arguments

Input/Output Required? Type Comment
Input CATMatConnection -
Output CATMatReference -

ReturnType

Boolean

Allows Applied-Material Only if Name Starts with 3DEXPERIENCE

Let MaterialRef (CATMatReference)
Let MaterialName(String)

Set MaterialRef = ThisObject.GetMaterialReference()
Validation = False
if (MaterialRef <> NULL) {
               MaterialName = MaterialRef.GetAttributeString("V_Name")
                if(0==MaterialName .Search("3DExperience")){
                Validation = True
       }
}

GetTargetPath

This function allows you to retrieve the path of the material connection that is referenced to the structure where the material is applied.

Signature

GetTargetPath()

Arguments

Input/Output Required? Type Comment
Input CATMatConnection
Output List

Inserts the Name of the Material in the Description of the Materialized Product

Let MaterialRef (CATMatReference)
Let Target (List)
Let Product(VPMReference)
Let MaterialName(String)

Set MaterialRef = ThisObject.GetMaterialReference()
Set Target  = ThisObject.GetTargetPath()

Product = Target.GetItem(1)

if (MaterialRef <> NULL) {
                MaterialName = MaterialRef.GetAttributeString("V_Name")
}

if (Target <> NULL) {
                Product.SetAttributeValue("V_description", MaterialName)
}

Validation = True