IPCB_Coordinate interface
A coordinate marker on a PCB document: a cross of two tracks at a point and a text that shows the X and Y coordinates of that point.
public interface IPCB_Coordinate : IPCB_Group
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Inherits: IPCB_Primitive → IPCB_Group
Remarks
A coordinate is a group with three child primitives: the text (Text), the horizontal track (Track1) and the vertical track (Track2). The marked point is the group's XLocation and YLocation; the children are placed on the coordinate's Layer. The text is placed at the right end of the horizontal track and shows the location relative to the board origin, in the board's DisplayUnit, formatted as set by Style. It is empty when the coordinate does not belong to a board.
SetState_XSizeYSize_1 regenerates the children from the coordinate's properties only when the location or the layer has changed since the last regeneration, or when its TrueType text must be rebuilt. Changing only a size, style or font property therefore does not regenerate the marker. MoveByXY moves the coordinate and regenerates the children.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| Bold | bool | get; set | Whether the text of the coordinate is bold when it uses a TrueType font. |
| FontName | string | get; set | The name of the TrueType font of the coordinate's text, for example Arial or Courier New. |
| Italic | bool | get; set | Whether the text of the coordinate is italic when it uses a TrueType font. |
| LineWidth | int | get; set | The width of the two tracks of the coordinate's cross, in internal units (10,000 per mil). |
| Rotation | double | get; set | The rotation of the coordinate's text, in degrees. |
| Size | int | get; set | Half the length of each track of the coordinate's cross, in internal units (10,000 per mil). |
| StrictHitTest | bool | get | Whether the given point hits the text or one of the tracks of the coordinate. |
| Style | TUnitStyle | get; set | How the text of the coordinate shows the units of the X and Y values. |
| TextFont | short | get; set | The stroke font of the coordinate's text. |
| TextHeight | int | get; set | The height of the coordinate's text, in internal units (10,000 per mil). |
| TextWidth | int | get; set | The stroke width of the coordinate's text, in internal units (10,000 per mil). |
| UseTTFonts | bool | get; set | Whether the text of the coordinate uses a TrueType font (FontName, Bold, Italic) rather than the stroke font TextFont. |
Bold
Whether the text of the coordinate is bold when it uses a TrueType font.
bool GetState_Bold();
void SetState_Bold(bool argBold);
Type: bool · Access: read/write
A new coordinate is not bold.
FontName
The name of the TrueType font of the coordinate's text, for example Arial or Courier New.
string GetState_FontName();
void SetState_FontName(string argFontName);
Type: string · Access: read/write
The value is used when UseTTFonts is true. A new coordinate uses Arial.
Italic
Whether the text of the coordinate is italic when it uses a TrueType font.
bool GetState_Italic();
void SetState_Italic(bool argItalic);
Type: bool · Access: read/write
A new coordinate is not italic.
LineWidth
The width of the two tracks of the coordinate's cross, in internal units (10,000 per mil).
int GetState_LineWidth();
void SetState_LineWidth(int argValue);
Type: int · Access: read/write
A new coordinate has a line width of 10 mil.
Rotation
The rotation of the coordinate's text, in degrees.
double GetState_Rotation();
void SetState_Rotation(double argValue);
Type: double · Access: read/write
Only the text is rotated; the tracks of the cross stay horizontal and vertical. A new coordinate has a rotation of 0.
Size
Half the length of each track of the coordinate's cross, in internal units (10,000 per mil).
int GetState_Size();
void SetState_Size(int argValue);
Type: int · Access: read/write
Each track extends by Size on both sides of the marked point, and the text starts Size to the right of it. When the value is less than 10 (0.001 mil), the tracks extend by 1 mil instead. A new coordinate has a size of 10 mil.
StrictHitTest
Whether the given point hits the text or one of the tracks of the coordinate.
bool GetState_StrictHitTest(int argHitX, int argHitY);
Type: bool · Access: read-only · Index: argHitX (int): The X coordinate of the point, in internal units (10,000 per mil)., argHitY (int): The Y coordinate of the point, in internal units (10,000 per mil).
Style
How the text of the coordinate shows the units of the X and Y values.
TUnitStyle GetState_Style();
void SetState_Style(TUnitStyle argValue);
Type: TUnitStyle · Access: read/write
The accessors are extension methods of IPCB_CoordinateHelper (using PCB;).
With TUnitStyle.eNoUnits the text shows the two values separated by a comma, without units. With TUnitStyle.eYesUnits each value has its unit. With TUnitStyle.eParenthUnits the values are followed by "(mm)" when the board's DisplayUnit is TUnit.eMetric, otherwise by "(mil)". A new coordinate uses TUnitStyle.eParenthUnits.
See also: TUnitStyle
TextFont
The stroke font of the coordinate's text.
short GetState_TextFont();
void SetState_TextFont(short argValue);
Type: short · Access: read/write
A new coordinate uses font 1.
TextHeight
The height of the coordinate's text, in internal units (10,000 per mil).
int GetState_TextHeight();
void SetState_TextHeight(int argValue);
Type: int · Access: read/write
A new coordinate has a text height of 60 mil.
TextWidth
The stroke width of the coordinate's text, in internal units (10,000 per mil).
int GetState_TextWidth();
void SetState_TextWidth(int argValue);
Type: int · Access: read/write
A new coordinate has a text width of 6 mil.
UseTTFonts
Whether the text of the coordinate uses a TrueType font (FontName, Bold, Italic) rather than the stroke font TextFont.
bool GetState_UseTTFonts();
void SetState_UseTTFonts(bool argUseTTFonts);
Type: bool · Access: read/write
A new coordinate uses the stroke font.
Methods
| Method | Returns | Description |
|---|---|---|
| RotateAroundXY | void | Does nothing for a coordinate. |
| SetState_XSizeYSize_1 | bool | Regenerates the text and the tracks of the coordinate from its properties and recalculates its bounds. |
| Text | IPCB_Primitive | Returns the text primitive of the coordinate, which shows the X and Y values. |
| Track1 | IPCB_Primitive | Returns the horizontal track of the coordinate's cross. |
| Track2 | IPCB_Primitive | Returns the vertical track of the coordinate's cross. |
RotateAroundXY
Does nothing for a coordinate.
void RotateAroundXY(int argX, int argY, double argngle);
| Parameter | Type | Passing |
|---|---|---|
argX | int | value |
argY | int | value |
argngle | double | value |
Returns: nothing (void)
SetState_XSizeYSize_1
Regenerates the text and the tracks of the coordinate from its properties and recalculates its bounds.
bool SetState_XSizeYSize_1();
Returns: bool
The children are regenerated only when the location or the layer has changed since the last regeneration, or when the TrueType text must be rebuilt.
Text
Returns the text primitive of the coordinate, which shows the X and Y values.
IPCB_Primitive Text();
Returns: IPCB_Primitive
Extension method of IPCB_CoordinateHelper (using PCB;).
Its value, position and font are overwritten when the children are regenerated.
Track1
Returns the horizontal track of the coordinate's cross.
IPCB_Primitive Track1();
Returns: IPCB_Primitive
Extension method of IPCB_CoordinateHelper (using PCB;).
Track2
Returns the vertical track of the coordinate's cross.
IPCB_Primitive Track2();
Returns: IPCB_Primitive
Extension method of IPCB_CoordinateHelper (using PCB;).
Inherited members
- From IPCB_Group: AddPCBObject, FastSetState_XSizeYSize, FreePrimitives, GetPrimitiveAt, GetPrimitiveCount, GroupIterator_Create, GroupIterator_Destroy, LayerUsed, PrimitiveLock, RemovePCBObject, ReplicateWithChildren, SetState_LayersUsedArray, SetState_XSizeYSize, XLocation, YLocation
- From IPCB_Primitive: AllowGlobalEdit, BeginModify, Board, BoundingRectangle, BoundingRectangleChildren, BoundingRectangleForPainting, BoundingRectangleForSelection, CancelModify, Component, Coordinate, DescriptorString, DetailString, Dimension, DrawAsPreview, DRCError, Enabled, Enabled_Direct, Enabled_vComponent, Enabled_vCoordinate, Enabled_vDimension, Enabled_vNet, Enabled_vPolygon, EnableDraw, EndModify, Export_ToParameters, FlipXY, GraphicallyInvalidate, Handle, Identifier, InBoard, InComponent, InCoordinate, Index, InDimension, InNet, InPolygon, InSelectionMemory, IsAssyTestPoint_Bottom, IsAssyTestPoint_Top, IsElectricalPrim, IsFreePrimitive, IsHidden, IsKeepout, IsPreRoute, IsSaveable, IsTenting, IsTenting_Bottom, IsTenting_Top, IsTestPoint_Bottom, IsTestPoint_Top, Layer, MiscFlag1, MiscFlag2, MiscFlag3, Moveable, MoveByXY, MoveToXY, Net, ObjectID, ObjectIDString, PadCacheRobotFlag, PasteMaskExpansion, Polygon, PolygonOutline, PowerPlaneClearance, PowerPlaneConnectStyle, PowerPlaneReliefExpansion, Preview, ReliefAirGap, ReliefConductorWidth, ReliefEntries, Replicate, RequiredParamterSpace, RotateBy, Selected, SolderMaskExpansion, SwapLayerPairs, TearDrop, UnionIndex, UniqueId, UniqueID, Used, UserRouted, V7Layer, ViewableObjectID