Migrating to HDevelopEVO from HDevelop🔗
Note
The conversion tool needs a HALCON runtime or SDK license.
Converting HDevelop scripts 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.
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.
Preview 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:
- Multi-threading with
par_start
andpar_join
- Vectors
- Global variables
- Some
dev_*
operators - Protected procedures
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 beforedev_*
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
useimport '../procs/
to access project_proc* procedures. - The folder
projects/shared_procedures/
is added as procedure path in HDevelopEVO.
Automatic conversion🔗
- Create a new workspace folder for HDevelopEVO, for example,
projects/myproject-tmp
. - Open the workspace folder in HDevelopEVO: File > Open Folder.
- Use File > Import HDevelop folder into Workspace and select
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:
Step-by-step migration of projects with hdevconvert
🔗
For a step-by-step conversion, use the command line tool hdevconvert
:
-
If you use procedures here, first migrate the procedures distributed by HALCON.
-
Then migrate
shared_procedures
with procedures from the procedure path. -
Finally migrate the project itself. List all converted dependencies with
-p
.
To get help for hdevconvert
, enter:
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
.