
# ISch_GraphicalObject interface

The `ISch_GraphicalObject` interface represents the ancestor interface for an object that has graphical properties on a schematic document.

```csharp
public interface ISch_GraphicalObject : ISch_BasicContainer
```

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

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

**Derived:** [IOpenBus_Port](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IOpenBus_Port.md), [ISch_Arc](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Arc.md), [ISch_Circle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Circle.md), [ISch_Directive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Directive.md), [ISch_HarnessEntry](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HarnessEntry.md), [ISch_Junction](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Junction.md), [ISch_Label](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Label.md), [ISch_Line](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Line.md), [ISch_NoERC](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_NoERC.md), [ISch_ParametrizedGroup](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_ParametrizedGroup.md), [ISch_Polygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md), [ISch_Rectangle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Rectangle.md), [ISch_SheetEntry](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_SheetEntry.md), [ISch_Symbol](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Symbol.md), [ISch_Template](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Template.md)

## Remarks

All graphic objects such as arcs, ports, rectangles etc have bounding rectangles of TCoordRect type.

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

`ISch_GraphicalObject` interface

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [AreaColor](#areacolor) | `int` | get; set | The `AreaColor` property denotes the filled color region of a closed object. |
| [Color](#color) | `int` | get; set | The Color property denotes the color region of a closed object which is usually the border outline. |
| [CompilationMasked](#compilationmasked) | `bool` | get; set | The `CompilationMasked` property determines whether the object is masked by the Compiler. |
| [Dimmed](#dimmed) | `bool` | get; set | This Dimmed property is true when a parent object is not part of the navigation mechanism (Navigator panel). |
| [Disabled](#disabled) | `bool` | get; set | The Disabled property determines whether the object is disabled (due to not being part of the collected objects by the filter mechanism ie the Filter panel) |
| [DisplayError](#displayerror) | `bool` | get; set | This property determines whether the `DisplayError` is displayed or not. |
| [EnableDraw](#enabledraw) | `bool` | get; set | This property merely determines whether the object can be drawn on the screen or not. |
| [ErrorColor](#errorcolor) | `int` | get; set | The `ErrorColor` property determines the error color value that the object is associated with. |
| [ErrorKind](#errorkind) | [TErrorKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/edp/TErrorKind.md) | get; set | This property determines the error kind that the object is associated with, when it is subject to the Compiler in Altium Designer. |
| [ErrorString](#errorstring) | `string` | get; set | This property returns the Error string that the object is associated with when it is subject to the Compiler in Altium Designer. |
| [LiveHighlightValue](#livehighlightvalue) | `string` | get; set | This property toggles the highlight value (text string) of the object when it is subject to the probe process in Altium Designer during the Live Design mode. |
| [Location](#location) | [Point](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/Point.md) | get; set | The Location property defines the reference point of the object (not necessarily the center of the object). |
| [OwnerPartDisplayMode](#ownerpartdisplaymode) | `byte` | get; set | This property represents schematic components in various graphical representations only. |
| [OwnerPartId](#ownerpartid) | `int` | get; set | The `OwnerPartId` property determines the child object's parent object's part id. |
| [Selection](#selection) | `bool` | get; set | This property determines whether the object is selected or not. |

### AreaColor

The `AreaColor` property denotes the filled color region of a closed object.

```csharp
int GetState_AreaColor();
void SetState_AreaColor(int argColor);
```

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

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

**See also:** [ISch_Port](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Port.md), [ISch_Pie](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Pie.md), [ISch_Rectangle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Rectangle.md), [ISch_RoundRectangle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_RoundRectangle.md), [ISch_TextFrame](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_TextFrame.md)

### Color

The Color property denotes the color region of a closed object which is usually the border outline.

```csharp
int GetState_Color();
void SetState_Color(int argColor);
```

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

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

The color format is in blue,green,red (b,g,r) primary color format and each primary color has a value of 0 to 255.

### CompilationMasked

The `CompilationMasked` property determines whether the object is masked by the Compiler. The CompileMask object can be placed on a group of objects on the schematic sheet, and these objects have their `CompilationMasked` property set to true.

```csharp
bool GetState_CompilationMasked();
void SetState_CompilationMasked(bool argValue);
```

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

### Dimmed

This Dimmed property is true when a parent object is not part of the navigation mechanism (Navigator panel). When objects are found by the Navigation mechanism, they stay as is (Dimmed is false), and the objects that are not part of the Navigation are dimmed (Dimmed is true).

```csharp
bool GetState_Dimmed();
void SetState_Dimmed(bool argB);
```

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

The Disabled / Dimmed states of a parent object (say a component), all its children (pins, lines, etc...) will be also set to this state. Thus when the Disabled/Dimmed property of a child object is being queried, the Disabled/Dimmed state of the parent object will be returned.

### Disabled

The Disabled property determines whether the object is disabled (due to not being part of the collected objects by the filter mechanism ie the Filter panel)

```csharp
bool GetState_Disabled();
void SetState_Disabled(bool argB);
```

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

The Disabled / Dimmed states of a parent object (say a component), all its children (pins, lines, etc...) will be also set to this state. Thus when the Disabled/Dimmed property of a child object is being queried, the Disabled/Dimmed state of the parent object will be returned.

### DisplayError

This property determines whether the `DisplayError` is displayed or not. When true, the red squiggly line underneath the graphical object appears when it is subject to a compilation error in Altium Designer.

```csharp
bool GetState_DisplayError();
void SetState_DisplayError(bool argValue);
```

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

### EnableDraw

This property merely determines whether the object can be drawn on the screen or not.

```csharp
bool GetState_EnableDraw();
void SetState_EnableDraw(bool argB);
```

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

### ErrorColor

The `ErrorColor` property determines the error color value that the object is associated with.

```csharp
int GetState_ErrorColor();
void SetState_ErrorColor(int argValue);
```

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

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

### ErrorKind

This property determines the error kind that the object is associated with, when it is subject to the Compiler in Altium Designer.

```csharp
TErrorKind GetState_ErrorKind();
void SetState_ErrorKind(TErrorKind argValue);
```

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

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

### ErrorString

This property returns the Error string that the object is associated with when it is subject to the Compiler in Altium Designer.

```csharp
string GetState_ErrorString();
void SetState_ErrorString(string argValue);
```

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

### LiveHighlightValue

This property toggles the highlight value (text string) of the object when it is subject to the probe process in Altium Designer during the Live Design mode.

```csharp
string GetState_LiveHighlightValue();
void SetState_LiveHighlightValue(string argValue);
```

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

### Location

The Location property defines the reference point of the object (not necessarily the center of the object). Use the [`BoundingRectangle`](#boundingrectangle) and [`BoundingRectangle_Full`](#boundingrectangle_full) methods to determine the bounding regions of the object.

```csharp
Point GetState_Location();
void SetState_Location(Point argLocation);
```

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

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

**See also:** [ISch_GraphicalObject.BoundingRectangle](#boundingrectangle), [ISch_GraphicalObject.BoundingRectangle_Full](#boundingrectangle_full)

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

### OwnerPartDisplayMode

This property represents schematic components in various graphical representations only. A schematic component can have up to 255 different graphical representations and a component can be composed of different parts that make up the whole. A child object is part of the parent object and thus the child object's owner part display mode fetches the parent's (in this case the component) part display mode.

```csharp
byte GetState_OwnerPartDisplayMode();
void SetState_OwnerPartDisplayMode(byte argValue);
```

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

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

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

### OwnerPartId

The `OwnerPartId` property determines the child object's parent object's part id. A component can be composed of multiple parts. Each part is composed of schematic primitives and thus each primitive associated with the part can be queried for its `OwnerPartId` property. The owner of the child object is the parent object.

```csharp
int GetState_OwnerPartId();
void SetState_OwnerPartId(int argValue);
```

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

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

### Selection

This property determines whether the object is selected or not. When an object is selected, a crossed line boundary appears around the object. This object can then be moved or edited graphically.

```csharp
bool GetState_Selection();
void SetState_Selection(bool argB);
```

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

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [AddErrorString](#adderrorstring) | `void` | This method adds an error string to the string whether it is at end or not. |
| [BoundingRectangle](#boundingrectangle) | [CoordRect](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/CoordRect.md) | This method returns the coordinates of the bounds of the parent object itself (not including the children objects if any). |
| [BoundingRectangle_Full](#boundingrectangle_full) | [CoordRect](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/CoordRect.md) | This method returns the coordinates of the bounds of the parent object itself and including the children objects if any.. |
| [GetHash](#gethash) | `string` |  |
| [GraphicallyInvalidate](#graphicallyinvalidate) | `void` | This method when invoked invalidates the object graphically prompting the system to do a system re-draw to refresh the screen. |
| [Mirror](#mirror) | `void` | The Mirror method flips the object across the axis (TLocaiton Type) |
| [MoveByXY](#movebyxy) | `void` | This `MoveByXY` method moves the object in a linear distance specified by the X,Y coordinates relative to the reference point of the object. |
| [MoveToXY](#movetoxy) | `void` | This `MoveToXY` method moves the object to a new location specified by the X,Y coordinates. |
| [ResetErrorFields](#reseterrorfields) | `void` | This method resets the error fields of the object. |
| [RotateBy90](#rotateby90) | `void` | The `RotateBy90` method forces the rotation of the object by its center or a defined location on the schematic sheet and the rotation is done in 90 degree increments (0, 90, 180, 270). |
| [SetState_xSizeySize](#setstate_xsizeysize) | `void` | This method sets the X size and the ySize of the graphical bounds of the object. |

### AddErrorString

This method adds an error string to the string whether it is at end or not.

```csharp
void AddErrorString(string argErrorString, bool argtEnd);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argErrorString` | `string` | value |
| `argtEnd` | `bool` | value |

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

### BoundingRectangle

This method returns the coordinates of the bounds of the parent object itself (not including the children objects if any). To determine the full bounding rectangle of the object (including the children object), invoke the [`BoundingRectangle_Full`](#boundingrectangle_full) method instead.

```csharp
CoordRect BoundingRectangle();
```

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

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

For example a Schematic component would typically have a rectangle as the outline, the pins and parameters as the children objects.

**See also:** [ISch_GraphicalObject.BoundingRectangle_Full](#boundingrectangle_full)

### BoundingRectangle_Full

This method returns the coordinates of the bounds of the parent object itself and including the children objects if any.. To determine the bounding rectangle of the parent object (excluding the children object), invoke the [`BoundingRectangle`](#boundingrectangle) method instead.

```csharp
CoordRect BoundingRectangle_Full();
```

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

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

For example a Schematic component would typically have a rectangle as the outline, the pins and parameters as the children objects.

**See also:** [ISch_GraphicalObject.BoundingRectangle](#boundingrectangle)

### GetHash

*No description yet.*

```csharp
string GetHash();
```

**Returns:** `string`

### GraphicallyInvalidate

This method when invoked invalidates the object graphically prompting the system to do a system re-draw to refresh the screen.

```csharp
void GraphicallyInvalidate();
```

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

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

### Mirror

The Mirror method flips the object across the axis (TLocaiton Type)

```csharp
void Mirror(Point argxis);
void Mirror(IPoint argxis);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argxis` | [Point](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/Point.md) | value |

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

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

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

### MoveByXY

This `MoveByXY` method moves the object in a linear distance specified by the X,Y coordinates relative to the reference point of the object.

```csharp
void MoveByXY(int argx, int argy);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argx` | `int` | value |
| `argy` | `int` | value |

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

### MoveToXY

This `MoveToXY` method moves the object to a new location specified by the X,Y coordinates.

```csharp
void MoveToXY(int argx, int argy);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argx` | `int` | value |
| `argy` | `int` | value |

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

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

### ResetErrorFields

This method resets the error fields of the object.

```csharp
void ResetErrorFields();
```

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

### RotateBy90

The `RotateBy90` method forces the rotation of the object by its center or a defined location on the schematic sheet and the rotation is done in 90 degree increments (0, 90, 180, 270).

```csharp
void RotateBy90(Point argCenter, TRotationBy90 arg);
void RotateBy90(IPoint argCenter, int arg);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argCenter` | [Point](https://altiumdeveloper.github.io/ad-sdk-docs/reference/dxp/Point.md) | value |
| `arg` | [TRotationBy90](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/TRotationBy90.md) | value |

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

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

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

### SetState_xSizeySize

This method sets the X size and the ySize of the graphical bounds of the object.

```csharp
void SetState_xSizeySize();
```

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

## Inherited members

- 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)

## Returned by

[IOpenBus_Port.SchOwner](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IOpenBus_Port.md#schowner), [ISch_HitTest.HitObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HitTest.md#hitobject)

## Accepted by

[IDocumentPainterView.PaintSingleObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IDocumentPainterView.md#paintsingleobject), [IDocumentPainterView.Redraw](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/IDocumentPainterView.md#redraw)
