1. Loading/Importing a script

From the GUI

The easiest way is to import scripts using the GUI. Such scripts are saved in the board file so you will need to import them in each board you want to use them with. The process is as follows:

Using actions

Loading drc rules and definitions from a tEDAx file:

LoadTedaxFrom(drc_query, filename.tdx, "", 0)

The "" is an empty argument, the ID of the rule to load. Being empty it will load all rules from the file. If it is non-empty, the action will load only the rule with matching name. This only matters if there are multiple rules in a tEDAx file.

The script is saved in the board file so you will need to import them in each board you want to use them with. Do not forget to save the board file after executing the action.

Manual editing of config files

This version works only if the drc rule/definition comes in a lihata file. The advantage of this method is that the rule van be placed in any config source/role not only in the board file.

Take the li:definitions and li:rules subtrees from the script file and copy them under the plugins/drc_query/rules config subtree in your target config file. Depending on the role, you may want to create a new subtree under li:pcb-rnd-conf-v1 called ha:append (instead of ha:overwrite), so the new script doesn't overwrite the list of existing drc rules but is appended to it.

2. Saving/Exporting a script

From the GUI

The easiest way is to export scripts using the GUI. The process is as follows:

Using actions

Exporting drc rules and definitions to a tEDAx file:

SaveTedax(drc_query, filename.tdx, "ruleID")

The ruleID is the unique name of the DRC rule. The rule and the definitions the rule use are all saved in filename.tdx.

3. Sharing DRC scripts

The easiest way to share DRC scripts is using edakrill.

If you need a DRC check not shipped with the standard pcb-rnd distribution, it's a good idea to check if there is something similar available on edakrill.

If you have written a DRC script, please consider sharing it on edakrill. Beside the DRC script file, it is recommended to share a .txt file (using the same name) to describe the details. The .krill file, also with the same name prefix, should contain at least the following fields: