MMpy.Schedule.new_attribute
Syntax
MMpy.Schedule.new_attribute()
Description
Creates a new attribute.
Returns
Type | Description |
---|---|
SchedulerAttribute | New attribute object​ |
Examples
newAttribute = schedule.new_attribute() setup = schedule.new_command() setup.add_command(newAttribute.set_name("scripting attribute")) setup.add_command(newAttribute.set_description("scripting attribute description")) setup.add_command(newAttribute.set_unit("m3")) setup.add_command(newAttribute.set_value(MMpy.SchedulerAttributeValue(MMpy.SchedulerAttributeType.decimal))) schedule.execute(setup); schedule.execute(schedule.attributes.set_attribute(newAttribute))
Resource ID
IDPH_SCHEDULE_NEW_ATTRIBUTE