Program Script Task

The Program Script Task is an extended feature in X-Pert Graphics, which not only gives you the opportunity to write program scripts for all the  tasks that can be done in X-Pert Graphics by writing a code for them but it also allows you to make your projects even more functional and user friendly. Note that in order to take full advantage of this X-Pert Graphics option, you need to be an advanced user of the program and you must have at least a basic programming knowledge.

This X-Pert Graphics feature supports four different language syntaxes:

Pascal script

C++ script

Visual Basic script

Java script

TIP (!): Considering the X-Pert Graphics functionality, it is advisable that you use Pascal or C++ script, instead of Visual Basic or Java script. Since you always have to declare the type of a variable in Pascal and C++, the latter are more thorough in terms of avoiding mistakes. In Visual Basic and Java script, on the other hand, new variables are not defined in terms of their type. They simply adopt the variant type and can accept all kinds of variables, no matter if they are string, integer, etc., throughout your script, which inevitably becomes a prerequisite for errors.

Please, be aware that X-Pert Graphics’s Program Script Task does not support all the functionalities that each of the programming languages, listed above offers. All the classes, functions, types, and variables that this interface supports, are listed in the tree view, situated in the right area of the Create Program Script window (see the screenshot above).

IMPORTANT! X-Pert Technology, does NOT offer support for third party scripts, developed with the Program Script Task. This function should be used at the sole responsibility of the corresponding third party developer.

More details may be found in the corresponding sections below:

User Interface of the Program Script

Creating X-Pert Graphics Items via Program Script

Working with More than One X-Pert Graphics Item

Error and Exception Messages