Skip to main content

system.mes.material.getProperty

Description

Retrieves a Material Properties record by its specified ID.

Syntax

system.mes.material.getProperty(id)

Parameters

ParameterTypeDescription
idString (ULID)The ULID of the material property to retrieve.

Returns

Returns a JSON representation of the material property. Returns nothing if no material property is found.

NameTypeDescription
materialClassIdString (ULID)The ULID of the material class associated with this material property.
nameStringThe name of the material property.
descriptionStringA description of the material property.
dataTypeStringThe data type of the property (e.g., Integer, String, Float).
lowLimitDoubleThe minimum value allowed for a numerical property.
highLimitDoubleThe maximum value allowed for a numerical property.
formatStringThe format of the property, if applicable.
unitOfMeasureIdString (ULID)The ULID of the unit of measure for this property.
unitOfMeasureNameStringThe name of the unit of measure for the property. For display purposes only.
unitOfMeasureSymbolStringThe symbol of the unit of measure for the property. For display purposes only.
optionsStringList of possible values for the property (e.g., "[option1, option2]").
nullableBooleanDefines if the property can accept null values.
defaultValueMixedThe default value assigned to the property if none is provided. The type is mixed as it depends on what dataType is.
idString (ULID)The ULID of the material property (optional, for updating an existing property).
notesStringNotes related to the material property.
enabledBooleanIndicates if the property is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve a material property by ID
property = system.mes.material.getProperty('01JQY39KNJ-E6AH9CCK-WM2XMMRW')

# Output the material property
print(property)