ISch_Lib interface

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

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 

SetState_ShowHiddenPins
SetState_Description
SetState_Current_SchComponent
SetState_ReleaseVaultGUID
SetState_FolderGUID
GetState_ShowHiddenPins
GetState_Description
GetState_Current_SchComponent
SetState_CurrentSchComponentAddPart
SetState_CurrentSchComponentAddDisplaymode
SetState_CurrentSchComponentRemovePart
SetState_CurrentSchComponentRemoveDisplayMode
SetState_CurrentSchComponentPartId
GetState_CurrentSchComponentPartId
SetState_CurrentSchComponentDisplayMode
GetState_CurrentSchComponentDisplayMode
GetState_ReleaseVaultGUID
GetState_FolderGUID
AddSchComponent
RemoveSchComponent
SchLibIterator_Create
LibIsEmpty
TransferComponentsPrimitivesBackFromEditor
TransferComponentsPrimitivesToEditor
Sch_LibraryRuleChecker_Create
SplitIntoComponents
GetState_SchComponentByLibRef
LinkDocumentToReleaseVault
ReleaseDocument
SetState_LifeCycleDefinitionGUID
GetState_LifeCycleDefinitionGUID
SetState_RevisionNamingSchemeGUID
GetState_RevisionNamingSchemeGUID
LoadFromFile(Const VFSAddress
SaveToFile(Const VFSAddress
Sch_LibraryRuleChecker_Destroy
SetState_DocumentBorderStyle
SetState_CustomSheetStyle
SetState_SheetStyle
SetState_WorkspaceOrientation
SetState_TitleBlockOn
SetState_ReferenceZonesOn
SetState_BorderOn
SetState_UseCustomSheet
SetState_CustomX
SetState_CustomY
SetState_CustomXZones
SetState_CustomYZones
SetState_CustomMarginWidth
SetState_SnapGridOn
SetState_SnapGridSize
SetState_VisibleGridOn
SetState_VisibleGridSize
SetState_HotspotGridOn
SetState_HotspotGridSize
SetState_ShowTemplateGraphics
SetState_TemplateFileName
SetState_SheetSizeX
SetState_SheetSizeY
SetState_SheetZonesX
SetState_SheetZonesY
SetState_SheetMarginWidth
SetState_SystemFont
SetState_LoadFormat
SetState_Unit
GetState_DocumentName
GetState_DocumentBorderStyle
GetState_CustomSheetStyle
GetState_SheetStyle
GetState_WorkspaceOrientation
GetState_TitleBlockOn
GetState_ReferenceZonesOn
GetState_BorderOn
GetState_UseCustomSheet
GetState_CustomX
GetState_CustomY
GetState_CustomXZones
GetState_CustomYZones
GetState_CustomMarginWidth
GetState_SnapGridOn
GetState_SnapGridSize
GetState_VisibleGridOn
GetState_VisibleGridSize
GetState_HotspotGridOn
GetState_HotspotGridSize
GetState_ShowTemplateGraphics
GetState_TemplateFileName
GetState_SheetSizeX
GetState_SheetSizeY
GetState_SheetZonesX
GetState_SheetZonesY
GetState_SheetMarginWidth
GetState_SystemFont
GetState_LoadFormat
GetState_Unit
GetState_UnitSystem
GetState_InternalTolerance
Graphical_VirtualRectangle
BoundingRectangle_Selected
RegisterSchObjectInContainer
UnRegisterSchObjectFromContainer
ObjectReferenceZone
RedrawToDC
UnregisterAndFreeAllConnectionLine
LockViewUpdate
UnLockViewUpdate
CreateHitTest
CreateLibraryFromProject
UpdateDocumentProperties
CountContextMenuObjects
PopupMenuHitTest
GridCoordinateUp
GridCoordinateClosest
UpdateDisplayForCurrentSheet
IsInEditorView
ChooseLocationInteractively
ChooseRectangleInteractively
Import_FromUser_Parameters
ResetAllSchParametersPosition
GetState_Location
GetState_Color
GetState_AreaColor
GetState_Selection
GetState_EnableDraw
GetState_Disabled
GetState_Dimmed
GetState_OwnerPartId
GetState_OwnerPartDisplayMode
GetState_LiveHighlightValue
GetState_ErrorKind
GetState_ErrorColor
GetState_DisplayError
GetState_ErrorString
GetState_CompilationMasked
SetState_Location(ALocation
SetState_Color
SetState_AreaColor
SetState_Selection
SetState_EnableDraw
SetState_Disabled
SetState_Dimmed
SetState_OwnerPartId
SetState_OwnerPartDisplayMode
SetState_LiveHighlightValue
SetState_ErrorKind
SetState_ErrorColor
SetState_DisplayError
SetState_ErrorString
SetState_CompilationMasked
RotateBy90
MoveByXY
MoveToXY
Mirror
SetState_xSizeySize
GraphicallyInvalidate
BoundingRectangle
BoundingRectangle_Full
AddErrorString
ResetErrorFields
SetState_Text
GetState_ObjectId
GetState_SchBasicContainer
GetState_OwnerSchDocument
GetState_Text
AddSchObject
AddAndPositionSchObject
RemoveSchObject
SchIterator_Create
DeleteAll
FreeAllContainedObjects
Setstate_Default
Import_FromUser
GetState_IdentifierString
GetState_DescriptionString
Replicate
ExportToParameters
SchIterator_Destroy

ISch_Lib properties 

ShowHiddenPins
Description
CurrentSchComponent
ReleaseVaultGUID
FolderGUID
LifeCycleDefinitionGUID
RevisionNamingSchemeGUID
DocumentName
DocumentBorderStyle
CustomSheetStyle
SheetStyle
WorkspaceOrientation
TitleBlockOn
BorderOn
ReferenceZonesOn
UseCustomSheet
CustomX
CustomY
CustomXZones
CustomYZones
CustomMarginWidth
SnapGridOn
SnapGridSize
ShowTemplateGraphics
TemplateFileName
VisibleGridOn
VisibleGridSize
HotspotGridOn
HotspotGridSize
SheetSizeX
SheetSizeY
SheetZonesX
SheetZonesY
SheetMarginWidth
SystemFont
LoadFormat
DisplayUnit
UnitSystem
InternalTolerance
Location
Color
AreaColor
Selection
EnableDraw
Disabled
Dimmed
OwnerPartId
OwnerPartDisplayMode
LiveHighlightValue
ErrorKind
ErrorColor
DisplayError
ErrorString
CompilationMasked
ObjectId
Container
OwnerDocument

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: