Running Scripts in Altium Designer. Executing scripts. Script as a Command. Modified by on 13-Sep-2017

Similar documents
Customizing the Altium Designer Resources

A Tour of the Scripting System. Contents

5 WAYS TO CUSTOMIZE ALTIUM DESIGNER FOR BETTER EFFICIENCY

Microsoft Windows XP. Operating System. Starting Windows XP. You might be asked to enter your username and password

Figure 1. Output jobs are configured as an OutJob file, giving you full control over print-based output.

Generating a Custom Bill of Materials

The following content has been imported from Legacy Help systems and is in the process of being checked for accuracy.

Published on Online Documentation for Altium Products (

For more detailed information on the differences between DelphiScript and Object Pascal, refer to the DelphiScript Reference document.

Published on Online Documentation for Altium Products (

Published on Online Documentation for Altium Products (

Published on Online Documentation for Altium Products (

eproduct Designer A Simple Design and Simulation Tutorial

Storage Manager. Summary. Panel access. Modified by on 10-Jan-2014

Editing Multiple Objects. Contents

SAP Favorites. You can manage your own SAP menu Favorites in multiple ways: 1. From the SAP menu bar click on Favorites to display your options:

Importing the Source Models. Placing a 3D Model in the Workspace. Modified by on 25-Jul-2014

Using the Customize Dialog Box

Publish to PDF. Contents

A board is split into distinct regions by placing Split Lines (blue in color), which run from one edge of the board shape to another edge.

Releasing a Schematic Sheet to a Vault

Unified Cursor-Snap System (PCB)

USER MANUAL SATORI TEAM

Welcome to the Altium Designer Environment

Working with Excel involves two basic tasks: building a spreadsheet and then manipulating the

Defining Board Regions and Bending Lines

EDAConnect-Dashboard User s Guide Version 3.4.0

Working with Excel CHAPTER 1

Defining Net Classes by Area on a Schematic. Creating a Net Class from a Blanket Directive. Modified by Admin on Sep 13, Blankets in Schematic

Summary. Parent Page: PCB Panels

Caja File Manager. Desktop User Guide

Moving to Altium Designer from Protel 99 SE. Contents

Published on Online Documentation for Altium Products (

Print Station. Point-and-Click Printing WHITE PAPER

Extensions Management Interface. Parent page: System Installation, Licensing & Management

The scripting system handles two types of components: Visual and Non-visual components.

CROMWELLSTUDIOS. Content Management System Instruction Manual V1. Content Management System. V1

Microsoft Access 2010

2. Click on the Launch button and select Terminal. A window will appear which looks like:

Dreamweaver Basics. Planning your website Organize site structure Plan site design & navigation Gather your assets

Collaborating between Altium Designer and SOLIDWORKS

Published on Online Documentation for Altium Products (

ICS Tutorials: Basic Operations

JAMS 7.X Getting Started Guide

Building an Integrated Library

Interaction Style Categories. COSC 3461 User Interfaces. Windows. Window Manager

Microsoft Office Outlook 2007: Intermediate Course 01 Customizing Outlook

Reading: Managing Files in Windows XP

Google Earth. Tutorials. Tutorial 2: Annotating Google Earth

Managed Projects. Modified by Jason Howie on 31-May-2017

Published on Online Documentation for Altium Products (

Schematic Editing Essentials

This document provides detailed information on placing components from a database using Altium Designer's SVN Database Library feature.

1. Adjusting Your Work Area

To Do Panel. Contents

Exploring CircuitMaker

Horizon Launcher Configuration Guide

PCB 3D Movie Editor. Summary. Modified by on 13-Sep D PCB Movie Editor. Parent page: Panels

Network Management Software ALLNET Zone Controller

Published on Online Documentation for Altium Products (

MODULE III: NAVIGATING AND FORMULAS

Schematic Symbol Generation Tool

Changing Button Images in Microsoft Office

This book is about using Microsoft Excel to

3D Body. Summary. Modified by Admin on Sep 13, Parent page: Objects

Text box. Command button. 1. Click the tool for the control you choose to draw in this case, the text box.

JScript Reference. Summary. Exploring the JScript language. Introduction. This reference manual describes the JScript scripting language used in DXP.

To complete this project, you will need the following folder:

USING THE Integrated Library to Database Library Translator WIZARD

OutputJob Editor Reference

Microsoft Access 2013

Fireworks 3 Animation and Rollovers

Published on Online Documentation for Altium Products (

Text strings are available for placement in both Schematic and Schematic Library Editors by:

All Applications Release Bulletin January 2010

Component Templates. The Component Template Item Type. Modified by Jason Howie on 31-May-2017

Generating Output for an Assembly Variant. Selecting the Variant. Modified by on 6-Nov-2013

Lab 5: Reporting with RPE

Parent page: PCB Panel

Comments. Summary. Modified by Rob Evans on Jun 10, Parent page: Workspace Manager Panels

If you are new to version control systems and are wondering where to start, read the article Version Control and Altium Designer.

Creating Buttons and Pop-up Menus

Class Structure in the PCB

Securing Design Source Inside a Design Repository

Enhanced Polygon Editing and Management. Poured or Unpoured Polygons. Modified by Jason Howie on Nov 13, 2014

The Spectacle Handbook. Boudhayan Gupta Boudhayan Gupta

Outline Vertices Editor for Polygonal Pours and Regions

IDX Support. Extension Access. Modified by on 13-Sep-2017

1. BlueSoleil isend Introduction: 2. Function:

JScript Reference. Contents

SILVACO. An Intuitive Front-End to Effective and Efficient Schematic Capture Design INSIDE. Introduction. Concepts of Scholar Schematic Capture

Folders Projects, Folders and Menus. Table of Contents. 1.0 Folder Types. 2.0 Folder Menu Commands

Adding a Simulation Model to a Component Definition

Acrobat X Professional

NetIQ Advanced Authentication Framework - Virtual Desktop Authentication (VDA) Profile Editor. Administrator's Guide. Version 5.1.

Getting Started with. Microsoft Office 2010

Multi-line PCB Text Support

Getting Started with BarchartX

Excel window. This will open the Tools menu. Select. from this list, Figure 3. This will launch a window that

Video Output Container. Access. Modified by Admin on Nov 26, D PCB Movie Editor. Related article: PCB 3D Video

Transcription:

Running Scripts in Altium Designer Old Content - visit altium.com/documentation Modified by on 13-Sep-2017 Related information Customizing the Altium Designer Resources Parent page: Scripting While the Altium Designer Scripting system provides the means to create sophisticated automated tasks for Altium Designer, the resulting scripts also need to be easily accessible during the design process. For example, a script created to perform a complex set of operations while editing a PCB should be readily available in the PCB Editor itself, where it can be executed with a mouse click or two. Altium Designer caters for this need by allowing a script to be assigned to a process launcher, and thereby a command that can be assigned to a server Menu, Toolbar and Shortcut. Executing scripts To briefly recap, when open in the script editor, a script can be executed using the editor's Run command or via the DXP» Run Script menu. This requires the script project to be open in Altium Designer, which is not a convenient approach to accessing a script needed during the PCB design process, for example. A more suitable method to access a frequently used script is to install the project as a Global Project DXP» Preferences, Scripting System Global Projects. In this case the project is automatically loaded when Altium Designer starts, and can be executed at any time via the DXP» Run Script menu. The ideal way to access a script's functionality however, is where it is integrated into Altium Designer's GUI as a menu or toolbar command. This is normally a two step process; implemeting a script as a Command (with optional shortcut), then assigning the Command to a Menu (static or popup) or a Toolbar. Script as a Command A script can implemented as a server command by harnessing Altium Designer's built in server processes, or more specifically, the ScriptingSystem:RunScript process. A command represents a performed action and is supported by a process string via a packaged process launcher. In the case of the the ScriptingSystem:RunScript process, it includes parameters for pointing to a specific script project file, a constituent script file (*.pas) and a processes within that script.

Run Process Altium Designer processes are directly available via the DXP» Run Process menu, where the ScriptingSystem:RunScript process can be selected and appropriate parameters added to execute the desired script. In the case of the sample HelloWorld script for example, the entries would be as follows: Process: ScriptingSystem:RunScript Parameters: ProjectName ProcName > Process Therefore, depending on the source path to the script the Parameters string would be similar to: ProjectName=C:\Users\Public\Documents\Altium\Delphiscript Scripts\General\HelloWorld.PRJSCR ProcName=HelloWorld.pas>HelloWorld Executing a script using the script process launcher via the Run Process dialog. While still not a particularly convenient way to execute a script during the design process, note that running the script as a process avoids the need to directly open the script or have it loaded as a Global Project. The second and more significant advantage of using the process method to run a script is that it can be implemented as an accessible Altium Designer command. This is done by customizing Altium Designer's menu system, where a script can be assigned to a command for a nominated server. Create a Command To assign the HelloWorld script as a command for the PCB editor for example, open a PCB document and select DXP» Customize from the main menu.

To create a new command, click the New button in the Customizing PCB Editor dialog to open the Edit Command dialog where the server process and script path details can be included, as detailed for the Run Process dialog example above.

The dialog also provides entry fields for a command caption, description, shortcut and associated bitmap image (BMP/GIF; 18 x 18 pixels). Tip: The required parameters can be copied from the actual script entry under the [Scripts] category in the Customize PCB Editor dialog. Once copied, ensure that the Categories entry is no longer set to [Scripts] before creating the new command with the New button. With the details complete and the dialog dismissed (OK) the HelloWorld script becomes available as a Custom command for the PCB Editor.

Note that commands are implemented on a server basis, so a Custom command that has been created for the PCB Editor (as above) will not be available in other severs, such as the Schematic Editor or the Scripting System. External Application Command An external application such as the Microsoft Notepad can be launched from Altium Designer through software control. In this case the command process and parameters entries would be: Process: ScriptingSystem:RunScriptText Parameters: Text=Begin RunApplication('notepad.exe'); End; The server process in this case, ScriptingSystem:RunScriptText, is literally running a sequence of script statements, rather than opening and running a specific script file as outlined above.

The alternative approach is to create a script with a few equivalent lines of code, then create a conventional ScriptingSystem:RunScript command entry. Procedure RunNotepad; Begin RunApplication('notepad.exe'); End; Note that for both approaches to implementing the external Notepad command it is sufficient to just enter 'notepad.exe' as the parameter for RunApplication, rather than specify the application's full path and filename. Windows applications such as Calculator and Notepad have their paths already specified by the operating system. To launch an application from Altium Designer that does not have an inherent Windows path, the application's full path and filename need to be specified (in single quotes, to cater for any white space in the path). So to launch a second copy of Altium Designer for example, the RunApplication process and parameters would be: RunApplication('C:\Program Files (x86)\altium\adxx\dxp.exe') where xx represents is the Altium Designer version. Commands can be edited and removed directly from the customizing dialog (in this case the Customizing PCB Editor dialog) using the buttons at the bottom of the dialog. Assigning Menu Commands With a script implemented as a custom server command via Altium Designer's Customizing function (DXP» Customize) as detailed above, it can be assigned to the server GUI by a simple drag and drop process.

Toolbars To assign a custom command to the PCB editor's main menu or Toolbar menu for example, open the Customizing PCB Editor dialog, locate the custom command and drag it to the desired menu location. Note that a PCB document needs to be open to provide access to the PCB server menus. A custom command can be dragged to the required menu location. With the customizing dialog closed, the new menu command can be accessed at any time in the PCB editor. A new script command assigned to the PCB Toolbar. Since the new custom command has been assigned to the PCB Toolbar menu it can be seen under the 'PCB Standard' command category in the Customizing PCB Editor dialog.

When assigned to a menu, the custom script command will appear under that menu's category in the customizing dialog. To remove a command from a menu, open the custom dialog then drag the menu command icon back into the dialog. Removing a command assigned to the Toolbar. When in customizing mode, commands assigned to a menu can also be edited and deleted by right clicking on the menu command itself.

Menus A custom command can be assigned to a menu, at any menu depth, using the same drag and drop process described above. When the server is in customizing mode the menus remain responsive to the mouse pointer, and will expand and contract accordingly. To place a command into the PCB editor's Reports menu for example, drag the command into the menu and down the list where it can be dropped in a suitable position. Active menus during customization allow a custom command to be dragged into a drop-down menu. With the customizing dialog closed, the new menu command can be accessed from within the Reports menu.

The Notepad script command included in the Reports menu. Pop-up Menu A command can be assigned to a right-click pop-up menu in the same way as described above, with no restriction imposed by the sub-menu depth. In this example the command is dragged through the menu path of Help» Popups» Right Mouse Click Free Space and dropped in the sub-menu as shown below.

A custom command assigned to a right-click sub-menu As assigned, the custom Notepad script command becomes available in the PCB editor when rightclicking in free space. The Notepad script command in the PCB right-click menu. Direct Script Assignment As an alternative to creating a reusable custom command from a script then assigning it to menu, a script can be directly applied to a menu as a quick, one-off approach. This bypasses the creation of a custom command step by directly assigning a loaded script to a menu. Without the existence of a matching custom command, which can be applied to multiple menus, this direct method is a singlular solution for script menu access. To assign a script directly to a menu, load the script project, open the server's Customizing dialog (DXP» Customize), select [Scripts] in the Categories list, locate the desired script and drag it to a menu position. Click OK to dismiss the Edit Command dialog.

A script, rather than a command, can also be assigned directly to a menu. The new menu item will be at its default settings (caption name etc), which can be corrected by rightclicking on the menu entry and selecting Edit from the submenu, to open the Edit Command dialog.

In Customizing mode, right click on a menu to access its parameters. Once configured, the new menu will be available at design time without further need to load the script project, or install it as a Global Project. Note that this approach to applying a script to a menu automatically creates the required command. This is not a re-assignable custom command, as described in the above methods, but a command created for that direct menu entry. This can be observed in the actual menu category entry in the Customizing dialog. For the above example, the command can be seen in the 'Reports' category in the Customizing PCB Editor dialog.

When directly applying a script to a menu, the matching command is created for just that menu entry. Source URL: https://techdocs.altium.com/display/scrt/running+scripts+in+altium+designer