
# ISch_Wire interface

Wires are straight line segments which are placed on a schematic document to create the electrical connections.

```csharp
public interface ISch_Wire : ISch_BasicPolyline
```

**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) → [ISch_Polygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md) → [ISch_BasicPolyline](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicPolyline.md)

**Derived:** [ISch_Bus](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Bus.md), [ISch_HarnessBundle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HarnessBundle.md), [ISch_HarnessWire](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_HarnessWire.md)

## Remarks

ReportList.Add('Wire #'

ReportList.Add('X: '

+ ', Y: '

## Example

Report the vertices of every wire on the current schematic sheet.

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

if (SCH.GlobalVars.SchServer == null)
    return;
ISch_Document schDoc = SCH.GlobalVars.SchServer.GetCurrentSchDocument();
if (schDoc == null)
    return;

// Set up an iterator to look for wire objects only.
ISch_Iterator iterator = schDoc.SchIterator_Create();
iterator.AddFilter_ObjectSet(new SCH.TObjectSet { TObjectId.eWire });
int wireCount = 0;
var reportList = new List<string>();
reportList.Add("Wires' Vertex report:");
reportList.Add("______________________");
reportList.Add("");
try
{
    var wire = iterator.FirstSchObject() as ISch_Wire;
    while (wire != null)
    {
        wireCount++;
        reportList.Add("Wire #" + wireCount);
        for (int index = 1; index <= wire.GetState_VerticesCount(); index++)
        {
            DXP.Point location = wire.GetState_Vertex(index);
            reportList.Add("X: " + location.X + ", Y: " + location.Y);
        }
        reportList.Add("");
        wire = iterator.NextSchObject() as ISch_Wire;
    }
}
finally
{
    schDoc.SchIterator_Destroy(ref iterator);
}

string reportPath = Path.Combine(Path.GetTempPath(), "WireVertexReport.txt");
File.WriteAllLines(reportPath, reportList);
// Display the report.
IClient client = DXP.GlobalVars.Client;
IServerDocument document = client.OpenDocument("Text", reportPath);
if (document != null)
    client.ShowDocument(document);
```

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [AutoWire](#autowire) | `bool` | get; set |  |
| [CompilationMaskedSegment](#compilationmaskedsegment) | `bool` | get; set |  |
| [EditingEndPoint](#editingendpoint) | `bool` | get; set |  |
| [UnderlineColor](#underlinecolor) | `int` | get; set |  |

### AutoWire

*No description yet.*

```csharp
bool GetState_AutoWire();
void SetState_AutoWire(bool argValue);
```

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

### CompilationMaskedSegment

*No description yet.*

```csharp
bool GetState_CompilationMaskedSegment(int argIndex);
void SetState_CompilationMaskedSegment(int argIndex, bool argValue);
```

**Type:** `bool` · **Access:** read/write · **Index:** `argIndex` (`int`)

### EditingEndPoint

*No description yet.*

```csharp
bool GetState_EditingEndPoint();
void SetState_EditingEndPoint(bool argValue);
```

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

### UnderlineColor

*No description yet.*

```csharp
int GetState_UnderlineColor();
void SetState_UnderlineColor(int argValue);
```

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

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

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [OrderCrossOverArray](#ordercrossoverarray) | `void` |  |
| [ResetCompilationMaskedSegments](#resetcompilationmaskedsegments) | `void` |  |

### OrderCrossOverArray

*No description yet.*

```csharp
void OrderCrossOverArray();
```

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

### ResetCompilationMaskedSegments

*No description yet.*

```csharp
void ResetCompilationMaskedSegments();
```

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

## Inherited members

- From [ISch_BasicPolyline](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicPolyline.md): [LineStyle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_BasicPolyline.md#linestyle)
- From [ISch_Polygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md): [ClearAllVertices](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#clearallvertices), [InsertVertex](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#insertvertex), [IsSolid](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#issolid), [LineWidth](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#linewidth), [RemoveVertex](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#removevertex), [Transparent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#transparent), [Vertex](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#vertex), [VerticesCount](https://altiumdeveloper.github.io/ad-sdk-docs/reference/sch/ISch_Polygon.md#verticescount)
- 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)

## Examples

Used in the SDK examples: [Extension_ModifySchWireColor](https://github.com/AltiumDeveloper/ad-sdk-examples/blob/5b144f54740a53ec578b3b6c3f902b831e0b1144/Extension_ModifySchWireColor/Source%20Code/Commands.cs#L43).
