Scripting

<< Click to Display Table of Contents >>

Navigation:  Designing a PCB with the DEX PCB Designer > Appendix >

Scripting

You can write embedded Python scripts to extend the functionality of DEX.

DEX has it's own scripting engine based on the Python programming language. (IronPython).

With embedded Python scripts in DEX, you can automate tasks, manipulate designs, and access external data sources. Some common tasks that can be automated include component placement, routing, and design rule checking. Python scripts can also be used to interface with external software or databases to import or export data.

To use Python scripts in DEX, you can create a new Python script file or open an existing one using the built-in Python editor. You can then write your code in the editor and execute it from within DEX.

It's important to note that using Python scripts in DEX requires some programming knowledge and understanding of the software's scripting API. You may want to consult DEX documentation or seek help from the software's community forums to get started.

See the language reference.

You can create your own command plug-ins that can be linked to a menu button.

A command plug-in consists of:

IronPython Script

This is a Python program that is run on demand by clicking the commands button in the menu or by clicking on the Run in the scripting panel.

DEX exposes a large API that you can call from your IronPython program.

In addition IronPython exposes the complete Microsoft .NET API for you to use.

Button Icons

You can optionally add 2 buttons icons to be displayed in the menu button. You can set a 16x16 pixel small icon and a 32x32 pixel large icon.

Button Caption

You can optionally add a text caption for the button.

ToolTip

You can optionally add a toolTip to be displayed when the mouse is moved over the button. This gives you information on the command. The toolTip has a title and text content.

If you enable a command plug-in, then it will be added to the menu as a button.