Custom workflows can have many benefits within your design process—from helping you remember all the necessary tasks for a successful design to creating consistency for multiple team members. With some simple coding and OrCAD’s ability for customization, you can create and utilize a workflow for any aspect of the design process.
To create a custom workflow, you will need to begin with a text file (.txt.). Within the text file the custom workflow is referred to as the workspace. A workspace consists of tasks which can be organized into groups and workflows. Below is the syntax for coding a workspace:
<?xml version="1.0" encoding="utf-8"?>
<workspace version="1.0" name = "WORKSPACE NAME" defaultTool="PCB">
<workflow name="WORKFLOW NAME">
<task name="TASK NAME" command="COMMAND"></task>
<group name="GROUP NAME">
<task name="TASK NAME" command="COMMAND"></task>
<task name="TASK NAME" command="COMMAND; COMMAND"></task>
</group>
</workflow>
</workspace>
In the syntax above, the items in BOLD are the portions of the code that need to be changed by you.
WORKSPACE NAME: This is the name of the custom workflow and will need to be different than any existing workflow.
WORKFLOW NAME: This is an expandable section containing groups and tasks and can be used for organization within the workflow.
GROUP NAME: This is an expandable section containing tasks and can be used for organization within the workflow.
TASK NAME: This is the name of a task within the workflow.
COMMAND: This is the command associated with the task you would like to complete in PCB Editor. Multiple commands can be combined into one string to produce the desired action.
Your workspace can contain any combination of workflows, groups, and tasks. These aspects are all customizable based on your preference; however, the commands need to be derived from PCB Editor. To determine the desired commands, use the following steps:
- Open PCB Editor.
- Select Display > Windows > Command from the menu.
- Type scriptmode +e in the command prompt. Click Enter.
- Execute the desired action in PCB Editor.
The code will be shown in the command window and can be copy/pasted into your text file. Here are some tips when completing this process:
- If you are copying/pasting multiple commands, remember to separate them with semicolons in your code.
- Change any double quotations to single quotations in copy/pasted code.
- Double check your code for spelling or syntax errors.
Let’s look at an example code. The code highlighted in red contains additional commands separated by a semicolon.
This code eliminates an extra step and allows you to automatically set the Active Class to Route Keepin in the Options Window.
When you are finished, or you want to test out your custom workflow:
- Save the file as an .XML file.
- Add it to the standard path for workflows: C:\Cadence\SPB_17.4\share\pcb\text\workflows
- Open PCB Editor.
- Select Display > Windows > Design Workflows from the menu.
- Select your custom workflow from the Workspace drop-down menu.
The possibilities for custom workflows are endless and can be beneficial for both new and seasoned designers, creating consistency for your entire design team; however, this process can be time-consuming. To reap the benefits without putting in hours of coding, check out EMA’s EDA Store for pre-built workflows for Differential Pairs, Rigid-Flex Designs, Footprint Creation, and more. If you have a custom workflow you would like to see created, be sure to add it in the comments below.