
# IPCB_Track interface

A straight track segment on a PCB document, from (`X1`, `Y1`) to (`X2`, `Y2`), with a stroke `Width`.

```csharp
public interface IPCB_Track : IPCB_Primitive
```

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

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

**Derived:** [IPCB_Wirebond](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Wirebond.md)

## Remarks

Tracks can be placed on signal, plane, overlay, mask, keep-out and mechanical layers. Tracks are also used in
polygons, coordinates, dimensions and components.

The coordinates and the width are in internal units (10,000 per mil); see [`IPCB_Primitive`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md).

## Example

Create a track on a new PCB document.

```csharp
using DXP;
using PCB;

// Sample values: track coordinates and width in mils, and the track layer.
double x1 = 1000, y1 = 1000, x2 = 3000, y2 = 1000, width = 10;
TV6_Layer layer = TV6_Layer.eV6_TopLayer;

// Create a new PCB document.
var workspace = DXP.GlobalVars.Client.GetDXPWorkspace() as EDP.IWorkspace;
if (workspace == null)
    return;
workspace.DM_CreateNewDocument("PCB");

// Check whether the new PCB document exists.
IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
IPCB_Board board = pcbServer?.GetCurrentPCBBoard();
if (board == null)
    return;

// Create a track object with dimensions in mils.
var track = pcbServer.PCBObjectFactory(TObjectId.eTrackObject, TDimensionKind.eNoDimension, TObjectCreationMode.eCreate_Default) as IPCB_Track;
track.SetState_X1(EDP.Utils.MilsToCoord(x1));
track.SetState_Y1(EDP.Utils.MilsToCoord(y1));
track.SetState_X2(EDP.Utils.MilsToCoord(x2));
track.SetState_Y2(EDP.Utils.MilsToCoord(y2));
track.SetState_Layer(layer);
track.SetState_Width(EDP.Utils.MilsToCoord(width));

// Add the new track to the PCB document.
board.AddPCBObject(track);

// Refresh the PCB document.
string parameters = "";
DXP.Utils.SetParamterValue(ref parameters, "Action", "All");
DXP.Utils.RunCommand("PCB:Zoom", parameters);
```

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [Width](#width) | `int` | get; set | The stroke width of the track, in internal units (10,000 per mil). |
| [X1](#x1) | `int` | get; set | The X coordinate of the track's first end point, in internal units (10,000 per mil). |
| [X2](#x2) | `int` | get; set | The X coordinate of the track's second end point, in internal units (10,000 per mil). |
| [Y1](#y1) | `int` | get; set | The Y coordinate of the track's first end point, in internal units (10,000 per mil). |
| [Y2](#y2) | `int` | get; set | The Y coordinate of the track's second end point, in internal units (10,000 per mil). |

### Width

The stroke width of the track, in internal units (10,000 per mil).

```csharp
int GetState_Width();
void SetState_Width(int argValue);
```

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

### X1

The X coordinate of the track's first end point, in internal units (10,000 per mil).

```csharp
int GetState_X1();
void SetState_X1(int argValue);
```

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

### X2

The X coordinate of the track's second end point, in internal units (10,000 per mil).

```csharp
int GetState_X2();
void SetState_X2(int argValue);
```

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

### Y1

The Y coordinate of the track's first end point, in internal units (10,000 per mil).

```csharp
int GetState_Y1();
void SetState_Y1(int argValue);
```

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

### Y2

The Y coordinate of the track's second end point, in internal units (10,000 per mil).

```csharp
int GetState_Y2();
void SetState_Y2(int argValue);
```

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

## Inherited members

- From [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md): [AllowGlobalEdit](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#allowglobaledit), [BeginModify](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#beginmodify), [Board](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#board), [BoundingRectangle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectangle), [BoundingRectangleChildren](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectanglechildren), [BoundingRectangleForPainting](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectangleforpainting), [BoundingRectangleForSelection](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#boundingrectangleforselection), [CancelModify](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#cancelmodify), [Component](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#component), [Coordinate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#coordinate), [DescriptorString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#descriptorstring), [DetailString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#detailstring), [Dimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#dimension), [DrawAsPreview](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#drawaspreview), [DRCError](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#drcerror), [Enabled](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled), [Enabled_Direct](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_direct), [Enabled_vComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vcomponent), [Enabled_vCoordinate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vcoordinate), [Enabled_vDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vdimension), [Enabled_vNet](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vnet), [Enabled_vPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabled_vpolygon), [EnableDraw](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#enabledraw), [EndModify](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#endmodify), [Export_ToParameters](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#export_toparameters), [FlipXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#flipxy), [GraphicallyInvalidate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#graphicallyinvalidate), [Handle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#handle), [Identifier](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#identifier), [InBoard](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#inboard), [InComponent](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#incomponent), [InCoordinate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#incoordinate), [Index](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#index), [InDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#indimension), [InNet](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#innet), [InPolygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#inpolygon), [InSelectionMemory](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#inselectionmemory), [IsAssyTestPoint_Bottom](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#isassytestpoint_bottom), [IsAssyTestPoint_Top](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#isassytestpoint_top), [IsElectricalPrim](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#iselectricalprim), [IsFreePrimitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#isfreeprimitive), [IsHidden](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#ishidden), [IsKeepout](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#iskeepout), [IsPreRoute](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#ispreroute), [IsSaveable](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#issaveable), [IsTenting](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istenting), [IsTenting_Bottom](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istenting_bottom), [IsTenting_Top](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istenting_top), [IsTestPoint_Bottom](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istestpoint_bottom), [IsTestPoint_Top](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#istestpoint_top), [Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#layer), [MiscFlag1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#miscflag1), [MiscFlag2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#miscflag2), [MiscFlag3](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#miscflag3), [Moveable](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#moveable), [MoveByXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#movebyxy), [MoveToXY](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#movetoxy), [Net](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#net), [ObjectID](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#objectid), [ObjectIDString](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#objectidstring), [PadCacheRobotFlag](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#padcacherobotflag), [PasteMaskExpansion](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#pastemaskexpansion), [Polygon](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#polygon), [PolygonOutline](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#polygonoutline), [PowerPlaneClearance](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#powerplaneclearance), [PowerPlaneConnectStyle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#powerplaneconnectstyle), [PowerPlaneReliefExpansion](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#powerplanereliefexpansion), [Preview](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#preview), [ReliefAirGap](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#reliefairgap), [ReliefConductorWidth](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#reliefconductorwidth), [ReliefEntries](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#reliefentries), [Replicate](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#replicate), [RequiredParamterSpace](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#requiredparamterspace), [RotateBy](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#rotateby), [Selected](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#selected), [SolderMaskExpansion](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#soldermaskexpansion), [SwapLayerPairs](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#swaplayerpairs), [TearDrop](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#teardrop), [UnionIndex](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#unionindex), [UniqueId](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#uniqueid), [UniqueID](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#uniqueid-1), [Used](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#used), [UserRouted](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#userrouted), [V7Layer](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#v7layer), [ViewableObjectID](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#viewableobjectid)

## Returned by

[IPCB_AngularDimension.Arrow1_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md#arrow1_track1), [IPCB_AngularDimension.Arrow1_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md#arrow1_track2), [IPCB_AngularDimension.Arrow2_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md#arrow2_track1), [IPCB_AngularDimension.Arrow2_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md#arrow2_track2), [IPCB_AngularDimension.Extension1_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md#extension1_track), [IPCB_AngularDimension.Extension2_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md#extension2_track), [IPCB_BaselineDimension.Arrow1_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#arrow1_track1), [IPCB_BaselineDimension.Arrow1_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#arrow1_track2), [IPCB_BaselineDimension.Arrow2_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#arrow2_track1), [IPCB_BaselineDimension.Arrow2_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#arrow2_track2), [IPCB_BaselineDimension.Extension1_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#extension1_track), [IPCB_BaselineDimension.Extension2_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#extension2_track), [IPCB_BaselineDimension.Line_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#line_track1), [IPCB_BaselineDimension.Line_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md#line_track2), [IPCB_CenterDimension.Cross_Horizontal_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_CenterDimension.md#cross_horizontal_track), [IPCB_CenterDimension.Cross_Vertical_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_CenterDimension.md#cross_vertical_track), [IPCB_DatumDimension.Extension_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DatumDimension.md#extension_track), [IPCB_LeaderDimension.Arrow_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md#arrow_track1), [IPCB_LeaderDimension.Arrow_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md#arrow_track2), [IPCB_LeaderDimension.Line_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md#line_track), [IPCB_LeaderDimension.Square_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md#square_track1), [IPCB_LeaderDimension.Square_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md#square_track2), [IPCB_LeaderDimension.Square_Track3](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md#square_track3), [IPCB_LeaderDimension.Square_Track4](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md#square_track4), [IPCB_LinearDimension.Arrow1_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#arrow1_track1), [IPCB_LinearDimension.Arrow1_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#arrow1_track2), [IPCB_LinearDimension.Arrow2_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#arrow2_track1), [IPCB_LinearDimension.Arrow2_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#arrow2_track2), [IPCB_LinearDimension.Extension1_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#extension1_track), [IPCB_LinearDimension.Extension2_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#extension2_track), [IPCB_LinearDimension.Line_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#line_track1), [IPCB_LinearDimension.Line_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md#line_track2), [IPCB_RadialDiameterDimension.Arrow2_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDiameterDimension.md#arrow2_track1), [IPCB_RadialDiameterDimension.Arrow2_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDiameterDimension.md#arrow2_track2), [IPCB_RadialDiameterDimension.Line3_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDiameterDimension.md#line3_track), [IPCB_RadialDimension.Arrow_Track1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDimension.md#arrow_track1), [IPCB_RadialDimension.Arrow_Track2](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDimension.md#arrow_track2), [IPCB_RadialDimension.Line1_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDimension.md#line1_track), [IPCB_RadialDimension.Line2_Track](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDimension.md#line2_track)

## Accepted by

[IPCB_ContourMaker.MakeContour_1](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ContourMaker.md#makecontour_1), [IPCB_ContourMaker2.MakeContour_11](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_ContourMaker2.md#makecontour_11)
