%% Modify Attribute Description in Label Definition Creator Object for Multisignal Workflow
% Create an empty labelDefinitionCreatorMultisignal object.

ldc = labelDefinitionCreatorMultisignal;

% Add a label called 'TrafficLight'.

addLabel(ldc,'TrafficLight',labelType.Rectangle);

% Add a sublabel named 'RedLight' for label 'TrafficLight'.

addSublabel(ldc,'TrafficLight','RedLight',labelType.Rectangle);

% Add an attribute named 'Active' to the label 'TrafficLight'. Set the attribute type as 'Logical' with the default value true.

addAttribute(ldc,'TrafficLight','Active',attributeType.Logical,true);

% Add an attribute called 'isOn' to the sublabel 'RedLight'. Set the attribute type as 'Logical' with the default value false.

addAttribute(ldc,'TrafficLight/RedLight','isOn',attributeType.Logical,false);

% Modify the Attribute Description Under a Label
% Display information about the label 'TrafficLight'.

info(ldc,'TrafficLight')

% Modify the description of the attribute 'Active' under the label 'TrafficLight'.

editAttributeDescription(ldc,'TrafficLight','Active','Is Active: true (DefaultValue: 1), false (DefaultValue: 0)')

% Display information about the label 'TrafficLight' to verify the modified attribute description.

info(ldc,'TrafficLight/Active')

% Modify the Attribute Description Under a Sublabel
% Display information about the sublabel 'RedLight'.

info(ldc,'TrafficLight/RedLight')

% Modify the description of the attribute 'isOn' under the sublabel 'RedLight'.

editAttributeDescription(ldc,'TrafficLight/RedLight','isOn','Is On: true (DefaultValue: 1), false (DefaultValue: 0)')

% Display information about the sublabel 'RedLight' to verify the modified attribute description.

info(ldc,'TrafficLight/RedLight/isOn')

% Copyright 2019 The MathWorks, Inc.