Design Automation Tools in Dimension Table
Manage design automation commands from Python code
In the Python code of the measurement table, you can control all design automation functions
Previously, the product automation system of Vertex G4 was implemented with an external user interface. With version 2024, design automation commands were largely integrated into basic features, and improvements were made to the Python code of the measurement table, allowing execution of measurement table commands directly from a Python program. Now, you can implement automated systems, for example, for sales purposes.
How do I use design automation commands from the Python -code?
There is now a list command_list defined in the Python code template. If any commands are placed in this list in a Python program, a command file is generated from them, which is then executed after the execution of the Python program. For example, the following lines in a Python program:
#Your Code Starts Here
if D1 > 10:
command_list.append("SETCOLOR(#105,111)")
command_list.append("SETCOLOR(#106,121)")
else:
command_list.append("SETCOLOR(#105,211)")
command_list.append("SETCOLOR(#106,221)")
#Your Code Ends Here
will change color for parts #105 ja #106 and it is dependable from variable D1 value.
Accessing the program from Windows command line
If there is a need to run the program without a user interface, for example, on a server, you can modify the template through a Python program without opening the measurement table as follows:
Launch the program using the parameter -runpython "TemplateID/TemplateFilePath PythonProgram InputFile OutputFile TaskFile"
only TemplateID/TemplateFilePath is necessary, others can be empty or replaced with the '-' character
especially the last 2 are mainly for testing purposes
if the configuration model is defined as design automation and
a) the user interface program is a .py file or
b) the user interface program is empty, and there is a .py file with the same name next to the model
right-click on the model, and you will find the 'Run Python Program' function
if the input file to be used is defined in the assembly properties in the Command File section, it will be used. If it is empty, an input file will be created from the model.