IPCB_Text interface
A text string on a PCB document, either a free text string or the designator or comment of a component.
public interface IPCB_Text : IPCB_RectangularPrimitive
Namespace: PCB · Assembly: Altium.SDK.Interfaces
Inherits: IPCB_Primitive → IPCB_RectangularPrimitive
Derived: IPCB_Text3
Remarks
There are two classes of text strings: free text strings and component text. Free text strings are standalone strings that can be used as descriptors or labels. Component text is the designator and the comment of a component; they are text objects themselves, returned by IPCB_Component.Name and IPCB_Component.Comment, and their Text property reads or writes the designator or comment string. Each component must have a unique designator, so designators are not globally editable; comments are.
A text can be drawn with a stroke font, with a TrueType font or as a barcode (TextKind).
The PCB editor includes special strings, which are interpreted when output (printing, plotting or generating Gerber files) is generated. For example, the string .PRINT_DATE is replaced by the current date. ConvertedString returns the text with its special strings replaced.
Text objects are rectangular primitives with the corner coordinates and the rotation of IPCB_RectangularPrimitive. A text is not a group and has no child objects. A text can be converted into a series of strokes with ConvertToStrokeArray.
Example
Place a text object on the top overlay of a new PCB document.
using DXP;
using PCB;
// Create a new PCB document.
var workspace = DXP.GlobalVars.Client.GetDXPWorkspace() as EDP.IWorkspace;
if (workspace == null)
return;
workspace.DM_CreateNewDocument("PCB");
IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
IPCB_Board board = pcbServer?.GetCurrentPCBBoard();
if (board == null)
return;
// Create a text object on the top overlay layer.
board.SetState_LayerIsDisplayed(new V7_Layer(TV6_Layer.eV6_TopOverlay), true);
var textObj = pcbServer.PCBObjectFactory(TObjectId.eTextObject, TDimensionKind.eNoDimension, TObjectCreationMode.eCreate_Default) as IPCB_Text;
textObj.SetState_XLocation(EDP.Utils.MilsToCoord(board.GetState_XOrigin() + 4000));
textObj.SetState_YLocation(EDP.Utils.MilsToCoord(board.GetState_YOrigin() + 2000));
textObj.SetState_Layer(TV6_Layer.eV6_TopOverlay);
textObj.SetState_Text("Text Object");
textObj.SetState_Size(EDP.Utils.MilsToCoord(90)); // sets the height of the text
board.AddPCBObject(textObj);
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| BarCodeBitPattern | string | get | The bit pattern of the barcode, generated from the text. |
| BarCodeFontName | string | get; set | |
| BarCodeFullHeight | int | get; set | The full height of the barcode, in internal units (10,000 per mil). |
| BarCodeFullWidth | int | get; set | The full width of the barcode, in internal units (10,000 per mil). |
| BarCodeInverted | bool | get; set | |
| BarCodeKind | TBarcodeKind | get; set | The kind of barcode, such as Code 39, Code 128, QR code or Data Matrix. |
| BarCodeMinWidth | int | get; set | |
| BarCodeRenderMode | TBarcodeRenderMode | get; set | |
| BarCodeShowText | bool | get; set | |
| BarCodeXMargin | int | get; set | The horizontal margin of the barcode, in internal units (10,000 per mil). |
| BarCodeYMargin | int | get; set | The vertical margin of the barcode, in internal units (10,000 per mil). |
| Bold | bool | get; set | Whether the text is bold when it uses a TrueType font (UseTTFonts). |
| BorderSpaceType | TTextBorderSpaceType | get; set | |
| CharSet | byte | get; set | The character set of the text's TrueType font. |
| ConvertedString | string | get | The string of the text with its special strings replaced by their values. |
| FontID | short | get; set | The stroke font of the text, an index into the font table of the PCB editor. |
| FontName | string | get; set | The name of the TrueType font of the text, for example Arial, Arial Narrow, Courier New or Verdana. |
| Inverted | bool | get; set | Whether the text is inverted, that is, cut out of a filled rectangle drawn around it. |
| InvertedTTTextBorder | int | get; set | The width of the border between inverted text and the edge of its rectangle, in internal units (10,000 per mil). |
| InvRectHeight | int | get; set | The height of the rectangle of inverted text, in internal units (10,000 per mil). |
| InvRectWidth | int | get; set | The width of the rectangle of inverted text, in internal units (10,000 per mil). |
| Italic | bool | get; set | Whether the text is italic when it uses a TrueType font (UseTTFonts). |
| Mirror | bool | get; set | Whether the text is mirrored. |
| Multiline | bool | get; set | Whether the text is a multiline text block. |
| MultilineTextAutoPosition | TTextAutoposition | get; set | Where the string is placed inside the rectangle of multiline or inverted text. |
| MultilineTextHeight | int | get; set | The height of the multiline text block, in internal units (10,000 per mil). |
| MultilineTextResizeEnabled | bool | get | Whether assigning MultilineTextWidth and MultilineTextHeight resizes the multiline text block. |
| MultilineTextWidth | int | get; set | The width of the multiline text block, in internal units (10,000 per mil). |
| Size | int | get; set | The height of the text, in internal units (10,000 per mil). |
| Text | string | get; set | The string of the text object. |
| TextKind | TTextKind | get; set | Whether the text is drawn with the stroke font, with a TrueType font or as a barcode. |
| TTFInvertedTextJustify | TTextAutoposition | get; set | Where the string is placed inside the rectangle of inverted or multiline text. |
| TTFOffsetFromInvertedRect | int | get; set | |
| TTFTextHeight | int | get; set | The height of the string of the text, in internal units (10,000 per mil). |
| TTFTextWidth | int | get; set | The width of the string of the text, in internal units (10,000 per mil). |
| UnderlyingString | string | get; set | The string of the text as stored, with special strings not converted. |
| UseInvertedRectangle | bool | get; set | |
| UseTTFonts | bool | get; set | Whether the text uses a TrueType font (FontName, Bold, Italic) rather than the stroke font FontID. |
| Width | int | get; set | The width of the lines of the text's stroke font, in internal units (10,000 per mil). |
| WordWrap | bool | get |
BarCodeBitPattern
The bit pattern of the barcode, generated from the text.
string GetState_BarCodeBitPattern();
Type: string · Access: read-only
When no pattern is stored, reading the property generates it from the text with its special strings converted. The pattern is regenerated when Text is assigned to a barcode and when the size of a barcode is recalculated.
BarCodeFontName
No description yet.
string GetState_BarCodeFontName();
void SetState_BarCodeFontName(string argValue);
Type: string · Access: read/write
A new text object uses Arial.
BarCodeFullHeight
The full height of the barcode, in internal units (10,000 per mil).
int GetState_BarCodeFullHeight();
void SetState_BarCodeFullHeight(int argValue);
Type: int · Access: read/write
When Multiline is true, the property reads and writes MultilineTextHeight instead. Otherwise a value below 20 mil is ignored. A new text object uses 210 mil.
BarCodeFullWidth
The full width of the barcode, in internal units (10,000 per mil).
int GetState_BarCodeFullWidth();
void SetState_BarCodeFullWidth(int argValue);
Type: int · Access: read/write
When Multiline is true, the property reads and writes MultilineTextWidth instead. Otherwise a value smaller than TTFTextWidth is ignored. A new text object uses 1050 mil.
BarCodeInverted
No description yet.
bool GetState_BarCodeInverted();
void SetState_BarCodeInverted(bool argValue);
Type: bool · Access: read/write
When the value is true, the string of the barcode is offset from the reference point by BarCodeXMargin and BarCodeYMargin. A new text object has the value true.
BarCodeKind
The kind of barcode, such as Code 39, Code 128, QR code or Data Matrix.
TBarcodeKind GetState_BarCodeKind();
void SetState_BarCodeKind(TBarcodeKind argValue);
Type: TBarcodeKind · Access: read/write
The accessors are extension methods of IPCB_TextHelper (using PCB;).
A new text object uses TBarcodeKind.eBarcode39.
BarCodeMinWidth
No description yet.
int GetState_BarCodeMinWidth();
void SetState_BarCodeMinWidth(int argValue);
Type: int · Access: read/write
A new text object has the value 0.
BarCodeRenderMode
No description yet.
TBarcodeRenderMode GetState_BarCodeRenderMode();
void SetState_BarCodeRenderMode(TBarcodeRenderMode argValue);
Type: TBarcodeRenderMode · Access: read/write
The accessors are extension methods of IPCB_TextHelper (using PCB;).
A new text object uses TBarcodeRenderMode.eRender_ByFullWidth.
BarCodeShowText
No description yet.
bool GetState_BarCodeShowText();
void SetState_BarCodeShowText(bool argValue);
Type: bool · Access: read/write
A new text object has the value true.
BarCodeXMargin
The horizontal margin of the barcode, in internal units (10,000 per mil).
int GetState_BarCodeXMargin();
void SetState_BarCodeXMargin(int argValue);
Type: int · Access: read/write
When BarCodeInverted is true, the string of the barcode is offset from the reference point by this distance in X. A new text object uses 20 mil.
BarCodeYMargin
The vertical margin of the barcode, in internal units (10,000 per mil).
int GetState_BarCodeYMargin();
void SetState_BarCodeYMargin(int argValue);
Type: int · Access: read/write
When BarCodeInverted is true, the string of the barcode is offset from the reference point by this distance in Y. A new text object uses 20 mil.
Bold
Whether the text is bold when it uses a TrueType font (UseTTFonts).
bool GetState_Bold();
void SetState_Bold(bool argBold);
Type: bool · Access: read/write
A new text object is not bold.
BorderSpaceType
No description yet.
TTextBorderSpaceType GetState_BorderSpaceType();
void SetState_BorderSpaceType(TTextBorderSpaceType argValue);
Type: TTextBorderSpaceType · Access: read/write
The accessors are extension methods of IPCB_TextHelper (using PCB;).
A new text object uses TTextBorderSpaceType.bstMargin.
CharSet
The character set of the text's TrueType font.
byte GetState_CharSet();
void SetState_CharSet(byte argCharSet);
Type: byte · Access: read/write
A new text object uses the Windows default character set (1).
ConvertedString
The string of the text with its special strings replaced by their values.
string GetState_ConvertedString();
Type: string · Access: read-only
For example, the special string .PRINT_DATE is replaced by the current date. For a component comment, the comment of the current variant is converted. The available special strings include .PRINT_DATE, .PRINT_TIME, .PRINT_SCALE, .LAYER_NAME, .PCB_FILE_NAME, .PCB_FILE_NAME_NO_PATH, .PLOT_FILE_NAME, .ARC_COUNT, .COMPONENT_COUNT, .FILL_COUNT, .HOLE_COUNT, .NET_COUNT, .PAD_COUNT, .STRING_COUNT, .TRACK_COUNT, .VIA_COUNT, .DESIGNATOR, .COMMENT, .LEGEND and .NET_NAMES_ON_LAYER.
Example: Show the converted value of every .Layer_Name special string on the current board.
using PCB;
// Retrieve the current board.
IPCB_Board board = PCB.GlobalVars.PCBServer?.GetCurrentPCBBoard();
if (board == null)
return;
// Create the iterator.
IPCB_BoardIterator iterator = board.BoardIterator_Create();
iterator.AddFilter_ObjectSet(new PCB.TObjectSet { TObjectId.eTextObject });
iterator.AddFilter_AllLayers();
iterator.AddFilter_Method(TIterationMethod.eProcessAll);
// Search for special strings.
var specialString = iterator.FirstPCBObject() as IPCB_Text;
while (specialString != null)
{
if (specialString.GetState_Text() == ".Layer_Name")
DXP.Utils.ShowInfo(specialString.GetState_ConvertedString(), "Special String");
specialString = iterator.NextPCBObject() as IPCB_Text;
}
board.BoardIterator_Destroy(ref iterator);
See also: IPCB_SpecialStringConverter
FontID
The stroke font of the text, an index into the font table of the PCB editor.
short GetState_FontID();
void SetState_FontID(short argFontID);
Type: short · Access: read/write
Each font used in the PCB editor has its own font ID; when a new font is used, a new entry is added to the table. A new text object uses font 1.
FontName
The name of the TrueType font of the text, for example Arial, Arial Narrow, Courier New or Verdana.
string GetState_FontName();
void SetState_FontName(string argFontName);
Type: string · Access: read/write
The value is used when UseTTFonts is true. A new text object uses Arial.
Inverted
Whether the text is inverted, that is, cut out of a filled rectangle drawn around it.
bool GetState_Inverted();
void SetState_Inverted(bool argInverted);
Type: bool · Access: read/write
Inverted text is useful when the text is placed on a copper region and has to create a cutout in it. The rectangle has the layer colour and the text itself is black. InvertedTTTextBorder sets the border around the text. A new text object is not inverted.
See also: IPCB_Text.InvertedTTTextBorder
InvertedTTTextBorder
The width of the border between inverted text and the edge of its rectangle, in internal units (10,000 per mil).
int GetState_InvertedTTTextBorder();
void SetState_InvertedTTTextBorder(int argBorder);
Type: int · Access: read/write
A new text object has a border of 0.
See also: IPCB_Text.Inverted
InvRectHeight
The height of the rectangle of inverted text, in internal units (10,000 per mil).
int GetState_InvRectHeight();
void SetState_InvRectHeight(int argValue);
Type: int · Access: read/write
For single-line text the value is reset to the height of the string plus its border whenever the size of the text is recalculated. Assigning a value smaller than TTFTextHeight is ignored, unless the current height is 0 or less, in which case any positive value is accepted.
InvRectWidth
The width of the rectangle of inverted text, in internal units (10,000 per mil).
int GetState_InvRectWidth();
void SetState_InvRectWidth(int argValue);
Type: int · Access: read/write
For single-line text the value is reset to the width of the string plus its border whenever the size of the text is recalculated. Assigning a value that is not greater than TTFTextWidth is ignored, unless the current width is 0 or less (any positive value is then accepted) or the value equals TTFTextWidth and the current width is smaller.
Italic
Whether the text is italic when it uses a TrueType font (UseTTFonts).
bool GetState_Italic();
void SetState_Italic(bool argItalic);
Type: bool · Access: read/write
A new text object is not italic.
Mirror
Whether the text is mirrored.
bool GetState_Mirror();
void SetState_Mirror(bool argMirror);
Type: bool · Access: read/write
A new text object is not mirrored.
Multiline
Whether the text is a multiline text block.
bool GetState_Multiline();
void SetState_Multiline(bool argValue);
Type: bool · Access: read/write
Assigning true is ignored for the text of a dimension or a coordinate. Assigning a value also sets WordWrap to the same value. A new text object is single-line.
MultilineTextAutoPosition
Where the string is placed inside the rectangle of multiline or inverted text.
TTextAutoposition GetState_MultilineTextAutoPosition();
void SetState_MultilineTextAutoPosition(TTextAutoposition argutoPosition);
Type: TTextAutoposition · Access: read/write
The accessors are extension methods of IPCB_TextHelper (using PCB;).
The property reads and writes the same value as TTFInvertedTextJustify.
MultilineTextHeight
The height of the multiline text block, in internal units (10,000 per mil).
int GetState_MultilineTextHeight();
void SetState_MultilineTextHeight(int argHeight);
Type: int · Access: read/write
Returns 0 when Multiline is false. Assigning a value sets Y2Location to Y1Location plus the value, and sets TTFTextHeight and InvRectHeight to the value; the block itself is resized only when MultilineTextResizeEnabled is true.
MultilineTextResizeEnabled
Whether assigning MultilineTextWidth and MultilineTextHeight resizes the multiline text block.
bool GetState_MultilineTextResizeEnabled();
Type: bool · Access: read-only
Returns false when Multiline is false.
MultilineTextWidth
The width of the multiline text block, in internal units (10,000 per mil).
int GetState_MultilineTextWidth();
void SetState_MultilineTextWidth(int argWidth);
Type: int · Access: read/write
Returns 0 when Multiline is false. Assigning a value sets X2Location to X1Location plus the value (for mirrored text, X1Location to X2Location minus the value), and sets TTFTextWidth and InvRectWidth to the value; the block itself is resized only when MultilineTextResizeEnabled is true.
Size
The height of the text, in internal units (10,000 per mil).
int GetState_Size();
void SetState_Size(int argSize);
Type: int · Access: read/write
A negative value or a value above 10 inches (10,000 mil) is ignored. A new text object has a height of 60 mil.
Text
The string of the text object.
string GetState_Text();
void SetState_Text(string argText);
Type: string · Access: read/write
When the text is on a board whose view displays special strings converted, reading returns the converted string (ConvertedString); otherwise it returns the underlying string, or for a component comment the comment of the current variant. Assigning a value sets the underlying string (UnderlyingString) and, for a barcode, regenerates BarCodeBitPattern; assigning the string that the text already holds does nothing. For a component comment that has a value in the current variant, assigning a different string asks the user for confirmation and then changes the comment of the variant.
TextKind
Whether the text is drawn with the stroke font, with a TrueType font or as a barcode.
TTextKind GetState_TextKind();
void SetState_TextKind(TTextKind argValue);
Type: TTextKind · Access: read/write
The accessors are extension methods of IPCB_TextHelper (using PCB;).
UseTTFonts is true exactly when the kind is TTextKind.eText_TrueTypeFont. A new text object uses TTextKind.eText_StrokeFont.
TTFInvertedTextJustify
Where the string is placed inside the rectangle of inverted or multiline text.
TTextAutoposition GetState_TTFInvertedTextJustify();
void SetState_TTFInvertedTextJustify(TTextAutoposition argValue);
Type: TTextAutoposition · Access: read/write
The accessors are extension methods of IPCB_TextHelper (using PCB;).
Only the values from TTextAutoposition.eAutoPos_TopLeft to TTextAutoposition.eAutoPos_BottomRight are accepted; assigning TTextAutoposition.eAutoPos_Manual is ignored. MultilineTextAutoPosition reads and writes the same value. A new text object uses TTextAutoposition.eAutoPos_BottomLeft.
TTFOffsetFromInvertedRect
No description yet.
int GetState_TTFOffsetFromInvertedRect();
void SetState_TTFOffsetFromInvertedRect(int argValue);
Type: int · Access: read/write
A new text object has the value 0.
TTFTextHeight
The height of the string of the text, in internal units (10,000 per mil).
int GetState_TTFTextHeight();
void SetState_TTFTextHeight(int argValue);
Type: int · Access: read/write
The value is calculated for stroke, TrueType and barcode text whenever the size of the text is recalculated, and is also set by assigning MultilineTextHeight.
TTFTextWidth
The width of the string of the text, in internal units (10,000 per mil).
int GetState_TTFTextWidth();
void SetState_TTFTextWidth(int argValue);
Type: int · Access: read/write
The value is calculated for stroke, TrueType and barcode text whenever the size of the text is recalculated, and is also set by assigning MultilineTextWidth.
UnderlyingString
The string of the text as stored, with special strings not converted.
string GetState_UnderlyingString();
void SetState_UnderlyingString(string argValue);
Type: string · Access: read/write
Unlike Text, reading never converts special strings and never returns the comment of a variant. Assigning a value sets the stored string; for a component comment that has a value in the current variant, assigning a different string asks the user for confirmation and then changes the comment of the variant.
UseInvertedRectangle
No description yet.
bool GetState_UseInvertedRectangle();
void SetState_UseInvertedRectangle(bool argValue);
Type: bool · Access: read/write
Reading the property returns the value of Inverted.
UseTTFonts
Whether the text uses a TrueType font (FontName, Bold, Italic) rather than the stroke font FontID.
bool GetState_UseTTFonts();
void SetState_UseTTFonts(bool argUseTTFonts);
Type: bool · Access: read/write
The value is true when TextKind is TTextKind.eText_TrueTypeFont. Assigning true sets TextKind to TTextKind.eText_TrueTypeFont; assigning false sets it to TTextKind.eText_StrokeFont only when it was TTextKind.eText_TrueTypeFont, so a barcode stays a barcode. A new text object uses the stroke font.
Example: Place an inverted TrueType text object on the bottom overlay of the current board.
using PCB;
IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
IPCB_Board board = pcbServer?.GetCurrentPCBBoard();
if (board == null)
return;
IPCB_Sheet sheet = board.GetState_PCBSheet();
var textObj = pcbServer.PCBObjectFactory(TObjectId.eTextObject, TDimensionKind.eNoDimension, TObjectCreationMode.eCreate_Default) as IPCB_Text;
// Notify that the PCB object is going to be modified.
textObj.BeginModify();
textObj.SetState_XLocation(sheet.GetState_SheetX() + EDP.Utils.MilsToCoord(1000));
textObj.SetState_YLocation(sheet.GetState_SheetY() + EDP.Utils.MilsToCoord(1000));
textObj.SetState_Layer(TV6_Layer.eV6_BottomOverlay);
// Use TrueType fonts.
textObj.SetState_UseTTFonts(true);
textObj.SetState_Italic(true);
textObj.SetState_Bold(false);
textObj.SetState_FontName("ARIAL");
textObj.SetState_Inverted(true);
textObj.SetState_InvertedTTTextBorder(EDP.Utils.MilsToCoord(100));
textObj.SetState_Text("Text with True Type Property enabled.");
textObj.SetState_Size(EDP.Utils.MilsToCoord(200)); // sets the height of the text
board.AddPCBObject(textObj);
// Notify that the PCB object has been modified.
textObj.EndModify();
Width
The width of the lines of the text's stroke font, in internal units (10,000 per mil).
int GetState_Width();
void SetState_Width(int argWidth);
Type: int · Access: read/write
A new text object uses 10 mil.
WordWrap
No description yet.
bool GetState_WordWrap();
Type: bool · Access: read-only
The value is set to the value of Multiline whenever Multiline is assigned.
Methods
| Method | Returns | Description |
|---|---|---|
| CanEditMultilineRectSize | bool | |
| ConvertToStrokeArray | IPCB_StrokeArray | Converts the text into a series of line strokes. |
| GetDesignatorDisplayString | string | Returns the designator string that the text displays. |
| GetTrueTypeTextOutlineGeometricPolygon | IPCB_GeometricPolygon | Returns the outline of the text as a geometric polygon. |
| GetTrueTypeTextOutlineGeometricPolygon_1 | IPCB_GeometricPolygon | Returns the outline of a string drawn in the text's TrueType font, as a geometric polygon. |
| InAutoDimension | bool | Returns whether the text belongs to an automatic dimension. |
| IsComment | bool | Returns whether the text is the comment of a component. |
| IsDesignator | bool | Returns whether the text is the designator of a component. |
| IsHidden_1 | bool | Returns whether the text is hidden. |
| RotationHandle | CoordPoint | Returns the position of the text's rotation handle, in internal units (10,000 per mil). |
CanEditMultilineRectSize
No description yet.
bool CanEditMultilineRectSize();
Returns: bool
A new text object returns true.
ConvertToStrokeArray
Converts the text into a series of line strokes.
IPCB_StrokeArray ConvertToStrokeArray();
Returns: IPCB_StrokeArray
Extension method of IPCB_TextHelper (using PCB;).
This is useful for using the text as standalone lines outside the PCB editor, for example in 3D modelling applications.
GetDesignatorDisplayString
Returns the designator string that the text displays.
string GetDesignatorDisplayString();
Returns: string
Returns an empty string when the text is not the designator of a component (IsDesignator). When the board displays logical designators (IPCB_Board.DesignatorDisplayMode is TDesignatorDisplayMode.eDesignatorDisplayMode_Logical) and the component's IPCB_Component.SourceDesignator is not empty, returns the source designator; otherwise returns the text.
GetTrueTypeTextOutlineGeometricPolygon
Returns the outline of the text as a geometric polygon.
IPCB_GeometricPolygon GetTrueTypeTextOutlineGeometricPolygon();
Returns: IPCB_GeometricPolygon
Extension method of IPCB_TextHelper (using PCB;).
Returns the outline of the TrueType text or of the barcode; returns null when TextKind is TTextKind.eText_StrokeFont.
GetTrueTypeTextOutlineGeometricPolygon_1
Returns the outline of a string drawn in the text's TrueType font, as a geometric polygon.
IPCB_GeometricPolygon GetTrueTypeTextOutlineGeometricPolygon_1(string argText);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argText | string | value | The string to outline. |
Returns: IPCB_GeometricPolygon
Extension method of IPCB_TextHelper (using PCB;).
Returns null unless TextKind is TTextKind.eText_TrueTypeFont.
InAutoDimension
Returns whether the text belongs to an automatic dimension.
bool InAutoDimension();
Returns: bool
Returns true when the text belongs to a dimension whose kind is not TDimensionKind.eOriginalDimension. Returns false when the text is not on a board or the board is still being loaded.
IsComment
Returns whether the text is the comment of a component.
bool IsComment();
Returns: bool
Returns false when the text is not on a board or the board is still being loaded. A component's comment is returned by IPCB_Component.Comment.
IsDesignator
Returns whether the text is the designator of a component.
bool IsDesignator();
Returns: bool
Returns false when the text is not on a board or the board is still being loaded. A component's designator is returned by IPCB_Component.Name.
IsHidden_1
Returns whether the text is hidden.
bool IsHidden_1();
Returns: bool
Besides the cases in which any primitive is hidden (IsHidden), returns true for the designator of a component whose IPCB_Component.NameOn is false and for the comment of a component whose IPCB_Component.CommentOn is false.
RotationHandle
Returns the position of the text's rotation handle, in internal units (10,000 per mil).
CoordPoint RotationHandle();
Returns: CoordPoint
Extension method of IPCB_TextHelper (using PCB;).
The handle lies in the direction of Rotation from the text, turned by 180 degrees for mirrored text.
Inherited members
- From IPCB_RectangularPrimitive: IsRedundant, RotateAroundXY, Rotation, SetState_XSizeYSize, X1Location, X2Location, XLocation, Y1Location, Y2Location, 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
Returned by
IPCB_AngularDimension.Text, IPCB_BaselineDimension.Text, IPCB_BaselineDimension.Texts, IPCB_Component.Comment, IPCB_Component.Name, IPCB_DatumDimension.Text, IPCB_DatumDimension.Texts, IPCB_LeaderDimension.Text, IPCB_LinearDimension.Text, IPCB_MultilineText.Text, IPCB_OriginalDimension.Text, IPCB_RadialDimension.Text
Accepted by
IPCB_ContourMaker.MakeContour_7, IPCB_ContourMaker2.MakeContour_17, IPCB_Text3.CopyTo