Skip to main content

system.mes.material.setPropertyValue

Description

Updates the value of a Material Property Values record given a material ID or path and a property ID or name.

Syntax

system.mes.material.setPropertyValue(materialIdOrPath, propertyIdOrName, value)

Parameters

ParameterTypeNullableDescription
materialIdOrPathStringFalseThe ULID or path of the material.
propertyIdOrNameStringFalseThe ULID or name of the property for which the value is retrieved.
valueMixedTrueThe value assigned to the property value if none is provided. The type is mixed as it depends on what the data type of the property.

Returns

Returns a JSON representation of the updated material property value.

Code Examples

# Update the value of a material property value
updated_property_value = system.mes.material.setPropertyValue('IRB/5391537510212', 'Density', 200)

# Output the JSON representation of the updated material property value
print(updated_property_value)