
# ISch_ServerInterface interface

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

```csharp
public interface ISch_ServerInterface
```

**Namespace:** SCH · **Assembly:** Altium.SDK.Interfaces

## Remarks

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

Note that these [`IServerModule`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IServerModule.md) interfaces represent loaded servers in Altium Designer. This application manages single instances of different server modules. Each server can have multiple server document kinds, for example the Schematic server supports two server document kinds - SCH and SCHLIB design documents. A loaded server typically hosts documents and each document in turn hosts a document view and panel views. Thus a Schematic Editor server also has the [`IServerModule`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IServerModule.md) interface along with the `ISch_ServerInterface` interface.

Read [`SCH.GlobalVars.SchServer`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/GlobalVars.md#schserver) to obtain the `ISch_ServerInterface` object interface which represents the Schematic Editor server.

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [FontManager](#fontmanager) | [ISch_FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md) | get | This property retrieves the Font manager object which is represented by the [`ISch_FontManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md) interface. |
| [JunctionConvertSettings](#junctionconvertsettings) | [ISch_JunctionConvertSettings](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_JunctionConvertSettings.md) | get | The `JunctionConvertSettings` property represents a crossing of wiring on a schematic sheet. |
| [ProbesTimerEnabled](#probestimerenabled) | `bool` | get; set | The `ProbesTimerEnabled` property determines whether the Probes are active or not. |
| [RobotManager](#robotmanager) | [ISch_RobotManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_RobotManager.md) | get | This property returns the [`ISch_RobotManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_RobotManager.md) interface. |
| [SchPreferences](#schpreferences) | [ISch_Preferences](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Preferences.md) | get | This Preferences property retrieves the [`ISch_Preferences`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Preferences.md) interface which represents the Preferences object for the Schematic Editor. |

### FontManager

This property retrieves the Font manager object which is represented by the [`ISch_FontManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md) interface.

```csharp
ISch_FontManager GetState_FontManager();
```

**Type:** [ISch_FontManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md) · **Access:** read-only

The accessors are extension methods of `ISch_ServerInterfaceHelper` (`using SCH;`).

**See also:** [ISch_FontManager2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager2.md)

### JunctionConvertSettings

The `JunctionConvertSettings` property represents a crossing of wiring on a schematic sheet. When an addition of a wire would create a four-way junction, this is converted to into two adjacent three way junctions. If it is disabled and when a four way junction is created, the two wires crossing at the intersection are not joined electrically and if the Display Cross Overs option is enabled, a cross over is shown on this intersection.

```csharp
ISch_JunctionConvertSettings GetState_JunctionConvertSettings();
```

**Type:** [ISch_JunctionConvertSettings](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_JunctionConvertSettings.md) · **Access:** read-only

The accessors are extension methods of `ISch_ServerInterfaceHelper` (`using SCH;`).

**See also:** [ISch_JunctionConvertSettings](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_JunctionConvertSettings.md)

### ProbesTimerEnabled

The `ProbesTimerEnabled` property determines whether the Probes are active or not. This feature is used in the LiveDesign process in Altium Designer.

```csharp
bool GetState_ProbesTimerEnabled();
void SetState_ProbesTimerEnabled(bool argValue);
```

**Type:** `bool` · **Access:** read/write

### RobotManager

This property returns the [`ISch_RobotManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_RobotManager.md) interface. This interface deals with sending Schematic notification messages in the system. To have the ability to send a specific message when a specific event in the Schematic Editor occurs can be achieved with the [`ISch_RobotManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_RobotManager.md) interface.

```csharp
ISch_RobotManager GetState_RobotManager();
```

**Type:** [ISch_RobotManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_RobotManager.md) · **Access:** read-only

The accessors are extension methods of `ISch_ServerInterfaceHelper` (`using SCH;`).

**Example:** Place a port on the current schematic sheet and register it with the robot manager.

```csharp
using DXP;
using SCH;

ISch_ServerInterface schServer = SCH.GlobalVars.SchServer;
ISch_Document doc = schServer?.GetCurrentSchDocument();
if (doc == null)
    return;

var schPort = schServer.SchObjectFactory(TObjectId.ePort, TObjectCreationMode.eCreate_GlobalCopy) as ISch_Port;
if (schPort == null)
    return;
schPort.SetState_Location(new DXP.Point(new SPoint { X = EDP.Utils.MilsToCoord(2500), Y = EDP.Utils.MilsToCoord(2500) }));
schPort.SetState_Style(TPortArrowStyle.ePortRight);
schPort.SetState_IOType(TPortIO.ePortBidirectional);
schPort.SetState_Alignment(THorizontalAlign.eHorizontalCentreAlign);
schPort.SetState_Width(EDP.Utils.MilsToCoord(500));
schPort.SetState_AreaColor(0);
schPort.SetState_TextColor(0xFF00FF);
schPort.SetState_Name("New Port 4");
// Add a new port object in the existing schematic document.
doc.RegisterSchObjectInContainer(schPort);
schServer.GetState_RobotManager().SendMessage(doc, SCHConstant.BroadCast,
    SCHConstant.SCHMPrimitiveRegistration, schPort);
```

**See also:** [ISch_RobotManager](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_RobotManager.md)

**Examples:** [Extension_ModifySchWireColor](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_ModifySchWireColor/Source%20Code/Commands.cs#L47)

### SchPreferences

This Preferences property retrieves the [`ISch_Preferences`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Preferences.md) interface which represents the Preferences object for the Schematic Editor.

```csharp
ISch_Preferences GetState_SchPreferences();
```

**Type:** [ISch_Preferences](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Preferences.md) · **Access:** read-only

The accessors are extension methods of `ISch_ServerInterfaceHelper` (`using SCH;`).

**Example:** Turn on the watermarks for device sheets and read-only sheets.

```csharp
using SCH;

ISch_Preferences preferences = SCH.GlobalVars.SchServer?.GetState_SchPreferences();
if (preferences == null)
    return;
preferences.Set_WatermarkDeviceSheet(true);
preferences.Set_WatermarkReadOnlySheet(true);
```

**See also:** [ISch_Preferences](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Preferences.md)

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [CreateComponentMetafilePainter](#createcomponentmetafilepainter) | [IComponentMetafilePainter](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentMetafilePainter.md) |  |
| [CreateComponentPainter](#createcomponentpainter) | [IComponentPainterView](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentPainterView.md) | A [`IComponentPainterView`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentPainterView.md) interface represents the surface that a component can be painted on. |
| [CreateDocumentPainter](#createdocumentpainter) | [IDocumentPainterView](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IDocumentPainterView.md) | This method retrieves the [`IDocumentPainterView`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IDocumentPainterView.md) interface that represents the Mini Viewer object in the Schematic Editor. |
| [CreateLibCompFullInfoReader](#createlibcompfullinforeader) | [ILibCompFullInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompFullInfoReader.md) |  |
| [CreateLibCompInfoReader](#createlibcompinforeader) | [ILibCompInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md) | The method returns a [`ILibCompInfoReader`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md) interface that represents a library component information reader object. |
| [CreateSchLibrary](#createschlibrary) | [ISch_Lib](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Lib.md) |  |
| [DestroyCompFullInfoReader](#destroycompfullinforeader) | `void` |  |
| [DestroyCompInfoReader](#destroycompinforeader) | `void` | The method destroys an library component information reader object that is represented by the [`ILibCompInfoReader`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md) interface. |
| [DestroySchLibrary](#destroyschlibrary) | `void` |  |
| [DestroySchObject](#destroyschobject) | `void` |  |
| [DisableScrapCompile](#disablescrapcompile) | `void` |  |
| [EnableScrapCompile](#enablescrapcompile) | `void` |  |
| [GetCurrentSchDocument](#getcurrentschdocument) | [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md) | This method returns the [`ISch_Document`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md) interface that represents the current schematic document open in Altium Designer. |
| [GetSchDocumentByPath](#getschdocumentbypath) | [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md) |  |
| [GetSchDocumentBySchDocID](#getschdocumentbyschdocid) | [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md) |  |
| [LoadComponent](#loadcomponent) | [ISch_Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Component.md) |  |
| [LoadComponentFromDatabaseLibrary](#loadcomponentfromdatabaselibrary) | [ISch_Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Component.md) |  |
| [LoadComponentFromLibrary](#loadcomponentfromlibrary) | [ISch_Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Component.md) |  |
| [LoadDesignItemDeviceSheet](#loaddesignitemdevicesheet) | [ISch_SheetSymbol](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_SheetSymbol.md) |  |
| [LoadSchDocumentByPath](#loadschdocumentbypath) | [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md) |  |
| [PaintComponentThumbnail](#paintcomponentthumbnail) | `uint` |  |
| [PaintDeviceSheetThumbnail](#paintdevicesheetthumbnail) | `uint` |  |
| [PaintLoadedComponentThumbnail](#paintloadedcomponentthumbnail) | `uint` |  |
| [ReportSchObjectsDifferences](#reportschobjectsdifferences) | `int` |  |
| [SchObjectFactory](#schobjectfactory) | [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md) | The `SchObjectFactory` method creates a new object based on TObjectID and [`TObjectCreationMode`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TObjectCreationMode.md) values. |
| [SchObjectFactoryBySettings](#schobjectfactorybysettings) | [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md) |  |
| [UpdateDocumentTemplate](#updatedocumenttemplate) | `void` |  |
| [UpdateSignalValueDisplay](#updatesignalvaluedisplay) | `bool` |  |

### CreateComponentMetafilePainter

*No description yet.*

```csharp
IComponentMetafilePainter CreateComponentMetafilePainter();
```

**Returns:** [IComponentMetafilePainter](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentMetafilePainter.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

**See also:** [IComponentMetafilePainter](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentMetafilePainter.md)

### CreateComponentPainter

A [`IComponentPainterView`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentPainterView.md) interface represents the surface that a component can be painted on.

```csharp
IComponentPainterView CreateComponentPainter();
```

**Returns:** [IComponentPainterView](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentPainterView.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

This interface is a [`IExternalForm`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IExternalForm.md) type which represents the TExternalFormComponent object. The TExternalForm class is defined in the [`ExternalForm`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/ExternalForm.md) unit from the DXP Run Time Library.

This [`IComponentPainterView`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentPainterView.md) interface is not supported in the scripting system.

This [`IComponentPainterView`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentPainterView.md) interface is for server development purposes and you need to have RT_IntegratedLIbrary, RT_Schematic, ExternalForms and the RT_ClientServerINterfaces units in a server project.

**See also:** [IComponentPainterView](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IComponentPainterView.md)

### CreateDocumentPainter

This method retrieves the [`IDocumentPainterView`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IDocumentPainterView.md) interface that represents the Mini Viewer object in the Schematic Editor.

```csharp
IDocumentPainterView CreateDocumentPainter();
```

**Returns:** [IDocumentPainterView](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IDocumentPainterView.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

**See also:** [IDocumentPainterView](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IDocumentPainterView.md)

### CreateLibCompFullInfoReader

*No description yet.*

```csharp
ILibCompFullInfoReader CreateLibCompFullInfoReader(string argLibFileName);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibFileName` | `string` | value |

**Returns:** [ILibCompFullInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompFullInfoReader.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### CreateLibCompInfoReader

The method returns a [`ILibCompInfoReader`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md) interface that represents a library component information reader object.

```csharp
ILibCompInfoReader CreateLibCompInfoReader(string argLibFileName);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibFileName` | `string` | value |

**Returns:** [ILibCompInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

Invoke the `CreateLibCompInfoReader` method with the path to a schematic library and to obtain the number of components in this library, invoke the ILibCompInfoReader.NumComponentsInfos method and then to obtain the information for each component in this library invoke the ComponentInfos[] method. When you are done, invoke the [`DestroyCompInfoReader`](#destroycompinforeader) method.

**Example:** Report the components of the current schematic library.

```csharp
using System.Collections.Generic;
using System.IO;
using DXP;
using SCH;

ISch_ServerInterface schServer = SCH.GlobalVars.SchServer;
if (schServer == null)
    return;

ISch_Document currentLib = schServer.GetCurrentSchDocument();
if (currentLib == null)
    return;
// Check whether the current document is a schematic library.
if (currentLib.GetState_ObjectId() != TObjectId.eSchLib)
{
    DXP.Utils.ShowError("Please open a schematic library.", "Library components");
    return;
}
string fileName = currentLib.GetState_DocumentName();

// Set up the library component reader.
ILibCompInfoReader reader = schServer.CreateLibCompInfoReader(fileName);
if (reader == null)
    return;
reader.ReadAllComponentInfo();

var report = new List<string> { "Schematic Libraries and Their Components Report", "-----------------------------------------------", "" };
// Go through each component found by the reader.
int componentCount = reader.NumComponentInfos();
for (int j = 0; j < componentCount; j++)
{
    IComponentInfo info = reader.GetState_ComponentInfo(j);
    report.Add(fileName);
    report.Add(" Name : " + info.GetState_CompName());
    report.Add(" Alias Name : " + info.GetState_AliasName());
    report.Add(" Part Count : " + info.GetState_PartCount());
    report.Add(" Description : " + info.GetState_Description());
    report.Add(" Offset : " + info.GetState_Offset());
    report.Add("");
}
schServer.DestroyCompInfoReader(ref reader);

// Save the report and open it in Altium Designer.
string reportPath = Path.Combine(Path.GetTempPath(), "SchLibCompReport.txt");
File.WriteAllLines(reportPath, report);
IClient client = DXP.GlobalVars.Client;
IServerDocument document = client?.OpenDocument("Text", reportPath);
if (document != null)
    client.ShowDocument(document);
```

**See also:** [ILibCompInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md)

### CreateSchLibrary

*No description yet.*

```csharp
ISch_Lib CreateSchLibrary();
```

**Returns:** [ISch_Lib](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Lib.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### DestroyCompFullInfoReader

*No description yet.*

```csharp
void DestroyCompFullInfoReader(ref ILibCompFullInfoReader argLibCompReader);
void DestroyCompFullInfoReader(ref object argLibCompReader);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibCompReader` | [ILibCompFullInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompFullInfoReader.md) | ref |

**Returns:** nothing (`void`)

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

### DestroyCompInfoReader

The method destroys an library component information reader object that is represented by the [`ILibCompInfoReader`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md) interface.

```csharp
void DestroyCompInfoReader(ref ILibCompInfoReader argLibCompReader);
void DestroyCompInfoReader(ref object argLibCompReader);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibCompReader` | [ILibCompInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md) | ref |

**Returns:** nothing (`void`)

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

**See also:** [ISch_ServerInterface.CreateLibCompInfoReader](#createlibcompinforeader), [ILibCompInfoReader](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ILibCompInfoReader.md)

### DestroySchLibrary

*No description yet.*

```csharp
void DestroySchLibrary(ref ISch_Lib argSchLib);
void DestroySchLibrary(ref object argSchLib);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSchLib` | [ISch_Lib](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Lib.md) | ref |

**Returns:** nothing (`void`)

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

### DestroySchObject

*No description yet.*

```csharp
void DestroySchObject(ref ISch_BasicContainer argSchObject);
void DestroySchObject(ref object argSchObject);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSchObject` | [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md) | ref |

**Returns:** nothing (`void`)

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

### DisableScrapCompile

*No description yet.*

```csharp
void DisableScrapCompile();
```

**Returns:** nothing (`void`)

### EnableScrapCompile

*No description yet.*

```csharp
void EnableScrapCompile();
```

**Returns:** nothing (`void`)

### GetCurrentSchDocument

This method returns the [`ISch_Document`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md) interface that represents the current schematic document open in Altium Designer.

```csharp
ISch_Document GetCurrentSchDocument();
```

**Returns:** [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

**See also:** [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md)

**Examples:** [Extension_CreateSchComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateSchComponent/Source%20Code/Commands.cs#L29), [Extension_ModifySchWireColor](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_ModifySchWireColor/Source%20Code/Commands.cs#L29), [Extension_PlaceDeviceSheet](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PlaceDeviceSheet/Source%20Code/Commands.cs#L46), [Extension_RemoveSchLibComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_RemoveSchLibComponent/Source%20Code/Commands.cs#L29), [Extension_SupplierPreference](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_SupplierPreference/Source%20Code/Commands.cs#L75)

### GetSchDocumentByPath

*No description yet.*

```csharp
ISch_Document GetSchDocumentByPath(string argPath);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argPath` | `string` | value |

**Returns:** [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

**Examples:** [Ciiva](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Ciiva/Source%20Code/CiivaBOMDocument.cs#L76), [Extension_RefreshDocument](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_RefreshDocument/Source%20Code/Commands.cs#L29)

### GetSchDocumentBySchDocID

*No description yet.*

```csharp
ISch_Document GetSchDocumentBySchDocID(int argDocID);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argDocID` | `int` | value |

**Returns:** [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### LoadComponent

*No description yet.*

```csharp
ISch_Component LoadComponent(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibIdentifierKind` | [TLibIdentifierKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/TLibIdentifierKind.md) | value |
| `argLibraryIdentifier` | `string` | value |
| `argDesignItemID` | `string` | value |

**Returns:** [ISch_Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Component.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

**Examples:** [Ciiva](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Ciiva/Source%20Code/CiivaBOMDocument.cs#L259)

### LoadComponentFromDatabaseLibrary

*No description yet.*

```csharp
ISch_Component LoadComponentFromDatabaseLibrary(string argLibraryName, string argDatabaseTableName, string argDatabaseKeys);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibraryName` | `string` | value |
| `argDatabaseTableName` | `string` | value |
| `argDatabaseKeys` | `string` | value |

**Returns:** [ISch_Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Component.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### LoadComponentFromLibrary

*No description yet.*

```csharp
ISch_Component LoadComponentFromLibrary(string argLibReference, string argLibraryName);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibReference` | `string` | value |
| `argLibraryName` | `string` | value |

**Returns:** [ISch_Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Component.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### LoadDesignItemDeviceSheet

*No description yet.*

```csharp
ISch_SheetSymbol LoadDesignItemDeviceSheet(TLibIdentifierKind argLibIdentifierKind, string argLibraryIdentifier, string argDesignItemID, int argLocationX, int argLocationY);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argLibIdentifierKind` | [TLibIdentifierKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/TLibIdentifierKind.md) | value |
| `argLibraryIdentifier` | `string` | value |
| `argDesignItemID` | `string` | value |
| `argLocationX` | `int` | value |
| `argLocationY` | `int` | value |

**Returns:** [ISch_SheetSymbol](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_SheetSymbol.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### LoadSchDocumentByPath

*No description yet.*

```csharp
ISch_Document LoadSchDocumentByPath(string argFullPath);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argFullPath` | `string` | value |

**Returns:** [ISch_Document](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### PaintComponentThumbnail

*No description yet.*

```csharp
uint PaintComponentThumbnail(string argSymbolName, string argSymbolLibraryFullPath, int argPartIndex, int argWidth, int argHeight);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSymbolName` | `string` | value |
| `argSymbolLibraryFullPath` | `string` | value |
| `argPartIndex` | `int` | value |
| `argWidth` | `int` | value |
| `argHeight` | `int` | value |

**Returns:** `uint`

### PaintDeviceSheetThumbnail

*No description yet.*

```csharp
uint PaintDeviceSheetThumbnail(string argDeviceSheetName, int argWidth, int argHeight);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argDeviceSheetName` | `string` | value |
| `argWidth` | `int` | value |
| `argHeight` | `int` | value |

**Returns:** `uint`

### PaintLoadedComponentThumbnail

*No description yet.*

```csharp
uint PaintLoadedComponentThumbnail(ISch_Component argSchPart, int argPartIndex, int argWidth, int argHeight);
uint PaintLoadedComponentThumbnail(object argSchPart, int argPartIndex, int argWidth, int argHeight);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argSchPart` | [ISch_Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Component.md) | value |
| `argPartIndex` | `int` | value |
| `argWidth` | `int` | value |
| `argHeight` | `int` | value |

**Returns:** `uint`

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

### ReportSchObjectsDifferences

*No description yet.*

```csharp
int ReportSchObjectsDifferences(ISch_BasicContainer argObject1, ISch_BasicContainer argObject2, bool argIgnoreSpatialAttributes, ref string argDiffDescription);
int ReportSchObjectsDifferences(object argObject1, object argObject2, bool argIgnoreSpatialAttributes, ref string argDiffDescription);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argObject1` | [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md) | value |
| `argObject2` | [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md) | value |
| `argIgnoreSpatialAttributes` | `bool` | value |
| `argDiffDescription` | `string` | ref |

**Returns:** `int`

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

### SchObjectFactory

The `SchObjectFactory` method creates a new object based on TObjectID and [`TObjectCreationMode`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TObjectCreationMode.md) values.

```csharp
ISch_BasicContainer SchObjectFactory(TObjectId argObjectId, TObjectCreationMode argCreationMode);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argObjectId` | [TObjectId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TObjectId.md) | value |
| `argCreationMode` | [TObjectCreationMode](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TObjectCreationMode.md) | value |

**Returns:** [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

When you wish to create a new design object with the `ISch_ServerInterface`'s `SchObjectFactory` method, you will need to have a specific design object type, assign this object with new attribute values and register this object with in the schematic document with the [`ISch_Document.RegisterSchObjectInContainer`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Document.md#registerschobjectincontainer) method.

**Example:** Create a port and place it on the current schematic sheet.

```csharp
using DXP;
using SCH;

ISch_ServerInterface schServer = SCH.GlobalVars.SchServer;
if (schServer == null)
    return;
ISch_Document document = schServer.GetCurrentSchDocument();
if (document == null)
    return;

// Create a new port object.
var port = schServer.SchObjectFactory(TObjectId.ePort, TObjectCreationMode.eCreate_GlobalCopy) as ISch_Port;
if (port == null)
    return;

// Set up the port; it is placed at 500, 500 mils.
port.SetState_Location(new DXP.Point(new SPoint { X = EDP.Utils.MilsToCoord(500), Y = EDP.Utils.MilsToCoord(500) }));
port.SetState_Style(TPortArrowStyle.ePortRight);
port.SetState_IOType(TPortIO.ePortBidirectional);
port.SetState_Alignment(THorizontalAlign.eHorizontalCentreAlign);
port.SetState_Width(EDP.Utils.MilsToCoord(1000));
port.SetState_AreaColor(0);
port.SetState_TextColor(0xFFFFFF);
port.SetState_Name("A new port with no net.");

// Add the port to the document and redraw the sheet.
document.RegisterSchObjectInContainer(port);
document.GraphicallyInvalidate();
```

**See also:** [TObjectCreationMode](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TObjectCreationMode.md)

**Examples:** [Extension_CreateSchComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateSchComponent/Source%20Code/Commands.cs#L36)

### SchObjectFactoryBySettings

*No description yet.*

```csharp
ISch_BasicContainer SchObjectFactoryBySettings(TObjectId argObjectId, TUnitSystem argUnit);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argObjectId` | [TObjectId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TObjectId.md) | value |
| `argUnit` | [TUnitSystem](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TUnitSystem.md) | value |

**Returns:** [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md)

Extension method of `ISch_ServerInterfaceHelper` (`using SCH;`).

### UpdateDocumentTemplate

*No description yet.*

```csharp
void UpdateDocumentTemplate(IServerDocument argDocument, string argVaultGUID, string argItemRevisionGUID);
void UpdateDocumentTemplate(object argDocument, string argVaultGUID, string argItemRevisionGUID);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argDocument` | [IServerDocument](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/IServerDocument.md) | value |
| `argVaultGUID` | `string` | value |
| `argItemRevisionGUID` | `string` | value |

**Returns:** nothing (`void`)

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

### UpdateSignalValueDisplay

*No description yet.*

```csharp
bool UpdateSignalValueDisplay(IDMObject argDMObject, int argValue, int argBitIndex);
bool UpdateSignalValueDisplay(object argDMObject, int argValue, int argBitIndex);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argDMObject` | [IDMObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/IDMObject.md) | value |
| `argValue` | `int` | value |
| `argBitIndex` | `int` | value |

**Returns:** `bool`

The first overload is an extension method of `ISch_ServerInterfaceHelper` (`using SCH;`) with typed parameters; the second is declared by the interface.

## Returned by

[GlobalVars.SchServer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/GlobalVars.md#schserver)

## Examples

Used in the SDK examples: [Ciiva](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Ciiva/Source%20Code/CiivaBOMDocument.cs#L48), [Extension_CreateProject](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateProject/Source%20Code/Commands.cs#L30), [Extension_CreateSchComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_CreateSchComponent/Source%20Code/Commands.cs#L25), [Extension_ModifySchWireColor](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_ModifySchWireColor/Source%20Code/Commands.cs#L25), [Extension_PlaceDeviceSheet](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_PlaceDeviceSheet/Source%20Code/Commands.cs#L42), [Extension_RefreshDocument](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_RefreshDocument/Source%20Code/Commands.cs#L25), [Extension_RemoveSchLibComponent](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_RemoveSchLibComponent/Source%20Code/Commands.cs#L25).
