Technical Reference - Schematic API

Old Content - visit altium.com/documentation

Parent page: Altium Designer API Reference

The Schematic Application Programming Interface (API) reference details the object interfaces for Schematic objects such as schematic documents and schematic design objects.

The Altium Designer scripting system implements a subset of the complete Altium Designer API and its Object Interfaces. The Altium DXP Developer, used for developing Altium Designer server Extensions, has access to the full Altium Designer API via a set of API SDK source units.

The Schematic Object Model and Functions

The Schematic API consists of the Schematic Object model and Schematic API functions. The Schematic API is made accessible by the Schematic Editor in Altium Designer. The Schematic design object interfaces and methods are available in all script languages supported by Altium Designer.

Object Interfaces

An interface is basically a list of methods that a class declares it implements — that is, each method in the interface is implemented in the corresponding class. While interfaces are declared like classes, they cannot be directly instantiated and do not have their own method definitions. The Schematic design objects are wrapped by their corresponding Schematic interfaces, which makes it possible to manipulate those objects by scripts and server code.

Main Schematic Object Interfaces

  • The ISch_ServerInterface interface is the main interface in the Schematic API and represents the main Schematic Editor object. The ISch_ServerInterface interface is the gateway to fetching other Schematic objects.
  • The ISch_GraphicalObject interface is a generic interface used for all Schematic design object interfaces (inherited from the ISch_BasicContainer interface).
  • The ISch_Document, ISch_Sheet and ISch_Lib interfaces represent an existing Schematic or library documents.

SchServer function

To obtain the Schematic interface that represents the Schematic editor object, invoke the SchServer function in a script to return the ISch_ServerInterface interface. This object interface obtains the Schematic editor server object so you can then extract data from existing Schematic objects and invoke the Schematic object's methods.

For example, the SchServer function is highlighted in the code snippet below:

Var
    Sheet : ISch_Sheet;
Begin
    Sheet := SchServer.GetCurrentSchDocument
    If Sheet = Nil then Exit;
    // do something here
End;
Script Examples

Schematic script examples that demonstrate the use of Schematic interfaces can be found in the \Examples\Scripts\DelphiScript\SCH folder.

References for the Schematic API

Separate references for other Altium Designer APIs

Schematic Object Model Hierarchy

The Schematic Object Model compromises of Schematic Object Interfaces and standalone utility functions that allow you to deal with Schematic objects from a Schematic document that's open in Altium Designer. An object interface is just a means of access to an object in memory.

To have access to the Schematic Editor server and manipulate common schematic design objects, you need to invoke the SchServer function. This extracts the ISch_ServerInterface interface, which represents the loaded schematic server in Altium Designer. The ISch_ServerInterface interface is the main server object interface and contains sub object interfaces within, as shown in the diagram below.

The ISch_ServerInterface and ISch_Document object interfaces, amongst others, are the main object interfaces used when working with a opened schematic document in Altium Designer. See the Schematic API System Interfaces reference for more information.

Schematic Object Interfaces Hierarchy Map

The following diagrams represent examples of the hierarchy map for schematic design objects. In all cases, the ISch_BasicContainer interface (which represents a schematic object's parent or child objects) is the ancestor object interface. For more information see the Schematic API System Interfaces reference.

All the descendant interfaces inherit methods and properties from their immediate parent interfaces. For example the ISch_Pie interface has its own methods and properties as well as inherited methods and properties from the ISch_Arc, ISch_GraphicalObject, and finally the ancestor ISch_BasicContainer interfaces. In the diagram below, the descended ISch_Pie interface is shown at the right.

The below hierarchy example diagram shows the inherited sequence from the ISch_BasicConatiner ancestor interface down to the ISch_Designator and IOpenBus_Component interfaces.

A further, more complex, interface hierarchy diagram (below) showing the descendants of the ISch_Label and ISch_ParametizedGroup interfaces. Methods and properties are inherited down the hierarchical chain from the ISch_BasicContainer interface to the ISch_GraphicalObject interface, and so on.


 

You are reporting an issue with the following selected text and/or image within the active document:
ALTIUM DESIGNER FREE TRIAL
Altium Designer Free Trial
Let’s get started. First off, are you or your organization already using Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

In that case, why do you need an evaluation license?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You actually don’t need an evaluation license for that.

Click the button below to download the latest Altium Designer installer.

Download Altium Designer Installer

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Please fill out the form below to get a quote for a new seat of Altium Designer.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

If you are on Altium Subscription, you don’t need an evaluation license.

If you are not an active Altium Subscription member, please fill out the form below to get your free trial.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Why are you looking to evaluate Altium Designer?

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

You came to the right place! Please fill out the form below to get your free trial started.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Sounds exciting! Did you know we offer special discounted student licenses? For more information, click here.

In the meantime, feel free to request a free trial by filling out the form below.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.

That’s great! Making things is awesome. We have the perfect program for you.

Upverter is a free community-driven platform designed specifically to meet the needs of makers like you.

Click here to give it a try!

If would like to speak with a representative, please contact your local Altium office.
Copyright © 2019 Altium Limited

Got it. You can download a free Altium Designer Viewer license which is valid for a 6 months.

Please fill out the form below to request one.

By clicking “Get Your Free Trial”, you are agreeing to our Privacy Policy.
You may receive communications from Altium and can change your notification preferences at any time.