Display messages in Configurator 360 using iLogic rules.
Three facets control the messages:
- What the message says.
- Controls the icon next to the text.
- Controls whether the message is visible.
- To create a message, use iLogic to create three custom iProperties using the following naming conventions:
- C360MessageTextYourMessageID (string)
- C360MessageSeverityYourMessageID (string)
- C360MessageTriggeredYourMessageID (Boolean)
- Name YourMessageID to any string that identifies your message, using this same ID for all three properties.
YourMessageID can include a leading underscore.
Examples:
- Set the text property to the string you want your user to see.
- Set the severity property to one of the following three strings:
- Set the triggered property to a Boolean (yes/no) value.
Note: The triggered property must always be set to the correct value by the rule and cannot depend on any earlier settings.
- Make sure the custom iProperties are in the same file as the parameters. For example, when using a skeleton file, the properties have to be in the skeleton file.
For example, you might have an iLogic rule that does the following:
widthValid = (width<1000)
depthValid = (depth<1000)
oneValid = (widthValid Or depthValid)
iProperties.Value("Custom", "C360MessageText_NeitherDimValid") = "One dimension must be less than 1000mm"
iProperties.Value("Custom", "C360MessageSeverity_NeitherDimValid") = "Error"
iProperties.Value("Custom", "C360MessageTriggered_NeitherDimValid") = Not oneValid
Note: The iProperties.Value creates the iProperty, if necessary.
- For text or severity:
- When the text or severity never changes (common), create the appropriate custom iProperty in the iProperties dialog box instead of using iLogic.
- When the text or severity does change, change it to the correct value each time the rule runs. Do not depend on the previous value being available or retained.
- The following message displays when you upload a design to Configurator 360 and change your dimensions:
Be aware that the rule shown above runs whenever either width or depth changes. It sets the triggered iProperty to be the correct on or off status under every condition (for example, it does not look at the triggered property's value, and ignore it if already set correctly).
Best practices
When your rule changes the value of one of the three relevant properties, your rule must set the value in all cases.
Note: The rule changes the value due to a change in the value of a contributing parameter.
Correct practice (error-prone):
If (myParam > 100) then
iProperties.Value("Custom", "C360MessageTriggered_MyMessage") = true
else
iProperties.Value("Custom", "C360MessageTriggered_MyMessage") = false
end if
Incorrect practice:
If (myParam > 100) then
iProperties.Value("Custom", "C360MessageTriggered_MyMessage") = true
End if
Note: The example displaying the incorrect practice does not turn off the message when it was previously on. Due to Configurator 360 caching, it cannot be predicted when the message is on or off when myParam <= 100.
Best practice:
Use the test as the value:
iProperties.Value("Custom", "C360MessageTriggered_MyMessage") = (myParam > 100)
This practice is ideal because it eliminates the ability to forget the else clause.