
# ISch_Label interface

The `ISch_Label` interface represents an existing label object on a schematic document. This interface is the ancestor interface for the [`ISch_NetLabel`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_NetLabel.md) interfaces.

```csharp
public interface ISch_Label : ISch_GraphicalObject
```

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

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

**Derived:** [ISch_ComplexText](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_ComplexText.md), [ISch_HarnessLayoutConnectionPoint](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HarnessLayoutConnectionPoint.md), [ISch_HarnessLayoutLabel](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HarnessLayoutLabel.md), [ISch_HarnessNoConnect](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HarnessNoConnect.md), [ISch_HarnessSplice](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HarnessSplice.md), [ISch_Hyperlink](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Hyperlink.md), [ISch_NetLabel](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_NetLabel.md), [ISch_PowerObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_PowerObject.md)

## Example

Set the location, color, text and font of a new label.

```csharp
using SCH;

ISch_ServerInterface schServer = SCH.GlobalVars.SchServer;
ISch_Document schDoc = schServer?.GetCurrentSchDocument();
if (schDoc == null)
    return;
var schLabel = schServer.SchObjectFactory(TObjectId.eLabel, TObjectCreationMode.eCreate_GlobalCopy) as ISch_Label;
if (schLabel == null)
    return;

var location = new DXP.Point(new DXP.SPoint { X = EDP.Utils.MilsToCoord(1000), Y = EDP.Utils.MilsToCoord(1000) });
schLabel.SetState_Location(location);
schLabel.SetState_Color(12345);
schLabel.SetState_Text("A new name");
schLabel.SetState_FontId(schServer.GetState_FontManager().GetFontID(14, 90, false, false, false, false, "Times New Roman"));
schDoc.RegisterSchObjectInContainer(schLabel);
```

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [CalculatedValueString](#calculatedvaluestring) | `string` | get | Much like the [`DisplayString`](#displaystring), the `CalculatedValueString` contains the value of the parameter text after special string evaluation. |
| [DisplayString](#displaystring) | `string` | get | The `DisplayString` is the text displayed on the schematic after special string evaluation. |
| [FontId](#fontid) | `int` | get; set | The FontID property determines the style and type of font for the `ISch_Label` object on a Schematic document. |
| [Formula](#formula) | `string` | get |  |
| [IsMirrored](#ismirrored) | `bool` | get; set |  |
| [Justification](#justification) | [TTextJustification](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TTextJustification.md) | get; set | The Justification property determines the alignment of the text in respect to the Label object whether it is left justified, centered and so on. |
| [Orientation](#orientation) | [TRotationBy90](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TRotationBy90.md) | get; set | This Orientation property determines the angle the `ISch_Label` is at on the Schematic document. |
| [OverrideDisplayString](#overridedisplaystring) | `string` | get; set | The OverrrideDisplayString property determines the override display string which overrides the Name string. |
| [SimpleCalculatedString](#simplecalculatedstring) | `string` | get |  |

### CalculatedValueString

Much like the [`DisplayString`](#displaystring), the `CalculatedValueString` contains the value of the parameter text after special string evaluation. However, unlike the [`DisplayString`](#displaystring), it does not include the parameter name, even if that is visible on the schematic.

```csharp
string GetState_CalculatedValueString();
```

**Type:** `string` · **Access:** read-only

### DisplayString

The `DisplayString` is the text displayed on the schematic after special string evaluation. It is used in the compiled project, and will include the parameter name at the beginning of the string in the form 'Name:' if the parameter name is visible on the schematic.

```csharp
string GetState_DisplayString();
```

**Type:** `string` · **Access:** read-only

### FontId

The FontID property determines the style and type of font for the `ISch_Label` object on a Schematic document.

```csharp
int GetState_FontId();
void SetState_FontId(int argFontId);
```

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

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

### Formula

*No description yet.*

```csharp
string GetState_Formula();
```

**Type:** `string` · **Access:** read-only

### IsMirrored

*No description yet.*

```csharp
bool GetState_IsMirrored();
void SetState_IsMirrored(bool argValue);
```

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

### Justification

The Justification property determines the alignment of the text in respect to the Label object whether it is left justified, centered and so on.

```csharp
TTextJustification GetState_Justification();
void SetState_Justification(TTextJustification argValue);
```

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

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

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

### Orientation

This Orientation property determines the angle the `ISch_Label` is at on the Schematic document. The angle is in 90 degree increments - 0, 90, 180, 270.

```csharp
TRotationBy90 GetState_Orientation();
void SetState_Orientation(TRotationBy90 argRotation);
```

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

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

However if you are using the FontID property to be assigned by the [`ISch_ServerInterface.FontManager`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_ServerInterface.md#fontmanager) then you will need to set the Orientation property as well as passing in the same rotation parameter for the [`ISch_FontManager.GetFontID`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_FontManager.md#getfontid) method.

### OverrideDisplayString

The OverrrideDisplayString property determines the override display string which overrides the Name string. This is similar to the [`DisplayString`](#displaystring), except that it is used in compiled projects which use board level annotation or assembly variants. In those cases, it will include the new value that has been set by the user for that variant/annotation.

```csharp
string GetState_OverrideDisplayString();
void SetState_OverrideDisplayString(string argS);
```

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

`SetState_OverrideDisplayString` methods.

### SimpleCalculatedString

*No description yet.*

```csharp
string GetState_SimpleCalculatedString();
```

**Type:** `string` · **Access:** read-only

## Inherited members

- From [ISch_GraphicalObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md): [AddErrorString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#adderrorstring), [AreaColor](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#areacolor), [BoundingRectangle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#boundingrectangle), [BoundingRectangle_Full](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#boundingrectangle_full), [Color](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#color), [CompilationMasked](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#compilationmasked), [Dimmed](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#dimmed), [Disabled](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#disabled), [DisplayError](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#displayerror), [EnableDraw](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#enabledraw), [ErrorColor](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#errorcolor), [ErrorKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#errorkind), [ErrorString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#errorstring), [GetHash](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#gethash), [GraphicallyInvalidate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#graphicallyinvalidate), [LiveHighlightValue](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#livehighlightvalue), [Location](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#location), [Mirror](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#mirror), [MoveByXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#movebyxy), [MoveToXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#movetoxy), [OwnerPartDisplayMode](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#ownerpartdisplaymode), [OwnerPartId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#ownerpartid), [ResetErrorFields](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#reseterrorfields), [RotateBy90](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#rotateby90), [Selection](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#selection), [SetState_xSizeySize](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_GraphicalObject.md#setstate_xsizeysize)
- From [ISch_BasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md): [AddAndPositionSchObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#addandpositionschobject), [AddSchObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#addschobject), [CopyTo](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#copyto), [DeleteAll](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#deleteall), [DescriptionString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#descriptionstring), [ExportToParameters](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#exporttoparameters), [FreeAllContainedObjects](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#freeallcontainedobjects), [Handle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#handle), [IdentifierString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#identifierstring), [Import_FromUser](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#import_fromuser), [ObjectId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#objectid), [OwnerSchDocument](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#ownerschdocument), [RemoveSchObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#removeschobject), [Replicate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#replicate), [SchBasicContainer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#schbasiccontainer), [SchIterator_Create](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#schiterator_create), [SchIterator_Destroy](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#schiterator_destroy), [SchParameterByName](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#schparameterbyname), [Setstate_Default](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#setstate_default), [Text](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#text), [UniqueId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#uniqueid), [WiringDiagramOriginUniqueId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicContainer.md#wiringdiagramoriginuniqueid)
