Altium Designer Documentation

Managed Scripts in an Altium Vault

Modified by Rob Evans on Oct 23, 2018
此文档页面引用了不再受支持的产品 Altium Vault, Altium Vault 及其组件管理功能已迁移到 Altium Concord Pro

Altium Designer, in conjunction with Altium Vault (3.0 or later), provides the capability of releasing Script Projects into the Altium Vault where they can then be accessed on a permission basis by Altium Designer users.

In Altium Designer, these Vault-based Script Projects can be opened directly from the Vault, loaded as permanently available projects, used in Custom menu commands, or assigned to Preferences that are controlled by the Vault’s Environment Configuration service.

Script projects are uploaded into a lifecycle-managed revision of a Script Project Item in the Vault, which allows an organization to manage and distribute ratified, custom script projects to Altium Designer users through administrative control. Ranging from simple utility scripts to those performing complex source operations, Scripts can be both a convenient and powerful way of adding functionality to Altium Designer.

Release a Script Project

A Script Project can be directly uploaded to a Script Item in the Vault through Altium Designer's Vaults panel (DXP » Vault Explorer), where the Item is generally created within a suitable Scripts Project folder – of the Scripts Folder Type. If not already available, this is also added through Vaults panel.


In the Vaults panel’s Vault Folders area, use the right-click menu options to add a Scripts type folder or to change an existing folder (via the folder's Properties menu) to the Scripts Folder type. Set the Folder Type, Folder Name and Description in the following Edit Folder dialog.


A Script Item can be created in any type of folder, however setting its host folder to the Script type will assist in locating and managing Vault-based Script projects.

Note that the folder’s applied Item Naming Scheme will define the format of the unique ID for each Script Item created in that folder. Normally, this will be set to a suitable, basic Naming Scheme by default, but can be changed to another predefined scheme (or a custom scheme).


A folder’s applied Naming Scheme is accessible in the Edit Folder dialog during the creation of a folder, or in the dialog when it has been opened for an existing folder – select Properties from the folder’s right-click context menu.  

Several default example schemes are available in the Item Naming Scheme drop-down menu. These use a short-form code for either the folder type (ASF – Scripts) or the content type (ASF – Script):

  • $CONTENT_TYPE_CODE-001-{0000} – for example, ASF-001-0001.
  • $CONTENT_TYPE_CODE-001-{A00} – for example, ASF-001-A01.
  • $FOLDER_TYPE_CODE-001-{0000} – for example, ASF-001-0001.
  • $FOLDER_TYPE_CODE-001-{A000} – for example, ASF-001-A001.

Note that in the latter two example formats a new Project Template Item will adopt the host folder type code as a prefix, so if a Script Item is created in say, a Generic Folder type, the example ID code for that Item would be GEN-001-0001 or GEN-001-A001.


Use a preset Item Naming Scheme or create a custom scheme.

Using the nominated naming scheme, the software will automatically assign the next available unique ID based on that scheme, while avoiding a naming clash with any existing Items in the Vault.

A custom naming scheme can also be defined for a folder, simply by typing it within the Item Naming Scheme field and ensuring that the variable portion is enclosed in curly braces (for example; StatisticScript-{0000}). Also, the Naming Scheme employed for the parent folder can be changed at any time – the modified scheme will then be applied to any subsequent newly-created Items within that folder.

Create Script Item

To create a Script Item in the target folder, select the Script Item option after clicking the Add an Item link in the Vaults dialog’s Item area, or from the right-click context menu. The following Create Item dialog offers all properties settings for the new Item, including Comment and Description fields that will help with quick identification of Script Items when searching the Vault.


Add a meaningful Comment and Description to a new Script Item so that Vault searches are more effective – note the Search tab at the bottom of the Vaults panel.

When the Create Item dialog is dismissed (OK), the new Script Item is created in the target Scripts folder, where it exists in an initial Planned Revision state until populated with the released Script project.

How Revisions of an Item are named, and how those revisions progress through their Lifecycle States, are determined by the Item's Revision Naming Scheme and Lifecycle Definition, respectively. Again, these should be set to sensible defaults, but can be changed when (or after) the Item is created – but before Script data has been uploaded (released) to that Item Revision.


Both the Item’s Revision Naming Scheme and Lifecycle Definition can be defined in Create Item dialog (see above), or through the equivalent Edit Item dialog for an existing Item (right-click on the Item and select Properties from the context menu). The Vault’s default settings for Script Items are normally: 1-Level Revision Scheme and Basic Lifecycle, respectively.

Use the drop down menus to select a different Scheme or Definition. To edit an existing Scheme/Definition, select the browse icon in their respective fields to open their corresponding Scheme or Definition editing dialogs.


Revision Naming Schemes and Lifecycle Definitions can be edited, and if desired, only applied to specific types of content.

Further to this, control over which Item types can use a particular lifecycle definition or revision naming scheme can be globally defined and enabled from the Content Types dialog. This is accessed from the Content Types link in the Edit Revision Naming Scheme or Edit Lifecycle Definition dialogs (above), and when opened, will apply to the currently selected tab in the editing dialog (the 1-Level Revision Scheme tab, for example, as shown above).

Upload a Script Project

To release a Script Project into the target Script Item Revision, select the Upload option from the Item’s right-click context menu and browse to the desired local Script Project.


A created Script Item will be in a Planned state until a Script Project is uploaded into the initial Revision, where it will normally progress to a read-only In Production state.

The selected Script Project will be released to the new Item Revision, which will (typically) progress from a Planned to In Production lifecycle state – note that the change in state will depend on the Lifecycle Definition applied to this Item.


In the Vaults panel, select the Details view to see the files contained in the current Script Revision.

To edit a released Script Project, right click on its Item Revision in the Vaults panel and select Edit xxx (where xxx is the selected Revision’s name). This will open the current (latest) version in Altium Designer where it can be edited as required, then Released back to the Vault as a new Revision using the Release to Vault command – available from the Project Name right-click context menu.

Using a Released Script Project

A Vault-hosted, managed Script Project can be used in several different ways in Altium Designer, where the methods range from simple direct access to imposing Script Preferences as part of an applied Environment Configuration.

Run a Script

To run a Vault-based accessible script directly in Altium Designer (DXP » Run Script), choose the Browse » From Vault option in the Select Item To Run dialog. The managed Script Project selected in the following Choose Item dialog will be opened from the Vault in the Select Item To Run dialog, where it can be Run in the usual way.


Choose to run a script from a Vault source, rather than a local source, by selecting the From Vault option in the Select Item to Run dialog.

Install a Script

Altium Designer allows any number of Script Projects to be installed on a permanent basis, so their functionality becomes available at all times, for all Altium Designer sessions. This feature is included as part of Altium Designer’s Preferences (DXP » Preferences), and is located on the Global Projects page in the Scripting System section.

To install a Script Project from the Vault, select Install from Vault from the Install button options. Select the desired vault-hosted Script from the following Choose Item dialog, and dismiss the dialog (OK) to install the Script Project.


Installed Scripts are always available in Altium Designer, and are configured in the Global Projects page of the Preferences dialog.

The installed Script Project will be available to Altium Designer whenever a User is signed in to the Vault with suitable credentials. Note that the installed Script Project is listed by its location or 'path' in the Vault, and its name reflects the Script Item ID that hosts the script project data.


A Managed Script installed from an Altium Vaults is listed by its Vault path and Item ID name.

The Vault reference links created in the Preferences by an installed Script Project are retained, and therefore will be included if the Preferences file is also released to the Vault.  The resulting Managed Preferences entry in the Vault can be applied as part of an Environment Configuration, which will automatically provide the linked Managed Script to Users in the designated team.

Create a Script Command

In Altium Designer, a Script (either locally or Vault -sourced) can be applied to a menu item with a number of simple steps. This relies on the permanent availability of that Script, which must be installed through the Script Preferences (as detailed above).

A custom Command is created from an installed Script using the Customize feature (DXP » Customize), which via the Edit Command dialog, allows the definition of a new Action based on the Script Process and Parameters. The command Parameters define the full path to the Script and its target Procedure, and are in the form: ProjectName|ProcName>Process.  So for a typical locally-stored Script, this might be:

ProjectName=C:\Design\Scripts\Hello\Hello.PRJSCR|ProcName=DisplayHelloWorld.pas>ShowAMessage

For a Managed Script Project hosted in the Vault however, the path, and therefore the command’s Parameters entry must point to the correct Vault location – which is based on the Script Item’s GUID reference. So this reference link must be obtained before attempting to create the new Script command entry.

To capture the correct Parameters for a Script installed from the Vault, open the Select Item To Run dialog (DXP » Run Script), right-click on the desired procedure in the Script and select Copy script parameters. This will copy the entire path, process name and procedure to the Clipboard.


Select the required process/procedure in the script project before copying the Vault command Parameters.

The new Script command can now be created in the Edit Command dialog – select DXP » Customize, and then the button in the following Customizing DefaultEditor Editor dialog. In the Edit Command dialog, paste the copied script parameters into the Parameters field, then complete the other fields (Caption, Image, Shortcuts etc) as required.


Paste the copied Vault Script parameters in the editor's Parameters field, then proceed as you would when creating a command from a locally-sourced Script.

From the Customizing DefaultEditor Editor dialog, the completed script command can be dragged to a suitable Altium Designer Toolbar or Menu and run as needed.

Note that since the Command's Script is sourced from the Altium Vault, it will be only available when the User has signed in to the Vault with the correct credentials.


A menu command created from a Vault-based Script is functional when the User is signed in to its host Vault.

Found an issue with this document? Highlight the area, then use Ctrl+Enter to report it.

联系我们

联系原厂或当地办公室

You are reporting an issue with the following selected text
and/or image within the active document:
Altium Designer 免费试用
Altium Designer Free Trial
我们开始吧!首先,您或者您的公司已经在使用Altium Designer了吗?

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

既然您在使用Altium Designer,为何仍需要试用?

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

好的,实际上您无需下载一个试用版本。

点击下方按钮下载最新版本的Altium Designer安装包

下载Altium Designer 安装包

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

填写下方表格,获取Altium Designer最新报价。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

如果您是Altium维保期内客户,您不需要下载试用版本。

如果您不是Altium维保客户,请填写下方表格免费试用。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

您为何想要试用Altium Designer?

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

那您来对地方了!请填写下方表格申请试用吧。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

Great News!

Valid students can get their very own 6-month Altium Designer Student License for FREE! Just fill out the form below to request your Student License today.

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

好的,您可以下载免费的Altium Designer Viewer查看文档,有效期6个月。

请填写下方表格申请。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。

好棒!创作是一件超酷的事情,我们可以为您提供完美的设计软件。

Upverter是一个社区导向的交流平台,专为您这样的创客量身定做。

点击这里看看吧!

如果您有任何需求,请点击这里联系获取当地办公室销售代表联系方式。.
Copyright © 2019 Altium Limited

好的,您可以下载免费的Altium Designer Viewer查看文档,有效期6个月。

请填写下方表格申请。

点击[获取免费试用],并同意我们的隐私政策。您会接收到来自Altium的资讯,并允许其改变您的通知首选项。