Skip to main content
View as Markdown

IPCB_Primitive interface

The base interface of the PCB design objects; tracks, arcs, pads, vias, fills, text, components, polygons, dimensions and the other PCB object interfaces inherit its members.

public interface IPCB_Primitive

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Derived: IPCB_Accordion, IPCB_Arc, IPCB_Board, IPCB_Connection, IPCB_DifferentialPair, IPCB_DrillTable, IPCB_Embedded, IPCB_FromTo, IPCB_Group, IPCB_ObjectClass, IPCB_ObjectClassBase, IPCB_Pad, IPCB_RectangularPrimitive, IPCB_Region, IPCB_Rule, IPCB_Track, IPCB_Via, IPCB_Violation

Remarks​

Coordinates and sizes are in internal units (10,000 per mil): 10,000 per mil (EDP.EDPConstant.InternalUnits). Convert with EDP.Utils.MilsToCoord and EDP.Utils.MMsToCoord, and back with EDP.Utils.CoordToMils and EDP.Utils.CoordToMMs.

To change an object, call BeginModify before and EndModify after the change, between IPCB_ServerInterface.PreProcess and IPCB_ServerInterface.PostProcess.

Once the object has been destroyed, every call through this interface fails with the error "Object accessed after being destroyed".

A primitive has a bounding rectangle which encapsulates the region of the primitive. There are two other bounding rectangles which are for selection and for painting (refreshing and updating).

Properties​

PropertyTypeAccessDescription
AllowGlobalEditboolget; set
BoardIPCB_Boardget; setThe Board property determines the PCB document that the object itself is associated with.
ComponentIPCB_Componentget; setThis property determines whether the object itself is associated with the component or not.
CoordinateIPCB_Coordinateget; setThe Coordinate property returns the IPCB_Coordinate only if this object itself is part of the IPCB_Coordinate type.
DescriptorStringstringgetThe Descriptor read only property fetches the Descriptor string.
DetailStringstringgetThis property retrieves the Detail text string for this design object.
DimensionIPCB_Dimensionget; setThe dimension the object belongs to, or null when it is not part of a dimension.
DrawAsPreviewboolget; set
DRCErrorboolget; setThe DRCError property determines whether the object is affected by the Design Rule Checker and thus if the object breaks one of the design rules, the DRCError is true.
Enabledboolget; set
Enabled_Directboolget; set
Enabled_vComponentboolget; set
Enabled_vCoordinateboolget; set
Enabled_vDimensionboolget; set
Enabled_vNetboolget; set
Enabled_vPolygonboolget; set
EnableDrawboolget; set
Handlestringget
Identifierstringget
InBoardboolget; setThis InBoard property determines whether the object itself is part of the board object or not.
InComponentboolget; setThis InComponent property determines whether the object itself is part of the component object or not.
InCoordinateboolget; setThis InCoordinate property determines whether the object itself is part of the coordinate object or not.
Indexushortget; set
InDimensionboolget; setThis InDimension property determines whether the object itself is part of the dimension object or not.
InNetboolget; set
InPolygonboolget; setThis InPolygon property determines whether the object itself is part of the polygon object or not.
InSelectionMemoryboolget; set
IsAssyTestPoint_Bottomboolget; set
IsAssyTestPoint_Topboolget; set
IsElectricalPrimboolgetThis property determines whether this PCB object possesses an electrical property- tracks, fills, polygons, arcs, vias all have electrical properties - basically those objects that have a Net propert…
IsKeepoutboolget; setThis property determines whether a PCB object is used as a keep-out object.
IsPreRouteboolget; set
IsTentingboolget; setThis property determines whether the solder mask of pad and via objects are tented on top and bottom layers.
IsTenting_Bottomboolget; setThis property determines whether the solder mask of pad and via objects are tented or not on the bottom layer.
IsTenting_Topboolget; setThis property determines whether the solder mask of pad and via objects are tented or not on the top layer.
IsTestPoint_Bottomboolget; set
IsTestPoint_Topboolget; set
LayerTV6_Layerget; setThe layer the object is on, as a TV6_Layer.
MiscFlag1boolget; setThis property determines the boolean value from the MiscFlag1 property and can be used for custom purposes.
MiscFlag2boolget; setThis property determines the boolean value from the MiscFlag2 property and can be used for custom purposes.
MiscFlag3boolget; setThis property determines the boolean value from the MiscFlag3 property and can be used for custom purposes.
Moveableboolget; setThis property determines whether this design object can be moved or not (by the autorouter for example).
NetIPCB_Netget; setThe Net property of an object denotes it has an electrical property, meaning it is connected from one node to another.
ObjectIDTObjectIdget
ObjectIDStringstringgetThis ObjectIDString property returns the Object Id string.
PadCacheRobotFlagboolget; setNot used; the property reads false, and setting it has no effect.
PasteMaskExpansionintgetThe paste mask expansion of the object, in internal units (10,000 per mil).
PolygonIPCB_Polygonget; setThis method retrieves the IPCB_Polygon interface that the design object primitive is associated with.
PolygonOutlineboolget; setThis method determines whether the design object primitive is part of the polygon outline or not.
PowerPlaneClearanceintgetThe power plane clearance of the object, in internal units (10,000 per mil).
PowerPlaneConnectStyleTPlaneConnectStylegetThe style of the object's connection to power planes.
PowerPlaneReliefExpansionintgetThe relief expansion of the object's power plane connection, in internal units (10,000 per mil).
Previewfloatset
ReliefAirGapintgetThe ReliefAirGap property retrieves the relief air gap value for this pad/via object, in internal units (10,000 per mil).
ReliefConductorWidthintgetThe relief conductor width of the pad or via, in internal units (10,000 per mil).
ReliefEntriesintgetThis property retrieves the number of relief entries for a pad/via object.
Selectedboolget; setThis property determines whether this object is selected or not on the PCB document.
SolderMaskExpansionintgetThe solder mask expansion of the object, in internal units (10,000 per mil).
TearDropboolget; setThis property determines whether the PCB object (an arc or track object) is used for as a tear drop.
UnionIndexintget; setThe property denotes the union index.
UniqueIdstringget
UniqueIDstringset
Usedboolget; set
UserRoutedboolget; set
V7LayerV7_LayerBaseget; setThe layer the object is on.
ViewableObjectIDTViewableObjectIDgetThe read only property determines the ViewableObjectID of the design object.

AllowGlobalEdit​

No description yet.

bool GetState_AllowGlobalEdit();
void SetState_AllowGlobalEdit(bool argValue);

Type: bool · Access: read/write

Board​

The Board property determines the PCB document that the object itself is associated with.

IPCB_Board GetState_Board();
void SetState_Board(IPCB_Board argBoard);

Type: IPCB_Board · Access: read/write

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

Examples: Extension_PcbLibComponentToSTEP, Extension_PlaceAndMovePcbComponent

Component​

This property determines whether the object itself is associated with the component or not.

IPCB_Component GetState_Component();
void SetState_Component(IPCB_Component argValue);

Type: IPCB_Component · Access: read/write

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

Coordinate​

The Coordinate property returns the IPCB_Coordinate only if this object itself is part of the IPCB_Coordinate type. A coordinate object is a group object and is composed of design object primitives such as tracks, arcs and text objects.

IPCB_Coordinate GetState_Coordinate();
void SetState_Coordinate(IPCB_Coordinate argValue);

Type: IPCB_Coordinate · Access: read/write

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

DescriptorString​

The Descriptor read only property fetches the Descriptor string.

string GetState_DescriptorString();

Type: string · Access: read-only

DetailString​

This property retrieves the Detail text string for this design object.

string GetState_DetailString();

Type: string · Access: read-only

Dimension​

The dimension the object belongs to, or null when it is not part of a dimension.

IPCB_Dimension GetState_Dimension();
void SetState_Dimension(IPCB_Dimension argValue);

Type: IPCB_Dimension · Access: read/write

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

DrawAsPreview​

No description yet.

bool GetState_DrawAsPreview();
void SetState_DrawAsPreview(bool argValue);

Type: bool · Access: read/write

DRCError​

The DRCError property determines whether the object is affected by the Design Rule Checker and thus if the object breaks one of the design rules, the DRCError is true.

bool GetState_DRCError();
void SetState_DRCError(bool argValue);

Type: bool · Access: read/write

Enabled​

No description yet.

bool GetState_Enabled();
void SetState_Enabled(bool argValue);

Type: bool · Access: read/write

Enabled_Direct​

No description yet.

bool GetState_Enabled_Direct();
void SetState_Enabled_Direct(bool argValue);

Type: bool · Access: read/write

Enabled_vComponent​

No description yet.

bool GetState_Enabled_vComponent();
void SetState_Enabled_vComponent(bool argValue);

Type: bool · Access: read/write

Enabled_vCoordinate​

No description yet.

bool GetState_Enabled_vCoordinate();
void SetState_Enabled_vCoordinate(bool argValue);

Type: bool · Access: read/write

Enabled_vDimension​

No description yet.

bool GetState_Enabled_vDimension();
void SetState_Enabled_vDimension(bool argValue);

Type: bool · Access: read/write

Enabled_vNet​

No description yet.

bool GetState_Enabled_vNet();
void SetState_Enabled_vNet(bool argValue);

Type: bool · Access: read/write

Enabled_vPolygon​

No description yet.

bool GetState_Enabled_vPolygon();
void SetState_Enabled_vPolygon(bool argValue);

Type: bool · Access: read/write

EnableDraw​

No description yet.

bool GetState_EnableDraw();
void SetState_EnableDraw(bool argValue);

Type: bool · Access: read/write

Handle​

No description yet.

string GetState_Handle();

Type: string · Access: read-only

Identifier​

No description yet.

string GetState_Identifier();

Type: string · Access: read-only

InBoard​

This InBoard property determines whether the object itself is part of the board object or not.

bool GetState_InBoard();
void SetState_InBoard(bool argValue);

Type: bool · Access: read/write

InComponent​

This InComponent property determines whether the object itself is part of the component object or not.

bool GetState_InComponent();
void SetState_InComponent(bool argValue);

Type: bool · Access: read/write

InCoordinate​

This InCoordinate property determines whether the object itself is part of the coordinate object or not.

bool GetState_InCoordinate();
void SetState_InCoordinate(bool argValue);

Type: bool · Access: read/write

Index​

No description yet.

ushort GetState_Index();
void SetState_Index(ushort argIndex);

Type: ushort · Access: read/write

InDimension​

This InDimension property determines whether the object itself is part of the dimension object or not.

bool GetState_InDimension();
void SetState_InDimension(bool argValue);

Type: bool · Access: read/write

InNet​

No description yet.

bool GetState_InNet();
void SetState_InNet(bool argValue);

Type: bool · Access: read/write

InPolygon​

This InPolygon property determines whether the object itself is part of the polygon object or not.

bool GetState_InPolygon();
void SetState_InPolygon(bool argValue);

Type: bool · Access: read/write

InSelectionMemory​

No description yet.

bool GetState_InSelectionMemory(int argIndex);
void SetState_InSelectionMemory(int argIndex, bool argValue);

Type: bool · Access: read/write · Index: argIndex (int): The selection memory, from 0 to 7.

Setting the property for an index outside 0 to 7 has no effect.

IsAssyTestPoint_Bottom​

No description yet.

bool GetState_IsAssyTestPoint_Bottom();
void SetState_IsAssyTestPoint_Bottom(bool argValue);

Type: bool · Access: read/write

IsAssyTestPoint_Top​

No description yet.

bool GetState_IsAssyTestPoint_Top();
void SetState_IsAssyTestPoint_Top(bool argValue);

Type: bool · Access: read/write

IsElectricalPrim​

This property determines whether this PCB object possesses an electrical property- tracks, fills, polygons, arcs, vias all have electrical properties - basically those objects that have a Net property will possess an electrical property.

bool GetState_IsElectricalPrim();

Type: bool · Access: read-only

Embedded boards and Embedded objects etc don't have an electrical property for example.

IsKeepout​

This property determines whether a PCB object is used as a keep-out object. Currently arc, track and fill objects are used as keep out objects. The keepout layer generally defines areas on the PCB document that you don't want automatically or manually routed, and this can include clearance areas around mounting hole pads or high voltage components for example.

bool GetState_IsKeepout();
void SetState_IsKeepout(bool argValue);

Type: bool · Access: read/write

IsPreRoute​

No description yet.

bool GetState_IsPreRoute();
void SetState_IsPreRoute(bool argB);

Type: bool · Access: read/write

IsTenting​

This property determines whether the solder mask of pad and via objects are tented on top and bottom layers. A tenting closes an opening in the mask of pad or via objects.

bool GetState_IsTenting();
void SetState_IsTenting(bool argValue);

Type: bool · Access: read/write

IsTenting_Bottom​

This property determines whether the solder mask of pad and via objects are tented or not on the bottom layer. A tenting closes an opening in the mask of pad or via objects.

bool GetState_IsTenting_Bottom();
void SetState_IsTenting_Bottom(bool argValue);

Type: bool · Access: read/write

IsTenting_Top​

This property determines whether the solder mask of pad and via objects are tented or not on the top layer. A tenting closes an opening in the mask of pad or via objects.

bool GetState_IsTenting_Top();
void SetState_IsTenting_Top(bool argValue);

Type: bool · Access: read/write

IsTestPoint_Bottom​

No description yet.

bool GetState_IsTestPoint_Bottom();
void SetState_IsTestPoint_Bottom(bool argValue);

Type: bool · Access: read/write

Examples: Extension_PlacePad

IsTestPoint_Top​

No description yet.

bool GetState_IsTestPoint_Top();
void SetState_IsTestPoint_Top(bool argValue);

Type: bool · Access: read/write

Layer​

The layer the object is on, as a TV6_Layer.

TV6_Layer GetState_Layer();
void SetState_Layer(TV6_Layer argLayer);

Type: TV6_Layer · Access: read/write

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

A layer that TV6_Layer cannot represent reads as the nearest value; mid layers above 30 as TV6_Layer.eV6_MidLayer30, internal planes above 16 as TV6_Layer.eV6_InternalPlane16, mechanical layers above 16 as TV6_Layer.eV6_Mechanical16, and other layers as TV6_Layer.eV6_NoLayer. V7Layer gives the exact layer.

Examples: Extension_PcbLibComponentToSTEP, Extension_PlaceAndMovePcbComponent, Extension_PlacePad

MiscFlag1​

This property determines the boolean value from the MiscFlag1 property and can be used for custom purposes.

bool GetState_MiscFlag1();
void SetState_MiscFlag1(bool argValue);

Type: bool · Access: read/write

MiscFlag2​

This property determines the boolean value from the MiscFlag2 property and can be used for custom purposes.

bool GetState_MiscFlag2();
void SetState_MiscFlag2(bool argValue);

Type: bool · Access: read/write

MiscFlag3​

This property determines the boolean value from the MiscFlag3 property and can be used for custom purposes.

bool GetState_MiscFlag3();
void SetState_MiscFlag3(bool argValue);

Type: bool · Access: read/write

Moveable​

This property determines whether this design object can be moved or not (by the autorouter for example).

bool GetState_Moveable();
void SetState_Moveable(bool argValue);

Type: bool · Access: read/write

Net​

The Net property of an object denotes it has an electrical property, meaning it is connected from one node to another.

IPCB_Net GetState_Net();
void SetState_Net(IPCB_Net argValue);

Type: IPCB_Net · Access: read/write

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

ObjectID​

No description yet.

TObjectId GetState_ObjectID();

Type: TObjectId · Access: read-only

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

ObjectIDString​

This ObjectIDString property returns the Object Id string. For example eTrackObject type will yield a Track string.

string GetState_ObjectIDString();

Type: string · Access: read-only

PadCacheRobotFlag​

Not used; the property reads false, and setting it has no effect.

bool GetState_PadCacheRobotFlag();
void SetState_PadCacheRobotFlag(bool argValue);

Type: bool · Access: read/write

PasteMaskExpansion​

The paste mask expansion of the object, in internal units (10,000 per mil).

int GetState_PasteMaskExpansion();

Type: int · Access: read-only

The value comes from the paste mask expansion rule that applies to the object, or is the object's manual expansion when it has one; it is 0 when the object has no paste mask.

Polygon​

This method retrieves the IPCB_Polygon interface that the design object primitive is associated with. For example, a polygon may contain arcs and tracks, and when you only have the arc, you can retrieve the polygon the arc is associated with.

IPCB_Polygon GetState_Polygon();
void SetState_Polygon(IPCB_Polygon argValue);

Type: IPCB_Polygon · Access: read/write

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

PolygonOutline​

This method determines whether the design object primitive is part of the polygon outline or not.

bool GetState_PolygonOutline();
void SetState_PolygonOutline(bool argValue);

Type: bool · Access: read/write

PowerPlaneClearance​

The power plane clearance of the object, in internal units (10,000 per mil).

int GetState_PowerPlaneClearance();

Type: int · Access: read-only

The value comes from the power plane clearance rule that applies to the object.

PowerPlaneConnectStyle​

The style of the object's connection to power planes.

TPlaneConnectStyle GetState_PowerPlaneConnectStyle();

Type: TPlaneConnectStyle · Access: read-only

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

The value comes from the power plane connect style rule that applies to the object; TPlaneConnectStyle.eNoConnect when no rule applies.

See also: TPlaneConnectStyle

PowerPlaneReliefExpansion​

The relief expansion of the object's power plane connection, in internal units (10,000 per mil).

int GetState_PowerPlaneReliefExpansion();

Type: int · Access: read-only

The value comes from the power plane connect style rule that applies to the object.

Preview​

No description yet.

void SetState_Preview(bool argEnable, uint argColor, float argOpacity, int argz, int argHeight, float argsx, float argsy, float argSZ);

Type: float · Access: write-only · Index: argEnable (bool), argColor (uint), argOpacity (float), argz (int), argHeight (int), argsx (float), argsy (float)

ReliefAirGap​

The ReliefAirGap property retrieves the relief air gap value for this pad/via object, in internal units (10,000 per mil).

int GetState_ReliefAirGap();

Type: int · Access: read-only

The value comes from the power plane connect style rule that applies to the object.

ReliefConductorWidth​

The relief conductor width of the pad or via, in internal units (10,000 per mil).

int GetState_ReliefConductorWidth();

Type: int · Access: read-only

The value comes from the power plane connect style rule that applies to the object.

ReliefEntries​

This property retrieves the number of relief entries for a pad/via object.

int GetState_ReliefEntries();

Type: int · Access: read-only

The value comes from the power plane connect style rule that applies to the object.

Selected​

This property determines whether this object is selected or not on the PCB document.

bool GetState_Selected();
void SetState_Selected(bool argB);

Type: bool · Access: read/write

Examples: Extension_PlaceAndMovePcbComponent, Extension_PlacePad

SolderMaskExpansion​

The solder mask expansion of the object, in internal units (10,000 per mil).

int GetState_SolderMaskExpansion();

Type: int · Access: read-only

The value comes from the solder mask expansion rule that applies to the object (its top side expansion), or is the object's manual expansion when it has one; it is 0 when the object has no solder mask.

A Solder Mask expansion property for a pad object is currently relevant just for pads on top and bottom copper layers.

TearDrop​

This property determines whether the PCB object (an arc or track object) is used for as a tear drop.

bool GetState_TearDrop();
void SetState_TearDrop(bool argValue);

Type: bool · Access: read/write

UnionIndex​

The property denotes the union index. Unions are sets of components that will be manipulated as a block for the PCB placement. Components in a union maintain their relative positions within the union as they are moved for example.

int GetState_UnionIndex();
void SetState_UnionIndex(int argValue);

Type: int · Access: read/write

See also: IPCB_Component

UniqueId​

No description yet.

string GetState_UniqueId();

Type: string · Access: read-only

UniqueID​

No description yet.

void SetState_UniqueID(string argValue);

Type: string · Access: write-only

Used​

No description yet.

bool GetState_Used();
void SetState_Used(bool argValue);

Type: bool · Access: read/write

UserRouted​

No description yet.

bool GetState_UserRouted();
void SetState_UserRouted(bool argValue);

Type: bool · Access: read/write

V7Layer​

The layer the object is on.

V7_LayerBase GetState_V7Layer();
void SetState_V7Layer(V7_LayerBase argL);

Type: V7_LayerBase · Access: read/write

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

Identifies every layer, including the layers that Layer cannot represent.

ViewableObjectID​

The read only property determines the ViewableObjectID of the design object. The TViewableObjectID type is a more descriptive ID of a design object than the TObjectID type.

TViewableObjectID GetState_ViewableObjectID();

Type: TViewableObjectID · Access: read-only

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

For example any type of dimension object is a eDimension type according to the TObjectID but could be one of the eViewableObject_LinearDimension...eViewableObject_RadialDiameterDimension value.

This TViewableObjectID type is mainly used by the Inspector and List views in Altium Designer and is an extension of TObjectID type.

See also: TViewableObjectID, TObjectId

Methods​

MethodReturnsDescription
BeginModifyvoidStarts a change of the object; saves the object's state and tells the board that the object is about to change.
BoundingRectangleCoordRectThis method returns the coordinates of the bounding rectangle that encapsulates the design object on a PCB document.
BoundingRectangleChildrenCoordRect
BoundingRectangleForPaintingCoordRectThe bounding rectangle of a design object for painting is potentially the largest of all bounding rectangles because for example a component can have comment and designator objects as well.
BoundingRectangleForSelectionCoordRectThe bounding rectangle of a design object used for selection is a bit bigger than the bounding rectangle of a design object itself.
CancelModifyvoidEnds a change started with BeginModify and restores the object's state that BeginModify saved.
EndModifyvoidEnds a change started with BeginModify and tells the board that the object has changed.
Export_ToParametersvoid
FlipXYvoidThis method flips the object about the axis depending on Axis and MirrOp parameters.
GraphicallyInvalidatevoidRedraws the object in the board's view.
IsFreePrimitiveboolThis method determines whether the object is a free primitive (not connected to a net) or just a standalone object.
IsHiddenboolReturns whether this object is hidden from view.
IsSaveableboolThis method determines whether this particular object can be saved in a specified file format version according to the TAdvPCBFileFormatVersion type.
MoveByXYvoidMoves the design object by an offset in horizontal and vertical directions.
MoveToXYvoidMoves the design object to a new location.
ReplicateIPCB_PrimitiveReturns a copy of the object.
RequiredParamterSpaceint
RotateByvoidRotates the object by an angle about its reference point.
SwapLayerPairsvoidThis method swaps the current layer pair that the PCB design object (vias and pads only) has.

BeginModify​

Starts a change of the object; saves the object's state and tells the board that the object is about to change.

void BeginModify();

Returns: nothing (void)

End the change with EndModify, or with CancelModify to restore the saved state. When the object is on a board, the board's undo history is one of the receivers of the notification.

Examples: Extension_PCBUndoRedo

BoundingRectangle​

This method returns the coordinates of the bounding rectangle that encapsulates the design object on a PCB document. There are other two bounding rectangle methods.

CoordRect BoundingRectangle();

Returns: CoordRect

Extension method of IPCB_PrimitiveHelper (using PCB;).

BoundingRectangleChildren​

No description yet.

CoordRect BoundingRectangleChildren();

Returns: CoordRect

Extension method of IPCB_PrimitiveHelper (using PCB;).

BoundingRectangleForPainting​

The bounding rectangle of a design object for painting is potentially the largest of all bounding rectangles because for example a component can have comment and designator objects as well.

CoordRect BoundingRectangleForPainting();

Returns: CoordRect

Extension method of IPCB_PrimitiveHelper (using PCB;).

BoundingRectangleForSelection​

The bounding rectangle of a design object used for selection is a bit bigger than the bounding rectangle of a design object itself.

CoordRect BoundingRectangleForSelection();

Returns: CoordRect

Extension method of IPCB_PrimitiveHelper (using PCB;).

CancelModify​

Ends a change started with BeginModify and restores the object's state that BeginModify saved.

void CancelModify();

Returns: nothing (void)

EndModify​

Ends a change started with BeginModify and tells the board that the object has changed.

void EndModify();

Returns: nothing (void)

Also updates the board's connectivity for the object. When the object has no board, no notification is sent.

Examples: Extension_PCBUndoRedo

Export_ToParameters​

No description yet.

void Export_ToParameters(ref string argParams);
ParameterTypePassing
argParamsstringref

Returns: nothing (void)

FlipXY​

This method flips the object about the axis depending on Axis and MirrOp parameters.

void FlipXY(int argxis, TMirrorOperation argMirrOp);
void FlipXY(int argxis, int argMirrOp);
ParameterTypePassing
argxisintvalue
argMirrOpTMirrorOperationvalue

Returns: nothing (void)

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

See also: TMirrorOperation

GraphicallyInvalidate​

Redraws the object in the board's view.

void GraphicallyInvalidate();

Returns: nothing (void)

Does nothing for the board itself or for an object that has no board.

Examples: Extension_PcbLibComponentToSTEP, Extension_PlaceAndMovePcbComponent, Extension_PlacePad

IsFreePrimitive​

This method determines whether the object is a free primitive (not connected to a net) or just a standalone object.

bool IsFreePrimitive();

Returns: bool

IsHidden​

Returns whether this object is hidden from view.

bool IsHidden();

Returns: bool

See also: IPCB_Text

IsSaveable​

This method determines whether this particular object can be saved in a specified file format version according to the TAdvPCBFileFormatVersion type.

bool IsSaveable(TAdvPCBFileFormatVersion argVer);
bool IsSaveable(int argVer);
ParameterTypePassing
argVerTAdvPCBFileFormatVersionvalue

Returns: bool

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

See also: TAdvPCBFileFormatVersion

MoveByXY​

Moves the design object by an offset in horizontal and vertical directions.

void MoveByXY(int argX, int argY);
ParameterTypePassingDescription
argXintvalueThe horizontal offset, in internal units (10,000 per mil).
argYintvalueThe vertical offset, in internal units (10,000 per mil).

Returns: nothing (void)

Example: Move the first selected object on the current board by a distance in a direction.

using PCB;

IPCB_Board board = PCB.GlobalVars.PCBServer?.GetCurrentPCBBoard();
if (board == null || board.GetState_SelectecObjectCount() == 0)
return;
IPCB_Primitive pcbObject = board.GetState_SelectecObject(0);
// Sample values: the distance and the direction (in radians) of the move.
int distanceStep = EDP.Utils.MilsToCoord(100);
double angleStep = Math.PI / 4;

//Move the object by a specified offset
int xStep = (int)(distanceStep * Math.Cos(angleStep));
int yStep = (int)(distanceStep * Math.Sin(angleStep));
pcbObject.MoveByXY(xStep, yStep);

MoveToXY​

Moves the design object to a new location.

void MoveToXY(int argX, int argY);
ParameterTypePassingDescription
argXintvalueThe X coordinate of the new location, in internal units (10,000 per mil).
argYintvalueThe Y coordinate of the new location, in internal units (10,000 per mil).

Returns: nothing (void)

Replicate​

Returns a copy of the object.

IPCB_Primitive Replicate();

Returns: IPCB_Primitive

Extension method of IPCB_PrimitiveHelper (using PCB;).

RequiredParamterSpace​

No description yet.

int RequiredParamterSpace();

Returns: int

RotateBy​

Rotates the object by an angle about its reference point.

void RotateBy(double argngle);
ParameterTypePassingDescription
argngledoublevalueThe angle, in degrees.

Returns: nothing (void)

SwapLayerPairs​

This method swaps the current layer pair that the PCB design object (vias and pads only) has.

void SwapLayerPairs();

Returns: nothing (void)

Returned by​

IPCB_AbstractIterator.FirstPCBObject, IPCB_AbstractIterator.NextPCBObject, IPCB_AccordinGraphicIterator.First, IPCB_AccordinGraphicIterator.Next, IPCB_BackDrilling.SourceObject, IPCB_Board.GetLastClickedObject, IPCB_Board.GetObjectAtCursor, IPCB_Board.GetObjectAtXYAskUserIfAmbiguous, IPCB_Board.SelectecObject, IPCB_Component.Getstate_PadByName, IPCB_Coordinate.Text, IPCB_Coordinate.Track1, IPCB_Coordinate.Track2, IPCB_CustomPadShape.CustomShape, IPCB_CustomPadShape.ExtractedPrimitiveOnLayer, IPCB_DocumentPainterView.FocusedPrimitive, IPCB_DrillTableGraphicIterator.First, IPCB_DrillTableGraphicIterator.Next, IPCB_Group.GetPrimitiveAt, IPCB_Group.ReplicateWithChildren, IPCB_GroupComparisionResult.GetPrimitiveForLayer, IPCB_Net.Getstate_PadByName, IPCB_Net.Getstate_PadByPinDescription, IPCB_OriginalDimension.Track1, IPCB_OriginalDimension.Track2, IPCB_OriginalDimension.Track3, IPCB_OriginalDimension.Track4, IPCB_OriginalDimension.Track5, IPCB_OriginalDimension.Track6, IPCB_OriginalDimension.Track7, IPCB_OriginalDimension.Track8, IPCB_PinPair.CastToPrimitive, IPCB_PinPair.GetPrimitives, IPCB_PrimitiveList.Get, IPCB_RealPlacementGuide.SourceObject, IPCB_ServerInterface.PCBObjectFactory, IPCB_SharedUnion.OwnerPrimitive, IPCB_Violation.Primitive1, IPCB_Violation.Primitive2, IPCB_Violation.Rule, and 1 more.

Accepted by​

IPCB_Board.AddObjectToHighlightObjectList, IPCB_Board.AddPCBObject, IPCB_Board.DispatchMessage, IPCB_Board.FindDominantRuleForObject, IPCB_Board.FindDominantRuleForObjectPair, IPCB_Board.FindLinkedBoardLibrary, IPCB_Board.FindLinkedBoardTemplate, IPCB_Board.HidePCBObject, IPCB_Board.InvertPCBObject, IPCB_Board.LinkToTemplate, IPCB_Board.PrimPrimDistance, IPCB_Board.RemovePCBObject, IPCB_Board.SelectedObjects_Add, IPCB_Board.ShowPCBObject, IPCB_Board.UnlinkFromTemplate, IPCB_Board.ViewManager_GraphicallyInvalidatePrimitive, IPCB_BoardEx.Drillmanager_GetDrillSymbolIndex, IPCB_BoardEx.GetSignalDelayForPrim, IPCB_BoardEx.GetSignalDelayPerMeter, IPCB_BoardEx2.GetBoardRegionForPrimitive, IPCB_BoardEx2.GetLayerStackForPrimitive, IPCB_BoardOutline.HitPrimitive_1, IPCB_BoardOutlineClearanceConstraint.GetObstacleTracks, IPCB_ClearanceConstraint.Clearance, IPCB_ClearanceConstraint.PrimitivesViolate, IPCB_ConnectivityGraph.FindShortestPath, IPCB_ContourMaker.MakeContour, IPCB_ContourMaker2.MakeContour_10, IPCB_Dimension.References_IndexOf, IPCB_DocumentPainterListener.OnBeginDrag, IPCB_DocumentPainterListener.OnClick, IPCB_DocumentPainterListener.OnDragging, IPCB_DocumentPainterListener.OnEndDrag, IPCB_DocumentPainterView.AddOrUpdatePrim, IPCB_DocumentPainterView.FocusPrimitive, IPCB_DocumentPainterView.SelectPrimitive, IPCB_GeometryMaker.BuildGeometry, IPCB_GridManager.AddHorizontalGuide, IPCB_GridManager.AddMinus45DegreeGuide, IPCB_GridManager.AddPlus45DegreeGuide, and 56 more.

Examples​

Used in the SDK examples: Extension_PCBUndoRedo, Extension_PcbLibToImage.