Skip to content

Migrating to HDevelopEVO from HDevelop๐Ÿ”—

Compatibility changes๐Ÿ”—

The following operators and statements are not supported in HDevelopEVO anymore:

  • assign, assign_at
    Instead of assign(Value, Result), use Result := Value.
    Instead of assign_at(Index, Value, Result), use Result := Value[Index].
  • insert (marked obsolete in HDevelop already)
    Instead, use Result:=Value[Index] or the tuple_replace operator.
  • comment
    Instead, use // or *.
  • Multithreading with par_start and par_join
    Instead, use the new thread_* statements; see About threading in HALCON Script.

Early Adopter restrictions

The new HALCON Script Engine does not support all language features of the HDevEngine yet.
Converted scripts using these features will not work as expected in HDevelopEVO Early Adopter:

  • Vectors
  • Global variables
  • Some dev_* operators
  • Protected procedures

Converting HDevelop script files to HSCRIPT in HDevelopEVO๐Ÿ”—

To use your .hdev, .hdvp, or .hdpl files in HDevelopEVO, they need to be converted to the .hscript format.

  • Make sure you have an open folder or workspace in which the new .hscript files will then be saved.
  • Select File > Import HDevelop file into Workspace if you only have one file to convert.
  • If you have more files in a folder, select File > Import HDevelop folder into Workspace.

Important

  • Already existing .hscript files will be overwritten.
  • Although scripts containing the exit statement are processed during conversion, they will produce parse and runtime errors. The exit statement is not planned to be supported in the foreseeable future.

Your Output will state which files have been converted, as well as any errors or warnings that occurred. The conversion tool also checks any procedures within your file and folder, and saves them separately in your workspace.

Possible changes in your code๐Ÿ”—

When using the conversion tool, the following changes may occur in your code. Some of these changes may require you to make manual adjustments.

Added import statements
The corresponding procedure calls could be resolved, but in HALCON Script, all procedures must be imported explicitly. Usually, no manual adjustments are required.
FIXME comment placed before procedure calls
This comment is added to procedure calls that could not be resolved.
โ†’ You need to add a corresponding import statement yourself.
Removed line continuation pattern
Multi-line statements donโ€™t need to be marked with a backslash at the end anymore. Usually, no manual adjustments are required.
FIXME comment placed before dev_* operators
This comment is added to dev_* operators that are not supported anymore, but where the result may be used in the script.
โ†’ You need to remove the code or resolve the problem yourself.
Commented out dev_* operators
dev_* operators that are not supported anymore and have no side-effects are disabled.

Example usage๐Ÿ”—

Letโ€™s assume the following directory structure:

๐Ÿ“‚projects
โ”œโ”€โ”€๐Ÿ“‚shared_procedures
โ”‚   โ”‚   ๐Ÿ“„proc0.hdvp
โ”‚   โ”‚   ๐Ÿ“„proc1.hdvp
โ”‚   โ”‚   ๐Ÿ“„proclib.hdpl
โ”‚   โ”‚   ...
โ”‚  
โ””โ”€โ”€๐Ÿ“‚myproject
    โ”œโ”€โ”€๐Ÿ“‚procs
    โ”‚   โ”‚   ๐Ÿ“„project_proc0.hdvp
    โ”‚   โ”‚   ๐Ÿ“„project_proc1.hdvp
    โ”‚   โ”‚   ...
    โ”‚
    โ””โ”€โ”€๐Ÿ“‚entrypoints
        โ”‚   ๐Ÿ“„tests.hdev
        โ”‚   ๐Ÿ“„init.hdev
        โ”‚   ...
  • The procedures in projects/myproject/entrypoints use import '../procs/' to access project_proc* procedures.
  • The folder projects/shared_procedures/ is added as procedure path in HDevelopEVO.

Automatic conversion๐Ÿ”—

  1. Create a new workspace folder for HDevelopEVO, for example, projects/myproject-tmp.
  2. Open the workspace folder in HDevelopEVO: File > Open Folder.
  3. Use File > Import HDevelop folder into Workspace, and then select the projects/myproject folder.

The import will then create these files and folders in your workspace:

๐Ÿ“‚myproject-tmp
โ”œโ”€โ”€๐Ÿ“‚procedures
โ”‚   โ”‚   required procedures distributed by HALCON
โ”‚
โ”œโ”€โ”€๐Ÿ“‚shared_procedures
โ”‚   โ”‚   only required procedures
โ”‚
โ””โ”€โ”€๐Ÿ“‚myproject
    โ”‚   converted project files

Alternatively, the conversion can be done on the command line:

hdevconvert --auto C:\projects\myprojects\ --output C:\projects\myprojects-tmp\

Step-by-step migration of projects with hdevconvert๐Ÿ”—

Note

The conversion tool needs a HALCON runtime or SDK license.

For a step-by-step conversion, use the command-line tool hdevconvert:

  1. If you use procedures here, first migrate the procedures distributed by HALCON.

    hdevconvert --is-library %HALCONROOT%\procedures\ --output C:\projects\migrated\halcon_procedures\
    
  2. Then migrate shared_procedures with procedures from the procedure path.

    hdevconvert -p C:\projects\migrated\halcon_procedure\ --is-library C:\projects\shared_procedures\ --output C:\projects\migrated\shared_procedures\
    
  3. Finally migrate the project itself. List all converted dependencies with -p.

    hdevconvert -p C:\projects\migrated\halcon_procedures\ -p C:\projects\migrated\shared_procedures\ C:\projects\myproject\ --output C:\projects\migrated\myproject\
    

To get help for hdevconvert, enter:

hdevconvert --help

Behavior of โ€œdevโ€ operators๐Ÿ”—

โ€œ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.

Example

To use the dev_display operator, for example, you first need to open a native HALCON graphics window with dev_open_window.