System API System Interfaces

Old Content - visit altium.com/documentation

Parent page: Technical Reference - System API

System API: System Interfaces

Contents of this reference:

ICommandLauncher Interface
IGUIManager Interface
INavigationSystem Interface
INotification Interface
IDynamicHelpManager Interface
IFastCrossSelectNotification Interface
IDocumentNotification Interface
IDocumentRequest Interface
INotificationHandler Interface
IProcessLauncher Interface
IProcessLauncherInfo Interface
IProcessControl Interface
ILicenseManager Interface
IOptionsManager Interface
IOptionsReader Interface
IOptionsWriter Interface
IOptionsPage Interface
IServerProcess Interface
IServerRecord Interface
IServerWindowKind Interface
IServerSecurity Interface
ITimerManager Interface
ITimerHandler Interface
ITranslationManager Interface

ICommandLauncher Interface

Overview
The ICommandLauncher interface encapsulates the functionality of launching a command (which is a pre packaged process) in Altium Designer. A command is associated with a user interface item in the server (Text Editor, Schematic Editor etc) such as a hot key button, menu item or a toolbar bitmap. In essence, a server is supported by its set of processes and the processes act as a link between Altium Designer and this server.

The LaunchCommand method launches a process from the server that this ICommandLauncher interface function is associated with.

The GetCommandState method retrieves information for the specified command.

Since a server has a set of processes and these process identifiers are stored in an installation file (which ends with an INS extension) and the process launchers that link to specific user interface elements (also called resources) and the layout of user interface elements are defined in the resources file (which ends with a RCS extension).

ICommandLauncher Methods and Properties Table

ICommandLauncher Methods
LaunchCommand
GetCommandState
ICommandLauncher Properties

Notes
All the functions in a server available to the user, such as placing a primitive, changing the zoom level and so on are performed by commands which are pre-packaged process launchers. The pre-packaged process launchers bundle together the process that runs when the command is selected, plus any parameters, bitmaps (icons), captions (the name of an item that displays on a resource), descriptions and associated shortcut keys.

When you select a menu item or click on a toolbar button, you are launching a process. Processes are launched by passing the process identifier to the appropriate server and the server then executes the process. Processes are defined and implemented in the Commands unit of a server source code project. The processes are declared in an Installation File (with an INS extension).

Each process has a process identifier.  The process identifier is made up of two parts separated by a colon.  The first part of the process identifier indicates the server that defines the process, and the second part is the process name. 

For example, the process Sch:ZoomIn is provided by Schematic server.  When this process is launched, either by selecting a menu item, pressing a hot key or activating a toolbar button (which are all defined as process launchers in the Altium Designer), it will perform the task of zooming in on the currently active schematic sheet.

When a server is started up for the first time in Altium Designer, process procedures or commands registered in the CommandLauncher object within the server module are loaded in Altium Designer.

See also
IClient interface
IServerModule interface

ICommandLauncher Methods

GetCommandState

(ICommandLauncher interface)
Syntax
Procedure GetCommandState(      ACommandName,
                                AParameters      : PChar;
                          Const AContext         : IServerDocumentView;
                          Var   Enabled,
                                Checked,
                                Visible          : LongBool;
                                Caption,
                                ImageFile        : PChar);
Description
The GetCommandState procedure fetches the current snapshot of the server command (internal server process) and the parameters are returned for the specified server command name.
Example

 ACommandLauncher := AServerModule.GetCommandLauncher; If ACommandLauncher <> Nil Then Begin     ACommandLauncher.GetCommandState(Command,                                      Parameters,                                      View,                                      Enabled,                                      Checked,                                      Visible,                                      Caption,                                      Image);     // do what you want with the parameters      // after you have supplied the Command parameter. End;

See also
IServerModule interface

LaunchCommand

(ICommandLauncher interface)
Syntax
Function  LaunchCommand  (Const ACommandName     : PChar;
                                AParameters      : PChar;
                                MaxParameterSize : Integer;
                                AContext         : IServerDocumentView) : LongBool;
Description
This function launches a command from a server module or from Client. (Client also has its own command launcher table since Client has its own processes as well).
The AContext parameter denotes which IServerDocumentView interface to launch the process onto. If the command can be launched, the function returns a true value.
Example

 If StringsEqual(ServerModule.ModuleName,'TextEdit') Then Begin     ServerModule.CommandLauncher.LaunchCommand('TextEdit:MoveCursorToTopOfDocument',                                                 Nil,0,ServerDocument.View[0]); End;

See also
IServerDocumentView interface

IGUIManager Interface

Overview
The IGUIManager interface represents the Graphical User interface portions of the Altium Designer application such as resizing panels, checking for certain hot key maps and status bars.

IGUIManager methods
AddKeyStrokeAndLaunch
AddKeyToBuffer
BeginDragDrop
CanResizePanel
CurrentProcessLauncherAvailable
DoneTransparentToolbars
DXPShortcutToDelphiShortcut
GetActivePLByCommand
GetAllAvailableHotkeys
GetFocusedPanelName
GetPanelIsOpen
GetPanelIsOpenInAnyForm
GetPanelIsVisibleInAnyForm
GetProcessLauncherInfoByID
GetShortcutTextForPLID
InitTransparentToolbars
IsPanelValidInCurrentForm
IsPanelVisibleInCurrentForm
IsSysLevelHotKey
LaunchCurrentHotkey
ProcessMessage
RegisterFloatingWindow
ResizePanel
SetFocusLock
SetPanelActiveInCurrentForm
SetPanelVisibleInCurrentForm
ShowCurrentProcessLauncherHelp
ShowTreeAsPopup
StatusBar_GetState
StatusBar_SetState
UnregisterFloatingWindow
UpdateInterfaceState
UpdateTransparentToolbars
IGUIManager properties

See also

IGUIManager Methods

AddKeyStrokeAndLaunch method

(IGUIManager interface)
Syntax
Function AddKeyStrokeAndLaunch (AKey : Word) : LongBool;
Description
Example
See also
IGUIManager interface

AddKeyToBuffer method

(IGUIManager interface)
Syntax
Function AddKeyToBuffer (KeyId : Integer;Alt, Shift, Ctrl : LongBool) : LongBool;
Description
Example
See also
IGUIManager interface

BeginDragDrop method

(IGUIManager interface)
Syntax
Procedure BeginDragDrop (ADragDropInfo : IDragDropObject);
Description
Example
See also
IGUIManager interface

CanResizePanel method

(IGUIManager interface)
Syntax
Function CanResizePanel (Const AViewName : Widestring) : LongBool;
Description
This function determines whether the panel can be resized or not. The name of the panel need to be supplied.
Example
See also
IGUIManager interface

CurrentProcessLauncherAvailable method

(IGUIManager interface)
Syntax
Function CurrentProcessLauncherAvailable : LongBool;
Description
This function determines whether the current process launcher is available or not to use.
Example
See also
IGUIManager interface

DoneTransparentToolbars method

(IGUIManager interface)
Syntax
Procedure DoneTransparentToolbars;
Description
Example
See also
IGUIManager interface

GetActivePLByCommand method

(IGUIManager interface)
Syntax
Function GetActivePLByCommand (Const DocumentKind, ACommand, AParams : Widestring) : IProcessLauncherInfo;
Description
Example
See also
IGUIManager interface

GetFocusedPanelName method

(IGUIManager interface)
Syntax
Function GetFocusedPanelName : Widestring;
Description
Example
See also
IGUIManager interface

GetPanelIsOpen method

(IGUIManager interface)
Syntax
Function GetPanelIsOpen (Const AViewName : Widestring) : LongBool;
Description
Example
See also
IGUIManager interface

GetProcessLauncherInfoByID method

(IGUIManager interface)
Syntax
Function GetProcessLauncherInfoByID (Const PLID : Widestring) : IProcessLauncherInfo;
Description
Example
See also
IGUIManager interface

InitTransparentToolbars method

(IGUIManager interface)
Syntax
Procedure InitTransparentToolbars (Const ViewRect : TRect);
Description
Example
See also
IGUIManager interface

IsPanelValidInCurrentForm method

(IGUIManager interface)
Syntax
Function IsPanelValidInCurrentForm (Const AViewName : Widestring) : LongBool;
Description
Example
See also
IGUIManager interface

IsPanelVisibleInCurrentForm method

(IGUIManager interface)
Syntax
Function IsPanelVisibleInCurrentForm (Const AViewName : Widestring) : LongBool;
Description
Example
See also
IGUIManager interface

IsSysLevelHotKey method

(IGUIManager interface)
Syntax
Function IsSysLevelHotKey (KeyId : Integer; Alt, Shift, Ctrl : LongBool): LongBool;
Description
Example
See also
IGUIManager interface

LaunchCurrentHotkey method

(IGUIManager interface)
Syntax
Procedure LaunchCurrentHotkey;
Description
Example
See also
IGUIManager interface

ProcessMessage method

(IGUIManager interface)
Syntax
Function ProcessMessage (Var Msg : TMessage) : LongBool;
Description
Example
See also
IGUIManager interface

RegisterFloatingWindow method

(IGUIManager interface)
Syntax
Procedure RegisterFloatingWindow (Const FloatingWindow : IFloatingWindow);
Description
Example
See also
IGUIManager interface

ResizePanel method

(IGUIManager interface)
Syntax
Procedure ResizePanel (Const AViewName : Widestring; AWidth, AHeight : Integer);
Description
Example
See also
IGUIManager interface

SetFocusLock method

(IGUIManager interface)
Syntax
Procedure SetFocusLock (Locked : LongBool);
Description
Example
See also
IGUIManager interface

SetPanelActiveInCurrentForm method

(IGUIManager interface)
Syntax
Procedure SetPanelActiveInCurrentForm (Const AViewName : Widestring);
Description
Example
See also
IGUIManager interface

SetPanelVisibleInCurrentForm method

(IGUIManager interface)
Syntax
Procedure SetPanelVisibleInCurrentForm (Const AViewName : Widestring; IsVisible : LongBool);
Description
Example
See also
IGUIManager interface

ShowCurrentProcessLauncherHelp method

(IGUIManager interface)
Syntax
Function ShowCurrentProcessLauncherHelp : LongBool;
Description
Example
See also
IGUIManager interface

ShowTreeAsPopup method

(IGUIManager interface)
Syntax
Procedure ShowTreeAsPopup (Const TreeID : Widestring);
Description
Example
See also
IGUIManager interface

StatusBar_GetState method

(IGUIManager interface)
Syntax
Function StatusBar_GetState (Index : Integer) : Widestring;
Description
Example
See also
IGUIManager interface

StatusBar_SetState method

(IGUIManager interface)
Syntax
Procedure StatusBar_SetState (Index : Integer; Const S : Widestring);
Description
Example
See also
IGUIManager interface

UnregisterFloatingWindow method

(IGUIManager interface)
Syntax
Procedure UnregisterFloatingWindow (Const FloatingWindow : IFloatingWindow);
Description
Example
See also
IGUIManager interface

UpdateInterfaceState method

(IGUIManager interface)
Syntax
Procedure UpdateInterfaceState;
Description
Example
See also
IGUIManager interface

UpdateTransparentToolbars method

(IGUIManager interface)
Syntax
Procedure UpdateTransparentToolbars;
Description
Example
See also
IGUIManager interface

INavigationSystem Interface

Overview
The navigation system is the workhouse for the Navigation panel which is the center-piece for net connectivity for the design project. There are three ways a design can be arranged - as a list of compiled sheets, flattened hierarchy and as a structural tree.

INavigationSystem Methods and Properties Table

INavigationSystem methods
RegisterNavigationProvider
UnregisterNavigationProtocol
RegisterSpecialURLString
UnregisterSpecialURLString
ParseDestinationString
NavigateTo
ExpandTargets
ValidatedTarget
INavigationSystem properties

See also
IClient interface

INavigationSystem Methods

UnregisterNavigationProtocol method

(INavigationSystem interface)
Syntax
Procedure UnregisterNavigationProtocol(Const Protocol : WideString; Handle : THandle);
Description
Example
See also
INavigationSystem interface

RegisterSpecialURLString method

(INavigationSystem interface)
Syntax
Procedure RegisterSpecialURLString (Const SpecialString : WideString; SpecialStringFunc : TSpecialStringFunc);
Description
Example
See also
INavigationSystem interface

RegisterNavigationProvider method

(INavigationSystem interface)
Syntax
Function RegisterNavigationProvider (Const ProtocolName : WideString; Const NavigationProvider : INavigationProvider) : THandle;
Description
Example
See also
INavigationSystem interface

ParseDestinationString method

(INavigationSystem interface)
Syntax
Procedure ParseDestinationString(Const Destination : WideString; Var Protocol, Target, Parameters : WideString);
Description
Example
See also
INavigationSystem interface

NavigateTo method

(INavigationSystem interface)
Syntax
Function NavigateTo (Const CurrentView : IExternalForm; Var Destination : WideString; Out TargetView : IExternalForm) : LongBool;
Description
Example
See also
INavigationSystem interface

ExpandTargets method

(INavigationSystem interface)
Syntax
Procedure ExpandTargets (Var Target : WideString);
Description
Example
See also
INavigationSystem interface

ValidatedTarget method

(INavigationSystem interface)
Syntax
Function ValidatedTarget ( Target : WideString) : WideString;
Description
Example
See also
INavigationSystem interface

UnregisterSpecialURLString method

(INavigationSystem interface)
Syntax
Procedure UnregisterSpecialURLString (Const SpecialString : WideString; SpecialStringFunc : TSpecialStringFunc);
Description
Example
See also
INavigationSystem interface

INotification Interface

Overview
The INotification interface is used by the IClient, IServerView, IServerDocument, IServerModule, INotificationHandler interfaces.
The notifications could be a document loading notification, workspace being loaded, an object being navigated, and a server module being loaded.
Notifications as event messages can be broadcasted by the Client system, and any open server documents can receive them and act on them accordingly.
The Broadcast Notification is a system wide notification, and the Dispatch Notification is a server specific notification.

Different types of notifications

1. DocumentNotification
2. ViewNotification
3. DocumentFormNotification
4. ModuleNotification
5. SystemNotification
6. MessagesNotification
7. DragDropNotification
8. FastCrossSelectNotification

Setting up notifications in a server project,

1. Override the ReceiveNotifications method in the TServerModule class to handle and process different notifications.
2. Define different notification handlers.
3. Process each handler based on the Code property of each notification.
Example

 Procedure TNotificationModule.ReceiveNotification(Const ANotification: INotification); Var     DocumentNotification : IDocumentNotification;     ViewNotification     : IViewNotification;     FormNotification     : IDocumentFormNotification;     ModuleNotification   : IModuleNotification;     SystemNotification   : ISystemNotification;  Begin     If Supports(ANotification, IDocumentNotification, DocumentNotification) Then            HandleDocumentNotification(DocumentNotification);       If Supports(ANotification, IViewNotification, ViewNotification) Then            HandleViewNotification(ViewNotification);       If Supports(ANotification, IDocumentFormNotification, FormNotification) Then            HandleFormNotification(FormNotification);       If Supports(ANotification, IModuleNotification, ModuleNotification) Then            HandleModuleNotification(ModuleNotification);       If Supports(ANotification, ISystemNotification, SystemNotification) Then            HandleSystemNotification(SystemNotification); End;


The INotification interface hierarchy is as follows;
INotification
IDocumentNotification
IViewNotification
IDocumentFormNotification
IModuleNotification
ISystemNotification
IMessageNotification
IDragDropNotification
IDocumentRequest
IFastCrossNotification

INotification methods INotification properties

See also
IClient Interface
IServerView interface
IServerDocument interface
IServerModule interface
INotificationHandler interface
IDocumentNotification interface
IViewNotification interface
IDocumentFormNotification interface
IModuleNotification interface
ISystemNotification interface
IMessageNotification interface
IDragDropNotification interface
IDocumentRequest interface
IFastCrossNotification interface

IDocumentFormNotification Interface

(IDocumentFormNotification interface)
Overview
 
Description
Example
 
See also
IClient interface
IExternalForm interface

ISystemNotification Interface

(ISystemNotification interface)
Syntax
 
Description
Example
 
See also
IClient interface
IExternalForm interface

IMessagesNotification Interface

Overview
The IMessagesNotification interface

IMessagesNotification methods IMessagesNotification properties
Code

See also
IClient interface
IExternalForm interface

IModuleNotification Interface

Overview
 
See also
IClient interface
IExternalForm interface

IViewNotification Interface

Overview
 
Description
Example
 
See also
IClient interface
IExternalForm interface

IDragDropNotification Interface

Overview
Notes
Inherited from INotification interface.

IDragDropNotification Methods
GetCode
GetDragDropObject
IDragDropNotification Properties

See also
IDragDropObject interface

IEventNavigated Interface

Overview

IEventNavigated Methods
GetCode
GetWnd
IEventNavigated Properties
Code
Wnd

See also
IDragDropObject interface

INavigationProvider Interface

Overview

INavigationProvider Methods
NavigateTo
INavigationProvider Properties

See also
IDragDropObject interface

INavigator Interface

Overview

INavigator Methods
NavigateTo
INavigator Properties

See also

IBackForwardNavigator Interface

Overview

IBackForwardNavigator Methods
GetAddress : WideString;
GetCaption : WideString;
 
GetBackwardHistoryCount 
GetBackwardHistoryAddress
GetBackwardHistoryCaption
MoveBackward            
 
GetForwardHistoryCount  
GetForwardHistoryAddress
GetForwardHistoryCaption
MoveForward             
IBackForwardNavigator Properties
Address
Caption

 
See also

INavigationSystem Interface

Overview

INavigationSystem Methods
RegisterNavigationProvider
UnregisterNavigationProtocol
 
RegisterSpecialURLString
UnregisterSpecialURLString
 
ParseDestinationString
NavigateTo
ExpandTargets
ValidatedTarget
INavigationSystem Properties

See also
IDragDropObject interface

INavigateAttributes Interface

Overview

INavigateAttributes Methods
GetAddress :
GetCaption :
 
IsSameAddress
INavigateAttributes Properties
Address
Caption

See also

IDynamicHelpManager Interface

Overview
This interface represents the Knowledge Center panel in Altium Designer. This interface is part of the IClient interface.

IDynamicHelpManager Methods
AddCustomContent
RemoveCustomContent
 
GetCustomSectionName
GetCustomSectionBody
GetCustomSectionsCount
IDynamicHelpManager Properties

See also
IClient interface

IFastCrossSelectNotification Interface

Overview

IFastCrossSelectionNotification Methods IFastCrossSelectNotification Properties
ObjectType     
ObjectDesignator
SourceKind     
SelectionState 

See also
IClient interface
IExternalForm interface

IDocumentNotification Interface

Overview
The IDocumentNotification interface represents

IDocumentNotification Methods IDocumentNotification Properties
Code         
ServerDocument
OldFileName  

See also
IClient interface
IExternalForm interface

IDocumentRequest Interface

Overview
 
Description
Example
 
See also
IClient interface
INotification interface

INotificationHandler Interface

Overview
The INotificationHandler interface handles notifications broadcasted in the Altium Designer system. The notifications could be a document loading notification, workspace being loaded, an object being navigated, and a server module being loaded.

Notifications as event messages can be broadcasted by the Client system, and any open server documents can receive them and act on them accordingly. The Broadcast Notification is a system wide notification, and the Dispatch Notification is a server specific notification.

To register a Notification handler in the server project (either in a server module object, panel view object or document view object)
1. When a object is created, the Client.RegisterNotificationHandler is invoked.
2. When a object is destroyed, the Client.UnregisterNotificationHandler is invoked.
3. To handle custom notifications, a object has a HandlerNotification method which checks if the custom notification code is intercepted then a call can be made to update for example the Panel's preferences controls.

The INotificationHandler is inherited in the TServerModule, TServerDocumentForm and TServerPanelForm classes and thus custom notifications can be registered and handled.

INotificationHandler methods
HandleNotification
 

See also
IClient interface

INotificationHandler Methods

HandleNotification

(INotificationHandler interface)
Syntax
Procedure HandleNotification(Const ANotification : INotification);
Description
Example
 
See also
IClient interface

IProcessLauncher Interface

Overview
This IProcessLauncher interface is a mechanism that launches a server process in Altium Designer. See ICommandLauncher and IServerProcess interfaces as well.

Since a server has a set of processes and these process identifiers are stored in an installation file (which ends with an INS extension) and the process launchers that link to specific user interface elements (also called resources) and the layout of user interface elements are defined in the resources file (which ends with a RCS extension).

IProcessLauncher Methods and Properties Table

IProcessLauncher methods
PostMessage
SendMessage
GetCommandState
 

See also
ICommandLauncher interface
IClient interface
IServerProcess interface
ICommandLauncher interface

IProcessLauncherInfo Interface

Overview
The IProcessLauncherInfo interface hierarchy is as follows;

IProcessLauncherInfo Methods and Properties Table

IProcessLauncherInfo methods
GetCaption
GetParameters
GetDescription
GetImageFile
GetKey
GetShift
GetKey2
GetShift2
GetServerCommand
GetShortcutText
IProcessLauncherInfo properties
Caption
Parameters
Description
ImageFile
Key
Shift
Key2
Shift2
ShortcutText
ServerCommand

See also

IProcessLauncherInfo Methods

GetCaption method

(IProcessLauncherInfo interface)
Syntax
Function GetCaption : Widestring;
Description
Example
See also
IProcessLauncherInfo interface

GetDescription method

(IProcessLauncherInfo interface)
Syntax
Function GetDescription : Widestring;
Description
Example
See also
IProcessLauncherInfo interface

GetImageFile method

(IProcessLauncherInfo interface)
Syntax
Function GetImageFile : Widestring;
Description
Example
See also
IProcessLauncherInfo interface

GetKey method

(IProcessLauncherInfo interface)
Syntax
Function GetKey : Integer;
Description
Example
See also
IProcessLauncherInfo interface

GetKey2 method

(IProcessLauncherInfo interface)
Syntax
Function GetKey2 : Integer;
Description
Example
See also
IProcessLauncherInfo interface

GetParameters method

(IProcessLauncherInfo interface)
Syntax
Function GetParameters : Widestring;
Description
Example
See also
IProcessLauncherInfo interface

GetServerCommand method

(IProcessLauncherInfo interface)
Syntax
Function GetServerCommand : Widestring;
Description
Example
See also
IProcessLauncherInfo interface

GetShift method

(IProcessLauncherInfo interface)
Syntax
Function GetShift : TShiftState;
Description
Example
See also
IProcessLauncherInfo interface

GetShift2 method

(IProcessLauncherInfo interface)
Syntax
Function GetShift2 : TShiftState;
Description
Example
See also
IProcessLauncherInfo interface

GetShortcutText method

(IProcessLauncherInfo interface)
Syntax
Function GetShortcutText : Widestring;
Description
Example
See also
IProcessLauncherInfo interface

IProcessLauncherInfo Properties

Caption property

(IProcessLauncherInfo interface)
Syntax
Property Caption : Widestring Read GetCaption ;
Description
Example
See also
IProcessLauncherInfo interface

Description property

(IProcessLauncherInfo interface)
Syntax
Property Description : Widestring Read GetDescription ;
Description
Example
See also
IProcessLauncherInfo interface

ImageFile property

(IProcessLauncherInfo interface)
Syntax
Property ImageFile : Widestring Read GetImageFile ;
Description
Example
See also
IProcessLauncherInfo interface

Key property

(IProcessLauncherInfo interface)
Syntax
Property Key : Integer Read GetKey ;
Description
Example
See also
IProcessLauncherInfo interface

Key2 property

(IProcessLauncherInfo interface)
Syntax
Property Key2 : Integer Read GetKey2 ;
Description
Example
See also
IProcessLauncherInfo interface

Parameters property

(IProcessLauncherInfo interface)
Syntax
Property Parameters : Widestring Read GetParameters ;
Description
Example
See also
IProcessLauncherInfo interface

ServerCommand property

(IProcessLauncherInfo interface)
Syntax
Property ServerCommand : Widestring Read GetServerCommand;
Description
Example
See also
IProcessLauncherInfo interface

Shift property

(IProcessLauncherInfo interface)
Syntax
Property Shift : TShiftState Read GetShift ;
Description
Example
See also
IProcessLauncherInfo interface

Shift2 property

(IProcessLauncherInfo interface)
Syntax
Property Shift2 : TShiftState Read GetShift2 ;
Description
Example
See also
IProcessLauncherInfo interface

ShortcutText property

(IProcessLauncherInfo interface)
Syntax
Property ShortcutText : Widestring Read GetShortcutText ;
Description
Example
See also
IProcessLauncherInfo interface

IProcessControl Interface

Overview
The IProcessControl interface controls the process depth for each design document in Altium Designer. Every time a process is launched on a document, the process depth is increased by one and once this same process has finished executing, the process depth is decreased by one. When the process depth is zero, it denotes that nothing is taking place on the current design document. This is necessary if you wish to keep the environment synchronized, especially the Undo system.

Process Depths for Schematic and PCB documents
When you are using Schematic API or PCB API to modify/manipulate objects on a Schematic or PCB document respectively, you will need to set the PreProcess and PostProcess methods so that the environment is updated correctly when you are adding, deleting or modifying objects on a Schematic or PCB document.

IProcessControl Methods
PostProcess
PreProcess
IProcessControl Properties
ProcessDepth

See also
IPCB_ServerInterface for PostProcess and PreProcess methods
ISch_ServerInterface for PostProcess and PreProcess methods

IProcessControl Methods

PostProcess method

(IProcessControl interface)
Syntax
Procedure PostProcess (Const AContext : IInterface; AParameters : PChar);
Description
This procedure performs a post processing within in a main server which could involve finalizing the states of  the environment of the server such as the Undo system. The AContext parameter is usually the focussed document in Altium Designer such as the ISch_Document and IPCB_Board interfaces.
Example

     // Initialize the robots in Schematic editor.     SchServer.ProcessControl.PreProcess(Doc, '');       // Create a new port and place on current Schematic document.     SchPort := SchServer.SchObjectFactory(ePort,eCreate_GlobalCopy);     If SchPort = Nil Then Exit;     SchPort.Location  := Point(100,100);     SchPort.Style     := ePortRight;     SchPort.IOType    := ePortBidirectional;     SchPort.Alignment := eHorizontalCentreAlign;     SchPort.Width     := 100;     SchPort.AreaColor := 0;     SchPort.TextColor := $FFFF00;     SchPort.Name      := 'New Port 1';       // Add a new port object in the existing Schematic document.     Doc.RegisterSchObjectInContainer(SchPort);     SchServer.RobotManager.SendMessage(Doc.I_ObjectAddress,c_BroadCast,                                        SCHM_PrimitiveRegistration,SchPort.I_ObjectAddress);       // Clean up the robots in Schematic editor     SchServer.ProcessControl.PostProcess(Doc, '');

See also
PreProcess method

PreProcess method

(IProcessControl interface)
Syntax
Procedure PreProcess      (Const AContext : IInterface; AParameters : PChar);
Description
Performs pre processing within in a main server which could involve resetting the environment of the server. The AContext parameter is usually the focussed document in Altium Designer such as the ISch_Document and IPCB_Board interfaces
Example

     // Initialize the robots in Schematic editor.     SchServer.ProcessControl.PreProcess(Doc, '');       // Create a new port and place on current Schematic document.     SchPort := SchServer.SchObjectFactory(ePort,eCreate_GlobalCopy);     If SchPort = Nil Then Exit;     SchPort.Location  := Point(100,100);     SchPort.Style     := ePortRight;     SchPort.IOType    := ePortBidirectional;     SchPort.Alignment := eHorizontalCentreAlign;     SchPort.Width     := 100;     SchPort.AreaColor := 0;     SchPort.TextColor := $FFFF00;     SchPort.Name      := 'New Port 1';       // Add a new port object in the existing Schematic document.     Doc.RegisterSchObjectInContainer(SchPort);     SchServer.RobotManager.SendMessage(Doc.I_ObjectAddress,c_BroadCast,                                        SCHM_PrimitiveRegistration,SchPort.I_ObjectAddress);       // Clean up the robots in Schematic editor     SchServer.ProcessControl.PostProcess(Doc, '');

See also
PostProcess method

IProcessControl Properties

ProcessDepth property

(IProcessControl interface)
Syntax
Property  ProcessDepth : Integer;
Description
Sets or gets the process depth. The depth value is an integer value.0 = inactive, and 1 onwards denotes the number of stacked processes.
ProcessDepth Example
ShowMessage('Current process depth ',IntToStr(Client.ProcessControl.ProcessDepth));

ILicenseManager Interface

Overview
The ILicenseManager interface hierarchy is as follows;

ILicenseManager methods
UseLicense
ReleaseLicense
ChangeToNetwork
ChangeToStandalone
UseLicenseByName
GetLicenses
ILicenseManager properties

See also

ILicenseManager Methods

UseLicense method

(ILicenseManager interface)
Syntax
Procedure UseLicense (Const LicenseFileName : Widestring);
Description
Example
See also
ILicenseManager interface

ReleaseLicense method

(ILicenseManager interface)
Syntax
Procedure ReleaseLicense (Const LicenseFileName : Widestring);
Description
Example
See also
ILicenseManager interface

GetLicenses method

(ILicenseManager interface)
Syntax
Procedure GetLicenses (Licenses : TList);
Description
Example
See also
ILicenseManager interface

ChangeToStandalone method

(ILicenseManager interface)
Syntax
Procedure ChangeToStandalone;
Description
This procedure changes from a networked license to a standalone license for a copy of Altium Designer that's running on a computer. A standalone computer is a computer that is not connected to the internet.
Example
See also
ILicenseManager interface

ChangeToNetwork method

(ILicenseManager interface)
Syntax
Procedure ChangeToNetwork (Const ServerName : Widestring);
Description
This procedure changes from a standalone license to a networked license for a copy of Altium Designer that's running on a computer. You will need to supply the server name as a string.
A standalone computer is a computer that is not connected to the internet.
Example
See also
ILicenseManager interface

UseLicenseByName method

(ILicenseManager interface)
Syntax
Procedure UseLicenseByName (Const LicenseName : Widestring);
Description
Example
See also
ILicenseManager interface

IOptionsManager Interface

Overview
The IOptionsManager interface deals with the options of a system wide Preferences dialog or project centric Project Options dialog.

Notes
A server needs to register its own options pages within the Client module of Altium Designer. The TServerModule class from the RT_ServerImplementation unit within the Altium Designer RTL has a RegisterOptionsPageClass procedure for you to override. You need to pass in the name of the options page and the Options Form of TOptionsForm type. Normally this form is the same as the server panel form with the controls on it.

IOptionsManager methods
GetOptionsReader
GetOptionsWriter
OptionsExist
IOptionsManager properties

Example

 Procedure TGraphicPreferences.Save; Var     Writer : IOptionsWriter; Begin     Writer := Client.OptionsManager.GetOptionsWriter(CGraphicViewer);     If Writer = Nil Then Exit;     Writer.WriteBoolean(cGraphicPreferences, 'ScaleImage'     , FScaleImage     );     Writer.WriteBoolean(cGraphicPreferences, 'KeepAspectRatio', FKeepAspectRatio); End;

See also
IOptionsReader interface
IOptionsWriter interface
IOptionsPage interface
GraphicViewer server project from \Developer Kit\Examples\Dxp\GraphicViewer folder

IOptionsManager Methods

OptionsExist method

(IOptionsManager interface)
Syntax
Function OptionsExist (Const ServerName, OldSettingsPath : WideString) : LongBool;
Description
This function checks if the options for the specified server exist on the system wide Preference dialog.
Example
See also
IOptionsManager interface

GetOptionsWriter method

(IOptionsManager interface)
Syntax
Function GetOptionsWriter (Const ServerName : WideString) : IOptionsWriter;
Description
This function retrieves the IOptionsWriter method which enables you to write setting values for the Options of the specified server.
Example

 Var     Writer : IOptionsWriter; Begin     Writer := Client.OptionsManager.GetOptionsWriter(CGraphicViewer);     If Writer = Nil Then Exit;       Writer.WriteBoolean(PreferencesName, OptionName , OptionValue); End;

See also
IOptionsManager interface
IOptionsWriter interface
IOptionsReader interface

GetOptionsReader method

(IOptionsManager interface)
Syntax
Function GetOptionsReader (Const ServerName, OldSettingsPath : WideString) : IOptionsReader;
Description
This function retrieves the IOptionsReader method which enables you to read setting values for the Options of the specified server.
Example

 Var     Reader : IOptionsReader; Begin     Reader := Client.OptionsManager.GetOptionsReader(NameOfServer,'');     If Reader = Nil Then Exit;       OptionValue := Reader.ReadBoolean(ServerPreferencesName,OptionName,DefaultValue); End;

See also
IOptionsManager interface
IOptionsWriter interface
IOptionsReader interface

IOptionsReader Interface

Overview
The IOptionsReader interface reads values for options on a page in the system wide Preferences dialog or Project options dialog from the registry storage.

IOptionsReader methods
ReadBoolean
ReadDouble
ReadInteger
ReadString
ReadSection
SectionExists
ValueExists
IOptionsReader properties

Example

 Var     Reader : IOptionsReader; Begin     Reader := Client.OptionsManager.GetOptionsReader(NameOfServer,'');     If Reader = Nil Then Exit;       AValue := Reader.ReadBoolean(NameOfServerPreferences,SettingName,DefaultValue); End;

See also
IClient interface
IOptionsManager interface

IOptionsReader Methods

ValueExists method

(IOptionsReader interface)
Syntax
Function ValueExists (Const SectionName, ValueName : WideString) : LongBool;
Description
This function determines whether the value name exists for this section name. This is useful if you need to check if a value name exists in the registry storage before you commit a value to this location.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsReader interface

SectionExists method

(IOptionsReader interface)
Syntax
Function SectionExists(Const SectionName : WideString) : LongBool;
Description
This function checks whether the section (or the targetted page) exists or not.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsReader interface

ReadString method

(IOptionsReader interface)
Syntax
Function ReadString (Const SectionName, ValueName, DefaultValue : WideString) : WideString;
Description
This ReadString function retrieves a string value for the specified server and the setting name that are represented by the system wide Preferences dialog.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsReader interface

ReadSection method

(IOptionsReader interface)
Syntax
Function ReadSection (Const SectionName : WideString) : WideString;
Description
This function retrieves the data for the section which is the targetted page in the system wide Preferences dialog.
Note the section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsReader interface

ReadInteger method

(IOptionsReader interface)
Syntax
Function ReadInteger (Const SectionName, ValueName : WideString; DefaultValue : Integer) : Integer;
Description
This ReadInteger function retrieves an integral value for the specified server and the setting name that are represented by the system wide Preferences dialog.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsReader interface

ReadDouble method

(IOptionsReader interface)
Syntax
Function ReadDouble (Const SectionName, ValueName : WideString; DefaultValue : Double) : Double;
Description
This ReadDouble function retrieves a double value for the specified server and the setting name that are represented by the system wide Preferences dialog.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsReader interface

ReadBoolean method

(IOptionsReader interface)
Syntax
Function ReadBoolean (Const SectionName, ValueName : WideString; DefaultValue : LongBool) : LongBool;
Description
This ReadBoolean function retrieves a boolean value for the specified server and the setting name that are represented by the system wide Preferences dialog.
The DefaultValue parameter for the ReadBoolean method returns a default Boolean value if the specific control on the Preferences dialog is not returning a valid Boolean value.
The section name represents the target server’s page in the system wide preferences dialog.
Example

 Var     Reader : IOptionsReader; Begin     Reader := Client.OptionsManager.GetOptionsReader(NameOfServer,'');     If Reader = Nil Then Exit;       AValue := Reader.ReadBoolean(NameOfServerPreferences,SettingName,DefaultValue); End;

See also
IOptionsReader interface

IOptionsWriter Interface

Overview
The IOptionsWriter interface writes values for options on a page in the system wide Preferences or Project options dialog to a registry storage.

IOptionsWriter methods
EraseSection
WriteBoolean
WriteDouble
WriteInteger
WriteString
IOptionsWriter properties

Example

 Var     Writer : IOptionsWriter; Begin     Writer := Client.OptionsManager.GetOptionsWriter(CGraphicViewer);     If Writer = Nil Then Exit;     Writer.WriteBoolean(cGraphicPreferences, 'ScaleImage'     , FScaleImage     );     Writer.WriteBoolean(cGraphicPreferences, 'KeepAspectRatio', FKeepAspectRatio); End;

See also
IClient interface
IOptionsManager interface

IOptionsWriter Methods

EraseSection method

(IOptionsWriter interface)
Syntax
Procedure EraseSection(Const SectionName : WideString);
Description
This procedure removes all the option values for the section (targetted page in the system wide preferences dialog).
Example
See also
IOptionsWriter interface

WriteInteger method

(IOptionsWriter interface)
Syntax
Procedure WriteInteger(Const SectionName, ValueName : WideString; Value : Integer);
Description
This WriteInteger procedure writes an integral value for the option name used by the specified server (SectionName) which is represented by the system wide Preferences dialog.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsWriter interface

WriteDouble method

(IOptionsWriter interface)
Syntax
Procedure WriteDouble (Const SectionName, ValueName : WideString; Value : Double);
Description
This WriteDouble procedure writes a double value for the option name used by the specified server (SectionName) which is represented by the system wide Preferences dialog.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsWriter interface

WriteBoolean method

(IOptionsWriter interface)
Syntax
Procedure WriteBoolean(Const SectionName, ValueName : WideString; Value : LongBool);
Description
This WriteBoolean procedure writes a boolean option value for the option name used by the specified server (SectionName) which is represented by the system wide Preferences dialog.
The section name is the targetted page in the system wide preferences dialog.
Example

 Var     Writer : IOptionsWriter; Begin     Writer := Client.OptionsManager.GetOptionsWriter(CGraphicViewer);     If Writer = Nil Then Exit;       Writer.WriteBoolean(cGraphicPreferences, 'ScaleImage'     , FScaleImage     );     Writer.WriteBoolean(cGraphicPreferences, 'KeepAspectRatio', FKeepAspectRatio); End;

See also
IOptionsWriter interface

WriteString method

(IOptionsWriter interface)
Syntax
Procedure WriteString (Const SectionName, ValueName, Value : WideString);
Description
This WriteString procedure writes a string option value for the option name used by the specified server (SectionName) which is represented by the system wide Preferences dialog.
The section name is the targetted page in the system wide preferences dialog.
Example
See also
IOptionsWriter interface

IOptionsPage Interface

Overview
The IOptionsPage interface represents the page of controls in the system wide Preferences dialog. For example, in Altium Designer, the controls on this page in the Preferences dialog are mapped from the controls on a server panel of this server. The controls on a page is represented by the TOptionsForm object and its IOptionsPage interface.

Note
The server module (TServerModule class) has the RegisterOptionsPageClass method which takes in the TOptionsForm object. The IOptionsPage interface represents this TOptionsForm object.
The TOptionsForm class has methods that you need to override to implement the OptionsPage, OptionsManager, OptionsReader and OptionsWriter interfaces.
ClearModified
GetModified
GetStateControls
GetNotificationCode
DoSetStateControls
SetDefaultState

IOptionsPage Methods and Properties table

IOptionsPage methods
GetModified
SetModified
GetStateControls
SetStateControls
GetNotificationCode
SetDefaultState
PostEditControls
IOptionsPage properties
Modified

Example

     TGraphicPrefsForm_General = Class(TOptionsForm)         chxScale        : TCheckBox;         chxProportional : TCheckBox;     Private         FScaleStored        : Boolean;         FProportionalStored : Boolean;     Protected         Procedure ClearModified;                        Override;         Function  GetModified : Boolean;                Override;         Procedure GetStateControls;                     Override;         Function  GetNotificationCode : Integer;        Override;         Procedure DoSetStateControls;                   Override;         Procedure SetDefaultState;                      Override;     End; {..........................................................................} Function TGraphicPrefsForm_General.GetNotificationCode: Integer; Begin     Result := cGraphicPreferencesChanged; End; Procedure TGraphicPrefsForm_General.GetStateControls; Begin     gv_GraphicPreferences.ScaleImage      := chxScale       .Checked;     gv_GraphicPreferences.KeepAspectRatio := chxProportional.Checked; End; Procedure TGraphicPrefsForm_General.DoSetStateControls; Begin     chxScale       .Checked := gv_GraphicPreferences.ScaleImage;     chxProportional.Checked := gv_GraphicPreferences.KeepAspectRatio; End; Procedure TGraphicPrefsForm_General.SetDefaultState; Begin     chxScale       .Checked := False;     chxProportional.Checked := False;     Inherited; End; Procedure TGraphicPrefsForm_General.ClearModified; Begin     FScaleStored        := chxScale.Checked;     FProportionalStored := chxProportional.Checked; End; Function TGraphicPrefsForm_General.GetModified : Boolean; Begin     Result := (FScaleStored <> chxScale.Checked) Or               (FProportionalStored <> chxProportional.Checked); End; 

See also
IOptionsManager interface
IOptionsReader interface
IOptionsWriter interface

IOptionsPage GetState and SetState Methods

GetModified method

(IOptionsPage interface)
Syntax
Function GetModified : Boolean;
Description
Example
See also
IOptionsPage interface

SetModified method

(IOptionsPage interface)
Syntax
Procedure SetModified(Value : Boolean);
Description
Example
See also
IOptionsPage interface

IOptionsPage Methods

SetStateControls method

(IOptionsPage interface)
Syntax
Procedure SetStateControls;
Description
This procedure updates the controls on the form from a data structure in a server module.
Example
See also
IOptionsPage interface

SetDefaultState method

(IOptionsPage interface)
Syntax
Procedure SetDefaultState;
Description
This procedure sets the controls on a page within the system wide Preferences dialog to their default values.
Note
The SetDefaultState procedure is overridden in a server's TOptionsForm object.
Example
See also
IOptionsPage interface

PostEditControls method

(IOptionsPage interface)
Syntax
Procedure PostEditControls;
Description
Example
See also
IOptionsPage interface

GetStateControls method

(IOptionsPage interface)
Syntax
Procedure GetStateControls;
Description
This procedure
Note
Example
See also
IOptionsPage interface

GetNotificationCode method

(IOptionsPage interface)
Syntax
Function GetNotificationCode : Integer;
Description
Each server that handles Option notifications to its server panel and the system wide Preferences dialog in Altium Designer will have its own Notification code which could be a value of 100 upwards.
Note
A server module will have a TOptionsForm object registered and this object will have a GetNotificationCode function overridden. This server module will have its own notification code value. Ensure these notification codes are unique.
Example
See also
IOptionsPage interface

IOptionsPage Properties

Modified property

(IOptionsPage interface)
Syntax
Property Modified : Boolean Read GetModified Write SetModified;
Description
Example
See also
IOptionsPage interface

IServerProcess Interface

Overview
The IServerProcess interface returns information for commands (server processes) in a server installation file;
·       the command name (GetOriginalID method)
·       the long summary
·       the number of parameters if any
·       parameter names if any
The IServerProcess interface is an aggregate interface used within the IServerRecord interface.
Notes
A typical  installation file structure is as follows
ClientInsFile 1.0
Server
    EditorName        = 'AddOn'
    EditorExePath     = 'AddOn.DLL'
    EditorDescription = 'A demonstratory AddOn module'
    Version           = 'Version 8.1.4.2763'
    Date              = '24-Dec-2004'
    HelpAboutInfo     = 'This software is protected by copyright law and international treaties.'
    Copyright         = 'Copyright © Altium Limited 2004'
    Updates           = 'ADVPCB'
End
Command Name = 'CountPads'      LongSummary = 'Find how many pads on a PCB document' End
Command Name = 'RunAPCBProcess' LongSummary = 'Invoke a PCB process'                 End

IServerProcess Methods
GetOriginalId
GetLongSummary
GetParameter
GetParameterCount
IServerProcess Properties

Example

 //ServerRecord is a IServerRecord interface CommandCount := ServerRecord.GetCommandCount; For J := 0 To CommandCount - 1 Do Begin      //ServerProcess is a IServerProcess interface      ServerProcess := ServerRecord.GetCommand(J);      ReportFile.Add('        Process #' + IntToStr(J + 1) + ' Name = '  +      ServerProcess.GetOriginalId + ' LongSummary = ' + ServerProcess.GetLongSummary);        ParameterCount := ServerProcess.GetParameterCount;      For K := 0 To ParameterCount - 1 Do          S := S + ServerProcess.GetParameter(K) + ', ';        ReportFile.Add('        Parameters = ' + S); End;

Notes
All the functions in a server available to the user, such as placing a primitive, changing the zoom level and so on are performed by commands which are pre-packaged process launchers. The pre-packaged process launchers bundle together the process that runs when the command is selected, plus any parameters, bitmaps (icons), captions (the name of an item that displays on a resource), descriptions and associated shortcut keys.

When you select a menu item or click on a toolbar button, you are launching a process. Processes are launched by passing the process identifier to the appropriate server and the server then executes the process. Processes are defined and implemented in the Commands unit of a server source code project. The processes are declared in an Installation File (with an INS extension).

Each process has a process identifier.  The process identifier is made up of two parts separated by a colon.  The first part of the process identifier indicates the server that defines the process, and the second part is the process name. 
For example, the process Sch:ZoomIn is provided by Schematic server.  When this process is launched, either by selecting a menu item, pressing a hot key or activating a toolbar button (which are all defined as process launchers), it will perform the task of zooming in on the currently active schematic sheet.

When a server is started up for the first time, process procedures or commands registered in the CommandLauncher object within the server modules.

See also
IServerRecord interface
ServerProcessReport script in \Examples\Scripts\DXP\ folder

IServerProcess Methods

GetLongSummary method

(IServerProcess interface)
Syntax
Function GetLongSummary : WideString;
Description
The GetLongSummary function returns the Long Summary identifier string.
Example
 
See also
IServerProcess interface
IServerRecord interface

GetOriginalId method

(IServerProcess interface)
Syntax
Function GetOriginalId : WideString;
Description
The GetOriginalID method returns the Process Identifier string for the specified server process.
Example
 
See also
IClient interface
IServerProcess interface

GetParameter method

(IServerProcess interface)
Syntax
Function GetParameter(Index : Integer) : WideString;
Description
The GetParameter function returns the indexed parameter string depending on the index parameter. This is to be used in conjunction with the GetParameterCount method. A server process can be parametric, and thus can have a number of parameters.
Example
See also
IClient interface
IServerProcess interface
GetParameterCount method

GetParameterCount method

(IServerProcess interface)
Syntax
Function GetParameterCount : Integer;
Description
The GetParameterCount function returns the number of parameters for the current Process Identifier (GetOriginalID).
This is to be used in conjunction with the GetParameter method.
Example
 
See also
IClient interface
IServerProcess interface
GetParameter method

IServerRecord Interface

Overview
This interface extracts the servers installation files information from the \System folder which has a list of server installation files. That is each server installation file (with an INS extension) correspond to a IServerRecord itnerface.

Since this IServerRecord interface is inside the Client object, invoke the Client.GetServerRecordCount to get the number of server installation files, and then assign the Client.GetServerRecord(RecordCount) to a IServerRecord variable where you can retrieve data associated with an installation file.

To find more information about each server module installed in Altium Designer, invoke the IClient.GetServerModule interface.

IServerRecord Methods
GetVersion
GetCopyRight
GetDate
GetSystemExtension
GetGeneralInfo
GetName
GetInsPath
GetExePath
GetDescription
GetServerFileExist
GetRCSFilePath
GetWindowKindCount
GetCommandCount
GetCommand
GetWindowKind
GetWindowKindByName
GetPanelInfo
GetPanelInfoByName
GetPanelInfoCount
IServerRecord Properties

Example
PCB_SR := Client.GetServerRecordByName('PCB');
See also
IClient interface
IServerModule interface
CS server example in the \Developer Kit\Examples\DXP\ClientServer Interfaces\ folder.

IServerRecord Methods

GetCommand method

(IServerRecord interface)
Syntax
Function GetCommand(Index : Integer) : IServerProcess;
Description
The method returns the IServerProcess interface. Used in conjunction with the GetCommandCount function.
Example
 
See also
IServerRecord interface

GetCommandCount method

(IServerRecord interface)
Syntax
Function GetCommandCount : Integer;
Description
The method returns the number of commands (Process launchers) this server supports. Used in
conjunction with the GetCommand function
Example
 
See also
IServerRecord interface

GetCopyRight method

(IServerRecord interface)
Syntax
Function GetCopyRight : PChar;
Description
The method returns the copyright string.
Example
 
See also
IServerRecord interface

GetDescription method

(IServerRecord interface)
Syntax
Function GetDescription : PChar;
Description
The method returns the description string.
Example
 
See also
IServerRecord interface

GetExePath method

(IServerRecord interface)
Syntax
Function GetExePath : PChar;
Description
The method returns the path to the server file.
Example
 
See also
IServerRecord interface

GetDate method

(IServerRecord interface)
Syntax
Function GetDate : PChar;
Description
The method returns the date string associated with the server installation file.
Example
 
See also
IServerRecord interface

GetGeneralInfo method

(IServerRecord interface)
Syntax
Function GetGeneralInfo : PChar;
Description
The method returns the general info string for the server record associated with a server.
Example
 
See also
IServerRecord interface

GetInsPath method

(IServerRecord interface)
Syntax
Function GetInsPath : PChar;
Description
The method returns the path to the installation file.
Example
 
See also
IServerRecord interface

GetName method

(IServerRecord interface)
Syntax
Function GetName : PChar;
Description
The method returns the name of the server.
Example
 
See also
IServerRecord interface

GetPanelInfo method

(IServerRecord interface)
Syntax
Function GetPanelInfo (Index : Integer) : IServerPanelInfo;
Description
The method returns the indexed panel information. This is to be used in conjunction with the GetPanelInfoCount method.
Example
 
See also
IServerRecord interface

GetPanelInfoByName method

(IServerRecord interface)
Syntax
Function GetPanelInfoByName (Const Name  : Widestring) : IServerPanelInfo;
Description
The method returns the panel information interface by the panel name.
Example
 
See also
IServerRecord interface

GetPanelInfoCount method

(IServerRecord interface)
Syntax
Function GetPanelInfoCount : Integer;
Description
The method returns the number of panels used for the server module. This is to be used in conjunction with the GetPanelInfo method.
Example
 
See also
IServerRecord interface

GetRCSFilePath method

(IServerRecord interface)
Syntax
Function GetRCSFilePath : PChar;
Description
The method returns the path to the resources file.
Example
 
See also
IServerRecord interface

GetSystemExtension method

(IServerRecord interface)
Syntax
Function GetSystemExtension : LongBool;
Description
The method returns the file system extension string.
Example
 
See also
IServerRecord interface

GetVersion method

(IServerRecord interface)
Syntax
Function GetVersion : PChar;
Description
The method returns the version string associated with the server installation file.
Example

 RecordCount := Client.GetServerRecordCount; For I := 0 to RecordCount - 1 Do Begin     // obtain details of the DXP.INS file     ServerRecord := Client.GetServerRecord(I);     If ServerRecord.GetName = 'Client' Then     Begin         Version := ServerRecord.GetVersion;         Break;     End; End;

See also
IServerRecord interface

GetServerFileExist method

(IServerRecord interface)
Syntax
Function GetServerFileExist : LongBool;
Description
The method returns the Boolean value whether the server file (with a DLL) exists or not.
Example
 
See also
IServerRecord interface

GetWindowKind method

(IServerRecord interface)
Syntax
Function GetWindowKind      (Index : Integer) : IServerWindowKind;
Description
The method returns the IServerWindowKind interface. Used in conjunction with the GetWindowKindCount function.
Example
 
See also
IServerRecord interface

GetWindowKindCount method

(IServerRecord interface)
Syntax
Function GetWindowKindCount : Integer;
Description
The method returns the number of document kinds the server supports.
Example
 
See also
IServerRecord interface

GetWindowKindByName method

(IServerRecord interface)
Syntax
Function GetWindowKindByName(Name  : PChar  ) : IServerWindowKind
Description
The method returns the IServerWindowKind interface depending on the DocumentKind Name parameter.
Example
 
See also
IServerRecord interface
IServerWindowKind interface

IServerWindowKind Interface

Overview
This IServerWindowKind interface reports the type of a design document in Altium Designer and it is a composite object used in IServerRecord and IClient interface objects

IServerWindowKind Methods
GetServerRecord
GetName
GetNewWindowCaption
GetNewWindowExtension
GetWindowKindDescription
GetIconName
GetIsDomain
GetIsDocumentEditor
FileLoadDescriptionCount
FileSaveDescriptionCount
GetFileLoadDescription
GetFileSaveDescription
GetWindowKindClassCount
GetWindowKindClass
IsOfWindowKindClass
IServerWindowKind Properties

See also
IClient interface
IServerRecord interface

IServerWindowKind Methods

FileLoadDescriptionCount method

(IServerWindowKind interface)
Syntax
Function FileLoadDescriptionCount : Integer;
Description
The method returns the number of File Load Descriptions for the document editor type of server. A document editor can support multiple document types and thus facilitate multiple load functions.
Example
 
See also
IClient interface
IServerWindowKind interface

FileSaveDescriptionCount method

(IServerWindowKind interface)
Syntax
Function FileSaveDescriptionCount : Integer;
Description
The method returns the number of File Save Descriptions for the document editor server. A document editor can have multiple document types and thus have multiple corresponding file save functions.
Example
 
See also
IClient interface
IServerWindowKind interface

GetFileLoadDescription method

(IServerWindowKind interface)
Syntax
Function GetFileLoadDescription(Index  : Integer) : Widestring;
Description
The method returns the indexed file load description. To be used in conjunction with the FileLoadDescriptionCount function.
Example
 
See also
IClient interface
IServerWindowKind interface

GetFileSaveDescription method

(IServerWindowKind interface)
Syntax
Function GetFileSaveDescription(Index  : Integer) : Widestring;
Description
The method returns the indexed file save description. To be used in conjunction with the FileSaveDescriptionCount function.
Example
 
See also
IClient interface
IServerWindowKind interface

GetIconName method

(IServerWindowKind interface)
Syntax
Function GetIconName : Widestring;
Description
The method returns the name of the icon associated with the server window of a document in DXP.
Example
 
See also
IClient interface
IServerWindowKind interface

GetIsDocumentEditor method

(IServerWindowKind interface)
Syntax
Function GetIsDocumentEditor : Boolean;
Description
The method returns a Boolean value whether this server is a document editor or not. Addons are not document editors. A document editor is a server that hosts its own documents and provide editing facilities. For example the PCB Editor is a Document Editor.
Example
 
See also
IClient interface
IServerWindowKind interface

GetIsDomain

(IServerWindowKind interface)
Syntax
Function GetIsDomain : LongBool;
Description
The method returns the Boolean value for this Domain. Normally false.
Example
 
See also
IClient interface
IServerWindowKind interface

GetName method

(IServerWindowKind interface)
Syntax
Function GetName : Widestring;
Description
Returns the name of the window kind.
Example
 
See also
IClient interface
IServerWindowKind interface

GetNewWindowCaption method

(IServerWindowKind interface)
Syntax
Function GetNewWindowCaption : Widestring;
Description
The GetNewWindowCaption method returns the new document caption string for the new document in Altium Designer.
Example
 
See also
IClient interface
IServerWindowKind interface

GetNewWindowExtension method

(IServerWindowKind interface)
Syntax
Function GetNewWindowExtension : Widestring;
Description
The method returns the new document’s extension string in DXP.
Example
 
See also
IClient interface
IServerWindowKind interface

GetServerRecord method

(IServerWindowKind interface)
Syntax
Function GetServerRecord : IServerRecord;
Description
Returns the IServerRecord interface that the IServerWindowKind interface is associated with. Since the server installation file defines document kinds (window kinds) and the IServerRecord interface represents this installation file.
Example
 
See also
IClient interface
IServerWindowKind interface

GetWindowKindClass

(IExternalForm interface)
Syntax
Function GetWindowKindClass (Index  : Integer) : Widestring;
Description
The method returns the indexed window kind class.
Example
 
See also
IClient interface
IServerWindowKind interface

GetWIndowKindClassCount

(IServerWindowKind interface)
Syntax
Function GetWindowKindClassCount : Integer;
Description
The method returns the number of window kind classes.
Example
 
See also
IClient interface
IServerWindowKind interface

GetWindowKindDescription method

(IServerWIndowKind interface)
Syntax
Function GetWindowKindDescription : Widestring;
Description
The method returns the window kind description string for a window in Altium Designer.
Example
 
See also
IClient interface
IServerWindowKind interface

IsOfWindowKindClass method

(IServerWindowKind interface)
Syntax
Function IsOfWindowKindClass(Const AClass : Widestring) : Boolean;
Description
The method returns a boolean value whether the class string is part of a window kind class or not.
Example
 
See also
IClient interface
IServerWindowKind interface

IServerSecurity Interface

Overview
The IServerSecurity interface hierarchy is as follows;

IServerSecurity methods
IsTechnologySetSupported
IServerSecurity properties

See also

IServerSecurity Methods

IsTechnologySetSupported method

(IServerSecurity interface)
Syntax
Function IsTechnologySetSupported (Const ATechnologySet : Widestring) : Boolean;
Description
Example
See also
IServerSecurity interface

ITimerManager Interface

Overview
The ITimerManager interface manages the timing mechanisms efficiently in Altium Designer which registers timer objects and calls them when used. Normally a Timer object needs a window to run and responds to WM_Timer messages. This is for internal use.

ITimerManager methods
AddHandler
RemoveHandler
GetHandlerEnabled
SetHandlerEnabled
SetGlobalEnabled
ITimerManager Properties

See also
ITimerHandler interface

ITimerManager Methods

AddHandler method

(ITimerManager interface)
Syntax
Function  AddHandler(Const AHandler : ITimerHandler; AInterval : Cardinal; AEnabled : Boolean = True) : DWord;
Description
Internal Use only
Example
 
See also
ITimerIManager interface

GetHandlerEnabled method

(ITimerManager interface)
Syntax
Function GetHandlerEnabled(ID : DWord) : Boolean;
Description
Internal Use only
Example
 
See also
ITimerManager interface

RemoveHandler method

(ITimerManager interface)
Syntax
Procedure RemoveHandler    (ID : DWord);
Description
Internal Use only
Example
 
See also
ITimerManager interface

SetGlobalEnabled method

(ITimerManager interface)
Syntax
Procedure SetGlobalEnabled (AEnabled : Boolean);
Description
Internal Use only
Example
 
See also
ITimerManager interface

SetHandlerEnabled method

(ITimerManager interface)
Syntax
Procedure SetHandlerEnabled(ID : DWord; AEnabled : Boolean);
Description
Internal Use only
Example
 
See also
ITimerManager interface

ITimerHandler Interface

Overview
Each timer object is represented by the ITimerHandler interface and all timer objects are managed by the ITimerManager interface.
This is for internal use.

ITimerHandler methods
HandleTimerEvent
ITimerHandler properties

See also
ITimerManger interface

ITimerHandler Methods

HandleTimerEvent method

(ITimerHandler interface)
Syntax
Procedure HandleTimerEvent(ID : DWord);
Description
Example
See also
ITimerHandler interface

ITranslationManager Interface

Overview
The ITranslationManager interface deals with the installed locale languages for Altium Designer. The installed locale languages are Simplified Chinese, Japanese, German and French. The default locale is Standard English.

ITranslationManager methods
GetTranslated
SetComponentToTranslate
HasTranslationData
ITranslationManager properties

See also

ITranslationManager Methods

GetTranslatedProperty method

(ITranslationManager interface)
Syntax
Function  GetTranslatedProperty(Const ComponentName, PropName : WideString; Out OutValue : WideString) : LongBool;
Description
Example
 
See also

SetComponentToTranslate method

(ITranslationManager interface)
Syntax
Procedure SetComponentToTranslate(Const ComponentName : WideString);
Description
Example
 
See also

HasTranslationData method

(ITranslationManager interface)
Syntax
Function  HasTranslationData : LongBool;
Description
Example
 
See also

You are reporting an issue with the following selected text and/or image within the active document: