6.21.3   Iconic Variables

The iconic variables are represented by icons, which contain an image, a region or an XLD, depending on the current value. The icons are created depending on the type of data according to the following rules:

Because of the different ways of displaying objects, you have to be aware that the coordinates cannot be compared. The variable name is positioned below each icon. They are displayed in the variable window in the order of occurrence or name from left to right. If there is not enough space, a scrollbar is created, which you can use to scroll the icons.

Displaying Iconic Variables

If you use images of different sizes in a program, the system uses the following output strategy for an automatic part reset, depending on the chosen resize mode: Every window keeps track of the size of the most recently displayed image. If you display an image with a different size, the system modifies the graphics window coordinate system in a way that the image is visible completely in the graphics window. In Full Stretch mode, the part is set to the full image size. In No Stretch mode or Keep Aspect Ratio mode, the part is extended to fit the full image in a 1:1 aspect ratio with black bars on one side.

If a partial zooming has been activated before (see section “Graphics Window”), it is suppressed.

Displaying Information About Iconic Variables

You can get information about an instantiated variable by placing the mouse pointer over the corresponding icon in the variable window. See also figure 6.82 for an illustration. The information depends on the contents of the corresponding variable:

Context Menu

Clicking an icon with the right mouse button opens a context menu with several options:

Display:  
Display the selected iconic variable in the active graphics window. Regions and XLDs are displayed on top of the previous contents of the active graphics window.

Display Channel:  
Display a single channel of the selected iconic variable in the active graphics window. This menu lists up to 15 channels. If the iconic variable contains more than 15 channels, you can access the remaining channels by clicking “Select...”, which opens an auxiliary window listing all channels.

This entry is only available if the selected iconic variable contains a mult-channel image.

Display Content:  
Display a single object of the selected iconic variable in the active graphics window. This menu lists up to 15 objects. If the iconic variable contains more than 15 objects, you can access the remaining objects by clicking “Select...”, which opens an auxiliary window listing all objects.

This entry is only available if the selected iconic variable contains multiple objects, for example, multiple images, regions, or XLDs.

Clear / Display:  
Clear the active graphics window before displaying the selected iconic variable.

Clear Variable:  
Clear the selected iconic variable. The contents of the variable become undefined.

Save:  
Save the contents of the selected iconic variable to a file. Depending on the content type of the variable (image, region, XLD, ...), different file formats are offered. See also: write_image, write_region, write_contour_xld_dxf, write_polygon_xld_dxf, fwrite_serialized_item.

Set/Clear Breakpoint on Variable:  
Toggle a breakpoint on the variable under the mouse cursor (see section “Breakpoints on Variables”).

Activate/Deactivate Breakpoint on Variable:  
Toggle activation of breakpoint on the variable under the mouse cursor.

Add to User Tab:  
The selected variable is added to the tab User.

Find Variable:  
Open the Find/Replace... dialog with the name of the selected variable preselected.

Insert dev_display() into program:  
Insert the operator dev_display into the program window at the IC. The parameter of the inserted instruction is the name of the selected iconic variable.

Shortcut: Ctrl + double-click variable icon.

Declared in (global variables only)  
List the names and line numbers of the procedures that declare (and thus use) the selected global variable. Click an entry to jump to the corresponding location in the program window.

Sort by Name:  
Sort all variables in alphabetical order.

Sort by Occurrence:  
Sort the variables in the same order as they are defined in the program.

Update Variables:  
Toggle whether variables will be updated during program execution. This is the same setting as in the runtime preferences (see section “Runtime Settings Runtime Settings).

Add Variable (tab User only):  
This submenu contains a list of all variables that are currently not displayed in the tab User. Click a variable name to add the corresponding variable to the tab.

Remove from User Tab (tab User only):  
The selected variables are removed from the tab User.

You can display the corresponding iconic variable in the active graphics window (with or without clearing the window first), and you can clear the iconic variable. If an iconic variable contains multiple items, you can also select a specific item from a submenu. Up to 15 items are listed in this menu. If an iconic variable contains more than 15 items, the remaining items can be accessed by clicking Select.... If you click Select... in this submenu, you can quickly browse the items of the iconic variable from a dialog. This also works for multi-channel images. See figure 6.83 for an example.

Figure 6.83: Interactive channel selection from an RGB image.

  • Channel 1: red
  • Channel 2: green
  • Channel 3: blue
  • Visualization of Iconic Variables

    Usually, regions, images, and XLDs are represented in variable icons. Besides this, there are three exceptions, which are shown by special icons: