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

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.