Schematic API Functions reference

Created: May 13, 2013 | Updated: November 15, 2016

Note:The Altium Designer SDK is currently in the Beta phase and therefore evolving along with its documentation. This reference document, derived from the Altium Designer RTL documentation, is a work in progress and includes some aspects that are different to the new SDK.

The majority of the Schematic API Functions reference is from EDPClasses_Sch and EDPUtil_Sch units of the new SDK.

SchServer Interface

Function SchServer : ISch_ServerInterface;
Description
The SchServer function (from the EDPClasses_Sch unit) returns the interface of the loaded Schematic Editor module in Altium Designer. To work with Schematic objects, you need to have access to the ISch_ServerInterface interface first. To obtain the current schematic document, invoke the SchServer.GetCurrentSchDocument for instance.
Refer to the ISch_ServerInterface's methods and properties for more information.

Example 1

// Grab current schematic document. SchDoc := SchServer.GetCurrentSchDocument; If SchDoc = Nil Then Exit; // Component is a container that has child objects // Create component, and its rectangle, pin and parameter objects. Component := SchServer.SchObjectFactory (eSchComponent, eCreate_Default);

Example 2

Try SchServer.ProcessControl.PreProcess(SchDoc, ''); // Add the parameter to the pin with undo stack also enabled Param.Name := 'Added Parameter'; Param.Text := 'Param added to the pin. Press Undo and this will disappear. Press undo twice to remove the component'; Param.Location := Point(InchesToCoord(3), InchesToCoord(2.4)); Pin.AddSchObject(Param); SchServer.RobotManager.SendMessage(Component.I_ObjectAddress, c_BroadCast, SCHM_PrimitiveRegistration, Param.I_ObjectAddress); Finally SchServer.ProcessControl.PostProcess(SchDoc, ''); End;

See also
ISch_ServerInterface interface

Schematic API functions

The schematic API functions are derived from the EDPUtil_Sch unit part of the SDK. 

ModelTypeManager

Function ModelTypeManager : IModelTypeManager;

IntegratedLibraryManager

Function IntegratedLibraryManager : IIntegratedLibraryManager;

GetState_AllImplementations

Function GetState_AllImplementations (Const ASchComponent : ISch_Component) : TInterfaceList;

GetState_PinsForCurrentMode

Function GetState_PinsForCurrentMode (Const ASchComponent : ISch_Component) : TInterfaceList;

GetState_AllPins

Function GetState_AllPins (Const ASchComponent : ISch_Component) : TInterfaceList;

GetState_AllComponents

Function GetState_AllComponents      (Const ASchLib       : ISch_Lib)            : TInterfaceList;

GetState_AllParameters

Function GetState_AllParameters (Const ASchObject : ISch_BasicContainer) : TInterfaceList;

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

Contact Us

Contact our corporate or local offices directly.

We're sorry to hear the article wasn't helpful to you.
Could you take a moment to tell us why?
200 characters remaining
You are reporting an issue with the following selected text
and/or image within the active document: