UDT Creator

Here is a simple UDT creater in python to create importable XML file from a simple config file format.

Only dependancy is pyparsing.

The UDT editor in designer is currently a pain to duplicate tags in, alter layout etc so it is much faster to work outside the editor and import as required.

Macro expansion makes it quick to duplicate common options eg history settings, scaling etc

An example config file, and resulting XML has also been included.

Comments in the config file are only documentation. Doco does not cover ignition stuff like datatype numbers etc…you can find these out easy enough by exporting.

Currently you have to edit the source to enter filenames. If program sees any use by others it can easily be enhanced to parse args etc.

The code written only does what I need at the moment so it may not yet cover everyones needs. Never tested with more than one UDT, but it may work with more than one UDT definition in a file.
create_udt.py.zip (11.8 KB)

Updated version - improved comment handling in cnfig file and command line arguments.

-i infile config file
-o outfile output xml file
-f force overwrite of outfile
-h help
create_udt.py_0.02.zip (15.9 KB)

Update to version 0.03

Python3 compat added
Included basic alarm support (demo supplied)
create_udt.py_0.03.zip (18.8 KB)

Updated to version 0.04

Data types used in parameters in 7.63-rc2 has first letter now capitalised.

Option --lower added to revert to all lower case for older versions