The Update Instruction file (test.py) contains the Python code that provides instructions for passing the MatML-formatted material data to a downstream Engineering Data system
container = ExternalConnectionSystemContainer
matFilePath = r"C:\Program Files\Ansys Inc\v182\Addins\ExternalConnection\SystemDefinitions\
GenericMaterialTransfer\Sample_Materials.xml"
matFileRef = None
isRegistered = IsFileRegistered(FilePath=matFilePath)
if isRegistered == True:
matFileRef = GetRegisteredFile(matFilePath)
else:
matFileRef = RegisterFile(FilePath=matFilePath)
AssociateFileWithContainer(matFileRef, container)
outputRefs = container.GetOutputData()
matOutputSet = outputRefs["MatML31"]
matOutput = matOutputSet[0]
matOutput.TransferFile = matFileRef