
# IPCB_Dimension interface

The base interface of the dimension objects of a PCB document, which show dimensional details of the board in imperial or metric units and can be placed on any layer.

```csharp
public interface IPCB_Dimension : IPCB_Group
```

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

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

**Derived:** [IPCB_AngularDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md), [IPCB_BaselineDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md), [IPCB_CenterDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_CenterDimension.md), [IPCB_DatumDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DatumDimension.md), [IPCB_LeaderDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md), [IPCB_LinearDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md), [IPCB_OriginalDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_OriginalDimension.md), [IPCB_RadialDimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDimension.md)

## Remarks

Altium Designer has several dimension styles: linear, angular, radial, leader, datum, baseline, center, linear diameter and radial diameter dimensions. `IPCB_Dimension` is the base interface of [`IPCB_OriginalDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_OriginalDimension.md), [`IPCB_LinearDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md), [`IPCB_AngularDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md), [`IPCB_RadialDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDimension.md), [`IPCB_LeaderDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LeaderDimension.md), [`IPCB_DatumDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_DatumDimension.md), [`IPCB_BaselineDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_BaselineDimension.md), [`IPCB_CenterDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_CenterDimension.md), [`IPCB_LinearDiameterDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDiameterDimension.md) and [`IPCB_RadialDiameterDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_RadialDiameterDimension.md). Original dimensions ([`IPCB_OriginalDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_OriginalDimension.md)) are the dimension style of early versions.

The [`DimensionKind`](#dimensionkind) property tells which kind of dimension an object is.

A dimension is a group whose tracks, arcs and texts are generated from its references and its style properties. [`SetState_XSizeYSize`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#setstate_xsizeysize) regenerates them only when the dimension's location, [`X1Location`](#x1location), [`Y1Location`](#y1location), `Layer`, [`TextX`](#textx) or [`TextY`](#texty) has changed since the last regeneration. Moving or rotating the dimension with [`MoveByXY`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#movebyxy) or [`RotateAroundXY`](#rotatearoundxy) also marks it for regeneration.

A dimension, especially a baseline or a leader dimension, has several references. A reference ties the dimension to a point on an object it measures; the distance between two reference points is the dimensional length.

## Properties

| Property | Type | Access | Description |
| --- | --- | --- | --- |
| [ArrowLength](#arrowlength) | `int` | get; set | The length of the dimension's arrow lines, in internal units (10,000 per mil). |
| [ArrowLineWidth](#arrowlinewidth) | `int` | get; set | The line width of the arrowheads, in internal units (10,000 per mil). |
| [ArrowPosition](#arrowposition) | [TDimensionArrowPosition](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TDimensionArrowPosition.md) | get; set | Whether the arrowheads are drawn inside or outside the measured span. |
| [ArrowSize](#arrowsize) | `int` | get; set | The length of the arrowheads, in internal units (10,000 per mil). |
| [Bold](#bold) | `bool` | get; set | Whether the dimension text is bold when it uses a TrueType font ([`UseTTFonts`](#usettfonts)). |
| [DimensionKind](#dimensionkind) | [TDimensionKind](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TDimensionKind.md) | get; set | The kind of dimension, such as linear, angular or radial. |
| [ExtensionLineWidth](#extensionlinewidth) | `int` | get; set | The line width of the extension lines, in internal units (10,000 per mil). |
| [ExtensionOffset](#extensionoffset) | `int` | get; set | How far the extension lines extend beyond the dimension line, in internal units (10,000 per mil). |
| [ExtensionPickGap](#extensionpickgap) | `int` | get; set | The gap between a referenced object and the start of its extension line, in internal units (10,000 per mil). |
| [FontName](#fontname) | `string` | get; set | The name of the TrueType font of the dimension text, used when [`UseTTFonts`](#usettfonts) is true. |
| [Italic](#italic) | `bool` | get; set | Whether the dimension text is italic when it uses a TrueType font ([`UseTTFonts`](#usettfonts)). |
| [LineWidth](#linewidth) | `int` | get; set | The width of the lines drawn by center and original dimensions, in internal units (10,000 per mil). |
| [References](#references) | [DimensionReference](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/DimensionReference.md) | get; set | The reference at the given index, with its point and anchor. |
| [References_Count](#references_count) | `int` | get | The number of references of the dimension. |
| [Size](#size) | `int` | get; set | A size used by some dimension kinds, in internal units (10,000 per mil). |
| [Style](#style) | [TUnitStyle](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TUnitStyle.md) | get; set | How an original dimension shows the unit of its value. |
| [TextDimensionUnit](#textdimensionunit) | [TDimensionUnit](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TDimensionUnit.md) | get; set | The unit in which the measured value is shown. |
| [TextFont](#textfont) | `short` | get; set | The stroke font of the dimension text, used when [`UseTTFonts`](#usettfonts) is false. |
| [TextFormat](#textformat) | `string` | get; set | How the measured value is formatted in the dimension text. |
| [TextGap](#textgap) | `int` | get; set | The gap kept between the dimension text and the dimension lines, in internal units (10,000 per mil). |
| [TextHeight](#textheight) | `int` | get; set | The height of the dimension text, in internal units (10,000 per mil). |
| [TextLineWidth](#textlinewidth) | `int` | get; set | The stroke width of the dimension text, in internal units (10,000 per mil). |
| [TextPosition](#textposition) | [TDimensionTextPosition](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/TDimensionTextPosition.md) | get; set | Where the dimension text is placed relative to the dimension line. |
| [TextPrecision](#textprecision) | `int` | get; set | The number of digits after the decimal point in the measured value. |
| [TextPrefix](#textprefix) | `string` | get; set | Text shown before the measured value. |
| [TextSuffix](#textsuffix) | `string` | get; set | Text shown after the measured value. |
| [TextValue](#textvalue) | `double` | get; set | The measured value shown in the dimension text. |
| [TextWidth](#textwidth) | `int` | get; set | The stroke width of the text of an original dimension, in internal units (10,000 per mil). |
| [TextX](#textx) | `int` | get; set | The X coordinate of the dimension text position, in internal units (10,000 per mil). |
| [TextY](#texty) | `int` | get; set | The Y coordinate of the dimension text position, in internal units (10,000 per mil). |
| [UseTTFonts](#usettfonts) | `bool` | get; set | Whether the dimension text uses a TrueType font ([`FontName`](#fontname), `Bold`, `Italic`) instead of the stroke font [`TextFont`](#textfont). |
| [X1Location](#x1location) | `int` | get; set | The X coordinate of the dimension's second point, in internal units (10,000 per mil). |
| [Y1Location](#y1location) | `int` | get; set | The Y coordinate of the dimension's second point, in internal units (10,000 per mil). |

### ArrowLength

The length of the dimension's arrow lines, in internal units (10,000 per mil).

```csharp
int GetState_ArrowLength();
void SetState_ArrowLength(int argValue);
```

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

For linear dimensions with [`ArrowPosition`](#arrowposition) set to `TDimensionArrowPosition.eOutside`, the arrows are drawn outside the measured span on lines of this length. The default is 100 mil.

### ArrowLineWidth

The line width of the arrowheads, in internal units (10,000 per mil).

```csharp
int GetState_ArrowLineWidth();
void SetState_ArrowLineWidth(int argValue);
```

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

The default is 10 mil. Linear and radial dimensions also draw their dimension line with this width, and leader dimensions draw all their lines and their enclosure with it. Original dimensions do not use it: they draw all their tracks with [`LineWidth`](#linewidth).

### ArrowPosition

Whether the arrowheads are drawn inside or outside the measured span.

```csharp
TDimensionArrowPosition GetState_ArrowPosition();
void SetState_ArrowPosition(TDimensionArrowPosition argValue);
```

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

The accessors are extension methods of `IPCB_DimensionHelper` (`using PCB;`).

The default is `TDimensionArrowPosition.eInside`, and `TDimensionArrowPosition.eOutside` for radial and radial diameter dimensions.

### ArrowSize

The length of the arrowheads, in internal units (10,000 per mil).

```csharp
int GetState_ArrowSize();
void SetState_ArrowSize(int argValue);
```

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

The default is 60 mil. Original dimensions do not use it: their arrowheads are [`TextHeight`](#textheight) long.

### Bold

Whether the dimension text is bold when it uses a TrueType font ([`UseTTFonts`](#usettfonts)).

```csharp
bool GetState_Bold();
void SetState_Bold(bool argBold);
```

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

The default is false.

### DimensionKind

The kind of dimension, such as linear, angular or radial.

```csharp
TDimensionKind GetState_DimensionKind();
void SetState_DimensionKind(TDimensionKind argValue);
```

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

The accessors are extension methods of `IPCB_DimensionHelper` (`using PCB;`).

Each kind of dimension object sets this value when it is created. Read it to find out which derived interface, such as [`IPCB_LinearDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_LinearDimension.md) or [`IPCB_AngularDimension`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_AngularDimension.md), the object implements.

### ExtensionLineWidth

The line width of the extension lines, in internal units (10,000 per mil).

```csharp
int GetState_ExtensionLineWidth();
void SetState_ExtensionLineWidth(int argValue);
```

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

The default is 10 mil.

### ExtensionOffset

How far the extension lines extend beyond the dimension line, in internal units (10,000 per mil).

```csharp
int GetState_ExtensionOffset();
void SetState_ExtensionOffset(int argValue);
```

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

The default is 10 mil.

### ExtensionPickGap

The gap between a referenced object and the start of its extension line, in internal units (10,000 per mil).

```csharp
int GetState_ExtensionPickGap();
void SetState_ExtensionPickGap(int argValue);
```

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

For a pad, via, track or arc the gap is measured from the object's edge: half the pad's larger size, half the via's size or half the line width is added to it. The default is 10 mil.

### FontName

The name of the TrueType font of the dimension text, used when [`UseTTFonts`](#usettfonts) is true.

```csharp
string GetState_FontName();
void SetState_FontName(string argFontName);
```

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

The default is "Arial".

### Italic

Whether the dimension text is italic when it uses a TrueType font ([`UseTTFonts`](#usettfonts)).

```csharp
bool GetState_Italic();
void SetState_Italic(bool argItalic);
```

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

The default is false.

### LineWidth

The width of the lines drawn by center and original dimensions, in internal units (10,000 per mil).

```csharp
int GetState_LineWidth();
void SetState_LineWidth(int argValue);
```

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

The default is 10 mil.

### References

The reference at the given index, with its point and anchor.

```csharp
DimensionReference GetState_References(int argI);
void SetState_References(int argI, DimensionReference argValue);
```

**Type:** [DimensionReference](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/DimensionReference.md) · **Access:** read/write · **Index:** `argI` (`int`): The zero-based index of the reference, from 0 to [`References_Count`](#references_count) - 1.

The accessors are extension methods of `IPCB_DimensionHelper` (`using PCB;`).

### References_Count

The number of references of the dimension.

```csharp
int GetState_References_Count();
```

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

### Size

A size used by some dimension kinds, in internal units (10,000 per mil).

```csharp
int GetState_Size();
void SetState_Size(int argValue);
```

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

A center dimension uses it as the size of its cross, a leader dimension as the size of the circle or square at its end, and an original dimension as the distance its end marks extend on each side of the dimension line. The default is 10 mil, 60 mil for center and 500 mil for leader dimensions.

### Style

How an original dimension shows the unit of its value.

```csharp
TUnitStyle GetState_Style();
void SetState_Style(TUnitStyle argValue);
```

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

The accessors are extension methods of `IPCB_DimensionHelper` (`using PCB;`).

`TUnitStyle.eNoUnits` shows the value only, `TUnitStyle.eYesUnits` the value with its unit and `TUnitStyle.eParenthUnits` the value followed by the unit in parentheses. The value is shown in the board's display unit. A new original dimension uses `TUnitStyle.eParenthUnits`. Other dimension kinds format their text with [`TextFormat`](#textformat), [`TextDimensionUnit`](#textdimensionunit) and [`TextPrecision`](#textprecision).

### TextDimensionUnit

The unit in which the measured value is shown.

```csharp
TDimensionUnit GetState_TextDimensionUnit();
void SetState_TextDimensionUnit(TDimensionUnit argValue);
```

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

The accessors are extension methods of `IPCB_DimensionHelper` (`using PCB;`).

Distances are shown in `TDimensionUnit.eMils`, `TDimensionUnit.eInches`, `TDimensionUnit.eMillimeters` or `TDimensionUnit.eCentimeters`; `TDimensionUnit.eAutomaticUnit` uses millimeters when the board's display unit is metric and mils otherwise. Angles are shown in radians when the unit is `TDimensionUnit.eRadians` and in degrees otherwise. The default is `TDimensionUnit.eMils`, and `TDimensionUnit.eDegrees` for angular dimensions.

### TextFont

The stroke font of the dimension text, used when [`UseTTFonts`](#usettfonts) is false.

```csharp
short GetState_TextFont();
void SetState_TextFont(short argValue);
```

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

### TextFormat

How the measured value is formatted in the dimension text.

```csharp
string GetState_TextFormat();
void SetState_TextFormat(string argValue);
```

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

For a distance, an empty string shows no value, "10" shows the value only, "10mil" the value followed by the unit abbreviation and "10 (mil)" the value followed by the unit in parentheses. For an angle in degrees, "10" shows whole degrees, "10*10*" degrees and minutes, and "10*10*10**" degrees, minutes and seconds; any other string shows whole degrees followed by a degree sign, which is the default of angular dimensions. The default for distances is "10". A leader dimension shows this string itself as its label; its default is "String".

### TextGap

The gap kept between the dimension text and the dimension lines, in internal units (10,000 per mil).

```csharp
int GetState_TextGap();
void SetState_TextGap(int argValue);
```

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

The default is 10 mil. Original dimensions do not use it: they keep a fixed gap of 10 mil on each side of their text.

### TextHeight

The height of the dimension text, in internal units (10,000 per mil).

```csharp
int GetState_TextHeight();
void SetState_TextHeight(int argValue);
```

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

The default is 60 mil.

### TextLineWidth

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

```csharp
int GetState_TextLineWidth();
void SetState_TextLineWidth(int argValue);
```

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

The default is 6 mil. Original dimensions use [`TextWidth`](#textwidth) instead.

### TextPosition

Where the dimension text is placed relative to the dimension line.

```csharp
TDimensionTextPosition GetState_TextPosition();
void SetState_TextPosition(TDimensionTextPosition argValue);
```

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

The accessors are extension methods of `IPCB_DimensionHelper` (`using PCB;`).

With `TDimensionTextPosition.eTextManual` the text is not repositioned when the dimension is regenerated; with any other value its position and rotation are calculated from the dimension line. The default is `TDimensionTextPosition.eTextAuto`, and `TDimensionTextPosition.eTextUniDirectional` for radial, radial diameter, leader and datum dimensions. Original dimensions do not use it: they always reposition their text.

### TextPrecision

The number of digits after the decimal point in the measured value.

```csharp
int GetState_TextPrecision();
void SetState_TextPrecision(int argValue);
```

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

For an angle shown as degrees, minutes and seconds it applies to the seconds. The default is 2.

### TextPrefix

Text shown before the measured value.

```csharp
string GetState_TextPrefix();
void SetState_TextPrefix(string argValue);
```

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

Assigning a value calls [`ResetPrefixIfNeeded`](#resetprefixifneeded), so on linear diameter and radial diameter dimensions a prefix that does not start with the diameter symbol is replaced by the symbol followed by a space. The default is empty, "R " for radial dimensions and a diameter symbol followed by a space for linear diameter and radial diameter dimensions.

### TextSuffix

Text shown after the measured value.

```csharp
string GetState_TextSuffix();
void SetState_TextSuffix(string argValue);
```

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

### TextValue

The measured value shown in the dimension text.

```csharp
double GetState_TextValue();
void SetState_TextValue(double argValue);
```

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

Linear, angular, radial, datum, baseline and linear diameter dimensions set it to the measured value each time their primitives are regenerated, so an assigned value can be overwritten. Original dimensions do not use it: their text shows the distance between their two points.

### TextWidth

The stroke width of the text of an original dimension, in internal units (10,000 per mil).

```csharp
int GetState_TextWidth();
void SetState_TextWidth(int argValue);
```

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

The default is 6 mil. Other dimension kinds use [`TextLineWidth`](#textlinewidth).

### TextX

The X coordinate of the dimension text position, in internal units (10,000 per mil).

```csharp
int GetState_TextX();
void SetState_TextX(int argValue);
```

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

### TextY

The Y coordinate of the dimension text position, in internal units (10,000 per mil).

```csharp
int GetState_TextY();
void SetState_TextY(int argValue);
```

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

### UseTTFonts

Whether the dimension text uses a TrueType font ([`FontName`](#fontname), `Bold`, `Italic`) instead of the stroke font [`TextFont`](#textfont).

```csharp
bool GetState_UseTTFonts();
void SetState_UseTTFonts(bool argUseTTFonts);
```

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

The default is false.

### X1Location

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

```csharp
int GetState_X1Location();
void SetState_X1Location(int argValue);
```

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

For an original dimension, the measured length is the distance from ([`XLocation`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#xlocation), [`YLocation`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#ylocation)) to (`X1Location`, [`Y1Location`](#y1location)). Moving, rotating or mirroring an original dimension moves this point with it.

### Y1Location

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

```csharp
int GetState_Y1Location();
void SetState_Y1Location(int argValue);
```

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

For an original dimension, the measured length is the distance from ([`XLocation`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#xlocation), [`YLocation`](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#ylocation)) to ([`X1Location`](#x1location), `Y1Location`). Moving, rotating or mirroring an original dimension moves this point with it.

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [MoveTextByXY](#movetextbyxy) | `void` | Moves the dimension text by an offset, changing [`TextX`](#textx) and [`TextY`](#texty). |
| [MoveTextToXY](#movetexttoxy) | `void` | Moves the dimension text to a new position, setting [`TextX`](#textx) and [`TextY`](#texty). |
| [References_Add](#references_add) | `void` | Adds a reference at the end of the dimension's references. |
| [References_Delete](#references_delete) | `void` | Detaches the reference at the given index from the object it refers to. |
| [References_DeleteLast](#references_deletelast) | `void` | Removes the last reference of the dimension, reducing [`References_Count`](#references_count) by one. |
| [References_IndexOf](#references_indexof) | `int` | Searches the dimension's references for one that refers to the given primitive. |
| [References_Validate](#references_validate) | `bool` | Checks that each reference still matches a point on the object it refers to, and reattaches the references that do not. |
| [ResetPrefixIfNeeded](#resetprefixifneeded) | `void` | Makes the text prefix of a diameter dimension start with a diameter symbol. |
| [RotateAroundXY](#rotatearoundxy) | `void` | Rotates the dimension around a point. |

### MoveTextByXY

Moves the dimension text by an offset, changing [`TextX`](#textx) and [`TextY`](#texty).

```csharp
void MoveTextByXY(int argX, int argY);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argX` | `int` | value | The horizontal offset, in internal units (10,000 per mil). |
| `argY` | `int` | value | The vertical offset, in internal units (10,000 per mil). |

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

### MoveTextToXY

Moves the dimension text to a new position, setting [`TextX`](#textx) and [`TextY`](#texty).

```csharp
void MoveTextToXY(int argX, int argY);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argX` | `int` | value | The X coordinate of the new text position, in internal units (10,000 per mil). |
| `argY` | `int` | value | The Y coordinate of the new text position, in internal units (10,000 per mil). |

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

For an angular dimension, the radius and the sector of the dimension are recalculated from the new position. For a center dimension, `Size` is set to twice the distance from the dimension's location to the new position.

### References_Add

Adds a reference at the end of the dimension's references.

```csharp
void References_Add(DimensionReference argR);
void References_Add(IDimensionReference argR);
```

| Parameter | Type | Passing |
| --- | --- | --- |
| `argR` | [DimensionReference](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/DimensionReference.md) | value |

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

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

Does nothing when the dimension already has `PCBConstant.MaxReferenceCount` (200) references. A leader dimension also adds a line for each reference after the first, and a datum dimension adds a text and an extension line for each reference.

### References_Delete

Detaches the reference at the given index from the object it refers to.

```csharp
void References_Delete(int argIndex);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argIndex` | `int` | value | The zero-based index of the reference. |

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

The reference is not removed and [`References_Count`](#references_count) does not change: the reference keeps the current coordinates of its point but no longer refers to the object. [`References_DeleteLast`](#references_deletelast) removes a reference.

### References_DeleteLast

Removes the last reference of the dimension, reducing [`References_Count`](#references_count) by one.

```csharp
void References_DeleteLast();
```

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

A leader dimension also deletes the line that belonged to the reference, and a datum dimension deletes the text and the extension line that belonged to it.

### References_IndexOf

Searches the dimension's references for one that refers to the given primitive.

```csharp
int References_IndexOf(IPCB_Primitive argP, int argIndex);
int References_IndexOf(object argP, int argIndex);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argP` | [IPCB_Primitive](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md) | value | The primitive to look for. |
| `argIndex` | `int` | value | The index of the first reference to check. |

**Returns:** `int`

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

### References_Validate

Checks that each reference still matches a point on the object it refers to, and reattaches the references that do not.

```csharp
bool References_Validate();
```

**Returns:** `bool`

References with an anchor of -1 are skipped. A reference whose stored point no longer matches its object, at its anchor or at another anchor of the same object, is attached to the object found at the stored point on the board, or detached when no object there matches the point. Returns true when no reference had to be reattached.

### ResetPrefixIfNeeded

Makes the text prefix of a diameter dimension start with a diameter symbol.

```csharp
void ResetPrefixIfNeeded();
```

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

For dimensions of kind `TDimensionKind.eLinearDiameterDimension` or `TDimensionKind.eRadialDiameterDimension` a prefix that is empty or does not start with the diameter symbol is replaced by the diameter symbol followed by a space. For other kinds the prefix is left unchanged.

### RotateAroundXY

Rotates the dimension around a point.

```csharp
void RotateAroundXY(int argX, int argY, double argngle);
```

| Parameter | Type | Passing | Description |
| --- | --- | --- | --- |
| `argX` | `int` | value | The X coordinate of the rotation center, in internal units (10,000 per mil). |
| `argY` | `int` | value | The Y coordinate of the rotation center, in internal units (10,000 per mil). |
| `argngle` | `double` | value | The rotation angle. |

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

When every object the dimension refers to is selected, or the dimension refers to no object, the reference points and the text position are rotated as well. Otherwise the reference points are not moved, and angular, radial and leader dimensions are not rotated at all. An original dimension always rotates both of its points together with its primitives.

## Inherited members

- From [IPCB_Group](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md): [AddPCBObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#addpcbobject), [FastSetState_XSizeYSize](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#fastsetstate_xsizeysize), [FreePrimitives](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#freeprimitives), [GetPrimitiveAt](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#getprimitiveat), [GetPrimitiveCount](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#getprimitivecount), [GroupIterator_Create](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#groupiterator_create), [GroupIterator_Destroy](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#groupiterator_destroy), [LayerUsed](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#layerused), [PrimitiveLock](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#primitivelock), [RemovePCBObject](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#removepcbobject), [ReplicateWithChildren](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#replicatewithchildren), [SetState_LayersUsedArray](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#setstate_layersusedarray), [SetState_XSizeYSize](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#setstate_xsizeysize), [XLocation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#xlocation), [YLocation](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Group.md#ylocation)
- 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_Primitive.Dimension](https://altiumdeveloper.github.io/ad-sdk-docs/reference/pcb/IPCB_Primitive.md#dimension)
