Add an object inside a structure in LabVIEW by dragging it inside the structure or by dragging a new structure around the object. You cannot put an object inside a structure by moving an existing structure over the object.

To practice adding objects inside a structure, you can complete the following steps.

  1. Add the Case Structure to the block diagram.

    Case structures and other structures are located on the Functions » Programming » Structures palette.


    Empty Case structure on the LabVIEW block diagram.
  2. Add the Tick Count (ms) function inside the structure.

    Find Tick Count (ms) on the Functions » Programming » Timing palette.

    A border appears within the structure before you place an item to indicate that you are placing the item within the structure.


    Hovering a function over a Case structure before placing the function.
  3. Move the Tick Count (ms) function close to the border of the structure.

    Notice that when you add or move an object in a structure near the structure border, the structure resizes to add space for that object after you add the object to the block diagram.

    Tip

    You can disable the automatic resizing behavior for a structure. Right-click the structure border and select Auto Grow to remove the checkmark.


    Expanding a Case structure by dragging a function within the structure close to the structure border.
  4. Move the Tick Count (ms) function outside the structure by selecting and dragging the function a longer distance.

    Dragging a function outside of a Case structure.
  5. Add another structure around the Tick Count (ms) function.
  6. Select the second structure and delete it. Notice that you also deleted the function inside the structure.
    Note You can remove a structure without deleting the objects in the structure.
  7. Add another Tick Count (ms) function outside the remaining structure.
  8. Move the structure over the Tick Count (ms) function.

    The shadow on the function indicates that the function is on top of the structure but is not inside it.


    Shadow behind function icon on block diagram indicating a function is superimposed on a Case structure but not within it.
  9. Select the Case structure and delete it.
    Notice that you did not delete the function because it was not inside the structure.

You can apply these same principles to other structures in LabVIEW.