原理图API系统界面

您正在阅读的是 17.0. 版本。关于最新版本,请前往 原理图API系统界面 阅读 22 版本

Parent page: Technical Reference - Schematic API

Please note that this documentation was last updated for an older version of Altium Designer. While many of the principles and approaches will remain the same, be aware that interfaces, objects, methods, properties, and the like will have changed since then, and will not reflect the entirety of those found in later versions of the software.

Schematic API: System Interfaces Reference

The Schematic API System Interface reference includes the following content:

IConnection Interface
IConnectionsArray Interface
ISch_Document Interface
ISch_Sheet Interface
ISch_Lib Interface
ISch_BasicContainer Interface
ISch_GraphicalObject Interface
ISch_RobotManager Interface
ISch_ServerInterface Interface
ISch_Preferences Interface
IGridSetting interface
ISch_FontManager
ISch_FontManager2 Interface
ISch_JunctionConvertSettings Interface
ISch_LibraryRuleChecker Interface
ISch_HitTest Interface
ISch_Iterator Interface
ILibCompInfoReader Interface
IComponentInfo Interface
IComponentPainterView Interface
IComponentPinSelectionListener Interface
IComponentMetafilePainter
IDocumentPainterView Interface

 

IConnection Interface

Overview
The IConnection interface represents whether the wire or bus connection has a manual junction on it or not, with location, wire or bus objects count and the thickness of wire or bus objects.

The object count denotes the number of connections from this connection location for example one end of a capacitor can have two or more wire connections because it is tied to the Ground as well as to other points on the schematic.

A connection that has 3 or more wire / bus objects denotes that a junction (system generated or manually placed) is required to tied the connections together. Thus you can use the IConnection interface to determine the number of wire or bus connections at the specified location.

The project that has schematics need to be compiled first before IConnection interfaces can be extracted with valid data.

Notes
The ISch_Sheet interface has the IConnectionsArray interface which in turn has the IConnection interface.
The ISch_Document can be either ISch_Sheet or ISch_Lib interfaces depending on which document (Schematic Sheet or Schematic Library) you are working with.
A manual junction (placed by an user) may signify a forced connection of at least 3 or more connections on a schematic document.

IConnection Methods and Properties Table

IConnection methods
GetState_Location
GetState_ObjectsCount
GetState_IsManualJunction
SetState_Location
SetState_ObjectsCount
SetState_IsManualJunction
IConnection properties
Location
ObjectsCount
IsManualJunction

See also
IConnectionsArray interface
ISch_Junction interface
ISch_Sheet interface

IConnection GetState and SetState Methods

GetState_Location method

(ISch_Connection interface)
Syntax
Function GetState_Location : TLocation;
Description
The GetState_Location method retrieves the X,Y location of the wire or bus connection on the schematic document. This method is used by the Location property.
See also
ISch_Connection interface
Location Property and Example
TLocation type

GetState_ObjectsCount method

(ISch_Connection interface)
Syntax
Function GetState_ObjectsCount
Description
The GetState_ObjectsCount method reports the number of wire or bus connections at a location on the schematic sheet.
See also
ISch_Connection interface
ObjectsCount Property and Example

GetState_Location method

(ISch_Connection interface)
Syntax
Function  GetState_IsManualJunction  : Boolean;
Description
The GetState_IsManualJunction function determines whether the connection has a manual junction or not.
See also
ISch_Connection interface
Location property and example

SetState_Location method

(ISch_Connection interface)
Syntax
Procedure SetState_Location (AValue : TLocation);
Description
The procedure adds a location to the IConnection object.
See also
ISch_Connection interface

SetState_ObjectsCount method

(ISch_Connection interface)
Syntax
Procedure SetState_ObjectsCount (AValue : Integer);
Description
This procedure sets the objects count for the IConnection object.
See also
ISch_Connection interface

SetState_IsManualJunction method

(ISch_Connection interface)
Syntax
Procedure SetState_IsManualJunction(AValue : Boolean);
Description
This procedure sets the IsManualJunction Boolean setting for the IConnection object.
See also
ISch_Connection interface

IConnection Properties

ObjectsCount property

(IConnection interface)
Syntax
Property ObjectsCount : Integer Read GetState_ObjectsCount Write SetState_ObjectsCount;
Description
This property retrieves or sets the Objects Count for Bus or Wire connection represented by  the IConnection object.
Example

Var
    I,J         : Integer;
    WS          : IWorkspace;
    Prj         : IProject;
    Doc         : IDocument;
    CurrentSch  : ISch_Sheet;
    TheWireConnections : IConnectionsArray;
    WireConnection     : IConnection;
    Connectionslist    : TStringList;
    FileName           : String;
    FilePath           : String;
    ReportDocument     : IServerDocument;
Begin
    WS  := GetWorkspace;
    If WS = Nil Then Exit;
    Prj := WS.DM_FocusedProject;
    If Prj = Nil Then Exit;
    Prj.DM_Compile;
    Doc := WS.DM_FocusedDocument;
    ConnectionsList := TStringList.Create;
    If Doc.DM_DocumentKind = 'SCH' Then
    Begin
         CurrentSch := SchServer.GetSchDocumentByPath(Doc.DM_FullPath);
         If CurrentSch <> Nil Then
         Begin
              TheWireConnections := CurrentSch.WireConnections;
              // Collect data for wire connections (IConnectionArray)
              ConnectionsList.Add('Wire Connections');
              For J := 0 To TheWireConnections.ConnectionsCount - 1 Do
              Begin
                 WireConnection := TheWireConnections.Connection(J);
                 If WireConnection <> Nil Then
                 Begin
                     ConnectionsList.Add('Wire Connection Count: '                 + IntToStr     (WireConnection.ObjectsCount));
                     ConnectionsList.Add('Wire Connection Location: '              + LocationtoStr(WireConnection.Location)); // currently 0,0
                     ConnectionsList.Add('Wire Connection has a manual junction: ' + BooleantoStr (WireConnection.IsManualJunction));
                     ConnectionsList.Add('Wire Connection size: '                  + SizeToStr    (WireConnection.Size));
                     ConnectionsList.Add('');
                 End;
              End;
         End;
    End;
 
    FilePath := ExtractFilePath(Doc.DM_FullPath);
    FileName := FilePath + '\ConnectionsReport.Txt';;
    ConnectionsList.SaveToFile(FileName);
    ConnectionsList.Free;
 
    ReportDocument := Client.OpenDocument('Text', FileName);
    If ReportDocument <> Nil Then
        Client.ShowDocument(ReportDocument);
End;

See also
IConnection interface

Location property

(IConnection interface)
Syntax
Property Location : TLocation Read GetState_Location Write SetState_Location;
Description
This property retrieves or sets the Location of Bus or Wire connection represented by the IConnection object.
Example

    WS  := GetWorkspace;
    If WS = Nil Then Exit;
    Prj := WS.DM_FocusedProject;
    If Prj = Nil Then Exit;
    Prj.DM_Compile;
    Doc := WS.DM_FocusedDocument;
    If Doc.DM_DocumentKind = 'SCH' Then
    Begin
         CurrentSch := SchServer.GetSchDocumentByPath(Doc.DM_FullPath);
         If CurrentSch <> Nil Then
         Begin
              TheWireConnections := CurrentSch.WireConnections;
              For J := 0 To TheWireConnections.ConnectionsCount - 1 Do
              Begin
                 WireConnection := TheWireConnections.Connection(J);
                 If WireConnection <> Nil Then
                 Begin
                     X := WireConnection.Location.X;
                     Y := WireConnection.Location.Y;
              End;
         End;
    End;

See also
IConnection interface

IsManualJunction property

(IConnection interface)
Syntax
Property IsManualJunction : Boolean Read GetState_IsManualJunction Write SetState_IsManualJunction;
Description
This property retrieves or sets the IsManualJunction setting of Bus or Wire connection represented by the IConnection object.
Example

    WS  := GetWorkspace;
    If WS = Nil Then Exit;
    Prj := WS.DM_FocusedProject;
    If Prj = Nil Then Exit;
    Prj.DM_Compile;
    Doc := WS.DM_FocusedDocument;
    If Doc.DM_DocumentKind = 'SCH' Then
    Begin
         CurrentSch := SchServer.GetSchDocumentByPath(Doc.DM_FullPath);
         If CurrentSch <> Nil Then
         Begin
              TheWireConnections := CurrentSch.WireConnections;
              For J := 0 To TheWireConnections.ConnectionsCount - 1 Do
              Begin
                 WireConnection := TheWireConnections.Connection(J);
                 If WireConnection <> Nil Then
                 Begin
                     ManualJunctionAtConnection := WireConnection.Location.IsManualJunction;
                     //rest of code
              End;
         End;
    End;

See also
IConnection interface

IConnectionsArray Interface

Overview
The IConnectionsArray represents the bus and wire connections in a schematic document. Bus and wire connections that have more than 3 connections could be connected by an automatic junction or a manual junction (placed by an user).

A schematic with valid buses and wires will have connections. An IConnectionsArray interface has all the connections for this schematic sheet and each element in the IConnectionsArray interface is a IConnection interface type.

IConnectionsArray Methods and Properties Table

IConnectionsArray methods
AddConnection
AddConnectionXY
GetConnectionAt
GetState_Connection
GetState_ConnectionsCount
GraphicallyInvalidate
RemoveAllConnectionsAt
RemoveAllConnectionsForLine
ResetAllConnections
IConnectionsArray properties
ConnectionsCount
Connection

See also
IConnection interface
ISch_Sheet interface

IConnectionsArray Methods

AddConnectionXY method

(IConnectionsArray interface)
Syntax
Procedure AddConnectionXY(X, Y : TCoord);
Description
This procedure adds a connection with X,Y parameters into the IConnectionsArray object.
See also
IConnectionsArray interface
AddConnection method

AddConnection method

(IConnectionsArray interface)
Syntax
Procedure AddConnection (ALocation : TLocation);
Description
This procedure adds a connection with a location parameter into the IConnectionsArray object.
See also
IConnectionsArray interface
AddConnectionXY method

GetConnectionAt method

(IConnectionsArray interface)
Syntax
Function GetConnectionAt(ALocation : TLocation) : IConnection;
Description
This function retrieves the connection of IConnection type based on the Location parameter.
Example

Connection :=  Connections.GetConnectionAt(ALocation);
If Connection <> Nil Then ShowMessage(IntToStr(Connection.ObjectsCount));

See also
IConnectionsArray interface

GetState_Connection method

(IConnectionsArray interface)
Syntax
Function GetState_Connection(Index : Integer) : IConnection;
Description
This function retrieves the indexed connection of IConnection type from the IConnectionsArray interface.
Example

For J := 0 To TheBusConnections.GetState_ConnectionsCount - 1 Do 
Begin 
    BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
    If BusConnection <> Nil Then 
    Begin 
        // statements here
    End; 
End; 

See also
IConnectionsArray interface
Connection property

GetState_ConnectionsCount method

(IConnectionsArray interface)
Syntax
Function GetState_ConnectionsCount : Integer;
Description
This function returns the number of connections for wires or buses on the schematic sheet. For each
Example

For J := 0 To TheBusConnections.GetState_ConnectionsCount - 1 Do 
Begin 
    BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
    If BusConnection <> Nil Then 
    Begin 
        // statements here
    End; 
End; 

See also
IConnectionsArray interface
ConnectionsCount property

GraphicallyInvalidate method

(IConnectionsArray interface)
Syntax
Procedure GraphicallyInvalidate;
Description
This procedure puts the group of design objects (bus or wire objects in an connection array) in an invalid state. A redraw is required to update the schematic sheet.
Example

TheWireConnections.GraphicallyInvalidate; 
// puts the wires part of the connection group in an invalid state that requires a graphical redraw

See also
IConnectionsArray interface

RemoveAllConnectionsAt method

(IConnectionsArray interface)
Syntax
Function RemoveAllConnectionsAt(ALocation : TLocation) : Boolean;
Description
This function removes all connections at this specified location on the schematic document.
Example

If BusConnection.ObjectsCount > 1 Then
    TheBusConnections.RemoveAllConnectionsAt(BusConnection.Location); 
// BusConnection = IConnection type, TheBusConnections = IConnectionsArray type

See also
IConnectionsArray interface

RemoveAllConnectionsForLine method

(IConnectionsArray interface)
Syntax
Function RemoveAllConnectionsForLine(L1, L2 : TLocation) : Boolean;
Description
This function removes all connections for the specified line with L1 and L2 parameters. If the call was successful, a true value is returned. The Connections can either represent bus or wire connections.
See also
IConnectionsArray interface

ResetAllConnections method

(IConnectionsArray interface)
Syntax
Procedure ResetAllConnections;
Description
This procedure resets all connections (frees all items) in the IConnectionsArray interface for either wire or bus connections.
Example

TheBusConnections.ResetAllConnections;
//TheBusConnections = IConnectionsArray type

See also
IConnectionsArray interface

IConnectionsArray Properties

Connection property

(IConnectionsArray interface)
Syntax
Property Connection[i : Integer] : IConnection Read GetState_Connection;
Description
Example

For J := 0 To TheBusConnections.GetState_ConnectionsCount - 1 Do 
Begin 
    BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
    If BusConnection <> Nil Then 
    Begin 
        // statements here
    End; 
End; 

See also
IConnectionsArray interface

ConnectionsCount property

(IConnectionsArray interface)
Syntax
Property ConnectionsCount : Integer Read GetState_ConnectionsCount;
Description
Example

For J := 0 To TheBusConnections.GetState_ConnectionsCount - 1 Do 
Begin 
    BusConnection := TheBusConnections.GetState_Connection(J); //IConnection
    If BusConnection <> Nil Then 
    Begin 
        // statements here
    End; 
End; 

See also
IConnectionsArray interface

ISch_Document Interface

Overview
This interface is the immediate ancestor interface for ISch_Sheet and ISch_Lib interfaces.

Notes

  • You can modify or set the document's preference settings.
  • You can iterate design objects in a Schematic or library document, see ISch_Iterator interface for details.
  • You can invoke the ChooseLocationInteractively or ChooseRectangleInteractively methods to obtain coordinates from the Schematic sheet or library sheet.
  • You can create a library from a project that has components
  • You can check whether objects exist on a particular point on a schematic or library document.

The ISch_Document interface hierarchy is as follows;
ISch_BasicContainer
    ISch_GraphicalObject
        ISch_ParameterizedGroup
            ISch_Document

ISch_Document Methods and Properties Table

ISch_Document methods
BoundingRectangle_Selected
ChooseLocationInteractively
ChooseRectangleInteractively
CountContextMenuObjects
CreateHitTest
CreateLibraryFromProject
Graphical_VirtualRectangle
LockViewUpdate
ObjectReferenceZone
PlaceSchComponent
PopupMenuHitTest
RedrawToDC
RegisterSchObjectInContainer
UnLockViewUpdate
UnregisterAndFreeAllConnectionLines
UnRegisterSchObjectFromContainer
UpdateDocumentProperties
GetState_BorderOn
GetState_CustomMarginWidth
GetState_CustomSheetStyle
GetState_CustomX
GetState_CustomXZones
GetState_CustomY
GetState_CustomYZones
GetState_DocumentBorderStyle
GetState_DocumentName
GetState_HotSpotGridOn
GetState_HotSpotGridSize
GetState_InternalTolerance
GetState_LoadFormat
GetState_ReferenceZonesOn
GetState_SheetMarginWidth
GetState_SheetSizeX
GetState_SheetSizeY
GetState_SheetStyle
GetState_SheetZonesX
GetState_SheetZonesY
GetState_ShowTemplateGraphics
GetState_SnapGridOn
GetState_SnapGridSize
GetState_SystemFont
GetState_TemplateFileName
GetState_TitleBlockOn
GetState_Unit
GetState_UnitSystem
GetState_UseCustomSheet
GetState_VisibleGridOn
GetState_VisibleGridSize
GetState_WorkspaceOrientation
SetState_BorderOn
SetState_CustomMarginWidth
SetState_CustomSheetStyle
SetState_CustomX
SetState_CustomXZones
SetState_CustomY
SetState_CustomYZones
SetState_DocumentBorderStyle
SetState_HotSpotGridOn
SetState_HotSpotGridSize
SetState_LoadFormat
SetState_ReferenceZonesOn
SetState_SheetMarginWidth
SetState_SheetSizeX
SetState_SheetSizeY
SetState_SheetStyle
SetState_SheetZonesX
SetState_SheetZonesY
SetState_ShowTemplateGraphics
SetState_SnapGridOn
SetState_SnapGridSize
SetState_SystemFont
SetState_TemplateFileName
SetState_TitleBlockOn
SetState_Unit
SetState_UseCustomSheet
SetState_VisibleGridOn
SetState_VisibleGridSize
SetState_WorkspaceOrientation
ISch_Document properties
BorderOn
CustomMarginWidth
CustomSheetStyle
CustomX
CustomXZones
CustomY
CustomYZones
DisplayUnit
DocumentBorderStyle
DocumentName
HotSpotGridOn
HotSpotGridSize
InternalTolerance
LoadFormat
ReferenceZonesOn
SheetMarginWidth
SheetSizeX
SheetSizeY
SheetStyle
SheetZonesX
SheetZonesY
ShowTemplateGraphics
SnapGridOn
SnapGridSize
SystemFont
TemplateFileName
TitleBlockOn
UnitSystem
UseCustomSheet
VisibleGridOn
VisibleGridSize
WorkspaceOrientation

See also
ISch_Sheet interface
ISch_Lib interface

ISch_Document Methods

BoundingRectangle_Selected method

(ISch_Document interface)
Syntax
Function BoundingRectangle_Selected : TCoordRect;
Description
The function returns the coordinates of the selected bounding rectangle on the current schematic document.
Example

Rect := Sheet.BoundingRectangle_Selected;
MinX := Floor(CoordToMils(Rect.x1));
MinY := Floor(CoordToMils(Rect.y1));
MaxX := Ceil (CoordToMils(Rect.x2));
MaxY := Ceil (CoordToMils(Rect.y2));

See also
ISch_Document interface
TCoordRect type

ChooseLocationInteractively method

(ISch_Document interface)
Syntax
Function ChooseLocationInteractively(Var ALocation : TLocation; Prompt : TDynamicString) : Boolean;
Description
To monitor the mouse movement and clicks from your script, the ISch_Document document interface and its descendant interfaces, ISch_Lib and ISch_Sheet interfaces has several interactive feedback methods. The ChooseLocationInteractively when invoked prompts the user to set the location (point) on the schematic sheet.
The ChooseLocationinteractively method can be used to fetch the coordinates of the clicked point on the schematic sheet and can be used for the ISch_HitTest interface.
Example

    If SchServer = Nil Then Exit;
    CurrentSheet := SchServer.GetCurrentSchDocument;
    If CurrentSheet = Nil Then Exit;
 
    ALocation := TLocation; //
    //Using the ChooseLocationInteractively method to capture the
    // location’s coordinates clicked on the sheet by the user.
    If Not CurrentSheet.ChooseLocationInteractively(ALocation,
                                                   'Please select the location') Then Exit;

See also
ISch_Document interface
ISch_HitTest interface

ChooseRectangleInteractively method

(ISch_Document interface)
Syntax
Function ChooseRectangleInteractively(Var ARect : TCoordRect;Prompt1 : TDynamicString;Prompt2 : TDynamicString) : Boolean;
Description
To monitor the mouse movement and clicks from your script, the ISch_Document document interface and its descendant interfaces, ISch_Lib and ISch_Sheet interfaces has several interactive feedback methods. The ChooseRectangleinteractively when invoked prompts the user to set the two corners of the bounding rectangle on the schematic sheet.
The ChooseRectangleinteractively method can be used to fetch the coordinates of the bounding rectangle (of TCoordRect type) for the Spatial iterator where it needs the bounds of a rectangle on the schematic document to search within.
DelphiScript Example

Var
    CurrentSheet    : ISch_Document;
    SpatialIterator : ISch_Iterator;
    GraphicalObj    : ISch_GraphicalObject;
    Rect            : TCoordRect;
Begin
    If SchServer = Nil Then Exit;
    CurrentSheet := SchServer.GetCurrentSchDocument;
    If CurrentSheet = Nil Then Exit;
    Rect := TCoordRect;
 
    If Not CurrentSheet.ChooseRectangleInteractively(Rect,
           'Please select the first corner',
           'Please select the final corner') Then Exit;
 
    SpatialIterator := CurrentSheet.SchIterator_Create;
    If SpatialIterator = Nil Then Exit;
    Try
        SpatialIterator.AddFilter_ObjectSet(MkSet(eJunction,eSchComponent));
        SpatialIterator.AddFilter_Area(Rect.left, Rect.bottom, Rect.right, Rect.top);
        GraphicalObj := SpatialIterator.FirstSchObject;
        While GraphicalObj <> Nil Do
        Begin
           // do what you want with the design object
           GraphicalObj := SpatialIterator.NextSchObject;
        End;
 
    Finally
        CurrentSheet.SchIterator_Destroy(SpatialIterator);
    End;
End;

See also
ISch_Document interface
TCoordRect type

CountContextMenuObjects method

(ISch_Document interface)
Syntax
Function CountContextMenuObjects (AObjectSet : TObjectSet) : Integer;
Description
The function counts the contextual objects based on the AObjectSet parameter of TObjectSet type.
Example

SchDoc  := SchServer.GetCurrentSchDocument;
Visible := (SchDoc <> Nil) And (SchDoc.CountContextMenuObjects([eSchComponent]) > 0);

DelphiScript Example

SchDoc  := SchServer.GetCurrentSchDocument;
ShowMessage(IntToStr(SchDoc.CountContextMenuObjects(MkSet(eSchComponent)) > 0);
// DelphiScript cannot handle sets like Borland Delphi does so we need to use MkSet function.

See also
ISch_Document interface
TObjectSet

CreateHitTest method

(ISch_Document interface)
Syntax
Function CreateHitTest (ATestMode : THitTestMode;ALocation : TLocation) : ISch_HitTest;
Description
The CreateHitTest function creates an hit test object which is represented by the ISch_HitTest interface with the ATestMode and ALocation parameters.
With this ISch_HitTest interface, the number of objects and the object type at a particular point on the schematic document can be returned.
Example

Doc := SchServer.GetCurrentSchDocument;
If Doc = Nil Then Exit;
 
Doc.ChooseLocationInteractively(ALocation,'Choose a location to click');
AHitTestMode := eHitTest_AllObjects;
AHitTest := Doc.CreateHitTest(AHitTestMode,ALocation);
For I := 0 to AHitTest.HitTestCount - 1 Do
Begin
    APrim := AHitTest.HitObject[I];
    ShowMessage(ObjectIdToString(APrim.ObjectId) + #13 +
               'Location coordinates - '         + #13 +
               ' X= ' + IntToStr(ALocation.X)    + #13 +
               ' Y= ' + IntToSTr(ALocation.Y));
End;

See also
ISch_Document interface
ISch_HitTest interface
THitTestMode type
ChooseLocationInteractively method

CreateLibraryFromProject method

(ISch_Document interface)
Syntax
Procedure CreateLibraryFromProject (AddLibToProject : Boolean;FileName : WideString; RunQuiet : Boolean);
Description
This procedure creates a schematic library based on the components on a schematic project. If AddLibToProject parameter is set to true, then the created library is put in the same project where the components are in. The RunQuiet parameter set to true avoids the Information dialog from coming up.
Example

CurrentSheet := SchServer.GetCurrentSchDocument;
If (CurrentSheet = Nil) or (CurrentSheet.ObjectID = eSchLib) Then
Begin
    ShowError('Please run the script on a schematic document.');
    Exit;
End;
CurrentSheet.CreateLibraryFromProject(True,'NewLibrary.SchLib',False);

See also
ISch_Document interface

Graphical_VirtualRectangle method

(ISch_Document interface)
Syntax
Function Graphical_VirtualRectangle : TCoordRect;
Description
The function returns the coordinates of TCoordRect type of the virtual rectangle of the graphical window in Altium Designer.
Example

Rect := Sheet.Graphical_VirtualRectangle;
MinX := Floor(CoordToMils(PrintRect.x1));
MinY := Floor(CoordToMils(PrintRect.y1));
MaxX := Ceil (CoordToMils(PrintRect.x2));
MaxY := Ceil (CoordToMils(PrintRect.y2));

See also
ISch_Document interface
TCoordRect type

LockViewUpdate method

(ISch_Document interface)
Syntax
Procedure LockViewUpdate;
Description
This procedure prevents the views of Schematic documents and panels from being refreshed or updated. This is especially used in the situations when a component is being created in the Schematic Library Editor. See the UnLockViewUpdate procedure.
Example in Delphi Code

If SchServer = Nil Then Exit;
If Not Supports (SchServer.GetCurrentSchDocument, ISch_Lib, CurrentLib) Then Exit;
 
CurrentLib.LockViewUpdate;
CurrentComponent := CurrentLib.CurrentSchComponent;
SimPortMap := '';
SimModel   := CreateSimObject(SimPortMap, ModelName, ModelDescription, FileLocation, CurrentLib);
CurrentLib.CurrentSchComponent.AddSchObject(SimModel);
CurrentLib.UnLockViewUpdate; 

See also
ISch_Document interface
UnLockViewUpdate method

ObjectReferenceZone method

(ISch_Document interface)
Syntax
Function ObjectReferenceZone(AObject : ISch_BasicContainer): WideString;
Description
The function returns the reference zone string for the design object on the schematic sheet. For example, if a sheet entry object is in the vicinity of Reference Zone C (vertically) and 2 (horizontally) for a Standard Style A document then the function will return a 2C for this sheet entry.
Example

SchPort.CrossReference := ChangeFileExt(ExtractFileName(ServerDocument.FileName),'') +
                          '[' + SchDocument.ObjectReferenceZone(SchSheetEntry) + ']' ;

See also
ISch_Document interface

PlaceSchComponent method

(ISch_Document interface)
Syntax
Procedure PlaceSchComponent (ALibraryPath : WideString;ALibRef : WideString;Var SchObject : TSchObjectHandle);
Description
This procedure places a component on a schematic sheet from the schematic library with ALibraryPath and ALibRef parameters. The object handle of this component is returned.
Example

Var
   CurrentSheet : ISch_Document;
   SchObject    : TSchObjectHandle;
   ALibraryPath : WideString;
   ALibRef      : WideString;
Begin
    CurrentSheet := SchServer.GetCurrentSchDocument;
    If (CurrentSheet = Nil) or (CurrentSheet.ObjectID = eSchLib) Then
    Begin
        ShowError('Please run the script on a schematic document.');
        Exit;
    End;
 
    SchObject    := 0;
    ALibraryPath := 'C:\Program Files\Altium Designer\Examples\Reference Designs\4 Port Serial Interface\Libraries\4 Port Serial Interface.SchLib';

    ALibRef      := 'Crystal';
 
    CurrentSheet.PlaceSchComponent (ALibraryPath, ALibRef, SchObject);
    ShowMessage(IntToStr(SchObject));
End;

See also
ISch_Document interface

RedrawToDC method

(ISch_Document interface)
Syntax
Procedure RedrawToDC(DC : HDC; PrintKind : Integer; PrintWhat : Integer);
Description
The DC parameter is a Handle of the canvas (a encapsulation of a device context).
PrintKind is an ordinal value of the TPrintKind type, TPrintKind      = (ePrintKind_FullColor,ePrintKind_GrayScale,ePrintKind_Monochrome);
PrintWhat is an ordinal value of the TPrintWhat type, TPrintWhat      = (ePrintAllDocuments,ePrintActiveDocument,ePrintSelection,ePrintScreenRegion);
Example
SchLibrary.RedrawToDC(DC, Ord(KindToPrint), Ord(PrinterOptions.PrintWhat));
See also
ISch_Document interface

RegisterSchObjectInContainer method

(ISch_Document interface)
Syntax
Procedure RegisterSchObjectInContainer (AObject : ISch_BasicContainer);
Description
The RegisterSchObjectInContainer procedure registers the object of ISch_BasicContainer type (including its descendants) in the parent object itself. In this case, the document registers a new design object. For example when you create a new port object, you are required to register the port object in the schematic document.
DelphiScript Example

SchPort := SchServer.SchObjectFactory(ePort,eCreate_GlobalCopy);
If SchPort = Nil Then Exit;
SchPort.Location  := Point(MilsToCoord(1000),MilsToCoord(1000));
SchPort.Style     := ePortRight;
SchPort.IOType    := ePortBidirectional;
SchPort.Alignment := eHorizontalCentreAlign;
SchPort.Width     := MilsToCoord(1000);
SchPort.AreaColor := 0;
SchPort.TextColor := $FFFFFF;
SchPort.Name      := 'Test Port';
SchDoc.RegisterSchObjectInContainer(SchPort);

See also
ISch_Document interface

UnLockViewUpdate method

(ISch_Document interface)
Syntax
Procedure UnLockViewUpdate;
Description
This procedure allows the views of Schematic documents and panels from being refreshed or updated after being locked by the LockViewUpdate method. This is especially used in the situations when a component is being created in the Schematic Library Editor. See the LockViewUpdate procedure.
Example

If SchServer = Nil Then Exit;
If Not Supports (SchServer.GetCurrentSchDocument, ISch_Lib, CurrentLib) Then Exit;
 
CurrentLib.LockViewUpdate;
CurrentComponent := CurrentLib.CurrentSchComponent;
SimPortMap := '';
SimModel   := CreateSimObject(SimPortMap, ModelName, ModelDescription, FileLocation, CurrentLib);
CurrentLib.CurrentSchComponent.AddSchObject(SimModel);
CurrentLib.UnLockViewUpdate;

See also
ISch_Document interface
LockViewUpdate method

UnRegisterSchObjectFromContainer method

(ISch_Document interface)
Syntax
Procedure UnRegisterSchObjectFromContainer (AObject : ISch_BasicContainer);
Description
When a schematic object is unregistered from the container, it is explicitly freed and cannot be used again.
Example
See also
ISch_Document interface

UnregisterAndFreeAllConnectionLines method

(ISch_Document interface)
Syntax
Procedure UnregisterAndFreeAllConnectionLines;
Description
When this procedure is invoked, the connection lines are unregistered and freed from the database associated with the schematic document.
Example
SchDoc.UnregisterAndFreeAllConnectionLines;
See also
ISch_Document interface
ISch_ConnectionLine interface

UpdateDocumentProperties method

(ISch_Document interface)
Syntax
Procedure UpdateDocumentProperties;
Description
This method forces an update of the document properties after the properties have been modified programmatically.
Example
Document.UpdateDocumentProperties;
See also
ISch_Document interface

ISch_Document GetState and SetState Methods

GetState_BorderOn method

(ISch_Document interface)
Syntax
Function GetState_BorderOn : Boolean;
Description
This BorderOn property determines whether the border on around the outside of the current schematic document will be displayed or not.
The method returns a boolean value whether the Border is displayed or not and is used in the BorderOn property.
Example
See also
ISch_Document interface

GetState_CustomMarginWidth method

(ISch_Document interface)
Syntax
Function GetState_CustomMarginWidth : TCoord;
Description
The CustomMarginWidth property sets the margin from the bounds of the schematic sheet inwards. This method sets the CustomMarginWidth property.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface
TCoord type

GetState_CustomSheetStyle method

(ISch_Document interface)
Syntax
Function GetState_CustomSheetStyle : WideString;
Description
This property represents custom sheet style property which values can be inherited from one of the standard sheet styles and customized further. This function sets the custom sheet style.
Example
See also
ISch_Document interface

GetState_CustomX method

(ISch_Document interface)
Syntax
Function GetState_CustomX : TCoord;
Description
The CustomX property determines the width of the custom sheet for the document. This method gets the CustomX value and is used in the CustomX property.
Example
See also
ISch_Document interface
TCoord type

GetState_CustomXZones method

(ISch_Document interface)
Syntax
Function GetState_CustomXZones : TCoord;
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
This method gets the CustomXZones property.
Example
See also
ISch_Document interface
TCoord type

GetState_CustomY method

(ISch_Document interface)
Syntax
Function GetState_CustomY : TCoord;
Description
The CustomY property determines the height of the custom sheet for the document. This method gets the CustomY value and is used in the CustomY property.
Example
See also
ISch_Document interface
TCoord type

GetState_CustomYZones method

(ISch_Document interface)
Syntax
Function GetState_CustomYZones : TCoord;
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
This method sets the CustomYZones property.
Example
See also
ISch_Document interface
TCoord type

GetState_DocumentBorderStyle method

(ISch_Document interface)
Syntax
Function GetState_DocumentBorderStyle : TSheetDocumentBorderStyle;
Description
The DocumentBorderStyle property determines the current document/border style for the schematic sheet - ANSI or Standard block.
The function gets the current document border style and is used in the DocumentBorderStyle property.
Example
See also
ISch_Document interface
TSheetDocumentBorder style

GetState_DocumentName method

(ISch_Document interface)
Syntax
Function GetState_DocumentName : WideString ;
Description
The read only DocumentName property determines the schematic document name. This method is used in the DocumentName property.
Example
See also
ISch_Document interface

GetState_HotSpotGridOn method

(ISch_Document interface)
Syntax
Function GetState_HotSpotGridOn : Boolean;
Description
The electrical grid supports the Schematic Editor's guided wiring feature. When you are moving an electrical object in the workspace, and when it falls within the electrical grid range of another electrical object that you could connect to, the object you are moving will snap to the fixed object and a hot spot or highlight dot will appear. This dot guides you as to where a valid connection can be made. The electrical grid (hot spot) should be set slightly lower than the current snap grid or else it becomes difficult to position electrical objects one snap grid apart.
The procedure gets the boolean value whether the hot spot grid is on or not and is used in the HotSpotGridOn property.
Example
See also
ISch_Document interface

GetState_HotSpotGridSize method

(ISch_Document interface)
Syntax
Function GetState_HotSpotGridSize : TCoord;
Description
The electrical grid supports the Schematic Editor's guided wiring feature. When you are moving an electrical object in the workspace, and when it falls within the electrical grid range of another electrical object that you could connect to, the object you are moving will snap to the fixed object and a hot spot or highlight dot will appear. This dot guides you as to where a valid connection can be made. The electrical grid (hot spot) should be set slightly lower than the current snap grid or else it becomes difficult to position electrical objects one snap grid apart.
The procedure gets the hot spot grid size and is used in the HotSpotGridSize property.
Example
See also
ISch_Document interface

GetState_InternalTolerance method

(ISch_Document interface)
Syntax
Function GetState_InternalTolerance : TCoord;
Description
Example
See also
ISch_Document interface

GetState_LoadFormat method

(ISch_Document interface)
Syntax
Function GetState_LoadFormat : WideString;
Description
Example
See also
ISch_Document interface

GetState_ReferenceZonesOn method

(ISch_Document interface)
Syntax
Function GetState_ReferenceZonesOn : Boolean;
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
The procedure gets the value whether the reference zones can be displayed or not and is used in the ReferenceZonesOn property.
Example

Procedure TurnOffReferenceZones;
Var
    I          : Integer;
    Project    : IProject;
    Doc        : IDocument;
    CurrentSch : ISch_Document;
Begin
    Project := GetWorkspace.DM_FocusedProject;
    If Project = Nil Then Exit;
 
    For I := 0 to Project.DM_LogicalDocumentCount - 1 Do
    Begin
        Doc := Project.DM_LogicalDocuments(I);
        If Doc.DM_DocumentKind = 'SCH' Then
        Begin
            CurrentSch := SchServer.GetSchDocumentByPath(Doc.DM_FullPath);
            If (CurrentSch <> Nil) And CurrentSch.GetState_ReferenceZonesOn Then
            Begin
              SchServer.RobotManager.SendMessage(CurrentSch.I_ObjectAddress, c_BroadCast, SCHM_BeginModify, c_NoEventData);
              CurrentSch.SetState_ReferenceZonesOn(False);
              SchServer.RobotManager.SendMessage(CurrentSch.I_ObjectAddress, c_BroadCast, SCHM_EndModify , c_NoEventData);
             End;
        End;
    End;
End;

See also
ISch_Document interface

GetState_SheetMarginWidth method

(ISch_Document interface)
Syntax
Function GetState_SheetMarginWidth : TCoord;
Description
The SheetMarginWidth property determines the margin from the bounds of the schematic sheet inwards.
The SheetMarginWidth function gets the width of the sheet margin and is used in the SheetMarginWidth property.
Notes
The UseCustomSheet property must be set to False before you can massage the attributes for the schematic sheet.
Example
See also
ISch_Document interface

GetState_SheetSizeX method

(ISch_Document interface)
Syntax
Function GetState_SheetSizeX : TCoord;
Description
Example
See also
ISch_Document interface

GetState_SheetSizeY method

(ISch_Document interface)
Syntax
Function GetState_SheetSizeY : TCoord;
Description
Example
See also
ISch_Document interface

GetState_SheetStyle method

(ISch_Document interface)
Syntax
Function GetState_SheetStyle : TSheetStyle;
Description
The SheetStyle property determines the document standard style. One of the document sheet styles are A4, Letter and imperial/metric sized sheets.
The procedure obtains the sheet style and is used in the SheetStyle property.
Example
See also
ISch_Document interface
TSheetStyle type

GetState_SheetZonesX method

(ISch_Document interface)
Syntax
Function GetState_SheetZonesX : Integer;
Description
Example
See also
ISch_Document interface

GetState_SheetZonesY method

(ISch_Document interface)
Syntax
Function GetState_SheetZonesY : Integer;
Description
Example
See also
ISch_Document interface

GetState_ShowTemplateGraphics method

(ISch_Document interface)
Syntax
Function GetState_ShowTemplateGraphics : Boolean;
Description
The template is usually placed on the bottom right of the schematic sheet. The template files have a DOT extension and are located in the \Templates\ folder of Altium Designer software installation.
The procedure determines whether the template graphics can be displayed or not and is used in the ShowTemplateGraphics property.
Example
See also
ISch_Document interface

GetState_SnapGridOn method

(ISch_Document interface)
Syntax
Function GetState_SnapGridOn : Boolean;
Description
The snap grid is the grid that the cursor is locked to when placing or manipulating objects on the sheet. This grid should be left on at all times except when specifically placing or moving objects that need to be off grid such as text objects. The visible grid is the grid you see on the grid which acts as a visual grid and typically it is set to be the same as or a multiple of the snap grid.
The procedure gets a boolean value whether the SnapGrid is active or not and is used in the SnapGridOn property.
Example
See also
ISch_Document interface

GetState_SnapGridSize method

(ISch_Document interface)
Syntax
Function GetState_SnapGridSize : TCoord;
Description
The snap grid is the grid that the cursor is locked to when placing or manipulating objects on the sheet. This grid should be left on at all times except when specifically placing or moving objects that need to be off grid such as text objects. The visible grid is the grid you see on the grid which acts as a visual grid and typically it is set to be the same as or a multiple of the snap grid.
The procedure gets the size value of the snap grid and is used in the SnapGridSize property.
Example
See also
ISch_Document interface

GetState_SystemFont method

(ISch_Document interface)
Syntax
Function GetState_SystemFont : TCoord;
Description
Example
See also
ISch_Document interface

GetState_TemplateFileName method

(ISch_Document interface)
Syntax
Function GetState_TemplateFileName : WideString;
Description
Example
See also
ISch_Document interface

GetState_TitleBlockOn method

(ISch_Document interface)
Syntax
Function GetState_TitleBlockOn : Boolean;
Description
Example
See also
ISch_Document interface

GetState_Unit method

(ISch_Document interface)
Syntax
Function GetState_Unit : TUnit;
Description
This property determines the system unit used for the schematic project. The available imperial units are Mils, inches, DXP default and Auto imperial as well as available metric units which are mm,cm, metres and auto-metric.
Example
See also
ISch_Document interface
TUnit type

GetState_UnitSystem method

(ISch_Document interface)
Syntax
Function GetState_UnitSystem : TUnitSystem;
Description
Example
See also
ISch_Document interface

GetState_UseCustomSheet method

(ISch_Document interface)
Syntax
Function GetState_UseCustomSheet : Boolean;
Description
The property determines whether a custom sheet is used instead of a standard sheet. If the UseCustomSheet is true, then the CustomMarginWidth, CustomSheetStyle, CustomX and CustomY properties can be set for this custom sheet property.
This procedure gets the value whether the custom sheet is used instead of a standard sheet and is used in the UseCustomSheet property.
Example
See also
ISch_Document interface

GetState_VisibleGridOn method

(ISch_Document interface)
Syntax
Function GetState_VisibleGridOn : Boolean;
Description
The electrical grid supports the Schematic Editor's guided wiring feature. When you are moving an electrical object in the workspace, and when it falls within the electrical grid range of another electrical object that you could connect to, the object you are moving will snap to the fixed object and a hot spot or highlight dot will appear. This dot guides you as to where a valid connection can be made. The electrical grid (hot spot) should be set slightly lower than the current snap grid or else it becomes difficult to position electrical objects one snap grid apart.
Example
See also
ISch_Document interface

GetState_VisibleGridSize method

(ISch_Document interface)
Syntax
Function GetState_VisibleGridSize : TCoord;
Description
Example
See also
ISch_Document interface

GetState_WorkspaceOrientation method

(ISch_Document interface)
Syntax
Function GetState_WorkspaceOrientation : TSheetOrientation;
Description
Example
See also
ISch_Document interface

SetState_BorderOn method

(ISch_Document interface)
Syntax
Procedure SetState_BorderOn (AValue : Boolean);
Description
This BorderOn property determines whether the border on around the outside of the current schematic document will be displayed or not.
The method sets a boolean value whether the Border is displayed or not and is used in the BorderOn property.
Example
See also
ISch_Document interface

SetState_CustomMarginWidth method

(ISch_Document interface)
Syntax
Procedure SetState_CustomMarginWidth (AValue : TCoord);
Description
The CustomMarginWidth property sets the margin from the bounds of the schematic sheet inwards. This method sets the CustomMarginWidth property.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface

SetState_CustomSheetStyle method

(ISch_Document interface)
Syntax
Procedure SetState_CustomSheetStyle (AValue : WideString);
Description
This property represents custom sheet style property which values can be inherited from one of the standard sheet styles and customized further. This method defines the custom sheet style and then can be customized further.
Example
See also
ISch_Document interface

SetState_CustomX method

(ISch_Document interface)
Syntax
Procedure SetState_CustomX (AValue : TCoord);
Description
The CustomX property sets the width of the custom sheet for the document. This method sets the CustomX value and is used in the CustomX property.
Example
See also
ISch_Document interface

SetState_CustomXZones method

(ISch_Document interface)
Syntax
Procedure SetState_CustomXZones (AValue : TCoord);
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
This method sets the CustomXZones property.
Example
See also
ISch_Document interface

SetState_CustomY method

(ISch_Document interface)
Syntax
Procedure SetState_CustomY (AValue : TCoord);
Description
The CustomY property sets the width of the custom sheet for the document. This method sets the CustomY value and is used in the CustomY property.
Example
See also
ISch_Document interface

SetState_CustomYZones method

(ISch_Document interface)
Syntax
Procedure SetState_CustomYZones (AValue : TCoord);
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
This method sets the CustomYZones property.
Example
See also
ISch_Document interface

SetState_DocumentBorderStyle method

(ISch_Document interface)
Syntax
Procedure SetState_DocumentBorderStyle (AValue : TSheetDocumentBorderStyle);
Description
The DocumentBorderStyle property determines the current document/border style for the schematic sheet - ANSI or standard blocks.
The function sets the current document border style and is used in the DocumentBorderStyle property.
Example
See also
ISch_Document interface

SetState_HotSpotGridOn method

(ISch_Document interface)
Syntax
Procedure SetState_HotSpotGridOn (AValue : Boolean);
Description
The electrical grid supports the Schematic Editor's guided wiring feature. When you are moving an electrical object in the workspace, and when it falls within the electrical grid range of another electrical object that you could connect to, the object you are moving will snap to the fixed object and a hot spot or highlight dot will appear. This dot guides you as to where a valid connection can be made. The electrical grid (hot spot) should be set slightly lower than the current snap grid or else it becomes difficult to position electrical objects one snap grid apart.
Example
See also
ISch_Document interface

SetState_HotSpotGridSize method

(ISch_Document interface)
Syntax
Procedure SetState_HotSpotGridSize (AValue : TCoord);
Description
The electrical grid supports the Schematic Editor's guided wiring feature. When you are moving an electrical object in the workspace, and when it falls within the electrical grid range of another electrical object that you could connect to, the object you are moving will snap to the fixed object and a hot spot or highlight dot will appear. This dot guides you as to where a valid connection can be made. The electrical grid (hot spot) should be set slightly lower than the current snap grid or else it becomes difficult to position electrical objects one snap grid apart.
The procedure sets the hot spot grid size and is used in the HotSpotGridSize property.
Example
See also
ISch_Document interface
HotSpotGridOn method
TCoord type

SetState_LoadFormat method

(ISch_Document interface)
Syntax
Procedure SetState_LoadFormat (AValue : WideString);
Description
Example
See also
ISch_Document interface

SetState_ReferenceZonesOn method

(ISch_Document interface)
Syntax
Procedure SetState_ReferenceZonesOn (AValue : Boolean);
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
The procedure sets whether the reference zones can be displayed or not and is used in the ReferenceZonesOn property.
Example

Procedure TurnOffReferenceZones;
Var
    I          : Integer;
    Project    : IProject;
    Doc        : IDocument;
    CurrentSch : ISch_Document;
Begin
    Project := GetWorkspace.DM_FocusedProject;
    If Project = Nil Then Exit;
 
    For I := 0 to Project.DM_LogicalDocumentCount - 1 Do
    Begin
        Doc := Project.DM_LogicalDocuments(I);
        If Doc.DM_DocumentKind = 'SCH' Then
        Begin
            CurrentSch := SchServer.GetSchDocumentByPath(Doc.DM_FullPath);
            If (CurrentSch <> Nil) And CurrentSch.GetState_ReferenceZonesOn Then
            Begin
              SchServer.RobotManager.SendMessage(CurrentSch.I_ObjectAddress, c_BroadCast, SCHM_BeginModify, c_NoEventData);
              CurrentSch.SetState_ReferenceZonesOn(False);
              SchServer.RobotManager.SendMessage(CurrentSch.I_ObjectAddress, c_BroadCast, SCHM_EndModify , c_NoEventData);
             End;
        End;
    End;
End;

See also
ISch_Document interface

SetState_SheetMarginWidth method

(ISch_Document interface)
Syntax
Procedure SetState_SheetMarginWidth (AValue : TCoord);
Description
The SheetMarginWidth property determines the margin from the bounds of the schematic sheet inwards.
The SheetMarginWidth procedure sets the width of the sheet margin and is used in the SheetMarginWidth property.
Notes
The UseCustomSheet property must be set to False before you can massage the attributes for the schematic sheet.
Example
See also
ISch_Document interface

SetState_SheetSizeX method

(ISch_Document interface)
Syntax
Procedure SetState_SheetSizeX (AValue : TCoord);
Description
Example
See also
ISch_Document interface

SetState_SheetSizeY method

(ISch_Document interface)
Syntax
Procedure SetState_SheetSizeY (AValue : TCoord);
Description
Example
See also
ISch_Document interface

SetState_SheetStyle method

(ISch_Document interface)
Syntax
Procedure SetState_SheetStyle (AValue : TSheetStyle);
Description
The SheetStyle property determines the document standard style. One of the document sheet styles are A4, Letter and imperial/metric sized sheets.
The procedure defines the sheet style and is used in the SheetStyle property.
Example
See also
ISch_Document interface

SetState_SheetZonesX method

(ISch_Document interface)
Syntax
Procedure SetState_SheetZonesX (AValue : Integer);
Description
Example
See also
ISch_Document interface

SetState_SheetZonesY method

(ISch_Document interface)
Syntax
Procedure SetState_SheetZonesY (AValue : Integer);
Description
Example
See also
ISch_Document interface

SetState_ShowTemplateGraphics method

(ISch_Document interface)
Syntax
Procedure SetState_ShowTemplateGraphics(AValue : Boolean);
Description
The template is usually placed on the bottom right of the schematic sheet. The template files have a DOT extension and are located in the in the \Templates\ folder of the Altium Designer software installation.
The procedure sets whether the template graphics can be displayed or not and is used in the ShowTemplateGraphics property.
Example
See also
ISch_Document interface

SetState_SnapGridOn method

(ISch_Document interface)
Syntax
Procedure SetState_SnapGridOn (AValue : Boolean);
Description
The snap grid is the grid that the cursor is locked to when placing or manipulating objects on the sheet. This grid should be left on at all times except when specifically placing or moving objects that need to be off grid such as text objects. The visible grid is the grid you see on the grid which acts as a visual grid and typically it is set to be the same as or a multiple of the snap grid.
The procedure sets a boolean value whether the SnapGrid is active or not and is used in the SnapGridOn property.
Example
See also
ISch_Document interface

SetState_SnapGridSize method

(ISch_Document interface)
Syntax
Procedure SetState_SnapGridSize (AValue : TCoord);
Description
The snap grid is the grid that the cursor is locked to when placing or manipulating objects on the sheet. This grid should be left on at all times except when specifically placing or moving objects that need to be off grid such as text objects. The visible grid is the grid you see on the grid which acts as a visual grid and typically it is set to be the same as or a multiple of the snap grid.
The procedure sets the size value of the snap grid and is used in the SnapGridSize property.
Example
See also
ISch_Document interface

SetState_SystemFont method

(ISch_Document interface)
Syntax
Procedure SetState_SystemFont (AValue : TFontId);
Description
Example
See also
ISch_Document interface

SetState_TemplateFileName method

(ISch_Document interface)
Syntax
Procedure SetState_TemplateFileName (AValue : WideString);
Description
The template filename is the filename of the template that is placed usually on the bottom right of the schematic sheet. The template files have a DOT extension and are located in the \Templates\ folder of the Altium Designer installation.
The procedure sets the template filename and is used in the TemplateFilename property.
Example
See also
ISch_Document interface

SetState_TitleBlockOn method

(ISch_Document interface)
Syntax
Procedure SetState_TitleBlockOn (AValue : Boolean);
Description
Example
See also
ISch_Document interface

SetState_Unit method

(ISch_Document interface)
Syntax
Procedure SetState_Unit (AValue : TUnit);
Description
This property determines the system unit used for the schematic project. The available imperial units are Mils, inches, DXP default and Auto imperial as well as available metric units which are mm,cm, metres and auto-metric.
This method sets the Unit system and is used in the DisplayUnit property.
Example
See also
ISch_Document interface
TUnit type

SetState_UseCustomSheet method

(ISch_Document interface)
Syntax
Procedure SetState_UseCustomSheet (AValue : Boolean);
Description
The property determines whether a custom sheet is used instead of a standard sheet. If the UseCustomSheet is true, then the CustomMarginWidth, CustomSheetStyle, CustomX and CustomY properties can be set for this custom sheet property.
This procedure sets whether the custom sheet is used instead of a standard sheet and is used in the UseCustomSheet property.
Example
See also
ISch_Document interface

SetState_VisibleGridOn method

(ISch_Document interface)
Syntax
Procedure SetState_VisibleGridOn (AValue : Boolean);
Description
Example
See also
ISch_Document interface

SetState_VisibleGridSize method

(ISch_Document interface)
Syntax
Procedure SetState_VisibleGridSize (AValue : TCoord);
Description
Example
See also
ISch_Document interface

SetState_WorkspaceOrientation method

(ISch_Document interface)
Syntax
Procedure SetState_WorkspaceOrientation(AValue : TSheetOrientation);
Description
This procedure sets the orientation of the workspace - either as a portrait or as a landscape format.
Example
See also
ISch_Document interface
TSheetOrientation type

ISch_Document Properties

BorderOn property

(ISch_Document interface)
Syntax
Property BorderOn : Boolean Read GetState_BorderOn Write SetState_BorderOn;
Description
This BorderOn property determines whether the border on around the outside of the current schematic document will be displayed or not.
Example
See also
ISch_Document interface

CustomMarginWidth property

(ISch_Document interface)
Syntax
Property CustomMarginWidth : TCoord Read GetState_CustomMarginWidth Write SetState_CustomMarginWidth;
Description
The CustomMarginWidth property sets the margin from the bounds of the schematic sheet inwards. This property is supported by the GetState_CustomMarginWidth and SetState_CustomMarginWidth methods.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface
UseCustomSheet property

CustomSheetStyle property

(ISch_Document interface)
Syntax
Property CustomSheetStyle : WideString Read GetState_CustomSheetStyle Write SetState_CustomSheetStyle;
Description
This property represents custom sheet style property which values can be inherited from one of the standard sheet styles and customized further.
This property is supported by the GetState_CustomSheetStyle and SetState_CustomSheetStyle methods.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface

CustomX property

(ISch_Document interface)
Syntax
Property CustomX : TCoord Read GetState_CustomX Write SetState_CustomX;
Description
This property sets the width of the custom sheet for the document. This property is supported by the GetState_CustomX and SetState_CustomX methods.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface

CustomXZones property

(ISch_Document interface)
Syntax
Property CustomXZones : TCoord Read GetState_CustomXZones Write SetState_CustomXZones;
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
This property is supported by the GetState_CustomXZones and SetState_CustomXZones methods.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface

CustomY property

(ISch_Document interface)
Syntax
Property CustomY : TCoord Read GetState_CustomY Write SetState_CustomY;
Description
This property sets the height of the custom sheet for the document. This property is supported by the GetState_CustomY and SetState_CustomY methods.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface

CustomYZones property

(ISch_Document interface)
Syntax
Property CustomYZones : TCoord Read GetState_CustomYZones Write SetState_CustomYZones;
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
This property is supported by the GetState_CustomYZones and SetState_CustomYZones methods.
Notes
The UseCustomSheet property must be set to true before you can massage the attributes for the custom style of the schematic sheet.
Example
See also
ISch_Document interface

DocumentBorderStyle property

(ISch_Document interface)
Syntax
Property DocumentBorderStyle : TSheetDocumentBorderStyle Read GetState_DocumentBorderStyle Write SetState_DocumentBorderStyle;
Description
The DocumentBorderStyle property determines the current document/border style for the schematic sheet - whether it is a standard or an ANSI title block.
This property is supported by the GetState_DocumentBorderStyle and SetState_DocumentBorderStyle methods.
Example
See also
ISch_Document interface
TSheetDocumentBorderStyle type

DisplayUnit property

(ISch_Document interface)
Syntax
Property DisplayUnit : TUnit Read GetState_Unit Write SetState_Unit;
Description
This property determines the system unit used for the schematic project. The available imperial units are Mils, inches, DXP default and Auto imperial as well as available metric units which are mm,cm,metres and autometric.
This DisplayUnit property is supported by the GetState_Unit and SetState_Unit methods.
Example
See also
ISch_Document interface
TUnit type

DocumentName property

(ISch_Document interface)
Syntax
Property DocumentName : WideString Read GetState_DocumentName;
Description
This read only property determines the schematic document name. This property is supported by the GetState_DocumentName;
Example
See also
ISch_Document interface

HotSpotGridOn property

(ISch_Document interface)
Syntax
Property HotSpotGridOn : Boolean Read GetState_HotSpotGridOn Write SetState_HotSpotGridOn;
Description
The property determines whether the hot spot grid is displayed or not. The electrical grid supports the Schematic Editor's guided wiring feature. When you are moving an electrical object in the workspace, and when it falls within the electrical grid range of another electrical object that you could connect to, the object you are moving will snap to the fixed object and a hot spot or highlight dot will appear. This dot guides you as to where a valid connection can be made. The electrical grid (hot spot) should be set slightly lower than the current snap grid or else it becomes difficult to position electrical objects one snap grid apart.
This property is supported by the GetState_HotSpotGridOn and SetState_HotSpotGridOn methods.
Example
See also
ISch_Document interface

HotSpotGridSize property

(ISch_Document interface)
Syntax
Property HotSpotGridSize : TCoord Read GetState_HotSpotGridSize Write SetState_HotSpotGridSize;
Description
The electrical grid supports the Schematic Editor's guided wiring feature. When you are moving an electrical object in the workspace, and when it falls within the electrical grid range of another electrical object that you could connect to, the object you are moving will snap to the fixed object and a hot spot or highlight dot will appear. This dot guides you as to where a valid connection can be made. The electrical grid (hot spot) should be set slightly lower than the current snap grid or else it becomes difficult to position electrical objects one snap grid apart.
The HotSpotGridSize property determines the size of the hot spot (electrical grid) in TCoord units.
Example
See also
ISch_Document interface
HotSpotGridOn
SnapGridOn
SnapGridSize
TCoord type

InternalTolerance property

(ISch_Document interface)
Syntax
Property InternalTolerance : TCoord Read GetState_InternalTolerance;
Description
Example
See also
ISch_Document interface

LoadFormat property

(ISch_Document interface)
Syntax
Property LoadFormat : WideString Read GetState_LoadFormat Write SetState_LoadFormat;
Description
Example
See also
ISch_Document interface

PopupMenuHitTest method

(ISch_Document interface)
Syntax
Function PopupMenuHitTest : ISch_HitTest;
Description
Example
See also
ISch_Document interface
ISch_HitTest interface

ReferenceZonesOn property

(ISch_Document interface)
Syntax
Property ReferenceZonesOn : Boolean Read GetState_ReferenceZonesOn Write SetState_ReferenceZonesOn;
Description
This property determines the number of regions or reference zones that are displayed along the horizontal and vertical borders. The reference zones form a reference grid along the border of your schematic. This reference grid is only for display purposes and does not affect the Snap, Visible or Electrical Grids that are used when placing schematic objects.
This property determines whether the reference zones can be displayed or not and is supported by the GetState_ReferenceZonesOn and SetState_ReferenceZonesOn methods.
Example

Procedure TurnOffReferenceZones;
Var
    I          : Integer;
    Project    : IProject;
    Doc        : IDocument;
    CurrentSch : ISch_Document;
Begin
    Project := GetWorkspace.DM_FocusedProject;
    If Project = Nil Then Exit;
 
    For I := 0 to Project.DM_LogicalDocumentCount - 1 Do
    Begin
        Doc := Project.DM_LogicalDocuments(I);
        If Doc.DM_DocumentKind = 'SCH' Then
        Begin
            CurrentSch := SchServer.GetSchDocumentByPath(Doc.DM_FullPath);
            If (CurrentSch <> Nil) And CurrentSch.ReferenceZonesOn Then
            Begin
              SchServer.RobotManager.SendMessage(CurrentSch.I_ObjectAddress, c_BroadCast, SCHM_BeginModify, c_NoEventData);
              CurrentSch.ReferenceZonesOn :=  False;
              SchServer.RobotManager.SendMessage(CurrentSch.I_ObjectAddress, c_BroadCast, SCHM_EndModify , c_NoEventData);
             End;
        End;
    End;
End;

See also
ISch_Document interface

SheetMarginWidth property

(ISch_Document interface)
Syntax
Property SheetMarginWidth : TCoord Read GetState_SheetMarginWidth Write SetState_SheetMarginWidth;
Description
The SheetMarginWidth property sets the margin from the bounds of the schematic sheet inwards. This property is supported by the GetState_MarginWidth and SetState_MarginWidth methods.
Notes
The UseCustomSheet property must be set to False before you can massage the attributes for the schematic sheet.
Example
See also
ISch_Document interface

SheetStyle property

(ISch_Document interface)
Syntax
Property SheetStyle : TSheetStyle Read GetState_SheetStyle Write SetState_SheetStyle;
Description
The SheetStyle property determines the document standard style. One of the document sheet styles are A4, Letter and imperial/metric sized sheets.
This property is supported by the GetState_SheetStyle and SetState_SheetStyle methods.
Example
See also
ISch_Document interface
TSheetStyle type

SheetSizeX property

(ISch_Document interface)
Syntax
Property SheetSizeX : TCoord Read GetState_SheetSizeX Write SetState_SheetSizeX;
Description
The SheetSizeX property defines the width of the sheet. This property is supported by the GetState_SheetSizeX and GetState_SheetSizeX methods.
Example
See also
ISch_Document interface
SheetSizeY method

SheetSizeY property

(ISch_Document interface)
Syntax
Property SheetSizeY : TCoord Read GetState_SheetSizeY Write SetState_SheetSizeY;
Description
The SheetSizeY property defines the height of the sheet. This property is supported by the GetState_SheetSizeY and GetState_SheetSizeY methods.
Example
See also
ISch_Document interface

SheetZonesX property

(ISch_Document interface)
Syntax
Property SheetZonesX : Integer Read GetState_SheetZonesX Write SetState_SheetZonesX;
Description
Example
See also
ISch_Document interface

SheetZonesY property

(ISch_Document interface)
Syntax
Property SheetZonesY : Integer Read GetState_SheetZonesY Write SetState_SheetZonesY;
Description
Example
See also
ISch_Document interface

ShowTemplateGraphics property

(ISch_Document interface)
Syntax
Property ShowTemplateGraphics : Boolean Read GetState_ShowTemplateGraphics Write SetState_ShowTemplateGraphics;
Description
The template is usually placed on the bottom right of the schematic sheet. The template files have a DOT extension and are located in the \Templates\ folder of the Altium Designer software installation.
The property determines whether the template graphics are displayed or not.
Example
See also
ISch_Document interface

SnapGridOn property

(ISch_Document interface)
Syntax
Property SnapGridOn : Boolean Read GetState_SnapGridOn Write SetState_SnapGridOn;
Description
The snap grid is the grid that the cursor is locked to when placing or manipulating objects on the sheet. This grid should be left on at all times except when specifically placing or moving objects that need to be off grid such as text objects. The visible grid is the grid you see on the grid which acts as a visual grid and typically it is set to be the same as or a multiple of the snap grid.
This property is supported by the GetState_SnapGridOn and SetState_SnapGridOn methods.
Example
See also
ISch_Document interface

SnapGridSize property

(ISch_Document interface)
Syntax
Property SnapGridSize : TCoord Read GetState_SnapGridSize Write SetState_SnapGridSize;
Description
The snap grid is the grid that the cursor is locked to when placing or manipulating objects on the sheet. This grid should be left on at all times except when specifically placing or moving objects that need to be off grid such as text objects. The visible grid is the grid you see on the grid which acts as a visual grid and typically it is set to be the same as or a multiple of the snap grid.
The property defines the snap grid size and is supported by the GetState_SnapGridSize and SetState_SnapGridSize methods.
Example
See also
ISch_Document interface

SystemFont property

(ISch_Document interface)
Syntax
Property SystemFont : TFontId Read GetState_SystemFont Write SetState_SystemFont;
Description
Example
See also
ISch_Document interface
TFontID type

TemplateFileName property

(ISch_Document interface)
Syntax
Property TemplateFileName : WideString Read GetState_TemplateFileName Write SetState_TemplateFileName;
Description
The template filename is the filename of the template that is placed usually on the bottom right of the schematic sheet. The template files have a DOT extension and are located in the \Templates\ folder of Altium Designer software installation.
This TemplateFileName property is supported by the GetState_TemplateFileName and SetState_TemplateFileName methods.
Example
See also
ISch_Document interface
ShowTemplateGraphics method

TitleBlockOn property

(ISch_Document interface)
Syntax
Property TitleBlockOn : Boolean Read GetState_TitleBlockOn Write SetState_TitleBlockOn;
Description
The property determines whether the title block is displayed or not and is supported by the GetState_TitleBlockOn and SetState_TitleBlockOn methods.
Example
See also
ISch_Document interface
DocumentBorderStyle method

VisibleGridOn property

(ISch_Document interface)
Syntax
Property VisibleGridOn : Boolean Read GetState_VisibleGridOn Write SetState_VisibleGridOn;
Description
Example
See also
ISch_Document interface

UnitSystem property

(ISch_Document interface)
Syntax
Property UnitSystem : TUnitSystem Read GetState_UnitSystem;
Description
Example
See also
ISch_Document interface

UseCustomSheet property

(ISch_Document interface)
Syntax
Property UseCustomSheet : Boolean Read GetState_UseCustomSheet Write SetState_UseCustomSheet;
Description
The property determines whether a custom sheet is used instead of a standard sheet. If the UseCustomSheet is true, then the CustomMarginWidth, CustomSheetStyle, CustomX and CustomY properties can be set for this custom sheet property.
The UseCustomSheet property is supported by the GetState_UseCustomSheet and SetState_UseCustomSheet methods.
Example
See also
ISch_Document interface
CustomX property
CustomY property
CustomSheetStyle property
CustomMarginWidth property

VisibleGridSize property

(ISch_Document interface)
Syntax
Property VisibleGridSize : TCoord Read GetState_VisibleGridSize Write SetState_VisibleGridSize;
Description
Example
See also
ISch_Document interface

WorkspaceOrientation property

(ISch_Document interface)
Syntax
Property WorkspaceOrientation : TSheetOrientation Read GetState_WorkspaceOrientation Write SetState_WorkspaceOrientation;
Description
Example
See also
ISch_Document interface

ISch_Sheet Interface

Overview
The ISch_Sheet interface represents an existing schematic document open in Altium Designer. A schematic document can have bus and wiring connections which are represented by the IConnectionsArray interface.

  • You can modify or set the document's preference settings.
  • You can iterate design objects in a Schematic or library document, see ISch_Iterator interface for details.
  • You can invoke the ChooseLocationInteractively or ChooseRectangleInteractively methods to obtain coordinates from the Schematic sheet or library sheet.
  • You can create a library from a project that has components
  • You can check whether objects exist on a particular point on a schematic or library document.

Notes
The ISch_Sheet interface hierarchy is as follows;
ISch_BasicContainer
    ISch_GraphicalObject
        ISch_ParameterizedGroup
        ISch_Document
            ISch_Sheet

ISch_Sheet methods
GetState_WireConnections
GetState_BusConnections
OptimizeUseOfPolylines
GetState_HarnessDefinitionsChanged
Reset_HarnessDefinitionsChanged
Raise_HarnessDefinitionsChanged
ISch_Sheet properties
WireConnections
BusConnections
HarnessDefinitionsChanged

See also
ISch_Document interface
ISch_Lib interface

ISch_Sheet Methods

GetState_BusConnections method

(ISch_Sheet interface)
Syntax
Function GetState_BusConnections : IConnectionsArray;
Description
This function fetches the connections of the busses on a schematic document. This method is used in the BusConnections property.
Example
See also
ISch_Sheet interface

GetState_WireConnections method

(ISch_Sheet interface)
Syntax
Function GetState_WireConnections : IConnectionsArray;
Description
This function fetches the connections of the wires on a schematic document. This method is used in the WireConnections property.
Example
See also
ISch_Sheet interface

OptimizeUseOfPolylines method

(ISch_Sheet interface)
Syntax
Procedure OptimizeUseOfPolylines;
Description
This procedure forces the optimal connection of polylines graphically and in the datastructure.
Example
See also
ISch_Sheet interface

GetState_HarnessDefinitionsChanged

(ISch_Sheet interface)
Syntax
Function  GetState_HarnessDefinitionsChanged : Boolean;
Description
Example
See also
ISch_Sheet interface

Reset_HarnessDefinitionsChanged

(ISch_Sheet interface)
Syntax
Procedure Reset_HarnessDefinitionsChanged; 
Description
Example
See also
ISch_Sheet interface

Raise_HarnessDefinitionsChanged

(ISch_Sheet interface)
Syntax
Procedure Raise_HarnessDefinitionsChanged;
Description
Example
See also
ISch_Sheet interface

ISch_Sheet Properties

BusConnections property

(ISch_Sheet interface)
Syntax
Property BusConnections : IConnectionsArray Read GetState_BusConnections;
Description
This property fetches the connections of busses on the schematic document. This property is supported by the GetState_BusConnections method.
Example
See also
ISch_Sheet interface

WireConnections property

(ISch_Sheet interface)
Syntax
Property WireConnections : IConnectionsArray Read GetState_WireConnections;
Description
This property fetches the connections of wires on the schematic document. This property is supported by the GetState_WireConnections method.
Example
See also
ISch_Sheet interface

HarnessDefinitionsChanged property

(ISch_Sheet interface)
Syntax
Property HarnessDefinitionsChanged : Boolean Read GetState_HarnessDefinitionsChanged;
Description
This property is supported by the GetState_HarnessDefinitionsChanged method.
Example
See also
ISch_Sheet interface

ISch_Lib Interface

Overview
This interface represents an existing library document open in Altium Designer. A library is composed of library pages and each page represents the symbol (schematic library component).

  • You can modify or set the document's preference settings.
  • You can invoke the ChooseLocationInteractively or ChooseRectangleInteractively methods to obtain coordinates from the Schematic sheet or library sheet.
  • You can check whether objects exist on a particular point on a schematic or library document.
  • You can iterate design objects in a library document, with the library iterator. This iterator is created by the SchLibIterator_Create function.
  • You can invoke the LibIsEmpty method to check if the library is empty (ie no symbols in the library) or not.

Notes
Due to the nature of a library document, all symbols (library components) are displayed on their library pages, so you iterate through the library to fetch symbols.

The ISch_Lib interface hierarchy is as follows;
ISch_BasicContainer
    ISch_GraphicalObject
        ISch_ParameterizedGroup
            ISch_Document
                ISch_Lib

ISch_Lib methods
AddSchComponent
LibIsEmpty
RemoveSchComponent
Sch_LibraryRuleChecker_Create
Sch_LibraryRuleChecker_Destroy
SchLibIterator_Create
TransferComponentsPrimitivesBackFromEditor
TransferComponentsPrimitivesToEditor
GetState_Current_SchComponent
GetState_CurrentSchComponentDisplayMode
GetState_CurrentSchComponentPartId
GetState_Description
GetState_ShowHiddenPins
SetState_Current_SchComponent
SetState_CurrentSchComponentAddDisplayMode
SetState_CurrentSchComponentAddPart
SetState_CurrentSchComponentDisplayMode
SetState_CurrentSchComponentPartId
SetState_CurrentSchComponentRemoveDisplayMode
SetState_CurrentSchComponentRemovePart
SetState_Description
SetState_ShowHiddenPins
ISch_Lib properties
CurrentSchComponent
Description
ShowHiddenPins

See also
ISch_Iterator interface
ILibCompInfoReader interface
IComponentINfo interface

ISch_Lib Methods

AddSchComponent method

(ISch_Lib interface)
Syntax
Procedure AddSchComponent (Const AComponent : ISch_Component);
Description
Example
See also
ISch_Lib interface

LibIsEmpty method

(ISch_Lib interface)
Syntax
Function LibIsEmpty : Boolean;
Description
Example
See also
ISch_Lib interface

SchLibIterator_Create method

(ISch_Lib interface)
Syntax
Function SchLibIterator_Create : ISch_Iterator;
Description
Example
See also
ISch_Lib interface

RemoveSchComponent method

(ISch_Lib interface)
Syntax
Procedure RemoveSchComponent(Const AComponent : ISch_Component);
Description
Example
See also
ISch_Lib interface

Sch_LibraryRuleChecker_Create method

(ISch_Lib interface)
Syntax
Function Sch_LibraryRuleChecker_Create : ISch_LibraryRuleChecker;
Description
Example
See also
ISch_Lib interface

Sch_LibraryRuleChecker_Destroy method

(ISch_Lib interface)
Syntax
Procedure Sch_LibraryRuleChecker_Destroy (Var ARuleChecker : ISch_LibraryRuleChecker);
Description
Example
See also
ISch_Lib interface

TransferComponentsPrimitivesToEditor method

(ISch_Lib interface)
Syntax
Procedure TransferComponentsPrimitivesToEditor;
Description
Example
See also
ISch_Lib interface

TransferComponentsPrimitivesBackFromEditor method

(ISch_Lib interface)
Syntax
Procedure TransferComponentsPrimitivesBackFromEditor;
Description
Example
See also
ISch_Lib interface

GetState_Current_SchComponent method

(ISch_Lib interface)
Syntax
Function GetState_Current_SchComponent: ISch_Component;
Description
Example
See also
ISch_Lib interface

GetState_CurrentSchComponentDisplayMode method

(ISch_Lib interface)
Syntax
Function GetState_CurrentSchComponentDisplayMode : TDisplayMode;
Description
Example
See also
ISch_Lib interface

GetState_CurrentSchComponentPartId method

(ISch_Lib interface)
Syntax
Function GetState_CurrentSchComponentPartId : Integer;
Description
Example
See also
ISch_Lib interface

GetState_Description method

(ISch_Lib interface)
Syntax
Function GetState_Description : WideString;
Description
Example
See also
ISch_Lib interface

GetState_ShowHiddenPins method

(ISch_Lib interface)
Syntax
Function GetState_ShowHiddenPins : Boolean;
Description
Example
See also
ISch_Lib interface

SetState_Current_SchComponent method

(ISch_Lib interface)
Syntax
Procedure SetState_Current_SchComponent(AValue : ISch_Component);
Description
Example
See also
ISch_Lib interface

SetState_CurrentSchComponentAddDisplayMode method

(ISch_Lib interface)
Syntax
Procedure SetState_CurrentSchComponentAddDisplayMode;
Description
Example
See also
ISch_Lib interface

SetState_CurrentSchComponentAddPart method

(ISch_Lib interface)
Syntax
Procedure SetState_CurrentSchComponentAddPart;
Description
Example
See also
ISch_Lib interface

SetState_CurrentSchComponentDisplayMode method

(ISch_Lib interface)
Syntax
Procedure SetState_CurrentSchComponentDisplayMode(ADisplayMode : TDisplayMode);
Description
Example
See also
ISch_Lib interface

SetState_CurrentSchComponentPartId method

(ISch_Lib interface)
Syntax
Procedure SetState_CurrentSchComponentPartId(APartId : Integer);
Description
Example
See also
ISch_Lib interface

SetState_CurrentSchComponentRemoveDisplayMode method

(ISch_Lib interface)
Syntax
Procedure SetState_CurrentSchComponentRemoveDisplayMode;
Description
Example
See also
ISch_Lib interface

SetState_CurrentSchComponentRemovePart method

(ISch_Lib interface)
Syntax
Procedure SetState_CurrentSchComponentRemovePart;
Description
Example
See also
ISch_Lib interface

SetState_Description method

(ISch_Lib interface)
Syntax
Procedure SetState_Description (AValue : WideString);
Description
Example
See also
ISch_Lib interface

SetState_ShowHiddenPins method

(ISch_Lib interface)
Syntax
Procedure SetState_ShowHiddenPins (AValue : Boolean);
Description
Example
See also
ISch_Lib interface

Properties

Description property

(ISch_Lib interface)
Syntax
Property Description : WideString Read GetState_Description Write SetState_Description;
Description
This property gets or sets the description of the library document. This property is supported by its GetState_Description and SetState_Description methods.
Example
See also
ISch_Lib interface

ShowHiddenPins property

(ISch_Lib interface)
Syntax
Property ShowHiddenPins : Boolean Read GetState_ShowHiddenPins Write SetState_ShowHiddenPins;
Description
This property gets or sets the visible property of hidden pins of the component in the library document. This property is supported by its GetState_ShowHiddenPins and SetState_ShowHiddenPins methods.
Example
See also
ISch_Lib interface

CurrentSchComponent property

(ISch_Lib interface)
Syntax
Property CurrentSchComponent : ISch_Component Read GetState_Current_SchComponent Write SetState_Current_SchComponent;
Description
This property gets or sets the component as the current component in the library document. This property is supported by its GetState_CurrentSchComponent and SetState_CurrentSchComponent methods.
Example
See also
ISch_Lib interface

ISch_BasicContainer Interface

Overview
The ISch_BasicContainer interface represents as a parent object or a child object for a schematic object in Altium Designer.

  • A sheet symbol object for example is a parent object, and its child objects are sheet entries, thus to fetch the sheet entries, you would create an iterator for the sheet symbol and iterate for sheet entry objects.
  • A schematic document is a parent object as well thus you also create an iterator for this document and iterate for objects on this document.

Notes
ISch_BasicContainer is the ancestor interface object for schematic object interfaces.
ISch_BasicContainer is the ancestor interface object for ISch_MapDefiner and ISch_Implementation interfaces.
ISch_Document is inherited from ISch_BasicContainer and is a container for storing design objects and in turn each design object is inherited from the ISch_BasicContainer interface.
ISch_Iterator fetches design objects which are inherited from the ISch_BasicContainer interface.

ISch_BasicContainer methods
GetState_ObjectId
GetState_SchBasicContainer
GetState_OwnerSchDocument
GetState_Text
GetState_IdentifierString
GetState_DescriptionString
Setstate_Default
SetState_Text
I_ObjectAddress
AddSchObject
AddAndPositionSchObject
RemoveSchObject
SchIterator_Create
SchIterator_Destroy
DeleteAll
FreeAllContainedObjects
Import_FromUser
Replicate
ISch_BasicContainer properties
Container
ObjectId
OwnerDocument

See also
ISch_GraphicalObject interface
ISch_Document interface
ISch_Implementation interface
ISch_MapDefiner interface

ISch_BasicContainer Methods

AddAndPositionSchObject method

(ISch_BasicContainer interface)
Syntax
Procedure AddAndPositionSchObject(AObject : ISch_BasicContainer);
Description
The AddSchObject procedure adds and positions a child object into the parent object that the AddSchObject is associated with. For example adding sheet entries in a sheet symbol, you would use this method.
Example
See also
ISch_BasicContainer interface
AddSchObject method

AddSchObject method

(ISch_BasicContainer interface)
Syntax
Procedure AddSchObject (AObject : ISch_BasicContainer);
Description
The AddSchObject procedure adds a child object into the parent object that the AddSchObject is associated with.
DelphiScript Example

// Create a parameter object and add it to the new pin object.
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_BasicContainer interface

DeleteAll method

(ISch_BasicContainer interface)
Syntax
Procedure DeleteAll;
Description
The DeleteAll procedure removes the contained objects from the container of ISch_BasicContainer type. For example, if you just want to get a list of contained objects, and make small changes to them and then move them to a new container. In this case, you do not want to free and recreate all the contained objects, so you use the DeleteAll method. To have a clean container, you need to call the FreeAllContainedObjects method instead.
Example
See also
ISch_BasicContainer interface
FreeAllContainedObjects method

FreeAllContainedObjects method

(ISch_BasicContainer interface)
Syntax
Procedure FreeAllContainedObjects;
Description
The FreeAllContainedObjects procedure removes the contained objects from the container of ISch_BasicContainer type and the container ends up clean. To have container that can be reused with the same elements in another container, you need to call the DeleteAll method instead.
Example
See also
ISch_BasicContainer interface
DeleteAll method

GetState_DescriptionString method

(ISch_BasicContainer interface)
Syntax
Function GetState_DescriptionString : WideString;
Description
This function returns you the description string for this object.
Example
See also
ISch_BasicContainer interface

GetState_IdentifierString method

(ISch_BasicContainer interface)
Syntax
Function GetState_IdentifierString : WideString;
Description
This function returns you the identifier string.
Example
See also
ISch_BasicContainer interface

GetState_ObjectId method

(ISch_BasicContainer interface)
Syntax
Function GetState_ObjectId : TObjectId;
Description
The ObjectID property determines what object type the object in question is. For example when iterating for objects on a schematic document, you would want to modify all objects but update the port objects' locations only, thus you check for the object's ObjectId and if it is a ePort type, then take action.
The function retrieves the ObjectId type and this function is used as a getter in the ObjectID property.
DelphiScript Example

AnObject := Iterator.FirstSchObject;
While AnObject <> Nil Do
Begin
    SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_BeginModify, c_NoEventData);
 
    Case AnObject.ObjectId Of
       eWire   : AnObject.Color     := $0000FF; //red color in bgr format
       ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
    End;
 
    SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_EndModify  , c_NoEventData);
    AnObject := Iterator.NextSchObject;
End;

See also
ISch_BasicContainer interface

GetState_OwnerSchDocument method

(ISch_BasicContainer interface)
Syntax
Function GetState_OwnerSchDocument : ISch_Document;
Description
This property returns the ISch_Document interface that the object is associated with. It is also said that the document owns the object when the Object has a valid OwnerDocument property.
The function returns the ISch_Document interface that the object is associated with.
Example
See also
ISch_BasicContainer interface
ISch_Document interface
ISch_GraphicalObject interface

GetState_SchBasicContainer method

(ISch_BasicContainer interface)
Syntax
Function GetState_SchBasicContainer : ISch_BasicContainer;
Description
This function obtains the container of child objects from the parent object itself. This function is used in the Container property.
Example
See also
ISch_BasicContainer interface

GetState_Text method

(ISch_BasicContainer interface)
Syntax
Function GetState_Text : WideString;
Description
This function retrieves the text string for this object.
Example
See also
ISch_BasicContainer interface

I_ObjectAddress method

(ISch_BasicContainer interface)
Syntax
Function I_ObjectAddress : TSCHObjectHandle;
Description
This function retrieves the object address (a pointer type) of the object in question which is of TSchObjectHandle type. This function is mainly used for the SendMessge method from the ISch_RobotManager interface.
DelphiScript Example

SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_BeginModify, c_NoEventData);
AnObject.Color     := $0000FF; //red color in bgr format
SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_EndModify  , c_NoEventData);
 

See also
ISch_BasicContainer interface
ISch_RobotManager interface

Import_FromUser method

(ISch_BasicContainer interface)
Syntax
Function Import_FromUser : Boolean;
Description
The Import_FromUser function invokes the Properties dialog for the object. This is equivalent to when you double click on an object on the schematic document and the Object Properties dialog appears. This function returns a True value when the User clicks okay otherwise a False value is returned.
An example of using this method is to pop up the Properties dialog programmatically so that the user can modify the object and then the script or the server code can do more processing.
Example
See also
ISch_BasicContainer interface

RemoveSchObject method

(ISch_BasicContainer interface)
Syntax
Procedure RemoveSchObject (AObject : ISch_BasicContainer);
Description
The RemoveSchObject method removes the Schematic object from the database associated with the document or the parent object but it is not removed from memory. Therefore an Undo action will be able to restore this object only if the RobotManager's SendMessage methods are invoked.
DelphiScript Example

// Initialize the robots in Schematic editor.
SchServer.ProcessControl.PreProcess(CurrentSheet, '');
 
// Set up iterator to look for Port objects only
Iterator := CurrentSheet.SchIterator_Create;
If Iterator = Nil Then Exit;
Iterator.AddFilter_ObjectSet(MkSet(ePort));
Try
    Port := Iterator.FirstSchObject;
    While Port <> Nil Do
    Begin
        OldPort := Port;
        Port    := Iterator.NextSchObject;
        CurrentSheet.RemoveSchObject(OldPort);
            
        SchServer.RobotManager.SendMessage(CurrentSheet.I_ObjectAddress,c_BroadCast,
                               SCHM_PrimitiveRegistration,OldPort.I_ObjectAddress);
    End;
Finally
    CurrentSheet.SchIterator_Destroy(Iterator);
End;
// Clean up robots in Schematic editor.
SchServer.ProcessControl.PostProcess(CurrentSheet, '');

See also
ISch_BasicContainer interface

Replicate method

(ISch_BasicContainer interface)
Syntax
Function Replicate : ISch_BasicContainer;
Description
This functions makes another copy of this object but with an unique object address (a new memory location) but with same attributes as this object.
Example
See also
ISch_BasicContainer interface

SchIterator_Create method

(ISch_BasicContainer interface)
Syntax
Function SchIterator_Create : ISch_Iterator;
Description
The SchIterator_Create function creates an iterator for the parent object (such as the document, component or the sheet symbol) and with this iterator, you have the ability to iterate the child objects within, such as pins of a component. Once you have finished using the iterator, invoke the SchIterator_Destroy method to free the iterator from memory.
Example

Try
    SheetSymbol := ParentIterator.FirstSchObject;
    While SheetSymbol <> Nil Do
    Begin
        // Look for sheet entries (child objects) within a sheet symbol object.
        ChildIterator := SheetSymbol.SchIterator_Create;
        If ChildIterator <> Nil Then
        Begin
            ChildIterator.AddFilter_ObjectSet(MkSet(eSheetEntry));
            Try
                SheetEntry := ChildIterator.FirstSchObject;
                While SheetEntry <> Nil Do
                Begin
                    EntriesNames := SheetEntry.Name + #13 + EntriesNames;
                    SheetEntry := ChildIterator.NextSchObject;
                End;
            Finally
                SheetSymbol.SchIterator_Destroy(ChildIterator);
            End;
        End;
        SheetSymbol := ParentIterator.NextSchObject;
    End;
Finally
    CurrentSheet.SchIterator_Destroy(ParentIterator);
End;

See also
ISch_BasicContainer interface
ISch_Iterator interface
SchIterator_Destroy

SchIterator_Destroy method

(ISch_BasicContainer interface)
Syntax
Procedure SchIterator_Destroy(Var AIterator : ISch_Iterator);
Description
The SchIterator_Destroy function destroys the iterator from the parent object (such as the document, component or the sheet symbol). This iterator once created with the SchIterator_Create method, has the ability to iterate the child objects within, such as pins of a component.
DelphiScript Example

Try
    SheetSymbol := ParentIterator.FirstSchObject;
    While SheetSymbol <> Nil Do
    Begin
        // Look for sheet entries (child objects) within a sheet symbol object.
        ChildIterator := SheetSymbol.SchIterator_Create;
        If ChildIterator <> Nil Then
        Begin
            ChildIterator.AddFilter_ObjectSet(MkSet(eSheetEntry));
            Try
                SheetEntry := ChildIterator.FirstSchObject;
                While SheetEntry <> Nil Do
                Begin
                    EntriesNames := SheetEntry.Name + #13 + EntriesNames;
                    SheetEntry := ChildIterator.NextSchObject;
                End;
            Finally
                SheetSymbol.SchIterator_Destroy(ChildIterator);
            End;
        End;
        SheetSymbol := ParentIterator.NextSchObject;
    End;
Finally
    CurrentSheet.SchIterator_Destroy(ParentIterator);
End;

See also
ISch_BasicContainer interface
SchIterator_Create;

Setstate_Default method

(ISch_BasicContainer interface)
Syntax
Procedure Setstate_Default(AUnit : TUnitSystem);
Description
This procedure sets the default unit system for this object.
Example
See also
ISch_BasicContainer interface
TUnitSystem type

SetState_Text method

(ISch_BasicContainer interface)
Syntax
Procedure SetState_Text (AValue : WideString);
Description
This procedure sets the text string for this object.
Example
See also
ISch_BasicContainer interface

ISch_BasicContainer Properties

Container property

(ISch_BasicContainer interface)
Syntax
Property Container : ISch_BasicContainer Read GetState_SchBasicContainer;
Description
This property represents the container within the parent object (such as a document, component or sheet symbol). This property is supported by the GetState_SchBasicContainer method. If the container is empty it implies that this object itself is a standalone or child object.
Example
See also
ISch_BasicContainer interface

ObjectId property

(ISch_BasicContainer interface)
Syntax
Property ObjectId : TObjectId Read GetState_ObjectId;
Description
The ObjectID property determines what object type the object in question is. For example when iterating for objects on a schematic document, you would want to modify all objects but update the port objects' locations only, thus you check for the object's ObjectId and if it is a ePort type, then take action.
DelphiScript Example

AnObject := Iterator.FirstSchObject;
While AnObject <> Nil Do
Begin
    SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_BeginModify, c_NoEventData);
 
    Case AnObject.ObjectId Of
       eWire   : AnObject.Color     := $0000FF; //red color in bgr format
       ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
    End;
 
    SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_EndModify  , c_NoEventData);
    AnObject := Iterator.NextSchObject;
End;

See also
ISch_BasicContainer interface
TObjectID type

OwnerDocument property

(ISch_BasicContainer interface)
Syntax
Property OwnerDocument : ISch_Document Read GetState_OwnerSchDocument;
Description
This property returns the ISch_Document interface that the object is associated with. It is also said that the document owns the object when the Object has a valid OwnerDocument property.
This property is supported by the GetState_OwnerSchDocument method.
Example
See also
ISch_BasicContainer interface
ISch_Document interface

ISch_GraphicalObject Interface

Overview
The ISch_GraphicalObject interface represents the ancestor interface for an object that has graphical properties on a schematic document.

All graphic objects such as arcs, ports, rectangles etc have bounding rectangles of TCoordRect type.

Notes
ISch_BasicContainer interface
                ISch_GraphicalObject interface

The ISch_GraphicalObject interface hierarchy is as follows;

ISch_GraphicalObject methods
GetState_AreaColor
GetState_Color
GetState_CompilationMasked
GetState_Dimmed
GetState_Disabled
GetState_DisplayError
GetState_EnableDraw
GetState_ErrorColor
GetState_ErrorKind
GetState_ErrorString
GetState_LiveHighlightValue
GetState_Location
GetState_OwnerPartDisplayMode
GetState_OwnerPartId
GetState_Selection
SetState_AreaColor
SetState_Color
SetState_CompilationMasked
SetState_Dimmed
SetState_Disabled
SetState_DisplayError
SetState_EnableDraw
SetState_ErrorColor
SetState_ErrorKind
SetState_ErrorString
SetState_LiveHighlightValue
SetState_Location
SetState_OwnerPartDisplayMode
SetState_OwnerPartId
SetState_Selection
AddErrorString
BoundingRectangle
BoundingRectangle_Full
GraphicallyInvalidate
Mirror
MoveByXY
MoveToXY
ResetErrorFields
RotateBy90
SetState_xSizeySize
ISch_GraphicalObject properties
AreaColor
Color
CompilationMasked
Dimmed
Disabled
DisplayError
EnableDraw
ErrorColor
ErrorKind
ErrorString
LiveHighlightValue
Location
OwnerPartDisplayMode
OwnerPartId
Selection

ISch_GraphicalObject Methods

AddErrorString method

(ISch_GraphicalObject interface)
Syntax
Procedure AddErrorString(Const AErrorString : WideString; AtEnd : LongBool);
Description
This procedure adds an error string to the string whether it is at end or not.
Example
See also
ISch_GraphicalObject interface

GetState_AreaColor method

(ISch_GraphicalObject interface)
Syntax
Function GetState_AreaColor : TColor;
Description
The AreaColor property denotes the filled color region of a closed object. The AreaColor value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
This method obtains the color for the area color of an object and is used in the AreaColor property.
Example

Case AnObject.ObjectId Of
    eWire   : AnObject.Color     := $0000FF; //red color in bgr format
    ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
End;

See also
ISch_GraphicalObject interface
TColor type

GetState_Color method

(ISch_GraphicalObject interface)
Syntax
Function GetState_Color : TColor;
Description
The Color property denotes the color region of a closed object which is usually the border. The Color value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
This method obtains the color for the color of the boundary of an object and is used in the Color property.
Example

Case AnObject.ObjectId Of
    eWire   : AnObject.Color     := $0000FF; //red color in bgr format
    ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
End;

See also
ISch_GraphicalObject interface
TColor type

GetState_CompilationMasked method

(ISch_GraphicalObject interface)
Syntax
Function GetState_CompilationMasked : Boolean;
Description
The CompilationMasked property determines whether the object is masked by the Compiler. The CompileMask object can be placed on a group of objects on the schematic sheet, and these objects have their CompilationMasked property set to true.
This method obtains the boolean value whether the CompilationMasked is true or not and is used in the CompilationMasked property.
Example
See also
ISch_GraphicalObject interface

GetState_Dimmed method

(ISch_GraphicalObject interface)
Syntax
Function GetState_Dimmed : Boolean;
Description
This Dimmed property is true when this object is not part of the filter mechanism (by the Filter panel for example). When objects are found by the Filter mechanism, they stay as is (Dimmed is false), and the objects that are not found are dimmed (Dimmed is true).
This procedure gets the boolean value of the Dimmed property and is this method used in the Dimmed property.
Example
See also
ISch_GraphicalObject interface

GetState_Disabled method

(ISch_GraphicalObject interface)
Syntax
Function GetState_Disabled : Boolean;
Description
This Disabled property is true when this object is not part of the filter mechanism (by the Filter panel for example). When objects are found by the Filter mechanism, they stay as is (Disabled is false), and the objects that are not found are disabled (Disabled is true).
Example
See also
ISch_GraphicalObject interface

GetState_DisplayError method

(ISch_GraphicalObject interface)
Syntax
Function GetState_DisplayError : Boolean;
Description
This property determines whether the DisplayError is displayed or not. When true, the red squiggly line underneath the graphical object appears when it is subject to a compilation error in Altium Designer.
This procedure gets the boolean value for the DisplayError property and is used in the DisplayError property.
Example
See also
ISch_GraphicalObject interface

GetState_EnableDraw method

(ISch_GraphicalObject interface)
Syntax
Function GetState_EnableDraw : Boolean;
Description
This property merely determines whether the object can be drawn on the screen or not. This procedure gets the value for the EnableDraw property and is used as a getter for the EnableDraw property.
Example
See also
ISch_GraphicalObject interface

GetState_ErrorColor method

(ISch_GraphicalObject interface)
Syntax
Function GetState_ErrorColor : TColor;
Description
The ErrorColor property determines the error color value that the object is associated with. The Color value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
The function sets the color for the ErrorColor property and is also used as a setter function in the ErrorColor property.
Example
See also
ISch_GraphicalObject interface

GetState_ErrorKind method

(ISch_GraphicalObject interface)
Syntax
Function GetState_ErrorKind : TErrorKind;
Description
This property determines the error kind that the object is associated with, when it is subject to the Compiler in Altium Designer. This procedure is used for the ErrorKind property.
Example
See also
ISch_GraphicalObject interface

GetState_ErrorString method

(ISch_GraphicalObject interface)
Syntax
Function GetState_ErrorString : WideString;
Description
This property returns the Error string that the object is associated with when it is subject to the Compiler in Altium Designer.
This procedure is used for the ErrorString property.
Example
See also
ISch_GraphicalObject interface

GetState_LiveHighlightValue method

(ISch_GraphicalObject interface)
Syntax
Function GetState_LiveHighlightValue : WideString;
Description
This property toggles the highlight value (text string) of the object when it is subject to the probe process in Altium Designer during the Live Design mode. This method is used for the LiveHighlightValue property.
Example
See also
ISch_GraphicalObject interface

GetState_Location method

(ISch_GraphicalObject interface)
Syntax
Function GetState_Location : TLocation;
Description
The Location property defines the reference point of the object (not necessarily the center of the object). Use the BoundingRectangle and BoundingRectangle_Full methods to determine the bounding regions of the object.
This procedure retrieves the location or the reference point of the object. This method is used for the Location property.
Example
See also
ISch_GraphicalObject interface
TLocation type

GetState_OwnerPartDisplayMode method

(ISch_GraphicalObject interface)
Syntax
Function GetState_OwnerPartDisplayMode : TDisplayMode;
Description
This property represents schematic components in various graphical representations only. A schematic component can have up to 255 different graphical representations and a component can be composed of different parts that make up the whole. A child object is part of the parent object and thus the child object's owner part display mode fetches the parent's (in this case the component) part display mode.
This procedure gets the owner display mode (one of the existing modes only) for the component.
Example
See also
ISch_GraphicalObject interface

GetState_OwnerPartId method

(ISch_GraphicalObject interface)
Syntax
Function GetState_OwnerPartId : Integer;
Description
The OwnerPartId property determines the child object's parent object's part id. A component can be composed of multiple parts. Each part is composed of schematic primitives and thus each primitive associated with the part can be queried for its OwnerPartId property. The owner of the child object is the parent object.
This procedure gets the OwnerPartId from the object as part of the component object.
Example
See also
ISch_GraphicalObject interface

GetState_Selection method

(ISch_GraphicalObject interface)
Syntax
Function GetState_Selection : Boolean;
Description
This property determines whether the object is selected or not. When an object is selected, a crossed line boundary appears around the object. This object can then be moved or edited graphically.
This method can define the selection state of the object and is used for the Selection property.
Example
See also
ISch_GraphicalObject interface

SetState_AreaColor method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_AreaColor (AColor : TColor);
Description
The AreaColor property denotes the filled color region of a closed object. The AreaColor value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
This method defines the color for the area color of an object and is used in the AreaColor property.
Example

Case AnObject.ObjectId Of
    eWire   : AnObject.Color     := $0000FF; //red color in bgr format
    ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
End;

See also
ISch_GraphicalObject interface
TColor type

SetState_Color method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_Color (AColor : TColor);
Description
The Color property denotes the color region of a closed object which is usually the border. The Color value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
This method defines the color for the color of the boundary of an object and is used in the Color property.
Example

Case AnObject.ObjectId Of
    eWire   : AnObject.Color     := $0000FF; //red color in bgr format
    ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
End;

See also
ISch_GraphicalObject interface
TColor type

SetState_CompilationMasked method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_CompilationMasked (AValue : Boolean);
Description
The CompilationMasked property determines whether the object is masked by the Compiler. The CompileMask object can be placed on a group of objects on the schematic sheet, and these objects have their CompilationMasked property set to true.
This method sets the CompilationMasked to true or not and is used in the CompilationMasked property.
Example
See also
ISch_GraphicalObject interface

SetState_Dimmed method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_Dimmed (B : Boolean);
Description
This Dimmed property is true when a parent object is not part of the navigation mechanism (Navigator panel). When objects are found by the Navigation mechanism, they stay as is (Dimmed is false), and the objects that are not part of the Navigation are dimmed (Dimmed is true).
This procedure sets the boolean value of the Dimmed property and is this method used in the Dimmed property.
Example
See also
ISch_GraphicalObject interface

SetState_Disabled method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_Disabled (B : Boolean);
Description
This Disabled property is true when this object is not part of the filter mechanism (by the Filter panel for example). When objects are found by the Filter mechanism, they stay as is (Disabled is false), and the objects that are not found are disabled (Disabled is true).
Example
See also
ISch_GraphicalObject interface

SetState_DisplayError method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_DisplayError (AValue : Boolean);
Description
This property determines whether the DisplayError is displayed or not. When true, the red squiggly line underneath the graphical object appears when it is subject to a compilation error in Altium Designer.
This procedure sets the boolean value for the DisplayError property and is used in the DisplayError property.
Example
See also
ISch_GraphicalObject interface

SetState_EnableDraw method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_EnableDraw (B : Boolean);
Description
This property merely determines whether the object can be drawn on the screen or not. This procedure sets the value for the EnableDraw property and is used as a setter for the EnableDraw property.
Example
See also
ISch_GraphicalObject interface

SetState_ErrorColor method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_ErrorColor (AValue : TColor);
Description
The ErrorColor property determines the error color value that the object is associated with.
The Color value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
This procedure obtains the color of the error and this procedure is used as a getter method for the ErrorColor property.
Example
See also
ISch_GraphicalObject interface

SetState_ErrorKind method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_ErrorKind (AValue : TErrorKind);
Description
This property determines the error kind that the object is associated with, when it is subject to the Compiler in Altium Designer. This procedure is used for the ErrorKind property.
Example
See also
ISch_GraphicalObject interface

SetState_ErrorString method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_ErrorString (Const AValue : WideString);
Description
This property returns the Error string that the object is associated with when it is subject to the Compiler in Altium Designer.
This procedure is used for the ErrorString property.
Example
See also
ISch_GraphicalObject interface

SetState_LiveHighlightValue method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_LiveHighlightValue (AValue : WideString);
Description
This property toggles the highlight value (text string) of the object when it is subject to the probe process in Altium Designer during the Live Design mode. This method is used for the LiveHighlightValue property.
Example
See also
ISch_GraphicalObject interface

SetState_Location method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_Location (ALocation : TLocation);
Description
The Location property defines the reference point of the object (not necessarily the center of the object). Use the BoundingRectangle and BoundingRectangle_Full methods to determine the bounding regions of the object.
This procedure sets the location or the reference point of the object. This method is used for the Location property.
Example
See also
ISch_GraphicalObject interface

SetState_OwnerPartDisplayMode method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_OwnerPartDisplayMode (AValue : TDisplayMode);
Description
This property represents schematic components in various graphical representations only. A schematic component can have up to 255 different graphical representations and a component can be composed of different parts that make up the whole. A child object is part of the parent object and thus the child object's owner part display mode fetches the parent's (in this case the component) part display mode.
This procedure sets the display mode (one of the existing modes only) for the component.
Example
See also
ISch_GraphicalObject interface
ISch_Component interface

SetState_OwnerPartId method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_OwnerPartId (AValue : Integer);
Description
The OwnerPartId property determines the child object's parent object's part id. A component can be composed of multiple parts. Each part is composed of schematic primitives and thus each primitive associated with the part can be queried for its OwnerPartId property. The owner of the child object is the parent object.
This procedure sets the OwnerPartId for the object as part of the component object.
Example
See also
ISch_GraphicalObject interface

SetState_Selection method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_Selection (B : Boolean);
Description
This property determines whether the object is selected or not. When an object is selected, a crossed line boundary appears around the object. This object can then be moved or edited graphically.
This method can define the selection state of the object and is used for the Selection property.
Example
See also
ISch_GraphicalObject interface

SetState_xSizeySize method

(ISch_GraphicalObject interface)
Syntax
Procedure SetState_xSizeySize;
Description
This method sets the X size and the ySize of the graphical bounds of the object.
Example
See also
ISch_GraphicalObject interface

BoundingRectangle method

(ISch_GraphicalObject interface)
Syntax
Function BoundingRectangle : TCoordRect;
Description
This function returns the coordinates of the bounds of the parent object itself (not including the children objects if any). To determine the full bounding rectangle of the object (including the children object), invoke the BoundingRectangle_Full method instead.
For example a Schematic component would typically have a rectangle as the outline, the pins and parameters as the children objects.
Example
See also
ISch_GraphicalObject interface
BoundingRectangle_Full method
TCoordRect type

BoundingRectangle_Full method

(ISch_GraphicalObject interface)
Syntax
Function BoundingRectangle_Full : TCoordRect;
Description
This function returns the coordinates of the bounds of the parent object itself and including the children objects if any.. To determine the bounding rectangle of the parent object (excluding the children object), invoke the BoundingRectangle  method instead.
For example a Schematic component would typically have a rectangle as the outline, the pins and parameters as the children objects.
Example
See also
ISch_GraphicalObject interface
BoundingRectangle method
TCoordRect type

GraphicallyInvalidate method

(ISch_GraphicalObject interface)
Syntax
Procedure GraphicallyInvalidate;
Description
This procedure when invoked invalidates the object graphically prompting the system to do a system re-draw to refresh the screen.
Example
See also
ISch_GraphicalObject interface

Mirror method

(ISch_GraphicalObject interface)
Syntax
Procedure Mirror (Axis : TLocation);
Description
The Mirror method flips the object across the axis (TLocaiton Type)
Example
See also
ISch_GraphicalObject interface
ISch_Label interface
ISch_Component interface
TLocation Type

MoveByXY method

(ISch_GraphicalObject interface)
Syntax
Procedure MoveByXY (x,y : TCoord);
Description
This MoveByXY procedure moves the object in a linear distance specified by the X,Y coordinates relative to the reference point of the object.
Example

// Add rectangle and pin objects to the component object.
Component.AddSchObject(Rect);
Component.AddSchObject(Pin);
 
// Add the new component to the schematic document.
SchDoc.AddSchObject(Component);
Component.Comment.IsHidden := True;
Component.Designator.IsHidden := True;
 
// Move component by 1,1 inch in respect to document's origin.
Component.MoveByXY(InchesToCoord(1), InchesToCoord(1));

See also
ISch_GraphicalObject interface
TCoord type
UndoRedo script example in \Examples\Scripts\DelphiScript Scripts\Sch folder.

MoveToXY method

(ISch_GraphicalObject interface)
Syntax
Procedure MoveToXY (x,y : TCoord);
Description
This MoveToXY procedure moves the object to a new location specified by the X,Y coordinates.
Example

// Add rectangle and pin objects to the component object.
Component.AddSchObject(Rect);
Component.AddSchObject(Pin);
 
// Add the new component to the schematic document.
SchDoc.AddSchObject(Component);
Component.Comment.IsHidden := True;
Component.Designator.IsHidden := True;
 
// Move component to 1,1 inch in respect to document's origin.
Component.MoveToXY(InchesToCoord(1), InchesToCoord(1));

See also
ISch_GraphicalObject interface
TCoord type
UndoRedo script example in \Examples\Scripts\DelphiScript Scripts\Sch folder.

ResetErrorFields method

(ISch_GraphicalObject interface)
Syntax
Procedure ResetErrorFields;
Description
This procedure resets the error fields of the object.
Example
See also
ISch_GraphicalObject interface

RotateBy90 method

(ISch_GraphicalObject interface)
Syntax
Procedure RotateBy90(Center : TLocation; A : TRotationBy90);
Description
The RotateBy90 procedure forces the rotation of the object by its center or a defined location on the schematic sheet and the rotation is done in 90 degree increments (0, 90, 180, 270).
Example
See also
ISch_GraphicalObject interface
TLocation type
TRotationBy90 type

ISch_GraphicalObject Properties

AreaColor property

(ISch_GraphicalObject interface)
Syntax
Property AreaColor : TColor Read GetState_AreaColor Write SetState_AreaColor;
Description
The AreaColor property denotes the filled color region of a closed object. The AreaColor value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
This property is supported by the GetState_AreaColor and SetState_AreaColor methods.
Example

Case AnObject.ObjectId Of
    eWire   : AnObject.Color     := $0000FF; //red color in bgr format
    ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
End;

See also
ISch_GraphicalObject interface
ISch_Port interface
ISch_Pie interface
ISch_Rectangle interface
ISch_RoundRectangle interface
ISch_TextFrame interface

Color property

(ISch_GraphicalObject interface)
Syntax
Property Color : TColor Read GetState_Color Write SetState_Color;
Description
The Color property denotes the color region of a closed object which is usually the border outline. The Color value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
The Color property is supported by the GetState_Color and SetState_Color methods.
Notes
The color format is in blue,green,red (b,g,r) primary color format and each primary color has a value of 0 to 255.
Example

Case AnObject.ObjectId Of
    eWire   : AnObject.Color     := $0000FF; //red color in bgr format
    ePort   : AnObject.AreaColor := $00FF00; //green color in bgr format
End;

See also
ISch_GraphicalObject interface
TColor type

CompilationMasked property

(ISch_GraphicalObject interface)
Syntax
Property CompilationMasked : Boolean Read GetState_CompilationMasked Write SetState_CompilationMasked;
Description
The CompilationMasked property determines whether the object is masked by the Compiler. The CompileMask object can be placed on a group of objects on the schematic sheet, and these objects have their CompilationMasked property set to true.
This property is supported by the GetState_CompilationMasked and SetState_CompilationMasked methods.
Example
See also
ISch_GraphicalObject interface

Dimmed property

(ISch_GraphicalObject interface)
Syntax
Property Dimmed : Boolean Read GetState_Dimmed Write SetState_Dimmed;
Description
This Dimmed property is true when a parent object is not part of the navigation mechanism (Navigator panel). When objects are found by the Navigation mechanism, they stay as is (Dimmed is false), and the objects that are not part of the Navigation are dimmed (Dimmed is true).
This property is supported by the GetState_Dimmed and SetState_Dimmed methods.
Notes
The Disabled / Dimmed states of a parent object (say a component), all its children (pins, lines, etc...) will be also set to this state. Thus when the Disabled/Dimmed property of a child object is being queried, the Disabled/Dimmed state of the parent object will be returned.
Example
See also
ISch_GraphicalObject interface

Disabled property

(ISch_GraphicalObject interface)
Syntax
Property Disabled : Boolean Read GetState_Disabled Write SetState_Disabled;
Description
The Disabled property determines whether the object is disabled (due to not being part of the collected objects by the filter mechanism ie the Filter panel)
Notes
The Disabled / Dimmed states of a parent object (say a component), all its children (pins, lines, etc...) will be also set to this state. Thus when the Disabled/Dimmed property of a child object is being queried, the Disabled/Dimmed state of the parent object will be returned.
Example
See also
ISch_GraphicalObject interface

DisplayError property

(ISch_GraphicalObject interface)
Syntax
Property DisplayError : Boolean Read GetState_DisplayError Write SetState_DisplayError;
Description
This property determines whether the DisplayError is displayed or not. When true, the red squiggly line underneath the graphical object appears when it is subject to a compilation error in Altium Designer.
This property is supported by the GetState_DisplayError and SetState_DisplayError methods.
Example
See also
ISch_GraphicalObject interface

EnableDraw property

(ISch_GraphicalObject interface)
Syntax
Property EnableDraw : Boolean Read GetState_EnableDraw Write SetState_EnableDraw;
Description
This property merely determines whether the object can be drawn on the screen or not. This property is supported by the GetState_EnableDraw and SetState_EnableDraw methods.
Example
See also
ISch_GraphicalObject interface

ErrorColor property

(ISch_GraphicalObject interface)
Syntax
Property ErrorColor : TColor Read GetState_ErrorColor Write SetState_ErrorColor;
Description
The ErrorColor property determines the error color value that the object is associated with.
The Color value is defined as a TColor type from the Borland Delphi's Graphics Unit and has a color range from $00000000 (black) to $00FFFFFF (white).
The Color property is supported by the GetState_ErrorColor and SetState_ErrorColor methods.
Example
See also
ISch_GraphicalObject interface

ErrorKind property

(ISch_GraphicalObject interface)
Syntax
Property ErrorKind : TErrorKind Read GetState_ErrorKind Write SetState_ErrorKind;
Description
This property determines the error kind that the object is associated with, when it is subject to the Compiler in Altium Designer. This property is supported by the GetState_ErrorKind and the SetState_ErrorKind methods.
Example
See also
ISch_GraphicalObject interface
TErrorKind type from Workspace Manager API

ErrorString property

(ISch_GraphicalObject interface)
Syntax
Property ErrorString : WideString Read GetState_ErrorString Write SetState_ErrorString;
Description
This property returns the Error string that the object is associated with when it is subject to the Compiler in Altium Designer. This property is supported by the GetState_ErrorString and SetState_ErrorString methods.
Example
See also
ISch_GraphicalObject interface

LiveHighlightValue property

(ISch_GraphicalObject interface)
Syntax
Property LiveHighlightValue : WideString Read GetState_LiveHighlightValue Write SetState_LiveHighlightValue;
Description
This property toggles the highlight value (text string) of the object when it is subject to the probe process in Altium Designer during the Live Design mode. This property is supported by the GetState_LiveHighlightValue and SetState_LIveHighlightValue methods.
Example
See also
ISch_GraphicalObject interface

Location property

(ISch_GraphicalObject interface)
Syntax
Property Location : TLocation Read GetState_Location Write SetState_Location;
Description
The Location property defines the reference point of the object (not necessarily the center of the object). Use the BoundingRectangle and BoundingRectangle_Full methods to determine the bounding regions of the object.
This property is supported by the GetState_Location and SetState_Location methods.
Example
See also
ISch_GraphicalObject interface
BoundingRectangle method
BoundingRectangle_Full method
TLocation type

OwnerPartDisplayMode property

(ISch_GraphicalObject interface)
Syntax
Property OwnerPartDisplayMode : TDisplayMode Read GetState_OwnerPartDisplayMode Write SetState_OwnerPartDisplayMode;
Description
This property represents schematic components in various graphical representations only. A schematic component can have up to 255 different graphical representations and a component can be composed of different parts that make up the whole. A child object is part of the parent object and thus the child object's owner part display mode fetches the parent's (in this case the component) part display mode.
This property is supported by the GetState_OwnerPartDisplayMode and SetState_OwnerPartDisplayMode methods.
Example
See also
ISch_GraphicalObject interface
ISch_Component interface
TDisplayMode type (byte type) from Workspace Manager API

OwnerPartId property

(ISch_GraphicalObject interface)
Syntax
Property OwnerPartId : Integer Read GetState_OwnerPartId Write SetState_OwnerPartId;
Description
The OwnerPartId property determines the child object's parent object's part id. A component can be composed of multiple parts. Each part is composed of schematic primitives and thus each primitive associated with the part can be queried for its OwnerPartId property. The owner of the child object is the parent object. This property is supported by the GetState_OwnerPartId and SetState_OwnerPartId methods.
Example
See also
ISch_GraphicalObject interface

Selection property

(ISch_GraphicalObject interface)
Syntax
Property Selection : Boolean Read GetState_Selection Write SetState_Selection;
Description
This property determines whether the object is selected or not. When an object is selected, a crossed line boundary appears around the object. This object can then be moved or edited graphically.
This property is supported by the GetState_Selection and SetState_Selection methods.
Example
See also
ISch_GraphicalObject interface

ISch_RobotManager Interface

Overview
The ISch_RobotManager interface represents an object that can send Schematic messages into the Schematic Editor server from a script to update the sub-systems such as the Undo system.
Notes
Part of ISch_ServerInterface object interface
MessageID table
SCHM_NullMessage             = 0;
SCHM_PrimitiveRegistration   = 1;
SCHM_BeginModify             = 2;
SCHM_EndModify               = 3;
SCHM_YieldToRobots           = 4;
SCHM_CancelModify            = 5;
SCHM_Create                  = 6;
SCHM_Destroy                 = 7;
SCHM_ProcessStart            = 8;
SCHM_ProcessEnd              = 9;
SCHM_ProcessCancel           = 10;
SCHM_CycleEnd                = 11;
SCHM_CycleStart              = 12;
SCHM_SystemInvalid           = 13;
SCHM_SystemValid             = 14;
Message types table
c_BroadCast     = Nil;
c_NoEventData   = Nil;
c_FromSystem    = Nil;
 
The ISch_RobotManager interface hierarchy is as follows;

ISch_RobotManager methods
SendMessage
ISch_RobotManager properties

See also
ISch_ServerInterface interface

SendMessage method

(ISch_RobotManager interface)
Syntax
Procedure SendMessage(Source,Destination : Pointer; MessageID : Word; MessageData : Pointer);
Description
The SendMessage method sends a message into Schematic Editor notifying that the data structures need to be updated and synchronized. It could be an object being modified, added or deleted from the schematic document.

Normally when an object is being modified:

  • The Source parameter, the current sheet's I_ObjectAddress value.
  • The Destination parameter has the c_Broadcast value
  • The MessageID parameter has the SchM_PrimitiveRegistration value
  • The MessageData parameter has the new object's I_ObjectAddress value.

Normally when a new object is being added:

  • The Source parameter, the I_ObjectAddress of an object needs to be invoked.
  • The Destination parameter has the c_Broadcast value
  • The MessageID parameter has the SchM_BeginModify and SchM_EndModify values.
  • The MessageData parameter has the c_noEventData value

Normally when an object is being removed:

  • The Source parameter, the current sheet's I_ObjectAddress value.
  • The Destination parameter normally has the c_Broadcast value
  • The MessageID parameter has the SchM_PrimitiveRegistration value.
  • The MessageData parameter has the deleted object's I_ObjectAddress value.

DelphiScript example of an object being modified

// Initialize the robots in Schematic editor.
SchServer.ProcessControl.PreProcess(Doc, '');
Iterator        := Doc.SchIterator_Create;
Iterator.AddFilter_ObjectSet(MkSet(ePort, eWire));
If Iterator = Nil Then Exit;
Try
    AnObject := Iterator.FirstSchObject;
    While AnObject <> Nil Do
    Begin
        Case AnObject.ObjectId Of
        SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_BeginModify, c_NoEventData);
           eWire   : AnObject.Color     := $0000FF; //red color in bgr format
        SchServer.RobotManager.SendMessage(AnObject.I_ObjectAddress, c_BroadCast, SCHM_EndModify  , c_NoEventData);
        End;
        AnObject := Iterator.NextSchObject;
    End;
Finally
    Doc.SchIterator_Destroy(Iterator);
End;
// Clean up the robots in Schematic editor
SchServer.ProcessControl.PostProcess(Doc, '');

DelphiScript example of an object being removed

Try
    Port := Iterator.FirstSchObject;
    While Port <> Nil Do
    Begin
        OldPort := Port;
        Port    := Iterator.NextSchObject;
        CurrentSheet.RemoveSchObject(OldPort);
        
        SchServer.RobotManager.SendMessage
                               (CurrentSheet.I_ObjectAddress,
                                c_BroadCast,
                                SCHM_PrimitiveRegistration,
                                OldPort.I_ObjectAddress);
     End;
Finally
     CurrentSheet.SchIterator_Destroy(Iterator);
End;

See also
ISch_RobotManager interface

ISch_ServerInterface Interface

Overview
This interface is an entry interface to the schematic server loaded in Altium Designer. You can fetch the Preferences, Robot Manager (for sending messages into the schematic system), the font manager for managing fonts on a schematic document. You can also create or delete schematic design objects from this interface.

The Sch_Server function in the Rt_Schematic unit (which is embedded in the scripting engine) returns the ISch_ServerInterface interface.

The ISch_ServerInterface as the composite interface has the following aggregate object interfaces:

Example

    // 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;

Notes
Note that these IServerModule interfaces represent loaded servers in Altium Designer. This application manages single instances of different server modules. Each server can have multiple server document kinds, for example the Schematic server supports two server document kinds – SCH and SCHLIB design documents. A loaded server typically hosts documents and each document in turn hosts a document view and panel views. Thus a Schematic Editor server also has the IServerModule interface along with the ISch_ServerInterface interface.

Invoke the SchServer function to obtain the ISch_ServerInterface object interface which represents the Schematic Editor server.

ISch_ServerInterface methods
GetState_SchPreferences
GetState_RobotManager
GetState_FontManager
GetState_ProbesTimerEnabled
SetState_ProbesTimerEnabled
GetState_JunctionConvertSettings
GetSchDocumentByPath
GetCurrentSchDocument
SchObjectFactory
LoadComponentFromLibrary
LoadComponentFromDatabaseLibrary
DestroySchObject
ReportSchObjectsDifferences
CreateLibCompInfoReader
DestroyCompInfoReader
CreateComponentPainter
CreateComponentMetafilePainter
CreateDocumentPainter
UpdateSignalValueDisplay
ISch_ServerInterface properties
Preferences
RobotManager
FontManager
JunctionConvertSettings
ProbesTimerEnabled

Example
See also
Sch_Server function
ISch_Preferences interface
ISch_RobotManager interface
ISch_FontManager interface
ILibCompInfoReader interface
IServerModule interface

ISch_ServerInterface Methods

CreateComponentMetafilePainter method

(ISch_ServerInterface interface)
Syntax
Function CreateComponentMetafilePainter : IComponentMetafilePainter;
Description
Example
See also
ISch_ServerInterface interface
IComponentMetafilePainter interface

CreateComponentPainter method

(ISch_ServerInterface interface)
Syntax
Function CreateComponentPainter : IComponentPainterView;
Description
A IComponentPainterView interface represents the surface that a component can be painted on.
This interface is a IExternalForm type which represents the TExternalFormComponent object. The TExternalForm class is defined in the ExternalForm unit from the DXP Run Time Library.
Notes
This IComponentPainterView interface is not supported in the scripting system.
This IComponentPainterView interface is for server development purposes and you need to have RT_IntegratedLIbrary, RT_Schematic, ExternalForms and the RT_ClientServerINterfaces units in a server project.
Example
See also
ISch_ServerInterface interface
IComponentPainterView interface

CreateDocumentPainter method

(ISch_ServerInterface interface)
Syntax
Function CreateDocumentPainter : IDocumentPainterView;
Description
This function retrieves the IDocumentPainterView interface that represents the Mini Viewer object in the Schematic Editor.
Example
See also
ISch_ServerInterface interface
IDocumentPainterView interface

CreateLibCompInfoReader method

(ISch_ServerInterface interface)
Syntax
Function CreateLibCompInfoReader (ALibFileName : WideString) : ILibCompInfoReader;
Description
The function returns a ILibCompInfoReader interface that represents a library component information reader object.
Invoke the CreateLibCompInfoReader function with the path to a schematic library and to obtain the number of components in this library, invoke the ILibCompInfoReader.NumComponentsInfos method and then to obtain the information for each component in this library invoke the ComponentInfos[] method. When you are done, invoke the DestroyCompInfoReader method.
DelphiScript Example

Procedure LibraryCompInfoReader;
Var
    CurrentLib     : ISch_Lib;
    ALibCompReader : ILibCompInfoReader;
    CompInfo       : IComponentInfo;
    FileName       : String;
    CompNum, J     : Integer;
    ReportInfo     : TStringList;
    Document       : IServerDocument;
Begin
    If SchServer = Nil Then Exit;
    CurrentLib := SchServer.GetCurrentSchDocument;
    If CurrentLib = Nil Then Exit;
    // CHeck if CurrentLib is a Library document or not
    If CurrentLib.ObjectID <> eSchLib Then
    Begin
         ShowError('Please open schematic library.');
         Exit;
    End;
    FileName := CurrentLib.DocumentName;
    // Set up Library Component Reader object.
    ALibCompReader := SchServer.CreateLibCompInfoReader(FileName);
    If ALibCompReader = Nil Then Exit;
    ALibCompReader.ReadAllComponentInfo;
    ReportInfo := TStringList.Create;
    // Obtain the number of components in the specified sch library.
    CompNum := ALibCompReader.NumComponentInfos;
    // Go thru each component obtained by the LibCompReader interface.
    For J := 0 To CompNum - 1 Do
    Begin
        ReportInfo.Add(FileName);
        CompInfo := ALibCompReader.ComponentInfos[J];
        ReportInfo.Add(' Name : '         + CompInfo.CompName);
        ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
        ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
        ReportInfo.Add('  Description : ' + CompInfo.Description);
        ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
        ReportInfo.Add('');
    End;
    SchServer.DestroyCompInfoReader(ALibCompReader);
 
    ReportInfo.Add('');
    ReportInfo.Insert(0,'Schematic Libraries and Their Components Report');
    ReportInfo.Insert(1,'-----------------------------------------------');
    ReportInfo.Insert(2,'');
    ReportInfo.SaveToFile('C:\SchLibCompReport.txt');
    // Open and display the Component data in DXP.
    If Client = Nil Then Exit;
    Document := Client.OpenDocument('Text','c:\SchLibCompReport.txt');
    If Document <> Nil Then
        Client.ShowDocument(Document);
    ReportInfo.Free;
End;

See also
ISch_ServerInterface interface
ILibCompInfoReader interface

DestroyCompInfoReader method

(ISch_ServerInterface interface)
Syntax
Procedure DestroyCompInfoReader (Var ALibCompReader : ILibCompInfoReader);
Description
The function destroys an library component information reader object that is represented by the ILibCompInfoReader interface.
Example
See also
ISch_ServerInterface interface
CreateLibCompInfoReader method
ILibCompInfoReader interface

GetCurrentSchDocument method

(ISch_ServerInterface interface)
Syntax
Function GetCurrentSchDocument : ISch_Document;
Description
This function returns the ISch_Document interface that represents the current schematic document open in Altium Designer.
Example
See also
ISch_ServerInterface interface
ISch_Document interface

GetSchDocumentByPath method

(ISch_ServerInterface interface)
Syntax
Function GetSchDocumentByPath(APath : WideString) : ISch_Document;
Description
Example
See also
ISch_ServerInterface interface

GetState_FontManager method

(ISch_ServerInterface interface)
Syntax
Function GetState_FontManager : ISch_FontManager;
Description
This function retrieves the ISch_Font interface which represents the Font Manager object in the Schematic Editor.
Example
See also
ISch_ServerInterface interface
ISch_Font interface

GetState_JunctionConvertSettings method

(ISch_ServerInterface interface)
Syntax
Function GetState_JunctionConvertSettings : ISch_JunctionConvertSettings;
Description
The JunctionConvertSettings property represents a crossing of wiring on a schematic sheet. When an addition of a wire would create a four-way junction, this is converted to into two adjacent three way junctions. If it is disabled and when a four way junction is created, the two wires crossing at the intersection are not joined electrically and if the Display Cross Overs option is enabled, a cross over is shown on this intersection.
This property is supported by the GetState_JunctionConvertSettings method.
Example
See also
ISch_ServerInterface interface

GetState_ProbesTimerEnabled method

(ISch_ServerInterface interface)
Syntax
Function GetState_ProbesTimerEnabled : Boolean;
Description
The ProbesTimerEnabled property determines whether the Probes are active or not. This feature is used in the LiveDesign process in Altium Designer.
This property is supported by the GetState_ProbesTimerEnabled and SetState_ProbesTimerEnabled methods.
Example
See also
ISch_ServerInterface interface

GetState_RobotManager method

(ISch_ServerInterface interface)
Syntax
Function GetState_RobotManager : ISch_RobotManager;
Description
The RobotManager property returns the ISch_RobotManager interface. This interface deals with sending Schematic notification messages in the system. To have the ability to send a specific message when a specific event in the Schematic Editor occurs can be achieved with the ISch_RobotManager interface.
This property is supported by the GetState_RobotManager method.
Example
See also
ISch_ServerInterface interface

GetState_SchPreferences method

(ISch_ServerInterface interface)
Syntax
Function GetState_SchPreferences : ISch_Preferences;
Description
The Preferences property retrieves the ISch_Preferences interface which represents the Preferences object for the Schematic Editor.
This read only property is supported by the GetState_SchPreference method.
Example
See also
ISch_ServerInterface interface

LoadComponentFromLibrary method

(ISch_ServerInterface interface)
Syntax
Function LoadComponentFromLibrary(ALibReference : WideString;ALibraryName : WideString) : ISch_Component;
Description
Example
See also
ISch_ServerInterface interface

LoadComponentFromDatabaseLibrary method

(ISch_ServerInterface interface)
Syntax
Function  LoadComponentFromDatabaseLibrary(ALibraryName       : WideString;
                                           ADatabaseTableName : WideString;
                                           ADatabaseKeys      : WideString) : ISch_Component;
Description
Example
See also
ISch_ServerInterface interface

ReportSchObjectsDifferences method

(ISch_ServerInterface interface)
Syntax
Function ReportSchObjectsDifferences(Const AObject1, AObject2 : ISch_BasicContainer;AIgnoreSpatialAttributes : Boolean;ADiffDescription : PChar) : Integer;
Description
Example
See also
ISch_ServerInterface interface

SchObjectFactory method

(ISch_ServerInterface interface)
Syntax
Function SchObjectFactory(AObjectId : TObjectId;ACreationMode : TObjectCreationMode) : ISch_BasicContainer;
Description
The SchObjectFactory function creates a new object based on TObjectID and TObjectCreationMode values.
When you wish to create a new design object with the ISch_ServerInterface’s SchObjectFactory method, you will need to have a specific design object type, assign this object with new attribute values and register this object with in the schematic document with the ISch_Document’s RegisterSchObjectInContainer method.
Example

Var
    SchPort     : ISch_Port;
    FSchDoc     : ISch_Document;
    CurView     : IServerDocumentView;
Begin
    // Check if Schematic server exists or not.
    If SchServer = Nil Then Exit;
 
    // Obtain the Schematid sheet interfac.e
    FSchDoc := SchServer.GetCurrentSchDocument;
    If FSchDoc = Nil Then Exit;
 
    // Create a new port object
    SchPort := SchServer.SchObjectFactory(ePort,eCreate_GlobalCopy);
    If SchPort = Nil Then Exit;
 
    // Set up parameters for the port object.
    // the port is placed at 500,500 mils respectively.
    SchPort.Location  := Point(MilsToCoord(500),MilsToCoord(500));
    SchPort.Style     := ePortRight;
    SchPort.IOType    := ePortBidirectional;
    SchPort.Alignment := eHorizontalCentreAlign;
 
    SchPort.Width     := MilsToCoord(1000);
 
    SchPort.AreaColor := 0;
    SchPort.TextColor := $FFFFFF;
    SchPort.Name      := 'A new port with no net.';
 
    // Add a port object onto the existing schematic document
    FSchDoc.RegisterSchObjectInContainer(SchPort);
 
    // Refresh the schematic sheet.
    FSchDoc.GraphicallyInvalidate;
End;

See also
ISch_ServerInterface interface
TObjectCreationMode type

DestroySchObject method

(ISch_ServerInterface interface)
Syntax
Procedure DestroySchObject(Var ASchObject : ISch_BasicContainer);
Description
Example
See also
ISch_ServerInterface interface

SetState_ProbesTimerEnabled method

(ISch_ServerInterface interface)
Syntax
Procedure SetState_ProbesTimerEnabled(AValue : Boolean);
Description
The ProbesTimerEnabled property determines whether the Probes are active or not. This feature is used in the LiveDesign process in Altium Designer.
This property is supported by the GetState_ProbesTimerEnabled and SetState_ProbesTimerEnabled methods.
Example
See also
ISch_ServerInterface interface

UpdateSignalValueDisplay method

(ISch_ServerInterface interface)
Syntax
Function UpdateSignalValueDisplay(DMObject : IDMObject; Value : Integer; BitIndex : Integer) : LongBool;
Description
Example
See also
ISch_ServerInterface interface

ISch_ServerInterface Properties

FontManager property

(ISch_ServerInterface interface)
Syntax
Property FontManager : ISch_FontManager Read GetState_FontManager;
Description
This property retrieves the Font manager object which is represented by the ISch_FontManager interface. The property is supported by the GetState_FontManager method.
Example
See also
ISch_Font interface
ISch_FontManager2 interface
ISch_ServerInterface interface

JunctionConvertSettings property

(ISch_ServerInterface interface)
Syntax
Property JunctionConvertSettings : ISch_JunctionConvertSettings Read GetState_JunctionConvertSettings;
Description
The JunctionConvertSettings property represents a crossing of wiring on a schematic sheet. When an addition of a wire would create a four-way junction, this is converted to into two adjacent three way junctions. If it is disabled and when a four way junction is created, the two wires crossing at the intersection are not joined electrically and if the Display Cross Overs option is enabled, a cross over is shown on this intersection.
This property is supported by the GetState_JunctionConvertSettings method.
Example
See also
ISch_ServerInterface interface
ISch_JunctionConvertSettings interface

Preferences property

(ISch_ServerInterface interface)
Syntax
Property Preferences : ISch_Preferences Read GetState_SchPreferences;
Description
This Preferences property retrieves the ISch_Preferences interface which represents the Preferences object for the Schematic Editor. This read only property is supported by the GetState_SchPreference method.
Example

Preferences := SchServer.Preferences;
Preferences.WatermarkDeviceSheet.True;
Preferences.WatermarkReadOnlySheet := True;

See also
ISch_Preferences interface
ISch_ServerInterface interface

ProbesTimerEnabled property

(ISch_ServerInterface interface)
Syntax
Property ProbesTimerEnabled : Boolean Read GetState_ProbesTimerEnabled Write SetState_ProbesTimerEnabled;
Description
The ProbesTimerEnabled property determines whether the Probes are active or not. This feature is used in the LiveDesign process in Altium Designer.
This property is supported by the GetState_ProbesTimerEnabled and SetState_ProbesTimerEnabled methods.
Example
See also
ISch_ServerInterface interface

RobotManager property

(ISch_ServerInterface interface)
Syntax
Property RobotManager : ISch_RobotManager Read GetState_RobotManager;
Description
This property returns the ISch_RobotManager interface. This interface deals with sending Schematic notification messages in the system. To have the ability to send a specific message when a specific event in the Schematic Editor occurs can be achieved with the ISch_RobotManager interface.
This property is supported by the GetState_RobotManager method.
DelphiScript Example

SchPort := SchServer.SchObjectFactory(ePort,eCreate_GlobalCopy);
If SchPort = Nil Then Exit;
SchPort.Location  := Point(MilsToCoord(2500),MilsToCoord(2500));
SchPort.Style     := ePortRight;
SchPort.IOType    := ePortBidirectional;
SchPort.Alignment := eHorizontalCentreAlign;
SchPort.Width     := MilsToCoord(500);
SchPort.AreaColor := 0;
SchPort.TextColor := $FF00FF;
SchPort.Name      := 'New Port 4';
 
// 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);

See also
ISch_ServerInterface interface
ISch_RobotManager interface

ISch_Preferences Interface

Overview
The ISch_Preferences interface represents the global preferences for the Schematic Editor and the settings are the same for any PCB project that has schematics in Altium Designer.

The ISch_ServerInterface interface represents the Schematic Editor and this interface has an ISch_Preferences aggregate object interface.

ISch_Preferences Methods and Properties Table

ISch_Preferences methods
Import_FromUser
Get_SelectionColor
Get_MultiSelectionColor
Get_ResizeColor
Get_TranslateRotateColor
Get_VisibleGridColor
Get_VisibleGridStyle
Get_GraphicsCursorStyle
Get_OrcadFootPrint
Get_SnapToCenter
Get_UseOrcadPortWidth
Get_AutoBackupTime
Get_AutoBackupFileCount
Get_SelectionReference
Get_UndoRedoStackSize
Get_ConvertSpecialStrings
Get_MaintainOrthogonal
Get_DisplayPrinterFonts
Get_AutoZoom
Get_HotSpotGridDistance
Get_SnapToHotSpot
Get_OptimizePolylines
Get_ComponentsCutWires
Get_AddTemplateToClipBoard
Get_AutoPanStyle
Get_AutoPanJumpDistance
Get_AutoPanShiftJumpDistance
Get_PinNameMargin
Get_PinNumberMargin
Get_DefaultPrimsPermanent
Get_IgnoreSelection
Get_ClickClearsSelection
Get_DoubleClickRunsInspector
Get_MultiPartNamingMethod
Get_Sensitivity
Get_SingleSlashNegation
Get_RunInPlaceEditing
Get_DefaultPowerGndName
Get_DefaultSignalGndName
Get_DefaultEarthName
Get_DefaultTemplateFileName
Get_BufferedPainting
Get_Metafile_NoERCMarkers
Get_Metafile_ParameterSets
Get_Metafile_Probes
Get_DocumentScope
Get_LibraryScope
Get_ConfirmSelectionMemoryClear
Get_LastModelType
Get_StringIncA
Get_StringIncB
Get_MarkManualParameters
Get_CtrlDbleClickGoesDown
Get_SheetStyle_XSize
Get_SheetStyle_YSize
Get_SheetStyle_XZones
Get_SheetStyle_YZones
Get_SheetStyle_MarginWidth
Get_PolylineCutterMode
Get_CutterGridSizeMultiple
Get_CutterFixedLength
Get_ShowCutterBoxMode
Get_ShowCutterMarkersMode
Get_ViolationDisplayByLevel
Get_ViolationColorByLevel
Get_AlwaysDrag
Get_DocMenuID
Get_LibMenuID
Get_DefaultSheetStyle
Get_WireAutoJunctionsColor
Get_ManualJunctionsColor
Get_BusAutoJunctionsColor
Get_DefaultUnit
Get_DefaultUnitSystem
Set_SelectionColor
Set_MultiSelectionColor
Set_ResizeColor
Set_TranslateRotateColor
Set_VisibleGridColor
Set_VisibleGridStyle
Set_GraphicsCursorStyle
Set_OrcadFootPrint
Set_SnapToCenter
Set_UseOrcadPortWidth
Set_AutoBackupTime
Set_AutoBackupFileCount
Set_SelectionReference
Set_UndoRedoStackSize
Set_ConvertSpecialStrings
Set_MaintainOrthogonal
Set_DisplayPrinterFonts
Set_AutoZoom
Set_HotSpotGridDistance
Set_SnapToHotSpot
Set_OptimizePolylines
Set_ComponentsCutWires
Set_AddTemplateToClipBoard
Set_AutoPanStyle
Set_AutoPanJumpDistance
Set_AutoPanShiftJumpDistance
Set_PinNameMargin
Set_PinNumberMargin
Set_DefaultPrimsPermanent
Set_IgnoreSelection
Set_ClickClearsSelection
Set_DoubleClickRunsInspector
Set_MultiPartNamingMethod
Set_Sensitivity
Set_SingleSlashNegation
Set_RunInPlaceEditing
Set_DefaultPowerGndName
Set_DefaultSignalGndName
Set_DefaultEarthName
Set_DefaultTemplateFileName
Set_BufferedPainting
Set_Metafile_NoERCMarkers
Set_Metafile_ParameterSets
Set_Metafile_Probes
Set_DocumentScope
Set_LibraryScope
Set_ConfirmSelectionMemoryClear
Set_LastModelType
Set_StringIncA
Set_StringIncB
Set_MarkManualParameters
Set_CtrlDbleClickGoesDown
Set_PolylineCutterMode
Set_CutterGridSizeMultiple
Set_CutterFixedLength
Set_ShowCutterBoxMode
Set_ShowCutterMarkersMode
Set_ViolationDisplayByLevel
Set_ViolationColorByLevel
Set_AlwaysDrag
Set_DocMenuID
Set_LibMenuID
Set_DefaultSheetStyle
Set_WireAutoJunctionsColor
Set_ManualJunctionsColor
Set_BusAutoJunctionsColor
Set_DefaultUnit
GridPresetsCount
GridPresetAt
ISch_Preferences properties
SelectionColor
MultiSelectionColor
ResizeColor
TranslateRotateColor
VisibleGridColor
VisibleGridStyle
GraphicsCursorStyle
OrcadFootPrint
SnapToCenter
UseOrcadPortWidth
AutoBackupTime
AutoBackupFileCount
SelectionReference
UndoRedoStackSize
ConvertSpecialStrings
MaintainOrthogonal
DisplayPrinterFonts
AutoZoom
HotSpotGridDistance
SnapToHotSpot
OptimizePolylines
ComponentsCutWires
AddTemplateToClipBoard
AutoPanStyle
AutoPanJumpDistance
AutoPanShiftJumpDistance
PinNameMargin
PinNumberMargin
DefaultPrimsPermanent
IgnoreSelection
ClickClearsSelection
DoubleClickRunsInspector
MultiPartNamingMethod
Sensitivity
SingleSlashNegation
RunInPlaceEditing
DefaultPowerGndName
DefaultSignalGndName
DefaultEarthName
DefaultTemplateFileName
BufferedPainting
Metafile_NoERCMarkers
Metafile_ParameterSets
Metafile_Probes
DocumentScope
LibraryScope
ConfirmSelectionMemoryClear
LastModelType
StringIncA
StringIncB
MarkManualParameters
CtrlDbleClickGoesDown
SheetStyle_XSize
SheetStyle_YSize
SheetStyle_XZones
SheetStyle_YZones
SheetStyle_MarginWidth
PolylineCutterMode
CutterGridSizeMultiple
CutterFixedLength
ShowCutterBoxMode
ShowCutterMarkersMode
ViolationDisplay
ViolationColor
AlwaysDrag
DocMenuID
LibMenuID
DefaultSheetStyle
WireAutoJunctionsColor
ManualJunctionsColor
BusAutoJunctionsColor
DefaultDisplayUnit
DefaultUnitSystem

See also
ISch_ServerInterface interface
ISch_Document interface

ISch_Preferences Methods

Get_AddTemplateToClipBoard method

(ISch_Preferences interface)
Syntax
Function Get_AddTemplateToClipBoard : Boolean;
Description
The Get_AddTemplateToClipBoard function when true, adds the current sheet template to the clipboard when you copy or cut from the current schematic sheet.
Example
AddTemp := Prefs.Get_AddTemplateToClipBoard;
See also
ISch_Preferences interface

Get_AlwaysDrag method

(ISch_Preferences interface)
Syntax
Function Get_AlwaysDrag : Boolean;
Description
The Get_AlwaysDrag function returns true if you can drag a group of objects on a schematic document and the electrical wiring stay connected. Note, to keep the connections clean while dragging, press the spacebar to cycle through the different corner modes in Altium Designer.
The function returns false if if wiring are left alone and become disconnected when previously connected objects are being dragged.
Example
AlwaysDrag := Prefs.Get_AlwaysDrag;
See also
ISch_Preferences interface

Get_AutoPanJumpDistance method

(ISch_Preferences interface)
Syntax
Function Get_AutoPanJumpDistance : TCoord;
Description
The Get_AutoPanJumpDistance function gets the size of each auto-panning step. The step size determines how fast the document pans when auto-panning is enabled. The smaller the value, the slower or finer the auto-panning movement.
Example
PanJumpDist := CoordToDxps(Prefs.Get_AutoPanJumpDistance);
See also
ISch_Preferences interface

Get_AutoPanShiftJumpDistance method

(ISch_Preferences interface)
Syntax
Function Get_AutoPanShiftJumpDistance : TCoord;
Description
The Get_AutoPanShiftJumpDistance function returns a value of TCoord type which determines the size of each step when the SHIFT key is held during auto-panning in Altium Designer. The shift step size determines how fast the document pans when auto-panning is enabled and the SHIFT key is pressed. The smaller the value, the slower or finer the auto-panning movement.
Example
JumpDist := Prefs.GetAutoPanShiftJumpDistance;
See also
ISch_Preferences interface

Get_AutoPanStyle method

(ISch_Preferences interface)
Syntax
Function Get_AutoPanStyle : TAutoPanStyle;
Description
Example
See also
ISch_Preferences interface

Get_AutoZoom method

(ISch_Preferences interface)
Syntax
Function Get_AutoZoom : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_BufferedPainting method

(ISch_Preferences interface)
Syntax
Function Get_BufferedPainting : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_BusAutoJunctionsColor method

(ISch_Preferences interface)
Syntax
Function Get_BusAutoJunctionsColor : TColor;
Description
Example
See also
ISch_Preferences interface

Get_ClickClearsSelection method

(ISch_Preferences interface)
Syntax
Function Get_ClickClearsSelection : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_ComponentsCutWires method

(ISch_Preferences interface)
Syntax
Function Get_ComponentsCutWires : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_ConfirmSelectionMemoryClear method

(ISch_Preferences interface)
Syntax
Function Get_ConfirmSelectionMemoryClear : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_ConvertSpecialStrings method

(ISch_Preferences interface)
Syntax
Function Get_ConvertSpecialStrings : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_CtrlDbleClickGoesDown method

(ISch_Preferences interface)
Syntax
Function Get_CtrlDbleClickGoesDown : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_CutterFixedLength method

(ISch_Preferences interface)
Syntax
Function Get_CutterFixedLength : TCoord;
Description
Example
See also
ISch_Preferences interface

Get_CutterGridSizeMultiple method

(ISch_Preferences interface)
Syntax
Function Get_CutterGridSizeMultiple : Integer;
Description
Example
See also
ISch_Preferences interface

Get_DefaultEarthName method

(ISch_Preferences interface)
Syntax
Function Get_DefaultEarthName : WideString;
Description
The DefaultEarthName property denotes the default signal ground name to be used for objects on the schematic document. The default name is EARTH.
The Get_DefaultEarthName function retrieves the earth name string.
Example
See also
ISch_Preferences interface

Get_DefaultPowerGndName method

(ISch_Preferences interface)
Syntax
Function Get_DefaultPowerGndName : WideString;
Description
The DefaultPowerGndName property denotes the default power ground name to be used for objects on the schematic document. The default name is GND.
The Get_DefaultPowerGndName function retrieves the power ground name string.
Example
See also
ISch_Preferences interface

Get_DefaultPrimsPermanent method

(ISch_Preferences interface)
Syntax
Function Get_DefaultPrimsPermanent : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_DefaultSheetStyle method

(ISch_Preferences interface)
Syntax
Function Get_DefaultSheetStyle : TSheetStyle;
Description
Example
See also
ISch_Preferences interface

Get_DefaultSignalGndName method

(ISch_Preferences interface)
Syntax
Function Get_DefaultSignalGndName : WideString;
Description
The DefaultSignalGndName property denotes the default signal ground name to be used for objects on the schematic document. The default name is SGND.
The Get_DefaultSignalGndName function retrieves the signal ground name string.
Example
See also
ISch_Preferences interface

Get_DefaultTemplateFileName method

(ISch_Preferences interface)
Syntax
Function Get_DefaultTemplateFileName : WideString;
Description
Example
See also
ISch_Preferences interface

Get_DefaultUnit method

(ISch_Preferences interface)
Syntax
Function Get_DefaultUnit : TUnit;
Description
Example
See also
ISch_Preferences interface

Get_DefaultUnitSystem method

(ISch_Preferences interface)
Syntax
Function Get_DefaultUnitSystem : TUnitSystem;
Description
Example
See also
ISch_Preferences interface

Get_DisplayPrinterFonts method

(ISch_Preferences interface)
Syntax
Function Get_DisplayPrinterFonts : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_DocMenuID method

(ISch_Preferences interface)
Syntax
Function Get_DocMenuID : Widestring;
Description
The DocMenuID property determines which pop up menu to pop up depending on whether it is a schematic or a library document. The property returns a widestring format which can be either PUSCHMENU or PUSCHLIBMENU strings and they correspond to the entries in the Schematic Editor's resources file (ADVSCH.RCS file).
Example
See also
ISch_Preferences interface

Get_DocumentScope method

(ISch_Preferences interface)
Syntax
Function Get_DocumentScope : TChosenDocumentScope;
Description
The DocumentScope property determines the scope for filtering and selection to be applied to the current document or to any open document in Altium Designer. The Get_DocumentScope method sets the Chosen Document scope.
Example
See also
ISch_Preferences interface

Get_DoubleClickRunsInspector method

(ISch_Preferences interface)
Syntax
Function Get_DoubleClickRunsInspector : Boolean;
Description
This method represents the option to bring up the Inspector dialog instead of the design object's properties dialog when you double click on a design object.
Invoke this function to check if design object's properties dialog is invoked (False) or the Inspector dialog (True) when you double click on a design object.
Example
See also
ISch_Preferences interface

Get_GraphicsCursorStyle method

(ISch_Preferences interface)
Syntax
Function Get_GraphicsCursorStyle : TCursorShape;
Description
Example
See also
ISch_Preferences interface

Get_HotSpotGridDistance method

(ISch_Preferences interface)
Syntax
Function Get_HotSpotGridDistance : Integer;
Description
Example
See also
ISch_Preferences interface

Get_IgnoreSelection method

(ISch_Preferences interface)
Syntax
Function Get_IgnoreSelection : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_LastModelType method

(ISch_Preferences interface)
Syntax
Function Get_LastModelType : WideString;
Description
Example
See also
ISch_Preferences interface

Get_LibMenuID method

(ISch_Preferences interface)
Syntax
Function Get_LibMenuID : Widestring;
Description
Example
See also
ISch_Preferences interface

Get_LibraryScope method

(ISch_Preferences interface)
Syntax
Function Get_LibraryScope : TLibraryScope;
Description
Example
See also
ISch_Preferences interface

Get_MaintainOrthogonal method

(ISch_Preferences interface)
Syntax
Function Get_MaintainOrthogonal : Boolean;
Description
The MaintainOrthogonal property if set to true then when you drag components, any wiring that is dragged with the component is kept orthogonal (i.e. corners at 90 degrees). If this option is disabled, wiring dragged with a component will be repositioned obliquely.
This method gets the property true or false and is used in the MaintainOrthogonal property.
Example
See also
ISch_Preferences interface

Get_ManualJunctionsColor method

(ISch_Preferences interface)
Syntax
Function Get_ManualJunctionsColor : TColor;
Description
Example
See also
ISch_Preferences interface

Get_MarkManualParameters method

(ISch_Preferences interface)
Syntax
Function Get_MarkManualParameters : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_Metafile_NoERCMarkers method

(ISch_Preferences interface)
Syntax
Function Get_Metafile_NoERCMarkers : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_Metafile_ParameterSets method

(ISch_Preferences interface)
Syntax
Function Get_Metafile_ParameterSets : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_MetaFile_Probes method

(ISch_Preferences interface)
Syntax
Function Get_Metafile_Probes : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_MultiPartNamingMethod method

(ISch_Preferences interface)
Syntax
Function Get_MultiPartNamingMethod : Integer;
Description
Example
See also
ISch_Preferences interface

Get_MultiSelectionColor method

(ISch_Preferences interface)
Syntax
Function Get_MultiSelectionColor : TColor;
Description
Example
See also
ISch_Preferences interface

Get_OptimizePolylines method

(ISch_Preferences interface)
Syntax
Function Get_OptimizePolylines : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_OrcadFootPrint method

(ISch_Preferences interface)
Syntax
Function Get_OrcadFootPrint : TOrcadFootPrint;
Description
Example
See also
ISch_Preferences interface

Get_PinNameMargin method

(ISch_Preferences interface)
Syntax
Function Get_PinNameMargin : Integer;
Description
Example
See also
ISch_Preferences interface

Get_PinNumberMargin method

(ISch_Preferences interface)
Syntax
Function Get_PinNumberMargin : Integer;
Description
Example
See also
ISch_Preferences interface

Get_PolylineCutterMode method

(ISch_Preferences interface)
Syntax
Function Get_PolylineCutterMode : TPolylineCutterMode;
Description
Example
See also
ISch_Preferences interface

Get_ResizeColor method

(ISch_Preferences interface)
Syntax
Function Get_ResizeColor : TColor;
Description
Example
See also
ISch_Preferences interface

Get_RunInPlaceEditing method

(ISch_Preferences interface)
Syntax
Function Get_RunInPlaceEditing : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_SelectionColor method

(ISch_Preferences interface)
Syntax
Function Get_SelectionColor : TColor;
Description
Example
See also
ISch_Preferences interface

Get_SelectionReference method

(ISch_Preferences interface)
Syntax
Function Get_SelectionReference : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_Sensitivity method

(ISch_Preferences interface)
Syntax
Function Get_Sensitivity : Integer;
Description
Example
See also
ISch_Preferences interface

Get_SheetStyle_MarginWidth method

(ISch_Preferences interface)
Syntax
Function Get_SheetStyle_MarginWidth (S : TSheetStyle) : TCoord;
Description
Example
See also
ISch_Preferences interface

Get_SheetStyle_XSize method

(ISch_Preferences interface)
Syntax
Function Get_SheetStyle_XSize (S : TSheetStyle) : TCoord;
Description
Example
See also
ISch_Preferences interface

Get_SheetStyle_XZones method

(ISch_Preferences interface)
Syntax
Function Get_SheetStyle_XZones (S : TSheetStyle) : TCoord;
Description
Example
See also
ISch_Preferences interface

Get_SheetStyle_YSize method

(ISch_Preferences interface)
Syntax
Function Get_SheetStyle_YSize (S : TSheetStyle) : TCoord;
Description
Example
See also
ISch_Preferences interface

Get_SheetStyle_YZones method

(ISch_Preferences interface)
Syntax
Function Get_SheetStyle_YZones (S : TSheetStyle) : TCoord;
Description
Example
See also
ISch_Preferences interface

Get_ShowCutterBoxMode method

(ISch_Preferences interface)
Syntax
Function Get_ShowCutterBoxMode : TShowCutterBoxMode;
Description
Example
See also
ISch_Preferences interface

Get_ShowCutterMarkersMode method

(ISch_Preferences interface)
Syntax
Function Get_ShowCutterMarkersMode : TShowCutterMarkersMode;
Description
Example
See also
ISch_Preferences interface

Get_SingleSlashNegation method

(ISch_Preferences interface)
Syntax
Function Get_SingleSlashNegation : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_SnapToCenter method

(ISch_Preferences interface)
Syntax
Function Get_SnapToCenter : Boolean;
Description
This property represents the action where you hold the object being moved or dragged by its reference point (for objects that have one, such as library components or ports), or its center (for objects which do not have a reference point such as a rectangle).
This function returns a boolean value whether the you can snap to the center of a object or not before being moved or dragged by its reference point.
Example
See also
ISch_Preferences interface

Get_SnapToHotSpot method

(ISch_Preferences interface)
Syntax
Function Get_SnapToHotSpot : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_StringIncA method

(ISch_Preferences interface)
Syntax
Function Get_StringIncA : WideString;
Description
Example
See also
ISch_Preferences interface

Get_StringIncB method

(ISch_Preferences interface)
Syntax
Function Get_StringIncB : WideString;
Description
Example
See also
ISch_Preferences interface

Get_TranslateRotateColor method

(ISch_Preferences interface)
Syntax
Function Get_TranslateRotateColor : TColor;
Description
Example
See also
ISch_Preferences interface

Get_UndoRedoStackSize method

(ISch_Preferences interface)
Syntax
Function Get_UndoRedoStackSize : Integer;
Description
Example
See also
ISch_Preferences interface

Get_UseOrcadPortWidth method

(ISch_Preferences interface)
Syntax
Function Get_UseOrcadPortWidth : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_ViolationColorByLevel method

(ISch_Preferences interface)
Syntax
Function Get_ViolationColorByLevel (ALevel : TErrorLevel) : TColor;
Description
Example
See also
ISch_Preferences interface

Get_ViolationDisplayByLevel method

(ISch_Preferences interface)
Syntax
Function Get_ViolationDisplayByLevel (ALevel : TErrorLevel) : Boolean;
Description
Example
See also
ISch_Preferences interface

Get_VisibleGridColor method

(ISch_Preferences interface)
Syntax
Function Get_VisibleGridColor : TColor;
Description
Example
See also
ISch_Preferences interface

Get_VisibleGridStyle method

(ISch_Preferences interface)
Syntax
Function Get_VisibleGridStyle : TVisibleGrid;
Description
Example
See also
ISch_Preferences interface

Get_WireAutoJunctionsColor method

(ISch_Preferences interface)
Syntax
Function Get_WireAutoJunctionsColor : TColor;
Description
Example
See also
ISch_Preferences interface

GridPresetsCount method

(ISch_Preferences interface)
Syntax
Function GridPresetsCount(AUnit : TUnitSystem) : Integer;
Description
Example
See also
ISch_Preferences interface

GridPresetAt method

(ISch_Preferences interface)
Syntax
Function GridPresetAt (AUnit : TUnitSystem; AnIndex : Integer) : IGridSetting;
Description
Example
See also
ISch_Preferences interface

Set_AddTemplateToClipBoard method

(ISch_Preferences interface)
Syntax
Procedure Set_AddTemplateToClipBoard (AValue : Boolean);
Description
The Set_AddTemplateToClipBoard procedure adds the current sheet template to the clipboard when you copy or cut from the current schematic sheet if the True value is passed in as a parameter. Otherwise the template is not copied ot the clipboard when the value is False.
Example
Prefs.Set_AddTemplateToClipBoard(True);
See also
ISch_Preferences interface

Set_AlwaysDrag method

(ISch_Preferences interface)
Syntax
Procedure Set_AlwaysDrag (AValue : Boolean);
Description
The Set_AlwaysDrag procedure if set true you can drag a group of objects on a schematic document and the electrical wiring stay connected. Note, to keep the connections clean while dragging, press the spacebar to cycle through the different corner modes in Altium Designer. Set a false value to leave wiring alone and become disconnected when previously connected objects are being dragged.
Example
Prefs.Set_AlwaysDrag(True);
See also
ISch_Preferences interface

Set_AutoBackupFileCount method

(ISch_Preferences interface)
Syntax
Procedure Set_AutoBackupFileCount (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_AutoBackupTime method

(ISch_Preferences interface)
Syntax
Procedure Set_AutoBackupTime (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_AutoPanJumpDistance method

(ISch_Preferences interface)
Syntax
Procedure Set_AutoPanJumpDistance (AValue : TCoord);
Description
The Set_AutoPanJumpDistance function sets the size of each auto-panning step with a TCoord value. The step size determines how fast the document pans when auto-panning is enabled. The smaller the value, the slower or finer the auto-panning movement.
Example
Prefs.Set_AutoPanJumpDistance(CoordToDxps(Value));
See also
ISch_Preferences interface

Set_AutoPanShiftJumpDistance method

(ISch_Preferences interface)
Syntax
Procedure Set_AutoPanShiftJumpDistance (AValue : TCoord);
Description
The Set_AutoPanShiftJumpDistance sets a value of TCoord type which determines the size of each step when the SHIFT key is held during auto-panning in Altium Designer. The shift step size determines how fast the document pans when auto-panning is enabled and the SHIFT key is pressed. The smaller the value, the slower or finer the auto-panning movement.
Example
Prefs.Set_AutoPanShiftJumpDistance(DxpsToCoord(100));
See also
ISch_Preferences interface

Set_AutoPanStyle method

(ISch_Preferences interface)
Syntax
Procedure Set_AutoPanStyle (AValue : TAutoPanStyle);
Description
Example
See also
ISch_Preferences interface

Set_AutoZoom method

(ISch_Preferences interface)
Syntax
Procedure Set_AutoZoom (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_BufferedPainting method

(ISch_Preferences interface)
Syntax
Procedure Set_BufferedPainting (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_BusAutoJunctionsColor method

(ISch_Preferences interface)
Syntax
Procedure Set_BusAutoJunctionsColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_ClickClearsSelection method

(ISch_Preferences interface)
Syntax
Procedure Set_ClickClearsSelection (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_ComponentsCutWires method

(ISch_Preferences interface)
Syntax
Procedure Set_ComponentsCutWires (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_ConfirmSelectionMemoryClear method

(ISch_Preferences interface)
Syntax
Procedure Set_ConfirmSelectionMemoryClear (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_ConvertSpecialStrings method

(ISch_Preferences interface)
Syntax
Procedure Set_ConvertSpecialStrings (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_CtrlDbleClickGoesDown method

(ISch_Preferences interface)
Syntax
Procedure Set_CtrlDbleClickGoesDown (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_CutterFixedLength method

(ISch_Preferences interface)
Syntax
Procedure Set_CutterFixedLength (AValue : TCoord);
Description
Example
See also
ISch_Preferences interface

Set_CutterGridSizeMultiple method

(ISch_Preferences interface)
Syntax
Procedure Set_CutterGridSizeMultiple (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_DefaultEarthName method

(ISch_Preferences interface)
Syntax
Procedure Set_DefaultEarthName (AValue : WideString);
Description
Example
See also
ISch_Preferences interface

Set_DefaultPowerGndName method

(ISch_Preferences interface)
Syntax
Procedure Set_DefaultPowerGndName (AValue : WideString);
Description
Example
See also
ISch_Preferences interface

Set_DefaultPrimsPermanent method

(ISch_Preferences interface)
Syntax
Procedure Set_DefaultPrimsPermanent (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_DefaultSheetStyle method

(ISch_Preferences interface)
Syntax
Procedure Set_DefaultSheetStyle (AValue : TSheetStyle);
Description
Example
See also
ISch_Preferences interface

Set_DefaultSignalGndName method

(ISch_Preferences interface)
Syntax
Procedure Set_DefaultSignalGndName (AValue : WideString);
Description
Example
See also
ISch_Preferences interface

Set_DefaultTemplateFileName method

(ISch_Preferences interface)
Syntax
Procedure Set_DefaultTemplateFileName (AValue : WideString);
Description
Example
See also
ISch_Preferences interface

Set_DefaultUnit method

(ISch_Preferences interface)
Syntax
Procedure Set_DefaultUnit (AValue : TUnit);
Description
Example
See also
ISch_Preferences interface

Set_DisplayPrinterFonts method

(ISch_Preferences interface)
Syntax
Procedure Set_DisplayPrinterFonts (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_DocMenuID method

(ISch_Preferences interface)
Syntax
Procedure Set_DocMenuID (Const AValue : Widestring);
Description
The DocMenuID property determines which pop up menu to pop up depending on whether it is a schematic or a library document. The property returns a widestring format which can be either PUSCHMENU or PUSCHLIBMENU strings and they correspond to the entries in the Schematic Editor's resources file (ADVSCH.RCS file).
The procedure sets the new Document Menu ID value.
Example
See also
ISch_Preferences interface

Set_DocumentScope method

(ISch_Preferences interface)
Syntax
Procedure Set_DocumentScope (AValue : TChosenDocumentScope);
Description
The DocumentScope property determines the scope for filtering and selection to be applied to the current document or to any open document in Altium Designer. The Set_DocumentScope method sets the Chosen Document scope.
Example
See also
ISch_Preferences interface

Set_DoubleClickRunsInspector method

(ISch_Preferences interface)
Syntax
Procedure Set_DoubleClickRunsInspector (AValue : Boolean);
Description
This method represents the option to bring up the Inspector dialog instead of the design object's properties dialog when you double click on a design object.
Assign false to this AValue parameter to disable this option if you want to see the design object's properties dialog when you double click on a design object.
Example
See also
ISch_Preferences interface

Set_GraphicsCursorStyle method

(ISch_Preferences interface)
Syntax
Procedure Set_GraphicsCursorStyle (AValue : TCursorShape);
Description
Example
See also
ISch_Preferences interface

Set_HotSpotGridDistance method

(ISch_Preferences interface)
Syntax
Procedure Set_HotSpotGridDistance (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_IgnoreSelection method

(ISch_Preferences interface)
Syntax
Procedure Set_IgnoreSelection (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_LastModelType method

(ISch_Preferences interface)
Syntax
Procedure Set_LastModelType (AValue : WideString);
Description
Example
See also
ISch_Preferences interface

Set_LibMenuID method

(ISch_Preferences interface)
Syntax
Procedure Set_LibMenuID (Const AValue : Widestring);
Description
Example
See also
ISch_Preferences interface

Set_LibraryScope method

(ISch_Preferences interface)
Syntax
Procedure Set_LibraryScope (AValue : TLibraryScope);
Description
Example
See also
ISch_Preferences interface

Set_MaintainOrthogonal method

(ISch_Preferences interface)
Syntax
Procedure Set_MaintainOrthogonal (AValue : Boolean);
Description
The MaintainOrthogonal property if set to true then when you drag components, any wiring that is dragged with the component is kept orthogonal (i.e. corners at 90 degrees). If this option is disabled, wiring dragged with a component will be repositioned obliquely.
This method sets the property true or false and is used in the MaintainOrthogonal property.
Example
See also
ISch_Preferences interface

Set_ManualJunctionsColor method

(ISch_Preferences interface)
Syntax
Procedure Set_ManualJunctionsColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_MarkManualParameters method

(ISch_Preferences interface)
Syntax
Procedure Set_MarkManualParameters (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_Metafile_NoERCMarkers method

(ISch_Preferences interface)
Syntax
Procedure Set_Metafile_NoERCMarkers (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_Metafile_ParameterSets method

(ISch_Preferences interface)
Syntax
Procedure Set_Metafile_ParameterSets (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_MetaFile_Probes method

(ISch_Preferences interface)
Syntax
Procedure Set_Metafile_Probes(AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_MultiPartNamingMethod method

(ISch_Preferences interface)
Syntax
Procedure Set_MultiPartNamingMethod (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_MultiSelectionColor method

(ISch_Preferences interface)
Syntax
Procedure Set_MultiSelectionColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_OptimizePolylines method

(ISch_Preferences interface)
Syntax
Procedure Set_OptimizePolylines (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_OrcadFootPrint method

(ISch_Preferences interface)
Syntax
Procedure Set_OrcadFootPrint (AValue : TOrcadFootPrint);
Description
Example
See also
ISch_Preferences interface

Set_PinNameMargin method

(ISch_Preferences interface)
Syntax
Procedure Set_PinNameMargin (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_PinNumberMargin method

(ISch_Preferences interface)
Syntax
Procedure Set_PinNumberMargin (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_PolylineCutterMode method

(ISch_Preferences interface)
Syntax
Procedure Set_PolylineCutterMode (AValue : TPolylineCutterMode);
Description
Example
See also
ISch_Preferences interface

Set_ResizeColor method

(ISch_Preferences interface)
Syntax
Procedure Set_ResizeColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_RunInPlaceEditing method

(ISch_Preferences interface)
Syntax
Procedure Set_RunInPlaceEditing (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_SelectionColor method

(ISch_Preferences interface)
Syntax
Procedure Set_SelectionColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_SelectionReference method

(ISch_Preferences interface)
Syntax
Procedure Set_SelectionReference (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_Sensitivity method

(ISch_Preferences interface)
Syntax
Procedure Set_Sensitivity (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_ShowCutterBoxMode method

(ISch_Preferences interface)
Syntax
Procedure Set_ShowCutterBoxMode (AValue : TShowCutterBoxMode);
Description
Example
See also
ISch_Preferences interface

Set_ShowCutterMarkersMode method

(ISch_Preferences interface)
Syntax
Procedure Set_ShowCutterMarkersMode (AValue : TShowCutterMarkersMode);
Description
Example
See also
ISch_Preferences interface

Set_SingleSlashNegation method

(ISch_Preferences interface)
Syntax
Procedure Set_SingleSlashNegation (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_SnapToCenter method

(ISch_Preferences interface)
Syntax
Procedure Set_SnapToCenter (AValue : Boolean);
Description
This SnapToCenter property represents the action where you hold the object being moved or dragged by its reference point (for objects that have one, such as library components or ports), or its center (for objects which do not have a reference point such as a rectangle).
The procedure sets whether you can snap to center of the objects or not.
Example
See also
ISch_Preferences interface

Set_SnapToHotSpot method

(ISch_Preferences interface)
Syntax
Procedure Set_SnapToHotSpot (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_StringIncA method

(ISch_Preferences interface)
Syntax
Procedure Set_StringIncA (AValue : WideString);
Description
The Set_StringIncA method represents a value to auto-increment on pin designators of a component when you are placing pins for a component. This is used for building components in the Library editor.  Normally you would use a positive increment value for pin designators and negative increment value for pin names. Eg  1, 2,3  for pin designators and D8, D7, D6 for pin names. Thus Primary = 1 and Secondary = -1 and set Display Name to D8 and Designator to 1 in the Pin Properties dialog before you place the first pin.
This method sets the increment value for the pin designators and the StringIncB method sets the increment value for the pin names.
This method is used by the StringIncA property.
Example
See also
ISch_Preferences interface

Set_StringIncB method

(ISch_Preferences interface)
Syntax
Procedure Set_StringIncB (AValue : WideString);
Description
The Set_StringIncB method represents a value to auto-increment on pin designators of a component when you are placing pins for a component. This is used for building components in the Library editor.  Normally you would use a positive increment value for pin designators and negative increment value for pin names. Eg  1, 2,3  for pin designators and D8, D7, D6 for pin names. Thus Primary = 1 and Secondary = -1 and set Display Name to D8 and Designator to 1 in the Pin Properties dialog before you place the first pin.
This method sets the increment value for the pin names and the StringIncA method sets the increment value for the pin designators.
This method is used by the StringIncB property.
Example
See also
ISch_Preferences interface

Set_TranslateRotateColor method

(ISch_Preferences interface)
Syntax
Procedure Set_TranslateRotateColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_UndoRedoStackSize method

(ISch_Preferences interface)
Syntax
Procedure Set_UndoRedoStackSize (AValue : Integer);
Description
Example
See also
ISch_Preferences interface

Set_UseOrcadPortWidth method

(ISch_Preferences interface)
Syntax
Procedure Set_UseOrcadPortWidth (AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_ViolationColorByLevel method

(ISch_Preferences interface)
Syntax
Procedure Set_ViolationColorByLevel (ALevel : TErrorLevel;AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_ViolationDisplayByLevel method

(ISch_Preferences interface)
Syntax
Procedure Set_ViolationDisplayByLevel (ALevel : TErrorLevel;AValue : Boolean);
Description
Example
See also
ISch_Preferences interface

Set_VisibleGridColor method

(ISch_Preferences interface)
Syntax
Procedure Set_VisibleGridColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

Set_VisibleGridStyle method

(ISch_Preferences interface)
Syntax
Procedure Set_VisibleGridStyle (AValue : TVisibleGrid);
Description
Example
See also
ISch_Preferences interface

Set_WireAutoJunctionsColor method

(ISch_Preferences interface)
Syntax
Procedure Set_WireAutoJunctionsColor (AValue : TColor);
Description
Example
See also
ISch_Preferences interface

ISch_Preferences Properties

WireAutoJunctionsColor property

(ISch_Preferences interface)
Syntax
Property WireAutoJunctionsColor : TColor Read Get_WireAutoJunctionsColor Write Set_WireAutoJunctionsColor;
Description
This property determines the color of the auto generated junctions on the schematic document. This property is supported by the GetState_WireAutoJunctionsColor and SetState_WireAutoJunctionsColor methods.
Example
See also
ISch_Preferences interface
TColor type

VisibleGridStyle property

(ISch_Preferences interface)
Syntax
Property VisibleGridStyle : TVisibleGrid Read Get_VisibleGridStyle Write Set_VisibleGridStyle ;
Description
This property determines the lined or dotted style of the visible grid on the schematic document.
Example
See also
ISch_Preferences interface
TVisibleGrid type

VisibleGridColor property

(ISch_Preferences interface)
Syntax
Property VisibleGridColor : TColor Read Get_VisibleGridColor Write Set_VisibleGridColor ;
Description
This property determines the color of the visible grid on schematic sheets.
Example
See also
ISch_Preferences interface
TColor type

ViolationDisplay property

(ISch_Preferences interface)
Syntax
Property ViolationDisplay [L : TErrorLevel] : Boolean Read Get_ViolationDisplayByLevel Write Set_ViolationDisplayByLevel;
Description
This ViolationDisplay property determines the error level for the violation display.
Example
See also
ISch_Preferences interface
TErrorLevel type from Workspace Manager API

ViolationColor property

(ISch_Preferences interface)
Syntax
Property ViolationColor [L : TErrorLevel] : TColor Read Get_ViolationColorByLevel Write Set_ViolationColorByLevel ;
Description
This ViolationColor property determines the color of the violation depending on the error level. This property is supported by the Get_ViolationColorByLevel and Set_ViolationColorByLevel methods.
Example
See also
ISch_Preferences interface
TColor type
TErrorLevel type in Workspace Manager API

UseOrcadPortWidth property

(ISch_Preferences interface)
Syntax
Property UseOrcadPortWidth : Boolean Read Get_UseOrcadPortWidth Write Set_UseOrcadPortWidth;
Description
The UseOrcadPortWidth property determines whether the ports can be re-sized in the Schematic Editor. This is important if the design has to go back to Orcad(TM) (which does not support re-sizing ports).
This property is supported by the Get_UseOrcadPortWidth and Set_UseOrcadPortWidth methods.
Example
See also
ISch_Preferences interface

UndoRedoStackSize property

(ISch_Preferences interface)
Syntax
Property UndoRedoStackSize : Integer Read Get_UndoRedoStackSize Write Set_UndoRedoStackSize ;
Description
This property shows the number of actions held in the Undo Buffer. The default value is 50. Define a value to set the Undo Buffer size. There is no limit to the size of the Undo Buffer, however, the larger the size, the more main memory is used to store undo information.
Example
See also
ISch_Preferences interface

TranslateRotateColor property

(ISch_Preferences interface)
Syntax
Property TranslateRotateColor : TColor Read Get_TranslateRotateColor Write Set_TranslateRotateColor ;
Description
This property sets or gets the color associated with translation or rotation.
Example
See also
ISch_Preferences interface
TColor type

StringIncB property

(ISch_Preferences interface)
Syntax
Property StringIncB : WideString Read Get_StringIncB Write Set_StringIncB ;
Description
This property represents a value to auto-increment on pin names of a component when you are placing pins for a component. This can be used for building components in the Library editor.
Normally you would use a positive increment value for pin designators and negative increment value for pin names. Eg  1, 2,3  for pin designators and D8, D7, D6 for pin names. Thus Primary = 1 and Secondary = -1 and set Display Name to D8 and Designator to 1 in the Pin Properties dialog before you place the first pin.
This property is supported by the Get_StringIncB and Set_StringIncB methods.
Example
See also
ISch_Preferences interface

StringIncA property

(ISch_Preferences interface)
Syntax
Property StringIncA : WideString Read Get_StringIncA Write Set_StringIncA ;
Description
This property represents a value to auto-increment on pin designators of a component when you are placing pins for a component. This is used for building components in the Library editor.  Normally you would use a positive increment value for pin designators and negative increment value for pin names. Eg  1, 2,3  for pin designators and D8, D7, D6 for pin names. Thus Primary = 1 and Secondary = -1 and set Display Name to D8 and Designator to 1 in the Pin Properties dialog before you place the first pin.
This property is supported by the Get_StringIncA and Set_StringIncA methods.
Example
See also
ISch_Preferences interface

SnapToHotSpot property

(ISch_Preferences interface)
Syntax
Property SnapToHotSpot : Boolean Read Get_SnapToHotSpot Write Set_SnapToHotSpot ;
Description
This property represents the action where you hold the object being moved or dragged by the nearest electrical hot spot (eg, the end of a pin) when moving or dragging.
Example
See also
ISch_Preferences interface

SnapToCenter property

(ISch_Preferences interface)
Syntax
Property SnapToCenter : Boolean Read Get_SnapToCenter Write Set_SnapToCenter ;
Description
This property represents the action where you hold the object being moved or dragged by its reference point (for objects that have one, such as library components or ports), or its center (for objects which do not have a reference point such as a rectangle).
Example
See also
ISch_Preferences interface

SingleSlashNegation property

(ISch_Preferences interface)
Syntax
Property SingleSlashNegation : Boolean Read Get_SingleSlashNegation Write Set_SingleSlashNegation ;
Description
Example
See also
ISch_Preferences interface

ShowCutterMarkersMode property

(ISch_Preferences interface)
Syntax
Property ShowCutterMarkersMode : TShowCutterMarkersMode Read Get_ShowCutterMarkersMode Write Set_ShowCutterMarkersMode ;
Description
Example
See also
ISch_Preferences interface

ShowCutterBoxMode property

(ISch_Preferences interface)
Syntax
Property ShowCutterBoxMode : TShowCutterBoxMode Read Get_ShowCutterBoxMode Write Set_ShowCutterBoxMode ;
Description
Example
See also
ISch_Preferences interface

SheetStyle_YZones property

(ISch_Preferences interface)
Syntax
Property SheetStyle_YZones [S : TSheetStyle]: TCoord Read Get_SheetStyle_YZones;
Description
Example
See also
ISch_Preferences interface

SheetStyle_YSize property

(ISch_Preferences interface)
Syntax
Property SheetStyle_YSize [S : TSheetStyle]: TCoord Read Get_SheetStyle_YSize;
Description
Example
See also
ISch_Preferences interface

SheetStyle_XZones property

(ISch_Preferences interface)
Syntax
Property SheetStyle_XZones [S : TSheetStyle]: TCoord Read Get_SheetStyle_XZones;
Description
Example
See also
ISch_Preferences interface

SheetStyle_XSize property

(ISch_Preferences interface)
Syntax
Property SheetStyle_XSize [S : TSheetStyle]: TCoord Read Get_SheetStyle_XSize;
Description
Example
See also
ISch_Preferences interface

SheetStyle_MarginWidth[S property

(ISch_Preferences interface)
Syntax
Property SheetStyle_MarginWidth[S : TSheetStyle]: TCoord Read Get_SheetStyle_MarginWidth;
Description
Example
See also
ISch_Preferences interface

Sensitivity property

(ISch_Preferences interface)
Syntax
Property Sensitivity : Integer Read Get_Sensitivity Write Set_Sensitivity ;
Description
Example
See also
ISch_Preferences interface

SelectionReference property

(ISch_Preferences interface)
Syntax
Property SelectionReference : Boolean Read Get_SelectionReference Write Set_SelectionReference ;
Description
Example
See also
ISch_Preferences interface

SelectionColor property

(ISch_Preferences interface)
Syntax
Property SelectionColor : TColor Read Get_SelectionColor Write Set_SelectionColor ;
Description
Example
See also
ISch_Preferences interface

RunInPlaceEditing property

(ISch_Preferences interface)
Syntax
Property RunInPlaceEditing : Boolean Read Get_RunInPlaceEditing Write Set_RunInPlaceEditing ;
Description
This property if set to true, then the focused text field may be directly edited within the Schematic Editor, rather than in a dialog box.  After focusing the field you wish to modify, clicking upon it again or pressing the F2 shortcut key will open the field for editing.
If this property is set to false, you cannot edit the text directly and you have to edit it from the Parameter Properties dialog. You can just graphically move this text field.
Example
See also
ISch_Preferences interface

ResizeColor property

(ISch_Preferences interface)
Syntax
Property ResizeColor : TColor Read Get_ResizeColor Write Set_ResizeColor ;
Description
Example
See also
ISch_Preferences interface
TColor type

PolylineCutterMode property

(ISch_Preferences interface)
Syntax
Property PolylineCutterMode : TPolylineCutterMode Read Get_PolylineCutterMode Write Set_PolylineCutterMode ;
Description
Example
See also
ISch_Preferences interface

PinNumberMargin property

(ISch_Preferences interface)
Syntax
Property PinNumberMargin : Integer Read Get_PinNumberMargin Write Set_PinNumberMargin ;
Description
Normally, component pin numbers are displayed outside the body of the component, directly above the corresponding pin line. This property controls the placement of the pin numbers. It specifies the distance (in hundredths of an inch) from the component outline to the start of the pin number text. The default is 8.
Example
See also
ISch_Preferences interface

PinNameMargin property

(ISch_Preferences interface)
Syntax
Property PinNameMargin : Integer Read Get_PinNameMargin Write Set_PinNameMargin ;
Description
Normally, component pin names are displayed inside the body of the component, adjacent to the corresponding pin. This property controls the placement of component pin names. It specifies the distance (in hundredths of an inch) from the component outline to the start of the pin name text. The default is 5.
Example
See also
ISch_Preferences interface

OrcadFootPrint property

(ISch_Preferences interface)
Syntax
Property OrcadFootPrint : TOrcadFootPrint Read Get_OrcadFootPrint Write Set_OrcadFootPrint ;
Description
Example
See also
ISch_Preferences interface

OptimizePolylines property

(ISch_Preferences interface)
Syntax
Property OptimizePolylines : Boolean Read Get_OptimizePolylines Write Set_OptimizePolylines ;
Description
If this property is set to true, then extra wires, poly-lines or buses are prevented from overlapping on top of each other and the overlapping wires, poly-lines or busses are removed automatically.
Note: You need to enable this option to have the ability to automatically cut a wire and terminate onto any two pins of this component when this component is dropped onto this wire.
Example
See also
ISch_Preferences interface

MultiSelectionColor property

(ISch_Preferences interface)
Syntax
Property MultiSelectionColor : TColor Read Get_MultiSelectionColor Write Set_MultiSelectionColor ;
Description
This property determines the color of the multi_selection, that is multiple objects on the schematic object is being selected.
Example
See also
ISch_Preferences interface
TColor type

MultiPartNamingMethod property

(ISch_Preferences interface)
Syntax
Property MultiPartNamingMethod : Integer Read Get_MultiPartNamingMethod Write Set_MultiPartNamingMethod ;
Description
Example
See also
ISch_Preferences interface

Metafile_ParameterSets property

(ISch_Preferences interface)
Syntax
Property Metafile_ParameterSets : Boolean Read Get_Metafile_ParameterSets Write Set_Metafile_ParameterSets ;
Description
This property if set to true includes Parameter Sets design objects when copying to the clipboard or when printing a schematic document.
Example
See also
ISch_Preferences interface

Metafile_NoERCMarkers property

(ISch_Preferences interface)
Syntax
Property Metafile_NoERCMarkers : Boolean Read Get_Metafile_NoERCMarkers Write Set_Metafile_NoERCMarkers ;
Description
Example
See also
ISch_Preferences interface

MarkManualParameters property

(ISch_Preferences interface)
Syntax
Property MarkManualParameters : Boolean Read Get_MarkManualParameters Write Set_MarkManualParameters;
Description
The MarkManualParameters property denotes whether the dots will be displayed or not when parameters of components for example are auto positioned. If true, the dot for the parameter will appear when its associated component has been rotated/moved on the schematic document.
This property is supported by the Get_MarkManualParameters and Set_MarkManualParameters methods.
Example
See also
ISch_Preferences interface

ManualJunctionsColor property

(ISch_Preferences interface)
Syntax
Property ManualJunctionsColor : TColor Read Get_ManualJunctionsColor Write Set_ManualJunctionsColor;
Description
Example
See also
ISch_Preferences interface
TColor type

MaintainOrthogonal property

(ISch_Preferences interface)
Syntax
Property MaintainOrthogonal : Boolean Read Get_MaintainOrthogonal Write Set_MaintainOrthogonal ;
Description
This property if set to true then when you drag components, any wiring that is dragged with the component is kept orthogonal (i.e. corners at 90 degrees). If this option is disabled, wiring dragged with a component will be repositioned obliquely.
This property is supported by the Get_MaintainOrthogonal and Set_MaintainOrthogonal methods.
Example
See also
ISch_Preferences interface

LibraryScope property

(ISch_Preferences interface)
Syntax
Property LibraryScope : TLibraryScope Read Get_LibraryScope Write Set_LibraryScope ;
Description
This property represents scope for filtering and selection to be applied to the current component on a library sheet or to all components of an open library in Altium Designer.
Example
See also
ISch_Preferences interface
TLibraryScope type

LibMenuID property

(ISch_Preferences interface)
Syntax
Property LibMenuID : Widestring Read Get_LibMenuID Write Set_LibMenuID;
Description
Example
See also
ISch_Preferences interface

LastModelType property

(ISch_Preferences interface)
Syntax
Property LastModelType : WideString Read Get_LastModelType Write Set_LastModelType ;
Description
Example
See also
ISch_Preferences interface

Import_FromUser method

(ISch_Preferences interface)
Syntax
Function Import_FromUser : Boolean;
Description
Example
See also
ISch_Preferences interface

IgnoreSelection property

(ISch_Preferences interface)
Syntax
Property IgnoreSelection : Boolean Read Get_IgnoreSelection Write Set_IgnoreSelection ;
Description
Example
See also
ISch_Preferences interface

HotSpotGridDistance property

(ISch_Preferences interface)
Syntax
Property HotSpotGridDistance : Integer Read Get_HotSpotGridDistance Write Set_HotSpotGridDistance ;
Description
Example
See also
ISch_Preferences interface

GraphicsCursorStyle property

(ISch_Preferences interface)
Syntax
Property GraphicsCursorStyle : TCursorShape Read Get_GraphicsCursorStyle Write Set_GraphicsCursorStyle ;
Description
Example
See also
ISch_Preferences interface

AddTemplateToClipBoard property

(ISch_Preferences interface)
Syntax
Property AddTemplateToClipBoard : Boolean Read Get_AddTemplateToClipBoard Write Set_AddTemplateToClipBoard ;
Description
The AddTemplateToClipBoard property determines whether  the current sheet template can be added to to the clipboard when you copy or cut from the current schematic sheet.
Example
Prefs.AddTemplateToClipBoard := True;
See also
ISch_Preferences interface

AlwaysDrag property

(ISch_Preferences interface)
Syntax
Property AlwaysDrag : Boolean Read Get_AlwaysDrag Write Set_AlwaysDrag;
Description
This property represents the AlwaysDrag option and every time you are dragging a group of objects on a schematic document, the electrical wiring stay connected if it is true. Note, to keep the connections clean while dragging, press the spacebar to cycle through the different corner modes.
Set it to false and the wiring are left alone and become disconnected when previously connected objects are being dragged.
Example
Prefs.AlwaysDrag := True;
See also
ISch_Preferences interface

AutoPanJumpDistance property

(ISch_Preferences interface)
Syntax
Property AutoPanJumpDistance : TCoord Read Get_AutoPanJumpDistance Write Set_AutoPanJumpDistance ;
Description
This property represents the value to set/get the size of each auto-panning step. The step size determines how fast the document pans when auto-panning is enabled. The smaller the value, the slower or finer the auto-panning movement.
This property is supported by the GetState_AutoPanJumpDistance and SetState_AutoPanJumpDistance methods.
Example
Prefs.AutoPanJumpDistance := CoordToDxps(10);
See also
ISch_Preferences interface

AutoPanShiftJumpDistance property

(ISch_Preferences interface)
Syntax
Property AutoPanShiftJumpDistance : TCoord Read Get_AutoPanShiftJumpDistance Write Set_AutoPanShiftJumpDistance ;
Description
This property represents a value to get/set the size of each step when the SHIFT key is held during auto-panning. The shift step size determines how fast the document pans when auto-panning is enabled and the SHIFT key is pressed. The smaller the value, the slower or finer the auto-panning movement. This property is supported by the Get_AutoPanShiftJumpDistance and Set_AutoPanShiftJumpDistance methods.
Example
Prefs.AutoPanShiftJumpDistance := DxpsToCoord(100);
See also
ISch_Preferences interface

AutoPanStyle property

(ISch_Preferences interface)
Syntax
Property AutoPanStyle : TAutoPanStyle Read Get_AutoPanStyle Write Set_AutoPanStyle ;
Description
Example
See also
ISch_Preferences interface

AutoZoom property

(ISch_Preferences interface)
Syntax
Property AutoZoom : Boolean Read Get_AutoZoom Write Set_AutoZoom ;
Description
This property if set to true the schematic sheet is automatically zoomed when jumping to a component. Zoom level remains as it was if this option is not enabled.
Example
See also
ISch_Preferences interface

BufferedPainting property

(ISch_Preferences interface)
Syntax
Property BufferedPainting : Boolean Read Get_BufferedPainting Write Set_BufferedPainting ;
Description
Example
See also
ISch_Preferences interface

BusAutoJunctionsColor property

(ISch_Preferences interface)
Syntax
Property BusAutoJunctionsColor : TColor Read Get_BusAutoJunctionsColor Write Set_BusAutoJunctionsColor;
Description
Example
See also
ISch_Preferences interface
TColor type

ClickClearsSelection property

(ISch_Preferences interface)
Syntax
Property ClickClearsSelection : Boolean Read Get_ClickClearsSelection Write Set_ClickClearsSelection ;
Description
If this property is set to true, then all design objects are de-selected by clicking any where on the schematic workspace. Set this property to false if you do not want to have this click anywhere to deselect all ability and the selection is cumulative.
Note: regardless of the setting, you can de-select a selected design object by clicking on it.
Example
See also
ISch_Preferences interface

ComponentsCutWires property

(ISch_Preferences interface)
Syntax
Property ComponentsCutWires : Boolean Read Get_ComponentsCutWires Write Set_ComponentsCutWires ;
Description
Set the property to true so you can drop a component onto a schematic wire and then the wire is cut into two segments and the segments are terminated onto any two hot pins of this component automatically. You will need to set the Optimize Wires & Buses option to true first.
Example
See also
ISch_Preferences interface

ConfirmSelectionMemoryClear property

(ISch_Preferences interface)
Syntax
Property ConfirmSelectionMemoryClear : Boolean Read Get_ConfirmSelectionMemoryClear Write Set_ConfirmSelectionMemoryClear;
Description
The selection memories can be used to store the selection state of a set of objects. To prevent inadvertent overwriting of a selection memory, set the property to true.
Example
See also
ISch_Preferences interface

ConvertSpecialStrings property

(ISch_Preferences interface)
Syntax
Property ConvertSpecialStrings : Boolean Read Get_ConvertSpecialStrings Write Set_ConvertSpecialStrings ;
Description
This property when set to true, the contents of the special strings on screen are displayed, as they appear on a printout.
Example
See also
ISch_Preferences interface

CtrlDbleClickGoesDown property

(ISch_Preferences interface)
Syntax
Property CtrlDbleClickGoesDown : Boolean Read Get_CtrlDbleClickGoesDown Write Set_CtrlDbleClickGoesDown ;
Description
This property when set to true, the sub-sheet of its associated sheet symbol by double clicking on this sheet symbol opens in Altium Designer.
Set it to false and when you double-click on a sheet symbol, the change properties dialog is displayed instead.
Example
See also
ISch_Preferences interface

CutterFixedLength property

(ISch_Preferences interface)
Syntax
Property CutterFixedLength : TCoord Read Get_CutterFixedLength Write Set_CutterFixedLength ;
Description
Example
See also
ISch_Preferences interface

CutterGridSizeMultiple property

(ISch_Preferences interface)
Syntax
Property CutterGridSizeMultiple : Integer Read Get_CutterGridSizeMultiple Write Set_CutterGridSizeMultiple ;
Description
Example
See also
ISch_Preferences interface

DefaultDisplayUnit property

(ISch_Preferences interface)
Syntax
Property DefaultDisplayUnit : TUnit Read Get_DefaultUnit Write Set_DefaultUnit;
Description
Example
See also
ISch_Preferences interface

DefaultEarthName property

(ISch_Preferences interface)
Syntax
Property DefaultEarthName : WideString Read Get_DefaultEarthName Write Set_DefaultEarthName ;
Description
The DefaultEarthName denotes the default signal ground name to be used for objects on the schematic document. The default name is EARTH.
This property is supported by the Get_DefaultEarthName and Set_DefaultEarthName methods.
Example
See also
ISch_Preferences interface

DefaultPowerGndName property

(ISch_Preferences interface)
Syntax
Property DefaultPowerGndName : WideString Read Get_DefaultPowerGndName Write Set_DefaultPowerGndName ;
Description
Example
See also
ISch_Preferences interface

DefaultPrimsPermanent property

(ISch_Preferences interface)
Syntax
Property DefaultPrimsPermanent : Boolean Read Get_DefaultPrimsPermanent Write Set_DefaultPrimsPermanent ;
Description
Example
See also
ISch_Preferences interface

DefaultSheetStyle property

(ISch_Preferences interface)
Syntax
Property DefaultSheetStyle : TSheetStyle Read Get_DefaultSheetStyle Write Set_DefaultSheetStyle;
Description
The DefaultSheetStyle property denotes the sheet style used for the workspace.
There are various sheet styles; A4,A3,A2,A1,A0, A,C,D,E,Letter, Legal, Tabloid, Orcad A, Orcad B, Orcad C, Orcad D, Orcad E.
Example
See also
ISch_Preferences interface
TSheetStyle type

DefaultSignalGndName property

(ISch_Preferences interface)
Syntax
Property DefaultSignalGndName : WideString Read Get_DefaultSignalGndName Write Set_DefaultSignalGndName ;
Description
The DefaultSignalGndName denotes the default signal ground name to be used for objects on the schematic document. The default name is SGND.
Example
See also
ISch_Preferences interface

DefaultTemplateFileName property

(ISch_Preferences interface)
Syntax
Property DefaultTemplateFileName : WideString Read Get_DefaultTemplateFileName Write Set_DefaultTemplateFileName ;
Description
Example
See also
ISch_Preferences interface

DefaultUnitSystem property

(ISch_Preferences interface)
Syntax
Property DefaultUnitSystem : TUnitSystem Read Get_DefaultUnitSystem;
Description
Example
See also
ISch_Preferences interface

DisplayPrinterFonts property

(ISch_Preferences interface)
Syntax
Property DisplayPrinterFonts : Boolean Read Get_DisplayPrinterFonts Write Set_DisplayPrinterFonts ;
Description
The DisplayPrinterFonts property denotes whether the printer fonts can be displayed or not.
Example
See also
ISch_Preferences interface

DocMenuID property

(ISch_Preferences interface)
Syntax
Property DocMenuID : Widestring Read Get_DocMenuID Write Set_DocMenuID;
Description
The DocMenuID property determines which pop up menu to pop up depending on whether it is a schematic or a library document. The property returns a widestring format which can be either PUSCHMENU or PUSCHLIBMENU strings and they correspond to the entries in the Schematic Editor's resources file (ADVSCH.RCS file).
Example
See also
ISch_Preferences interface

DocumentScope property

(ISch_Preferences interface)
Syntax
Property DocumentScope : TChosenDocumentScope Read Get_DocumentScope Write Set_DocumentScope ;
Description
The DocumentScope property determines the scope for filtering and selection to be applied to the current document or to any open document in Altium Designer.
Example
See also
ISch_Preferences interface
TChosenDocumentScope type

DoubleClickRunsInspector property

(ISch_Preferences interface)
Syntax
Property DoubleClickRunsInspector : Boolean Read Get_DoubleClickRunsInspector Write Set_DoubleClickRunsInspector ;
Description
This property represents the option to bring up the Inspector dialog instead of the design object's properties dialog when you double click on a design object.
Assign false to this property to disable this option if you want to see the design object's properties dialog when you double click on a design object. Invoke this property to check if design object's properties dialog is invoked (False) or the Inspector dialog (True) when you double click on a design object.
Example
See also
ISch_Preferences interface

IGridSetting interface

Overview
The IGridSetting interface represents the grid settings for the Schematic documents part of a project.

The IGridSetting interface hierarchy is a standalone.

IGridSetting methods
GetState_SnapGridOn
GetState_HotspotGridOn
GetState_VisibleGridOn
GetState_SnapGridSize
GetState_HotspotGridSize
GetState_VisibleGridSize
SetState_SnapGridOn
SetState_HotspotGridOn
SetState_VisibleGridOn
SetState_SnapGridSize
SetState_HotspotGridSize
SetState_VisibleGridSize
I_ObjectAddress
CopyTo
SameAs
IGridSetting properties
SnapGridOn
HotspotGridOn
VisibleGridOn
SnapGridSize
HotspotGridSize
VisibleGridSize

See also
ISch_Preferences interface

IGridSetting Methods

CopyTo method

(IGridSetting interface)
Syntax
Procedure CopyTo(AGridSetting : IGridSetting);
Description
Example
See also
IGridSetting interface

GetState_HotspotGridOn method

(IGridSetting interface)
Syntax
Function GetState_HotspotGridOn : Boolean;
Description
This function determines whether the hot spot grid is enabled or not and returns a True or False value.
Example

If GridSetting.GetState_HotspotGridOn = True Then
    HotspotGridSize := MilsToCoord(4);

See also
IGridSetting interface

GetState_HotspotGridSize method

(IGridSetting interface)
Syntax
Function GetState_HotspotGridSize : TCoord;
Description
This function determines the size of the hot spot grid size.
Example

If GridSetting.GetState_HotspotGridOn = True Then
    HotspotGridSize := MilsToCoord(4);

See also
IGridSetting interface

GetState_SnapGridOn method

(IGridSetting interface)
Syntax
Function GetState_SnapGridOn : Boolean;
Description
Example
See also
IGridSetting interface

GetState_SnapGridSize method

(IGridSetting interface)
Syntax
Function GetState_SnapGridSize : TCoord;
Description
Example
See also
IGridSetting interface

GetState_VisibleGridOn method

(IGridSetting interface)
Syntax
Function GetState_VisibleGridOn : Boolean;
Description
Example
See also
IGridSetting interface

GetState_VisibleGridSize method

(IGridSetting interface)
Syntax
Function GetState_VisibleGridSize : TCoord;
Description
Example
See also
IGridSetting interface

I_ObjectAddress method

(IGridSetting interface)
Syntax
Function I_ObjectAddress : Pointer;
Description
This function returns the object address of the IGridSetting interface as a pointer type.
Example
If GridSetting.I_ObjectAddress <> Nil Then ShowMessage(IntToStr(GridSetting.I_ObjectAddress));
See also
IGridSetting interface

SameAs method

(IGridSetting interface)
Syntax
Function SameAs(AGridSetting : IGridSetting) : Boolean;
Description
Example
See also
IGridSetting interface

SetState_HotspotGridOn method

(IGridSetting interface)
Syntax
Procedure SetState_HotspotGridOn (B : Boolean);
Description
Example
See also
IGridSetting interface

SetState_HotspotGridSize method

(IGridSetting interface)
Syntax
Procedure SetState_HotspotGridSize (C : TCoord);
Description
Example
See also
IGridSetting interface

SetState_SnapGridOn method

(IGridSetting interface)
Syntax
Procedure SetState_SnapGridOn (B : Boolean);
Description
Example
See also
IGridSetting interface

SetState_SnapGridSize method

(IGridSetting interface)
Syntax
Procedure SetState_SnapGridSize (C : TCoord);
Description
Example
See also
IGridSetting interface

SetState_VisibleGridOn method

(IGridSetting interface)
Syntax
Procedure SetState_VisibleGridOn (B : Boolean);
Description
Example
See also
IGridSetting interface

SetState_VisibleGridSize method

(IGridSetting interface)
Syntax
Procedure SetState_VisibleGridSize (C : TCoord);
Description
Example
See also
IGridSetting interface

IGridSetting Properties

HotspotGridOn property

(IGridSetting interface)
Syntax
Property HotspotGridOn : Boolean Read GetState_HotspotGridOn Write SetState_HotspotGridOn ;
Description
Example
See also
IGridSetting interface

HotspotGridSize property

(IGridSetting interface)
Syntax
Property HotspotGridSize : TCoord Read GetState_HotspotGridSize Write SetState_HotspotGridSize ;
Description
Example
See also
IGridSetting interface

SnapGridOn property

(IGridSetting interface)
Syntax
Property SnapGridOn : Boolean Read GetState_SnapGridOn Write SetState_SnapGridOn ;
Description
Example
See also
IGridSetting interface

SnapGridSize property

(IGridSetting interface)
Syntax
Property SnapGridSize : TCoord Read GetState_SnapGridSize Write SetState_SnapGridSize ;
Description
Example
See also
IGridSetting interface

VisibleGridOn property

(IGridSetting interface)
Syntax
Property VisibleGridOn : Boolean Read GetState_VisibleGridOn Write SetState_VisibleGridOn ;
Description
Example
See also
IGridSetting interface

VisibleGridSize property

(IGridSetting interface)
Syntax
Property VisibleGridSize : TCoord Read GetState_VisibleGridSize Write SetState_VisibleGridSize ;
Description
Example
See also
IGridSetting interface

ISch_FontManager

ISch_FontManager Interface

Overview
The ISch_FontManager interface represents the internal font manager in Schematic Editor that manages fonts for text based objects on schematic documents.

To have access to the ISch_FontManager interface, you need to invoke the SchServer function;
FontManager := SchServer.FontManager;

ISch_FontManager methods
GetState_DefaultHorizontalSysFontId
GetState_DefaultVerticalSysFontId
GetState_FontCount
GetState_Rotation
GetState_Size
GetState_Italic
GetState_Bold
GetState_UnderLine
GetState_StrikeOut
GetState_SaveFlag
GetState_FontName
GetFontHandle
GetFontID
GetFontSpec
GetFontSize
IsFontVertical
Import_FromUser
ISch_FontManager properties
DefaultHorizontalSysFontId
DefaultVerticalSysFontId
FontCount
Rotation
Size
Italic
Bold
UnderLine
StrikeOut
SaveFlag
FontName

Example

SchLabel.Orientation := eRotate90;
SchLabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Times New Roman');

See also
ISch_Label interface

ISch_FontManager Methods

GetFontHandle method

(ISch_FontManager interface)
Syntax
Function GetFontHandle (AnId: Integer; Const CurrentLogFont : TLogFont; ScreenSize : Integer): THandle;
Description
This function retrieves the handle of the font.
Example
See also
ISch_FontManager interface

GetFontID method

(ISch_FontManager interface)
Syntax
Function GetFontID (Size,Rotation : Integer; Underline,Italic,Bold,StrikeOut : Boolean; Const FontName : WideString) : TFontID;
Description
This function retrieves the font ID of TFontID type that can be used to set the font style of a text based object such as a ISch_Label object.
Example
ALabel.FontId := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Arial');
See also
ISch_FontManager interface
TFontID type

GetFontSpec method

(ISch_FontManager interface)
Syntax
Procedure GetFontSpec (FontID : TFontID; Var Size,Rotation : Integer; Var Underline,Italic,Bold,StrikeOut : Boolean; Var FontName : WideString);
Description
Every font used in the Schematic document has its own FontID. You can invoke the GetFontSpec function to retrieve font specifications for the supplied Font ID.
Example
See also
ISch_FontManager interface

GetFontSize method

(ISch_FontManager interface)
Syntax
Function GetFontSize (FontID : TFontID) : Integer;
Description
Example
See also
ISch_FontManager interface

GetState_Bold method

(ISch_FontManager interface)
Syntax
Function GetState_Bold (AnId : Integer) : Boolean;
Description
This Bold property determines the Bold style for the font. This property is supported by the GetState_Bold method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,True,False,'Times New Roman');

See also
ISch_FontManager interface

GetState_DefaultHorizontalSysFontId method

(ISch_FontManager interface)
Syntax
Function GetState_DefaultHorizontalSysFontId : Integer;
Description
Example
See also
ISch_FontManager interface

GetState_DefaultVerticalSysFontId method

(ISch_FontManager interface)
Syntax
Function GetState_DefaultVerticalSysFontId : Integer;
Description
Example
See also
ISch_FontManager interface

GetState_FontCount method

(ISch_FontManager interface)
Syntax
Function GetState_FontCount : Integer;
Description
The FontCount property returns the number of fonts used in the Altium Designer. This property is supported by the GetState_FontCount method.
Example
See also
ISch_FontManager interface

GetState_FontName method

(ISch_FontManager interface)
Syntax
Function GetState_FontName (AnId : Integer) : TFontName;
Description
This indexed FontName property returns the name of an indexed font as a string. Every computer could have a different table of fonts used. The FontName property is supported by the GetState_FontName method.
Example
See also
ISch_FontManager interface

GetState_Italic method

(ISch_FontManager interface)
Syntax
Function GetState_Italic (AnId : Integer) : Boolean;
Description
This Italic property determines the Italic style for the font. This property is supported by the GetState_Italic method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman'

See also
ISch_FontManager interface

GetState_Rotation method

(ISch_FontManager interface)
Syntax
Function GetState_Rotation (AnId : Integer) : Integer;
Description
The Rotation property determines the orientation of the text object. For ISch_Labels, it is necessary to set the Orientation property of these ISch_Labels as well as the Rotation property for the FontID variables. This property is supported by the GetState_Rotation method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Times New Roman');
// Note eRotate90 for the Orientation property, and a 90 value as a parameter for the GetFontID method.

See also
ISch_FontManager interface

GetState_SaveFlag method

(ISch_FontManager interface)
Syntax
Function GetState_SaveFlag (AnId : Integer) : Boolean;
Description
Example
See also
ISch_FontManager interface

GetState_Size method

(ISch_FontManager interface)
Syntax
Function GetState_Size (AnId : Integer) : Integer;
Description
The Size property determines the font size. This property is supported by the GetState_Size method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Times New Roman Font size to 14 points - 1st parameter

See also
ISch_FontManager interface

GetState_StrikeOut method

(ISch_FontManager interface)
Syntax
Function GetState_StrikeOut (AnId : Integer) : Boolean;
Description
The StrikeOut property determines whether the font is striked out or not. This property is supported by the GetState_StrikeOut method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (sixth parameter)

See also
ISch_FontManager interface

GetState_UnderLine method

(ISch_FontManager interface)
Syntax
Function GetState_UnderLine (AnId : Integer) : Boolean;
Description
This UnderLine property determines whether the font is underlined or not. This property is supported by the GetState_UnderLine method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (third parameter)

See also
ISch_FontManager interface

IsFontVertical method

(ISch_FontManager interface)
Syntax
Function IsFontVertical(FontID : TFontID) : Boolean;
Description
This function determines whether the font is vertically orientated or not.
Example
See also
ISch_FontManager interface

ISch_FontManager Properties

Bold property

(ISch_FontManager interface)
Syntax
Property Bold [Id : Integer] : Boolean Read GetState_Bold ;
Description
This Bold property determines the Bold style for the font. This property is supported by the GetState_Bold method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,True,False,'Times New Roman');

See also
ISch_FontManager interface
GetFontID method

DefaultHorizontalSysFontId property

(ISch_FontManager interface)
Syntax
Property DefaultHorizontalSysFontId : Integer Read GetState_DefaultHorizontalSysFontId;
Description
Example
See also
ISch_FontManager interface

DefaultVerticalSysFontId property

(ISch_FontManager interface)
Syntax
Property DefaultVerticalSysFontId : Integer Read GetState_DefaultVerticalSysFontId;
Description
Example
See also
ISch_FontManager interface

FontCount property

(ISch_FontManager interface)
Syntax
Property FontCount : Integer Read GetState_FontCount;
Description
The FontCount property returns the number of fonts used in the computer system that the Altium Designer is currently residing on. This property is supported by the GetState_FontCount method.
Example
See also
ISch_FontManager interface

FontName property

(ISch_FontManager interface)
Syntax
Property FontName [Id : Integer] : TFontName Read GetState_FontName ;
Description
This indexed FontName property returns the name of an indexed font as a string. Every computer could have a different table of fonts used. The FontName property is supported by the GetState_FontName method.
Example
See also
ISch_FontManager interface

Italic property

(ISch_FontManager interface)
Syntax
Property Italic [Id : Integer] : Boolean Read GetState_Italic ;
Description
This Italic property determines the Italic style for the font. This property is supported by the GetState_Italic method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');

See also
ISch_FontManager interface
GetFontID method

Rotation property

(ISch_FontManager interface)
Syntax
Property Rotation [Id : Integer] : Integer Read GetState_Rotation ;
Description
The Rotation property determines the orientation of the text object. For ISch_Labels, it is necessary to set the Orientation property of these ISch_Labels as well as the Rotation property for the FontID variables. This property is supported by the GetState_Rotation method.
Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Times New Roman');
// Note eRotate90 for the Orientation property, and a 90 value as a parameter for the GetFontID method.

See also
ISch_FontManager interface

SaveFlag property

(ISch_FontManager interface)
Syntax
Property SaveFlag [Id : Integer] : Boolean Read GetState_SaveFlag ;
Description
Example
See also
ISch_FontManager interface

Size property

(ISch_FontManager interface)
Syntax
Property Size [Id : Integer] : Integer Read GetState_Size ;
Description
The Size property determines the font size. This property is supported by the GetState_Size method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Times New Roman Font size to 14 points - 1st parameter

See also
ISch_FontManager interface
GetFontID method

StrikeOut property

(ISch_FontManager interface)
Syntax
Property StrikeOut [Id : Integer] : Boolean Read GetState_StrikeOut;
Description
The StrikeOut property determines whether the font is striked out or not. This property is supported by the GetState_StrikeOut method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (sixth parameter)

See also
ISch_FontManager interface
GetFontID method

UnderLine property

(ISch_FontManager interface)
Syntax
Property UnderLine [Id : Integer] : Boolean Read GetState_UnderLine;
Description
This UnderLine property determines whether the font is underlined or not. This property is supported by the GetState_UnderLine method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (third parameter)

See also
ISch_FontManager interface
GetFontID method

ISch_FontManager2 Interface

Overview
The ISch_FontManager2 interface represents the internal font manager in Schematic Editor that manages fonts for text based objects on schematic documents. The ISch_FontManager2 is the same as ISch_FontManager, but all the methods have the Safecall calling convention which is important for SDK purposes.

To have access to the ISch_FontManager interface, you need to invoke the SchServer function;
FontManager := SchServer.FontManager;

ISch_FontManager2 methods
GetState_DefaultHorizontalSysFontId
GetState_DefaultVerticalSysFontId
GetState_FontCount
GetState_Rotation
GetState_Size
GetState_Italic
GetState_Bold
GetState_UnderLine
GetState_StrikeOut
GetState_SaveFlag
GetState_FontName
GetFontHandle
GetFontID
GetFontSpec
GetFontSize
IsFontVertical
Import_FromUser
ISch_FontManage2r properties
DefaultHorizontalSysFontId
DefaultVerticalSysFontId
FontCount
Rotation
Size
Italic
Bold
UnderLine
StrikeOut
SaveFlag
FontName

Example

SchLabel.Orientation := eRotate90;
SchLabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Times New Roman');

See also
ISch_Label interface

ISch_FontManager2 Methods

GetFontHandle method

(ISch_FontManager2 interface)
Syntax
Function GetFontHandle (AnId: Integer; Const CurrentLogFont : TLogFont; ScreenSize : Integer): THandle;
Description
This function retrieves the handle of the font.
Example
See also
ISch_FontManager2 interface

GetFontID method

(ISch_FontManager2 interface)
Syntax
Function GetFontID (Size,Rotation : Integer; Underline,Italic,Bold,StrikeOut : Boolean; Const FontName : WideString) : TFontID;
Description
This function retrieves the font ID of TFontID type that can be used to set the font style of a text based object such as a ISch_Label object.
Example
ALabel.FontId := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Arial');
See also
ISch_FontManager2 interface
TFontID type

GetFontSpec method

(ISch_FontManager2 interface)
Syntax
Procedure GetFontSpec (FontID : TFontID; Var Size,Rotation : Integer; Var Underline,Italic,Bold,StrikeOut : Boolean; Var FontName : WideString);
Description
Every font used in the Schematic document has its own FontID. You can invoke the GetFontSpec function to retrieve font specifications for the supplied Font ID.
Example
See also
ISch_FontManager2 interface

GetFontSize method

(ISch_FontManager2 interface)
Syntax
Function GetFontSize (FontID : TFontID) : Integer;
Description
Example
See also
ISch_FontManager2 interface

GetState_Bold method

(ISch_FontManager2 interface)
Syntax
Function GetState_Bold (AnId : Integer) : Boolean;
Description
This Bold property determines the Bold style for the font. This property is supported by the GetState_Bold method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,True,False,'Times New Roman');

See also
ISch_FontManager2 interface

GetState_DefaultHorizontalSysFontId method

(ISch_FontManager2 interface)
Syntax
Function GetState_DefaultHorizontalSysFontId : Integer;
Description
Example
See also
ISch_FontManager2 interface

GetState_DefaultVerticalSysFontId method

(ISch_FontManager2 interface)
Syntax
Function GetState_DefaultVerticalSysFontId : Integer;
Description
Example
See also
ISch_FontManager2 interface

GetState_FontCount method

(ISch_FontManager2 interface)
Syntax
Function GetState_FontCount : Integer;
Description
The FontCount property returns the number of fonts used in the Altium Designer. This property is supported by the GetState_FontCount method.
Example
See also
ISch_FontManager2 interface

GetState_FontName method

(ISch_FontManager interface)
Syntax
Function GetState_FontName (AnId : Integer) : TFontName;
Description
This indexed FontName property returns the name of an indexed font as a string. Every computer could have a different table of fonts used. The FontName property is supported by the GetState_FontName method.
Example
See also
ISch_FontManager2 interface

GetState_Italic method

(ISch_FontManager2 interface)
Syntax
Function GetState_Italic (AnId : Integer) : Boolean;
Description
This Italic property determines the Italic style for the font. This property is supported by the GetState_Italic method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman'

See also
ISch_FontManager2 interface

GetState_Rotation method

(ISch_FontManager2 interface)
Syntax
Function GetState_Rotation (AnId : Integer) : Integer;
Description
The Rotation property determines the orientation of the text object. For ISch_Labels, it is necessary to set the Orientation property of these ISch_Labels as well as the Rotation property for the FontID variables. This property is supported by the GetState_Rotation method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Times New Roman');
// Note eRotate90 for the Orientation property, and a 90 value as a parameter for the GetFontID method.

See also
ISch_FontManager2 interface

GetState_SaveFlag method

(ISch_FontManager2 interface)
Syntax
Function GetState_SaveFlag (AnId : Integer) : Boolean;
Description
Example
See also
ISch_FontManager2 interface

GetState_Size method

(ISch_FontManager2 interface)
Syntax
Function GetState_Size (AnId : Integer) : Integer;
Description
The Size property determines the font size. This property is supported by the GetState_Size method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Times New Roman Font size to 14 points - 1st parameter

See also
ISch_FontManager2 interface

GetState_StrikeOut method

(ISch_FontManager2 interface)
Syntax
Function GetState_StrikeOut (AnId : Integer) : Boolean;
Description
The StrikeOut property determines whether the font is striked out or not. This property is supported by the GetState_StrikeOut method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (sixth parameter)

See also
ISch_FontManager2 interface

GetState_UnderLine method

(ISch_FontManager2 interface)
Syntax
Function GetState_UnderLine (AnId : Integer) : Boolean;
Description
This UnderLine property determines whether the font is underlined or not. This property is supported by the GetState_UnderLine method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (third parameter)

See also
ISch_FontManager2 interface

IsFontVertical method

(ISch_FontManager2 interface)
Syntax
Function IsFontVertical(FontID : TFontID) : Boolean;
Description
This function determines whether the font is vertically orientated or not.
Example
See also
ISch_FontManager2 interface

ISch_FontManager2 Properties

Bold property

(ISch_FontManager2 interface)
Syntax
Property Bold [Id : Integer] : Boolean Read GetState_Bold ;
Description
This Bold property determines the Bold style for the font. This property is supported by the GetState_Bold method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,True,False,'Times New Roman');

See also
ISch_FontManager interface
GetFontID method

DefaultHorizontalSysFontId property

(ISch_FontManager2 interface)
Syntax
Property DefaultHorizontalSysFontId : Integer Read GetState_DefaultHorizontalSysFontId;
Description
Example
See also
ISch_FontManager2 interface

DefaultVerticalSysFontId property

(ISch_FontManager2 interface)
Syntax
Property DefaultVerticalSysFontId : Integer Read GetState_DefaultVerticalSysFontId;
Description
Example
See also
ISch_FontManager2 interface

FontCount property

(ISch_FontManager2 interface)
Syntax
Property FontCount : Integer Read GetState_FontCount;
Description
The FontCount property returns the number of fonts used in the computer system that the Altium Designer is currently residing on. This property is supported by the GetState_FontCount method.
Example
See also
ISch_FontManager interface

FontName property

(ISch_FontManager2 interface)
Syntax
Property FontName [Id : Integer] : TFontName Read GetState_FontName ;
Description
This indexed FontName property returns the name of an indexed font as a string. Every computer could have a different table of fonts used. The FontName property is supported by the GetState_FontName method.
Example
See also
ISch_FontManager2 interface

Italic property

(ISch_FontManager2 interface)
Syntax
Property Italic [Id : Integer] : Boolean Read GetState_Italic ;
Description
This Italic property determines the Italic style for the font. This property is supported by the GetState_Italic method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');

See also
ISch_FontManager2 interface
GetFontID method

Rotation property

(ISch_FontManager2 interface)
Syntax
Property Rotation [Id : Integer] : Integer Read GetState_Rotation ;
Description
The Rotation property determines the orientation of the text object. For ISch_Labels, it is necessary to set the Orientation property of these ISch_Labels as well as the Rotation property for the FontID variables. This property is supported by the GetState_Rotation method.
Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,False,False,False,'Times New Roman');
// Note eRotate90 for the Orientation property, and a 90 value as a parameter for the GetFontID method.

See also
ISch_FontManager2 interface

SaveFlag property

(ISch_FontManager2 interface)
Syntax
Property SaveFlag [Id : Integer] : Boolean Read GetState_SaveFlag ;
Description
Example
See also
ISch_FontManager2 interface

Size property

(ISch_FontManager2 interface)
Syntax
Property Size [Id : Integer] : Integer Read GetState_Size ;
Description
The Size property determines the font size. This property is supported by the GetState_Size method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Times New Roman Font size to 14 points - 1st parameter

See also
ISch_FontManager interface
GetFontID method

StrikeOut property

(ISch_FontManager2 interface)
Syntax
Property StrikeOut [Id : Integer] : Boolean Read GetState_StrikeOut;
Description
The StrikeOut property determines whether the font is striked out or not. This property is supported by the GetState_StrikeOut method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (sixth parameter)

See also
ISch_FontManager interface
GetFontID method

UnderLine property

(ISch_FontManager2 interface)
Syntax
Property UnderLine [Id : Integer] : Boolean Read GetState_UnderLine;
Description
This UnderLine property determines whether the font is underlined or not. This property is supported by the GetState_UnderLine method.
DelphiScript Example

ALabel.Orientation := eRotate90;
ALabel.FontId      := SchServer.FontManager.GetFontID(14,90,False,True,False,False,'Times New Roman');
// Strikeout set to false (third parameter)

See also
ISch_FontManager interface
GetFontID method

ISch_JunctionConvertSettings Interface

Overview
The ISch_JunctionConvertSettings interface hierarchy is as follows;

ISch_JunctionConvertSettings Methods and Properties Table

ISch_JunctionConvertSettings methods
GetJunctionConversion
SetJunctionConversion
GetMiterSize
SetMiterSize
GetBatchMode
SetBatchMode
GetShowDialog
SetShowDialog
Export_ToIniFile
Import_FromIniFile
ISch_JunctionConvertSettings properties
JunctionConversion
MiterSize
BatchMode
ShowDialog

ISch_JunctionConvertSettings Methods

SetShowDialog method

(ISch_JunctionConvertSettings interface)
Syntax
Procedure SetShowDialog (Value : Boolean);
Description
Example
See also
ISch_JunctionConvertSettings interface

SetMiterSize method

(ISch_JunctionConvertSettings interface)
Syntax
Procedure SetMiterSize (Value : TDistance);
Description
Example
See also
ISch_JunctionConvertSettings interface

SetJunctionConversion method

(ISch_JunctionConvertSettings interface)
Syntax
Procedure SetJunctionConversion(Value : TJunctionConversionKind);
Description
Example
See also
ISch_JunctionConvertSettings interface

SetBatchMode method

(ISch_JunctionConvertSettings interface)
Syntax
Procedure SetBatchMode (Value : Boolean);
Description
Example
See also
ISch_JunctionConvertSettings interface

Import_FromIniFile method

(ISch_JunctionConvertSettings interface)
Syntax
Procedure Import_FromIniFile(Const OptionsReader : IOptionsReader);
Description
Example
See also
ISch_JunctionConvertSettings interface

GetShowDialog method

(ISch_JunctionConvertSettings interface)
Syntax
Function GetShowDialog : Boolean;
Description
Example
See also
ISch_JunctionConvertSettings interface

GetMiterSize method

(ISch_JunctionConvertSettings interface)
Syntax
Function GetMiterSize : TDistance;
Description
Example
See also
ISch_JunctionConvertSettings interface

GetJunctionConversion method

(ISch_JunctionConvertSettings interface)
Syntax
Function GetJunctionConversion : TJunctionConversionKind;
Description
Example
See also
ISch_JunctionConvertSettings interface

GetBatchMode method

(ISch_JunctionConvertSettings interface)
Syntax
Function GetBatchMode : Boolean;
Description
Example
See also
ISch_JunctionConvertSettings interface

Export_ToIniFile method

(ISch_JunctionConvertSettings interface)
Syntax
Procedure Export_ToIniFile (Const OptionsWriter : IOptionsWriter);
Description
Example
See also
ISch_JunctionConvertSettings interface

ISch_JunctionConvertSettings Properties

MiterSize property

(ISch_JunctionConvertSettings interface)
Syntax
Property MiterSize : TDistance Read GetMiterSize Write SetMiterSize;
Description
Example
See also
ISch_JunctionConvertSettings interface

JunctionConversion property

(ISch_JunctionConvertSettings interface)
Syntax
Property JunctionConversion : TJunctionConversionKind Read GetJunctionConversion Write SetJunctionConversion;
Description
Example
See also
ISch_JunctionConvertSettings interface

BatchMode property

(ISch_JunctionConvertSettings interface)
Syntax
Property BatchMode : Boolean Read GetBatchMode Write SetBatchMode;
Description
Example
See also
ISch_JunctionConvertSettings interface

ShowDialog property

(ISch_JunctionConvertSettings interface)
Syntax
Property ShowDialog : Boolean Read GetShowDialog Write SetShowDialog;
Description
Example
See also
ISch_JunctionConvertSettings interface

ISch_LibraryRuleChecker Interface

Overview
The ISch_LibraryRuleChecker interface represents the internal library rule checker facility that checks the validity of symbols in schematic libraries.

ISch_LIbraryRuleChecker Methods and Properties Table

ISch_LibraryRuleChecker methods
GetState_Duplicate_Pins
GetState_Duplicate_Component
GetState_Missing_Pin_Number
GetState_Missing_Default_Designator
GetState_Missing_Footprint
GetState_Missing_Description
GetState_Missing_Pin_Name
GetState_Missing_Pins_In_Sequence
GetState_ShowReport
SetState_Duplicate_Pins
SetState_Duplicate_Component
SetState_Missing_Pin_Number
SetState_Missing_Default_Designator
SetState_Missing_Footprint
SetState_Missing_Description
SetState_Missing_Pin_Name
SetState_Missing_Pins_In_Sequence
SetState_ShowReport
SetState_FromParameters
Import_FromUser
Run
I_ObjectAddress
ISch_LibraryRuleChecker properties
Duplicate_Pins
Duplicate_Component
Missing_Pin_Number
Missing_Default_Designator
Missing_Footprint
Missing_Description
Missing_Pin_Name
Missing_Pins_In_Sequence
ShowReport

ISch_LibraryRuleChecker Methods

GetState_Duplicate_Component method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Duplicate_Component : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_Duplicate_Pins method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Duplicate_Pins : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_Missing_Default_Designator method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Missing_Default_Designator : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_Missing_Description method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Missing_Description : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_Missing_Footprint method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Missing_Footprint : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_Missing_Pin_Name method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Missing_Pin_Name : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_Missing_Pin_Number method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Missing_Pin_Number : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_Missing_Pins_In_Sequence method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_Missing_Pins_In_Sequence : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

GetState_ShowReport method

(ISch_LibraryRuleChecker interface)
Syntax
Function GetState_ShowReport : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Duplicate_Component method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Duplicate_Component (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Duplicate_Pins method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Duplicate_Pins (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_FromParameters method

(ISch_LibraryRuleChecker interface)
Syntax
Function SetState_FromParameters(Parameters : PChar) : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Missing_Default_Designator method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Missing_Default_Designator(AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Missing_Description method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Missing_Description (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Missing_Footprint method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Missing_Footprint (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Missing_Pin_Name method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Missing_Pin_Name (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Missing_Pin_Number method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Missing_Pin_Number (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_Missing_Pins_In_Sequence method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_Missing_Pins_In_Sequence (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

SetState_ShowReport method

(ISch_LibraryRuleChecker interface)
Syntax
Procedure SetState_ShowReport (AValue : Boolean);
Description
Example
See also
ISch_LibraryRuleChecker interface

Import_FromUser method

(ISch_LibraryRuleChecker interface)
Syntax
Function Import_FromUser : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

I_ObjectAddress method

(ISch_LibraryRuleChecker interface)
Syntax
Function I_ObjectAddress : TSCHObjectHandle;
Description
Example
See also
ISch_LibraryRuleChecker interface

Run method

(ISch_LibraryRuleChecker interface)
Syntax
Function Run : Boolean;
Description
Example
See also
ISch_LibraryRuleChecker interface

ISch_LibraryRuleChecker Properties

Duplicate_Component property

(ISch_LibraryRuleChecker interface)
Syntax
Property Duplicate_Component : Boolean Read GetState_Duplicate_Component Write SetState_Duplicate_Component ;
Description
Example
See also
ISch_LibraryRuleChecker interface

Duplicate_Pins property

(ISch_LibraryRuleChecker interface)
Syntax
Property Duplicate_Pins : Boolean Read GetState_Duplicate_Pins Write SetState_Duplicate_Pins ;
Description
Example
See also
ISch_LibraryRuleChecker interface

Missing_Default_Designator property

(ISch_LibraryRuleChecker interface)
Syntax
Property Missing_Default_Designator : Boolean Read GetState_Missing_Default_Designator Write SetState_Missing_Default_Designator;
Description
Example
See also
ISch_LibraryRuleChecker interface

Missing_Description property

(ISch_LibraryRuleChecker interface)
Syntax
Property Missing_Description : Boolean Read GetState_Missing_Description Write SetState_Missing_Description ;
Description
Example
See also
ISch_LibraryRuleChecker interface

Missing_Footprint property

(ISch_LibraryRuleChecker interface)
Syntax
Property Missing_Footprint : Boolean Read GetState_Missing_Footprint Write SetState_Missing_Footprint ;
Description
Example
See also
ISch_LibraryRuleChecker interface

Missing_Pins_In_Sequence property

(ISch_LibraryRuleChecker interface)
Syntax
Property Missing_Pins_In_Sequence : Boolean Read GetState_Missing_Pins_In_Sequence Write SetState_Missing_Pins_In_Sequence ;
Description
Example
See also
ISch_LibraryRuleChecker interface

Missing_Pin_Name property

(ISch_LibraryRuleChecker interface)
Syntax
Property Missing_Pin_Name : Boolean Read GetState_Missing_Pin_Name Write SetState_Missing_Pin_Name ;
Description
Example
See also
ISch_LibraryRuleChecker interface

Missing_Pin_Number property

(ISch_LibraryRuleChecker interface)
Syntax
Property Missing_Pin_Number : Boolean Read GetState_Missing_Pin_Number Write SetState_Missing_Pin_Number ;
Description
Example
See also
ISch_LibraryRuleChecker interface

ShowReport property

(ISch_LibraryRuleChecker interface)
Syntax
Property ShowReport : Boolean Read GetState_ShowReport Write SetState_ShowReport ;
Description
Example
See also
ISch_LibraryRuleChecker interface

ISch_HitTest Interface

Overview
This ISch_HitTest interface returns you the number of objects and object type at a particular point on the schematic document.

Notes
To specify the location where the objects can be checked on the schematic document, pass in the location (of TLocation type) and invoke the CreateHitTest method from the ISchDocument interface. This location parameter can be set either programmatically or by the ChooseLocationInteractively method form the ISch_Document interface.

ISch_HitTest methods
GetState_HitTestCount
GetState_HitObject
ISch_HitTest properties
HitTestCount
HitObject

See also
ISch_Document interface
CreateHitTest method
ChooseLocationInteractively method
ChooseRectangleInteractively method
TLocation type

ISch_HitTest Methods

GetState_HitObject method

(ISch_HitTest interface)
Syntax
Function GetState_HitObject (i : Integer) : ISch_GraphicalObject;
Description
This function returns you the indexed object at the particular point on the schematic document. This method is used in the HitObject property.
Example
See also
ISch_HitTest interface

GetState_HitTestCount method

(ISch_HitTest interface)
Syntax
Function GetState_HitTestCount : Integer;
Description
This function returns you the number of objects at the particular point on the schematic document. This method is used in the HitTestCount property.
Example
See also
ISch_HitTest interface

ISch_HitTest Properties

HitObject property

(ISch_HitTest interface)
Syntax
Property HitObject[i : Integer] : ISch_GraphicalObject Read GetState_HitObject;
Description
This property returns you the indexed object at the particular point on the schematic document. This property is supported by the GetState_HitObject method.
Example
See also
ISch_HitTest interface
HitTestCount property

HitTestCount property

(ISch_HitTest interface)
Syntax
Property HitTestCount : Integer Read GetState_HitTestCount;
Description
This property returns you the number of objects at the particular point on the schematic document. This property is supported by the GetState_HitTestCount method.
Example
See also
ISch_HitTest interface

ISch_Iterator Interface

Overview
An iterator object interface represents an existing iterator object which iterates through a design database to fetch specified objects within a specified region if necessary.

Important Notes
Delphi Script does not support sets. Therefore, to specify the object set or the layer set, you need to use the MkSet function to create a set of objects, for example Iterator.AddFilter_ObjectSet(MkSet(ePort));

The TIterationDepth type denotes how deep the iterator can look - look for first level objects (for example standalone system parameters of the document only, or all levels for example all parameters on the document including system parameters, objects' parameters such as component's parameters. By default, eIterateAllLevels value is used.

SetState_FilterAll denotes that all objects and the whole schematic document is to be searched within. Otherwise, use the following AddFilter_ObjectSet, AddFilter_Area etc methods to set up a restricted search.

The ISch_Iterator interface hierarchy is as follows;

ISch_Iterator Methods and Properties Table

ISch_Iterator methods
I_ObjectAddress
SetState_FilterAll
AddFilter_ObjectSet
AddFilter_CurrentPartPrimitives
AddFilter_CurrentDisplayModePrimitives
AddFilter_PartPrimitives
AddFilter_Area
SetState_IterationDepth
FirstSchObject
NextSchObject
ISch_Iterator properties

See also
ISch_BasicContainer interface
ISch_Lib interface

ISch_Iterator Methods

AddFilter_Area method

(ISch_Iterator interface)
Syntax
Procedure AddFilter_Area(X1, Y1, X2, Y2 : TCoord);
Description
The AddFilter_Area procedure defines the rectangular bounds (X1,Y1 and X2,Y2) of the schematic/library document that the iterator will search within.
Example
See also
ISch_Iterator interface
TCoord type

AddFilter_CurrentDisplayModePrimitives method

(ISch_Iterator interface)
Syntax
Procedure AddFilter_CurrentDisplayModePrimitives;
Description
This procedure sets the iterator to look for current display mode primitives only. A component can be represented by different modes - ie there can be different graphical representations of the same component type.
Example
See also
ISch_Iterator interface

AddFilter_CurrentPartPrimitives method

(ISch_Iterator interface)
Syntax
Procedure AddFilter_CurrentPartPrimitives;
Description
This procedure sets up the filter of the iterator to look for the current primitives of a part only. A component can be composed of multiple parts and each part is identified by its PartID value.
Example
See also
ISch_Iterator interface

AddFilter_ObjectSet method

(ISch_Iterator interface)
Syntax
Procedure AddFilter_ObjectSet(Const AObjectSet : TObjectSet);
Description
This procedure defines which objects the iterator will look for on a schematid document or a library document.
Example
See also
ISch_Iterator interface
TObjectSet type

AddFilter_PartPrimitives method

(ISch_Iterator interface)
Syntax
Procedure AddFilter_PartPrimitives(APartId : Integer; ADisplayMode : TDisplayMode);
Description
This procedure sets up the filter of the iterator to look for primitives of a part (of a component). A component can be a multi-part component, for example a 74LS04 can have four parts and they are identified by the PartID value.
Example
See also
ISch_Iterator interface
TDisplayMode type in Workspace Manager API

FirstSchObject method

(ISch_Iterator interface)
Syntax
Function FirstSchObject : ISch_BasicContainer;
Description
The FirstSchObject function fetches the first object found by the iterator. The FirstSchObject method is to be invoked first and then in a While Nil loop, the NextSchObject is called repeatedly until it returns a nil value where the loop is terminated.
DelphiScript Example

Iterator   := CurrentSheet.SchIterator_Create;
Iterator.AddFilter_ObjectSet(MkSet(ePort));
If Iterator = Nil Then Exit;
Try
    Port := Iterator.FirstSchObject;
    While Port <> Nil Do
    Begin
        PortNumber := PortNumber + 1;
        Port := Iterator.NextSchObject;
    End;
Finally
    CurrentSheet.SchIterator_Detroy(Iterator);
End;

See also
ISch_Iterator interface
NextSchObject interface

I_ObjectAddress method

(ISch_Iterator interface)
Syntax
Function I_ObjectAddress : TSCHObjectHandle;
Description
This function obtains the pointer to the iterator object.
Example
See also
ISch_Iterator interface
TSchObjectHandle type

NextSchObject method

(ISch_Iterator interface)
Syntax
Function NextSchObject : ISch_BasicContainer;
Description
The NextSchObject function fetches the next object found by the iterator. The FirstSchObject method is to be invoked first and then in a While Nil loop, the NextSchObject is called repeatedly until it returns a nil value where the loop is terminated.
DelphiScript Example

Iterator   := CurrentSheet.SchIterator_Create;
Iterator.AddFilter_ObjectSet(MkSet(ePort));
If Iterator = Nil Then Exit;
Try
    Port := Iterator.FirstSchObject;
    While Port <> Nil Do
    Begin
        PortNumber := PortNumber + 1;
        Port := Iterator.NextSchObject;
    End;
Finally
    CurrentSheet.SchIterator_Detroy(Iterator);
End;

See also
ISch_Iterator interface
FirstSchObject method

SetState_FilterAll method

(ISch_Iterator interface)
Syntax
Procedure SetState_FilterAll;
Description
This procedure sets the iterator to look for everything on a document.
Example
See also
ISch_Iterator interface

SetState_IterationDepth method

(ISch_Iterator interface)
Syntax
Procedure SetState_IterationDepth(AIterationDepth : TIterationDepth);
Description
The TIterationDepth type denotes how deep the iterator can look on a document.
Look for first level objects, for example standalone system parameters of the document only, or all levels for example all parameters on the document including system parameters, objects' parameters such as component's parameters.
By default, eIterateAllLevels value is used.
Example
See also
ISch_Iterator interface
TIterationDepth type

ILibCompInfoReader Interface

Overview
The ILibCompInfoReader interface represents the object which has the list of library components (symbols) of a loaded schematic library.

A Schematic library file with a SchLib extension can be loaded in the object represented by the  ILibCompInfoReader interface and to obtain each component (Symbol), invoke the indexed ComponentInfos method. This method fetches the object which is represented by the IComponentInfo interface.

The steps required to load a schematic library and its components.
1. Create an object and pass in the filename of a schematic library file. This object is represented by the ILibCompInfoReader interface. This object is created by the SchServer.CreateLibCompInfoReader(LibraryFileName);
2. Invoke the ReadAllComponentInfo method to load the components specified by the library name.
3. Invoke the NumComponentInfos method to obtain the number of components for this library
4. Obtain the indexed ComponentInfos method. This ComponentInfos method returns the indexed IComponentInfo interface.

ILibCompInfoReader methods
GetState_ComponentInfo
GetState_FileName
ReadAllComponentInfo
NumComponentInfos
I_ObjectAddress
ILibCompInfoReader properties
ComponentInfos
FileName

ILibCompInfoReader Methods

GetState_ComponentInfo method

(ILibCompInfoReader interface)
Syntax
Function GetState_ComponentInfo (i : Integer) : IComponentInfo;
Description
This GetState_ComponentInfo function retrieves the indexed IComponentInfo interface representing the component information datastructure. The ComponentInfo interface contains information such as component name, alias name, part count and offset for the indexed schematic symbol (component) in the library.
Example

Var
    ALibCompReader : ICompInfoReader;
    CompInfo       : IComponentInfo;
    CompNum, J     : Integer;
Begin
    ALibCompReader := SchServer.CreateLibCompInfoReader(FileName);
    ALibCompReader.ReadAllComponentInfo;
    CompNum := ALIbCompReader.NumComponentInfos;
    For J := 0 To CompNum -1 Do
    Begin
        ReportInfo.Add(FileName);
        CompInfo := ALibCompReader.ComponentInfos[J];
        ReportInfo.Add(' Name : '         + CompInfo.CompName);
        ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
        ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
        ReportInfo.Add('  Description : ' + CompInfo.Description);
        ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
        ReportInfo.Add('  FileName : '    + CompInfo.FileName);
        ReportInfo.Add('');
    End;

See also
ILibCompInfoReader interface
IComponentInfo interface

GetState_FileName method

(ILibCompInfoReader interface)
Syntax
Function GetState_FileName : WideString;
Description
This GetState_FileName function gets the temporary filename of the datastructure.
Example

Var
    ALibCompReader : ICompInfoReader;
    CompInfo       : IComponentInfo;
    CompNum, J     : Integer;
Begin
    ALibCompReader := SchServer.CreateLibCompInfoReader(FileName);
    ALibCompReader.ReadAllComponentInfo;
    ShowMessage(ALibCompReader.GetState_FileName);
    CompNum := ALIbCompReader.NumComponentInfos;
    For J := 0 To CompNum -1 Do
    Begin
        ReportInfo.Add(FileName);
        CompInfo := ALibCompReader.ComponentInfos[J];
        ReportInfo.Add(' Name : '         + CompInfo.CompName);
        ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
        ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
        ReportInfo.Add('  Description : ' + CompInfo.Description);
        ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
        ReportInfo.Add('  FileName : '    + CompInfo.FileName);
        ReportInfo.Add('');
    End;
 

See also
ILibCompInfoReader interface
IComponentInfo interface

I_ObjectAddress method

(ILibCompInfoReader interface)
Syntax
Function I_ObjectAddress : TSCHObjectHandle;
Description
This function obtains the pointer to the ILibCompInfoReader object.
Example
See also
ILibCompInfoReader interface

NumComponentInfos method

(ILibCompInfoReader interface)
Syntax
Function NumComponentInfos : Integer;
Description
This NumComponentInfos function retrieves the number of component information data structures. This method is also used by the ComponentInfos property. The ComponentInfo interface contains information such as component name, alias name, part count and offset for the indexed schematic symbol (component) in the library.
Example

Var
    ALibCompReader : ICompInfoReader;
    CompInfo       : IComponentInfo;
    CompNum, J     : Integer;
Begin
    ALibCompReader := SchServer.CreateLibCompInfoReader(FileName);
    ALibCompReader.ReadAllComponentInfo;
    ShowMessage(ALibCompReader.GetState_FileName);
    CompNum := ALIbCompReader.NumComponentInfos;
    For J := 0 To CompNum -1 Do
    Begin
        ReportInfo.Add(FileName);
        CompInfo := ALibCompReader.ComponentInfos[J];
        ReportInfo.Add(' Name : '         + CompInfo.CompName);
        ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
        ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
        ReportInfo.Add('  Description : ' + CompInfo.Description);
        ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
        ReportInfo.Add('  FileName : '    + CompInfo.FileName);
        ReportInfo.Add('');
    End;

See also
ILibCompInfoReader interface

ReadAllComponentInfo method

(ILibCompInfoReader interface)
Syntax
Procedure ReadAllComponentInfo;
Description
The ReadAllComponentInfo retrieves all the IComponentInfo data structures for the ILibCompInfoReader interface. The ComponentInfo interface contains information such as component name, alias name, part count and offset for the indexed schematic symbol (component) in the library.
Example

Var
    ALibCompReader : ICompInfoReader;
    CompInfo       : IComponentInfo;
    CompNum, J     : Integer;
Begin
    ALibCompReader := SchServer.CreateLibCompInfoReader(FileName);
    ALibCompReader.ReadAllComponentInfo;
    ShowMessage(ALibCompReader.GetState_FileName);
    CompNum := ALIbCompReader.NumComponentInfos;
    For J := 0 To CompNum -1 Do
    Begin
        ReportInfo.Add(FileName);
        CompInfo := ALibCompReader.ComponentInfos[J];
        ReportInfo.Add(' Name : '         + CompInfo.CompName);
        ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
        ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
        ReportInfo.Add('  Description : ' + CompInfo.Description);
        ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
        ReportInfo.Add('  FileName : '    + CompInfo.FileName);
        ReportInfo.Add('');
    End;

See also
ILibCompInfoReader interface

ILibCompInfoReader Properties

ComponentInfos property

(ILibCompInfoReader interface)
Syntax
Property ComponentInfos[i : Integer] : IComponentInfo Read GetState_ComponentInfo;
Description
This ComponentInfos property retrieves the indexed IComponentInfo data structure. This property is supported by the GetState_ComponentInfo method. The ComponentInfo interface contains information such as component name, alias name, part count and offset for the indexed schematic symbol (component) in the library.
Example

Var
    ALibCompReader : ICompInfoReader;
    CompInfo       : IComponentInfo;
    CompNum, J     : Integer;
Begin
    ALibCompReader := SchServer.CreateLibCompInfoReader(FileName);
    ALibCompReader.ReadAllComponentInfo;
    ShowMessage(ALibCompReader.GetState_FileName);
    CompNum := ALIbCompReader.NumComponentInfos;
    For J := 0 To CompNum -1 Do
    Begin
        ReportInfo.Add(FileName);
        CompInfo := ALibCompReader.ComponentInfos[J];
        ReportInfo.Add(' Name : '         + CompInfo.CompName);
        ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
        ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
        ReportInfo.Add('  Description : ' + CompInfo.Description);
        ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
        ReportInfo.Add('  FileName : '    + CompInfo.FileName);
        ReportInfo.Add('');
    End;

See also
ILibCompInfoReader interface

FileName property

(ILibCompInfoReader interface)
Syntax
Property FileName : WideString Read GetState_FileName;
Description
This FileName property gets the temporary filename of the datastructure. The FileName property is supported by the GetState_FileName function.
Example
ShowMessage(ALibCompReader.Filename)
See also
ILibCompInfoReader interface

IComponentInfo Interface

Overview
The IComponentInfo interface is an item within the ILibCompInfoReader interface. This IComponentInfo interface represents a schematic symbol in a specified schematic library file with a SchLib extension.

The steps required to load a schematic library and its components.
1. Create an object and pass in the filename of a schematic library file. This object is represented by the ILibCompInfoReader interface by the SchServer.CreateLibCompInfoReader(FileName);
2. Invoke the ReadAllComponentInfo method to load the library and its components.
3. Invoke the NumComponentInfos method to obtain the number of components for this library
4. Obtain the indexed ComponentInfos method. This ComponentInfos method returns the indexed IComponentInfo interface.

Notes
The IComponentInfo interface is extracted from the ILibCompInfoReader.ComponentInfos[Index] method.

IComponentInfo methods
GetState_Offset
GetState_AliasName
GetState_CompName
GetState_PartCount
GetState_Description
IComponentInfo properties
Offset
AliasName
CompName
PartCount
Description

See also
ILibCompInfoReader interface

IComponentInfo Methods

GetState_AliasName method

(IComponentInfo interface)
Syntax
Function GetState_AliasName : WideString;
Description
This function returns the alias name for this component. Ie a component can be referred to by one of its multiple names.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.GetState_AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

GetState_CompName method

(IComponentInfo interface)
Syntax
Function GetState_CompName : WideString;
Description
This function returns the name string for this component from the IComponentInfo object interface.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.GetState_CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.GetState_AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.GetState_PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.Getstate_Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.GetState_Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

GetState_Description method

(IComponentInfo interface)
Syntax
Function GetState_Description : WideString;
Description
This function returns the description string for this component from the IComponentInfo object interface.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.GetState_CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.GetState_AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.GetStatePartCount));
    ReportInfo.Add('  Description : ' + CompInfo.GetState_Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.GetState_Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

GetState_Offset method

(IComponentInfo interface)
Syntax
Function GetState_Offset : Integer;
Description
This function returns the offset as a number - each part of a component whole has an offset to denote its place within the component.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.GetState_CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.GetState_AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.GetState_PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.GetState_Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.GetState_Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

GetState_PartCount method

(IComponentInfo interface)
Syntax
Function GetState_PartCount : Integer;
Description
This function obtains the number of parts (multiple types of the same component type as an example). For example an Integrated circuit may have multiple smaller modules, such as a 74LS00 has multiple OR gates.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.GetState_CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.GetState_AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.GetState_PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.GetState_Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.GetState_Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

IComponentInfo Properties

AliasName property

(IComponentInfo interface)
Syntax
Property AliasName : WideString Read GetState_AliasName;
Description
This property returns the alias name for this component. Ie a component can be referred to by one of its multiple names. This property is supported by the GetState_AliasName method.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.GetState_ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

CompName property

(IComponentInfo interface)
Syntax
Property CompName : WideString Read GetState_CompName;
Description
This property returns the name string for this component from the IComponentInfo object interface. This property is supported by the GetState_CompName function.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.GetState_ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

Description property

(IComponentInfo interface)
Syntax
Property Description : WideString Read GetState_Description;
Description
This property returns the description string for this component from the IComponentInfo object interface. This property is supported by the GetState_Description method.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.GetState_ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

Offset property

(IComponentInfo interface)
Syntax
Property Offset : Integer Read GetState_Offset;
Description
This property returns the offset as a number - each part of a component whole has an offset to denote its place within the component. This property is supported by the GetState_Offset function.
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.GetState_ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

PartCount property

(IComponentInfo interface)
Syntax
Property PartCount : Integer Read GetState_PartCount;
Description
Example

// Obtain the number of components in the specified sch library.
CompNum := ALibCompReader.NumComponentInfos;
 
// Go thru each component obtained by the LibCompReader interface.
For J := 0 To CompNum - 1 Do
Begin
    ReportInfo.Add(FileName);
    CompInfo := ALibCompReader.ComponentInfos[J];
    ReportInfo.Add(' Name : '         + CompInfo.CompName);
    ReportInfo.Add('  Alias Name : '  + CompInfo.AliasName);
    ReportInfo.Add('  Part Count : '  + IntToStr(CompInfo.PartCount));
    ReportInfo.Add('  Description : ' + CompInfo.Description);
    ReportInfo.Add('  Offset : '      + IntToStr(CompInfo.Offset));
    ReportInfo.Add('  Filename : '      + CompInfo.Filename);
    ReportInfo.Add('');
End;

See also
IComponentInfo interface

IComponentPainterView Interface

Overview

IComponentPainterView Methods and Properties Table

IComponentPainterView methods
HideComponentTextualDescriptions;
HighLightComponentPins
RegisterListener
RenameSpecifiedPins
SetComponent
SetComponentByHandle
ShowAllPins
ShowPinsAsSelected
ShowSpecifiedPinsOnly
IComponentPainterView properties

See also
ISch_ServerInterface interface
IComponentMetafilePainter interface
IDocumentPainterView interface

IComponentPainterView Methods

SetComponent method

(IComponentPainterView interface)
Syntax
Procedure SetComponent(LibReference, LibraryPath : WideString; APartIndex: Integer);
Description
The SetComponent procedure sets the ComponentPainter object to display the specific part of a component from the library with the specified library path. Note a component can be a multi-part component and the first part is numbered 1 and so on.
A component painter object can also be set with the component's handle of ISch_Component type.
Example

// display Schematic model on the 3d panel
// cLibraryPath_Sch = 'C:\Program Files\Altium Designer\Developer Kit\Examples\Sch\View Models\Xilinx CoolRunner II.SchLib';

// cLibraryReference_Sch = 'XC2C32-3CP56C';
 
FExternalFormComponent_Sch.Visible := True;
ComponentPainter := FExternalForm_Sch As IComponentPainterView;
ComponentPainter.SetComponent(cLibraryReference_Sch, cLibraryPath_Sch, 1);

See also
IComponentPainterView interface
ViewModel server example in \Developer Kit\Examples\Sch\ViewModel folder of SDK installation.

SetComponentByHandle method

(IComponentPainterView interface)
Syntax
Procedure SetComponentByHandle(AHandle : ISch_Component; APartIndex : Integer);
Description
The SetComponentByHandle procedure sets the ComponentPainter object to display the specific part of a component. Note a component can be a multi-part component and the first part is numbered 1 and so on.
A component painter object can also be set with the full path to a library and its component.
Example

FExternalFormComponent_Sch.Visible := True;
ComponentPainter := FExternalForm_Sch As IComponentPainterView;
ComponentPainter.SetComponent(ACompHandle, 1);

See also
IComponentPainterView interface
CreateComponentPainter method
SetComponent method
IExternalForm interface in RT_ClientServerInterface unit.
TExternalFormComponent in ExternalForms unit.

HighLightComponentPins method

(IComponentPainterView interface)
Syntax
Procedure HighLightComponentPins(APinNameList : WideString; AHighlightColor : TColor; ANonHighlightColor : TColor);
Description
Example
 
See also
IComponentPainterView interface

ShowSpecifiedPinsOnly method

(IComponentPainterView interface)
Syntax
Procedure ShowSpecifiedPinsOnly(APinNameList : WideString);
Description
Example
 
See also
IComponentPainterView interface

ShowAllPins method

(IComponentPainterView interface)
Syntax
Procedure ShowAllPins;
Description
Example
 
See also
IComponentPainterView interface

RenameSpecifiedPins method

(IComponentPainterView interface)
Syntax
Procedure RenameSpecifiedPins(APinNamesParam : WideString);
Description
Example
 
See also
IComponentPainterView interface

HideComponentTextualDescriptions method

(IComponentPainterView interface)
Syntax
Procedure HideComponentTextualDescriptions;
Description
Example
 
See also
IComponentPainterView interface

ShowPinsAsSelected method

(IComponentPainterView interface)
Syntax
Procedure ShowPinsAsSelected(APinNameList : WideString);
Description
Example
 
See also
IComponentPainterView interface

RegisterListener method

(IComponentPainterView interface)
Syntax
Procedure RegisterListener  (APinSelectionListener : IComponentPinSelectionListener);
Description
Example
 
See also
IComponentPainterView interface

IComponentPinSelectionListener Interface

Overview
This is for internal use.

IComponentPinSelectionListener methods
ComponentPinSelectionChanged
IComponentPinSelectionListener properties

See also
ISch_ServerInterface interface
IComopnentPainterView interface

Methods

ComponentPinSelectionChanged method

(IComponentPinSelectionListener interface)
Syntax
Procedure (NewPinSelectionList : WideString);
Description
This is for internal use.
Example
See also
IComponentPinSelectionListener interface

IComponentMetafilePainter

Overview
The IComponentMetaFilePainter interface is an internal interface that provides a mechanism to generate images into library reports within the Schematic Library Editor.

The IComponentMetafilePainter interface hierarchy is as follows;

IComponentMetafilePainter methods
SetComponent
DrawToMetafile
IComponentMetafilePainter properties

See also
ISch_ServerInterface interface
IComponentPainterView interface
IComponentMetafilePainter interface

Methods

DrawToMetafile method

(IComponentMetafilePainter interface)
Syntax
Procedure DrawToMetafile(APartIndex : Integer; APaintColorMode : TPaintColorMode;AScaleMode : TPaintScaleMode; Const AFileName : WideString);
Description
This is for internal use.
Example
See also
IComponentMetafilePainter interface
TPaintColorMode type
TPaintScaleMode type

SetComponent method

(IComponentMetafilePainter interface)
Syntax
Procedure SetComponent (Const ALibReference, ALibraryPath : WideString);
Description
This is for internal use.
Example
 
See also
IComponentMetafilePainter interface

IDocumentPainterView Interface

Overview
The IDocumentPainterView interface is an internal interface for the Schematic Editor and it represents the Mini Viewer facility. This is for internal use.

IDocumentPainterView methods
DrawCurrentZoomRectangle_Invert
PaintSingleObject
Redraw
Refresh
RefreshCurrentZoomWindow
SetState_ClickHandler
SetState_DbleClickHandler
SetState_DocumentToPaint
SetState_MouseMoveOverLocationHandler
IDocumentPainterView properties

See also
ISch_ServerInterface interface
IComponentPainterView interface
IComponentMetafilePainter interface

Methods

SetState_MouseMoveOverLocationHandler method

(IDocumentPainterView interface)
Syntax
Procedure SetState_MouseMoveOverLocationHandler(ALocationProcedure : TLocationProcedure);
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

SetState_DocumentToPaint method

(IDocumentPainterView interface)
Syntax
Procedure SetState_DocumentToPaint(Const ADocument : ISch_Document);
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

SetState_DbleClickHandler method

(IDocumentPainterView interface)
Syntax
Procedure SetState_DbleClickHandler (ALocationProcedure : TLocationProcedure);
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

SetState_ClickHandler method

(IDocumentPainterView interface)
Syntax
Procedure SetState_ClickHandler (ALocationProcedure : TLocationProcedure);
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

RefreshCurrentZoomWindow method

(IDocumentPainterView interface)
Syntax
Procedure RefreshCurrentZoomWindow;
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

Refresh method

(IDocumentPainterView interface)
Syntax
Procedure Refresh;
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

Redraw method

(IDocumentPainterView interface)
Syntax
Procedure Redraw (Const AGraphicalObject : ISch_GraphicalObject);
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

PaintSingleObject method

(IDocumentPainterView interface)
Syntax
Procedure PaintSingleObject (Const AGraphicalObject : ISch_GraphicalObject);
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

DrawCurrentZoomRectangle_Invert method

(IDocumentPainterView interface)
Syntax
Procedure DrawCurrentZoomRectangle_Invert;
Description
This is for internal use.
Example
See also
IDocumentPainterView interface

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.

软件的功能取决于您购买的Altium产品级别。您可以比较Altium Designer软件订阅的各个级别中包含的功能,以及通过Altium 365平台提供的应用程序所能实现的功能。

如果您在软件中找不到某个讨论过的功能,请联系Altium销售团队以获取更多信息。