MMpy.SchedulerAttributeScale.set_label
Syntax
MMpy.SchedulerAttributeScale.set_label()
Description
Sets a new label for the attribute scale object.
Parameters
Name | Type | Description |
---|---|---|
name | Str | New label for the scale object. |
Returns
Type | Description |
---|---|
SchedulerAttributeScale | Scale object with the updated label. |
Notes
Please be aware that this method creates a new object that has the unit updated.
Examples
schedule = MMpy.SchedulerProject.get_schedule() with schedule.open_transaction(): attribute_units = schedule.new_attribute_units() attribute_units.set_name("Tonnes") attribute_units.set_decimals(3) attribute_units.set_base_unit("t") attribute_units.set_scales([MMpy.SchedulerAttributeScale(MMpy.SchedulerUnitScaleOperator.greater_than, 1000).set_unit("kt").set_label("KT")]) schedule.add_attribute_units(attribute_units)
Resource ID
IDPH_SCHEDULER_ATTRIBUTE_SCALE_SET_LABEL