Skip to content

Introducing HDevelopEVOπŸ”—

Figure 1: Overview HDevelopEVO

The First Activity Bar is located on the left side of the window and gives you quick access to different views, such as the Explorer, Search, and Debug View. It is the core navigation surface. When clicking an item in the Activity Bar, the Primary Sidebar opens to the right where you can see and manage the contents of the corresponding Activity Bar item.

On the top is the Menu Bar.

In the Central Space you can find the Welcome Page which shows you several direct links like Open Folder > Open Example Folder when first starting up HDevelopEVO. It also is the space where your Editor tabs will be opened.

On the right is the Secondary Activity Bar, which acts just like the Activity Bar itself, and clicking it opens the Secondary Panel.

In the Graphics View your graphics will be displayed, it is also part of the secondary activity bar.

You can inspect your iconic variables in the Iconic Variables View, it is also part of the secondary activity bar.

The Bottom Panel shows the Output, Debug Console, and Problems.

The Status Bar is located at the bottom of the window and shows information about the file you are editing, used version of HALCON, and the workspace you have open.

OverviewπŸ”—

Preview Restrictions

As you’re using a preview version of HDevelopEVO, keep in mind that not all language features have been implemented yet:

  • par_start and vectors have not been implemented yet.
  • Several details of the language may also still be incomplete, or are not 100% compatible with the previous behavior.
  • Libraries and external procedures cannot be used yet.
  • Several commands you may be familiar with from the old HDevelop have not been implemented yet.

Explorer and EditorπŸ”—

The editor displays the entire content of your loaded file, including the procedures. Procedures can be used directly in your editor. To simplify working with your code, we’ve integrated code snippets into HDevelopEVO.

Tip

When you’re using more than one editor tab, you can use the split view to display the tabs side by side. This makes it easier to compare code, for example. To view your editor tabs in split view, simply drag the editors side by side.

Fileformat .hscriptπŸ”—

Before you open or load a new folder, you need to know that we use a new fileformat for HDevelopEVO. It is called HALCON Script, .hscript, which means that β€œold” HDevelop .hdev files will only work in HDevelopEVO when their code content is copied and saved as a .hscript file. For information on migrating to HDevelopEVO, see Migrating to HDevelopEVO From HDevelop.

HSCRIPT is a simple plain text format, unlike the β€œold” .hdev files, which were an XML format. This makes it a lot easier to use in any editor you want.

Example ProgramsπŸ”—

You can find a direct link on your Welcome page to the example programs. Additionally, you can find them under File > Open Example Folder. This folder will open as a whole new separate workspace containing the examples.

WorkspaceπŸ”—

A workspace is a virtual environment where you can organize and manage your development projects, in one session. It consists of a collection of one or more folders. By adding a folder, everything within the folder becomes part of your workspace. When a folder is loaded, the explorer activity bar shows the options resembling your folder contents.

If you have already worked with HDevelopEVO, you can also load your workspace by clicking Recent workspace.

Opening a Folder and Creating a FileπŸ”—

You can open a folder with an existing .hscript file, or you can create a new file:

  • Click Open Folder, and then browse to the folder.

or

  • Click Create New File, choose New HALCON Script File (.hscript), and save the new file.

Tip

You can open any file by its name with the shortcut Ctrl+P.

Procedure SyntaxπŸ”—

The general syntax of procedure is as follows. A procedure must start with proc and end with endproc. You can choose any proc_name.

proc proc_name (object InputImage, tuple InputParam, out object OutputImage, out tuple OutputParam) #(1)!
  ...
endproc
  1. You can add zero to n parameters in your parameter list as long as they are separated by a comma.

Example

proc proc_name(object InputImage, out object Region)
    threshold(InputImage, Region, 128.0, 255.0)
endproc

read_image(Image, 'printer_chip/printer_chip_01')
proc_name(Image, Region)
connection(Region, ConnectedRegions)

Your local procedures can always be used. For more information, see HSCRIPT File Format > Declaring and Calling Procedures.

Using Code SnippetsπŸ”—

To insert a control flow operators, start by typing in the code you want to use. The corresponding suggestion of a code snippet pops up and is marked by a icon. Select the entry or press Tab and it gets inserted into your code.

Example

If you want to add a for loop in a script, type for and select for.

for Index := 1 to 5 by 1

endfor

You can customize the inserted snippet as you need within your code.

Editing CodeπŸ”—

To edit all occurring code instances at once, set your cursor to the instance you want to change, press Ctrl+D, and type in your changes. Now all corresponding instances are changed in one go.

Line breaks no longer cause invalid lines, which means you can add line breaks as you see fit into your script.

Code wrapping allows you to selectively fold code blocks as parts of your code. This helps you to manage large amounts of code while viewing only those subsections that are currently of interest.

Command PaletteπŸ”—

The commands are available through the Command Palette. Open it by pressing Ctrl+Shift+P. Alternatively, open the search bar with Ctrl+P and then type > to search all available commands.

ShortcutsπŸ”—

HDevelopEVO has a rich set of default keyboard shortcuts. You can find an overview of the keyboard shortcuts by pressing Ctrl+Alt+,.

Outline ViewπŸ”—

The Outline view is a separate section at the left of the Explorer view. Choose the file on which you want to work and the outline view shows all procedures and variables used in the selected file. Selecting a listed procedure or variable will jump to and highlight the corresponding line in your code.

Running and DebuggingπŸ”—

Note

To start debugging, a configuration has to be loaded. Loading a configuration is only possible when a project folder was opened beforehand.

Warning

You can only run a program or use autocompletion if you have saved the HSCRIPT file before.

Place the cursor on the corresponding code line and press F9, or click on the beginning of the line next to the line numbers, to set a breakpoint. With a breakpoint, you can pause the execution of your program at a specific line of code. A red dot appears in the left margin of the editor, indicating that a breakpoint is set.

To start debugging:

  1. Open the Debug View by clicking in the First Activity Bar.

  2. Choose Launch HALCON Script (HALCONEngine) as your configuration.

  3. Click the button.

  4. You can now either click to execute the whole script until you hit a breakpoint, or you can click to execute line after line.

It’s also possible to debug more than one file. To debug one file after another, just click through them in your thread view.

VariablesπŸ”—

To inspect variables, you have the following options:

  • When you expand the drop-down within the variables view, you can display all the parameters contained in the handles of your script. The control variables and the iconic variables are shown in a tree structure. By expanding it, you get more information about the variables.

  • Iconic variables will additionally be shown in the iconic variables view as thumbnails, and can also be inspected in the graphics window inside the graphics view.

Graphics WindowπŸ”—

HDevelopEVO’s graphics window behaves similar to the one you are used to from HDevelop.

Preview Restrictions

  • β€œdev_*” operators are now executed via the engine directly, and visualization in the graphics windows of the IDE via dev_* operators, such as dev_display or dev_disp_text, is not possible.
  • Instead, you can display the visualization in a native HALCON graphics window, which can be opened using dev_open_window.

A typical operator to visualize images in HDevelopEVO is read_image.
While debugging your script step-by-step , the corresponding images can be displayed in the graphics window. They can be viewed in the active graphics window automatically or by double-clicking each iconic variable in the iconic variables view.
By using the small toolbar within your graphics window, you can zoom into the images, move them around, fit them back to the screen, and clear the window.