Case Labels
It is highly advisable to use case labels over string constants to define the recipient case of a message.
A case label is simply a string constant that is wrapped in a VI, that is a member of a Worker and corresponds to the name of Worker's MHL case. A case label (right) is the preferred way to identify the recipient case of a message, instead of using a string constant (left) as shown in the image below.
Case labels provide the following advantages over using string constants to define the recipient case of a message.
You create them instantly via use of the quickdrop shortcut: Create Case Label (Ctrl+9).
They provide a single location to define the name of a Worker's MHL case.
You can search for every instance of a case label to find the locations in your code where a particular MHL case is sent messages from.
The quickdrop shortcut: Go To Case (Ctrl+8) allows you to jump directly to the corresponding MHL case of a selected case label, helping you to follow the data-flow of a message while developing.
Because a case label VI is a member of a Worker, the case label's VI icon take the Worker's class icon header, allowing you to identify which Worker the case label belongs to.
Create Case Label (Ctrl+9) also allows you to rename both the name of an MHL case and its corresponding case label.
Case labels are VIs with a c_ prefix in their filename, identifying them as a case label.
Last updated