Schematic API System Interfaces reference

Created: May 13, 2013 | Updated: October 23, 2018

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

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

Function GetState_Location : TPoint;
Function GetState_ObjectsCount : Integer;
Function GetState_IsManualJunction : Boolean;
Procedure SetState_Location(AValue : TPoint);
Procedure SetState_ObjectsCount(AValue : Integer);
Procedure SetState_IsManualJunction(AValue : Boolean);
Function GetState_Size : EDPTypes_SCH.TSize;
Procedure SetState_Size(AValue : EDPTypes_SCH.TSize);

IConnection properties

Property Location : TPoint Read GetState_Location Write SetState_Location;
Property ObjectsCount : Integer Read GetState_ObjectsCount Write SetState_ObjectsCount;
Property IsManualJunction : Boolean Read GetState_IsManualJunction Write SetState_IsManualJunction;
Property Size : EDPTypes_SCH.TSize Read GetState_Size Write SetState_Size;

See also
IConnectionsArray interface
ISch_Sheet interface

IConnection 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
AddConnectionXY_WithSize
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 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.
Notes
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

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

Contact Us

Contact our corporate or local offices directly.

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