Skip to main content
View as Markdown

IPCB_Board interface

An open PCB document, through which you add and delete design objects, find out which layers are used and so on.

public interface IPCB_Board : IPCB_Primitive

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Inherits: IPCB_Primitive

Remarks​

A PCB library document also has a board (IPCB_Library.Board): the library holds a list of footprints (IPCB_LibComponent, components with unnamed designators), and each footprint is shown on the library's board.

Check that the PCB server exists and that there is a PCB document before you call any PCB interface methods.

To add a new object, create it with IPCB_ServerInterface.PCBObjectFactory and add it with AddPCBObject.

To look for objects, use a board iterator (BoardIterator_Create), a spatial iterator (SpatialIterator_Create), a group iterator (IPCB_Group.GroupIterator_Create) or, on a PCB library document, a library iterator (IPCB_Library.LibraryIterator_Create).

The interactive methods GetObjectAtCursor, GetObjectAtXYAskUserIfAmbiguous, ChooseRectangleByCorners and ChooseLocation return the object or the coordinates that the user clicks on.

Properties​

PropertyTypeAccessDescription
AutomaticSplitPlanesboolget; setWhether split planes are generated automatically; always true.
BigVisibleGridMultFactordoubleget; set
BigVisibleGridSizedoubleget; setThe size of the big (coarse) visible grid.
BigVisibleGridUnitTUnitget; setThe measurement unit of the big (coarse) visible grid, imperial or metric.
BoardIDintget
BoardLayerSetManagerIPCB_BoardLayerSetManagerget
BoardOutlineIPCB_BoardOutlinegetThe Board Outline represents the board outline which encompasses a board design on a PCB document.
BoardVersiondoublegetThe file format version that was read from the board's file.
ComponentGridSizedoubleget; setThe component placement grid size, for X and Y together.
ComponentGridSizeXdoubleget; setThe X size of the component placement grid.
ComponentGridSizeYdoubleget; setThe Y size of the component placement grid.
CurrentLayerTV6_LayergetThis property denotes the current PCB layer being displayed in the PCB workspace in Altium Designer.
CurrentLayerV7V7_LayerBaseget; setThe current layer of the board's view.
DesignatorDisplayModeTDesignatorDisplayModeget; set
DisplayUnitTUnitget; setThis property retrieves or sets the measurement units for the PCB document display purposes in Imperial or Metric units.
DrawDotGridboolget; setWhether the grid is drawn as dots (true) or as continuous lines (false).
DrawModeTDrawModeget; set
DrillLayerPairsCountintgetThis property returns the number of drill layer pairs for the board.
ECOOptionsIPCB_ECOOptionsgetThis property returns you the IPCB_ECOOptions interface which represents the Options for the Engineering Order Change facility in the PCB editor.
FileNamestringgetThe FileName property denotes the filename of the PCB document that the IPCB_Board interface is associated with.
GerberOptionsIPCB_GerberOptionsgetThis property returns you the IPCB_GerberOptions interface which represents the Options for the Gerbers facility in the PCB editor.
InternalPlane1NetNamestringget; setThe net name of internal plane 1.
InternalPlane2NetNamestringget; setThe net name of internal plane 2.
InternalPlane3NetNamestringget; setThe net name of internal plane 3.
InternalPlane4NetNamestringget; setThe net name of internal plane 4.
InternalPlaneNetNamestringget; setThis property returns or sets the net name for the targeted internal plane.
LayerColoruintgetThe display colour of a layer.
LayerIsDisplayedboolget; setWhether a layer is shown in the board's view.
LayerIsUsedboolget; setThis property retrieves or sets the boolean value for whether the layer is used by primitives or not.
LayerPairIPCB_DrillLayerPairgetThis property returns you the layer pair associated with the IPCB_DrillLayerPair interface.
LayerPairByPairIPCB_DrillLayerPairgetDeprecated: use LayerPairByPairEx.
LayerPairByPairExIPCB_DrillLayerPairget
LayerStackIPCB_LayerStackgetThe layer stack property fetches the IPCB_LayerStack interface for the current PCB document.
LayerStack_V7IPCB_LayerStack_V7getThe master layer stack of the board, the same stack as MasterStack, as an IPCB_LayerStack_V7.
MainGraphicalViewIPCB_GraphicalViewgetThe graphical view of the board.
MasterStackIPCB_MasterLayerStackget
MechanicalPairsIPCB_MechanicalLayerPairsgetThe mechanical layer pairs of the board, as an IPCB_MechanicalLayerPairs.
MeshViewModeTPCBMeshViewModeget; set
Navigate_HighlightObjectListboolsetHighlights the objects in the board's highlight list with the given highlight methods.
OutputOptionsIPCB_OutputOptionsgetThis property returns you the IPCB_OutputOptions interface which represents the Options for the Output facility in the PCB editor.
PadViaCacheIPCB_PadViaLibraryget
PadViaLibraryIPCB_PadViaLibraryget
PCB3DMovieManagerIPCB_3DMovieManagerget
PCBSheetIPCB_SheetgetThis property returns the IPCB_Sheet interface which is represented by the sheet workspace.
PinPairsManagerIPCB_PinPairsManagergetThe manager of the board's pin pairs.
PlacerOptionsIPCB_AdvancedPlacerOptionsgetThis property returns you the IPCB_AdvancedPlacerOptions interface which represents the Options for the Placement facility in the PCB editor.
PolygonNameTemplateTPolygonNameTemplatesget; set
PrinterOptionsIPCB_PrinterOptionsgetThis property returns you the IPCB_PrinterOptions interface which represents the Options for the Printer setup facility in the PCB editor.
RouteToolPathLayerV7_LayerBaseget; set
RoutingOptionsIPCB_BoardRoutingOptionsget
SelectecObjectIPCB_PrimitivegetThis property represents the indexed selected object found on the PCB document.
SelectecObjectCountintgetThis property represents the number of selected objects found on the PCB document.
SnapGridSizedoubleget; setThe SnapGridSize property sets the X and Y values for the Snap Grid simultaneously.
SnapGridSizeXdoubleget; setThis property retrieves or sets the Snap Grid size X value.
SnapGridSizeYdoubleget; setThis property retrieves or sets the Snap Grid size Y value.
SnapGridUnitTUnitget; setThe SnapGridUnit property retrieves or sets the measurement unit for the Snap Grid Unit.
SwitchOutputCapabilityModeboolset
SystemValidboolget; set
TrackGridSizedoubleget; setThis property retrieves or sets the track grid size in both X and Y directions simultaneously.
ViaGridSizedoubleget; setThis property retrieves or sets the via grid size in both X and Y directions simultaneously.
ViewConfigColor2Duintget
ViewConfigColor3Duintget
ViewConfigFromStringstringset
ViewConfigFromString_ForceRebuildstringset
ViewConfigIs3Dboolget
ViewConfigOpacity2Dfloatget
ViewConfigOpacity3Dfloatget
ViewConfigTopSolderMaskColor3Duintget
ViewportIPCB_Viewportget; set
VisibleGridMultFactordoubleget; set
VisibleGridSizedoubleget; setThe size of the (fine) visible grid.
VisibleGridUnitTUnitget; setThe measurement unit of the (fine) visible grid, imperial or metric.
WindowuintgetThis property returns the raw Windows handle for a window handle of a PCB document in Altium Designer.
WorldXOriginintget; setThe X coordinate of the world origin of the board, in internal units (10,000 per mil).
WorldYOriginintget; setThe Y coordinate of the world origin of the board, in internal units (10,000 per mil).
XCursorintget; setThe X coordinate of the cursor in the current PCB view, in internal units (10,000 per mil).
XOriginintget; setThis property sets or retrieves the X coordinate of the absolute origin of the board, in internal units (10,000 per mil).
YCursorintget; setThe Y coordinate of the cursor in the current PCB view, in internal units (10,000 per mil).
YOriginintget; setThis property sets or retrieves the Y coordinate of the absolute origin of the board, in internal units (10,000 per mil).

AutomaticSplitPlanes​

Whether split planes are generated automatically; always true.

bool GetState_AutomaticSplitPlanes();
void SetState_AutomaticSplitPlanes(bool argValue);

Type: bool · Access: read/write

Setting the property has no effect.

BigVisibleGridMultFactor​

No description yet.

double GetState_BigVisibleGridMultFactor();
void SetState_BigVisibleGridMultFactor(double argMultFact);

Type: double · Access: read/write

BigVisibleGridSize​

The size of the big (coarse) visible grid. This grid is used for reference purposes and there are two visible grids.

double GetState_BigVisibleGridSize();
void SetState_BigVisibleGridSize(double argValue);

Type: double · Access: read/write

See also: IPCB_Board.VisibleGridSize

BigVisibleGridUnit​

The measurement unit of the big (coarse) visible grid, imperial or metric. There are two visible grids to use for reference purposes.

TUnit GetState_BigVisibleGridUnit();
void SetState_BigVisibleGridUnit(TUnit argValue);

Type: TUnit · Access: read/write

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

See also: IPCB_Board.VisibleGridUnit, TUnit

BoardID​

No description yet.

int GetState_BoardID();

Type: int · Access: read-only

BoardLayerSetManager​

No description yet.

IPCB_BoardLayerSetManager GetState_BoardLayerSetManager();

Type: IPCB_BoardLayerSetManager · Access: read-only

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

BoardOutline​

The Board Outline represents the board outline which encompasses a board design on a PCB document. The board outline is represented by the IPCB_BoardOutline interface and inherited from the IPCB_Polygon interface because the Board Outline is composed of vertices (tracks and arcs only).

IPCB_BoardOutline GetState_BoardOutline();

Type: IPCB_BoardOutline · Access: read-only

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

To get the size of the board, the examples take the outline's IPCB_Primitive.BoundingRectangle (in internal units).

See also: IPCB_BoardOutline

BoardVersion​

The file format version that was read from the board's file.

double GetState_BoardVersion();

Type: double · Access: read-only

ComponentGridSize​

The component placement grid size, for X and Y together.

double GetState_ComponentGridSize();
void SetState_ComponentGridSize(double argValue);

Type: double · Access: read/write

Setting the property has no effect.

See also: IPCB_Board.ComponentGridSizeX, IPCB_Board.ComponentGridSizeY

ComponentGridSizeX​

The X size of the component placement grid.

double GetState_ComponentGridSizeX();
void SetState_ComponentGridSizeX(double argValue);

Type: double · Access: read/write

Setting the property has no effect.

See also: IPCB_Board.ComponentGridSize, IPCB_Board.ComponentGridSizeY

ComponentGridSizeY​

The Y size of the component placement grid.

double GetState_ComponentGridSizeY();
void SetState_ComponentGridSizeY(double argValue);

Type: double · Access: read/write

Setting the property has no effect.

See also: IPCB_Board.ComponentGridSize, IPCB_Board.ComponentGridSizeX

CurrentLayer​

This property denotes the current PCB layer being displayed in the PCB workspace in Altium Designer.

TV6_Layer GetState_CurrentLayer();

Type: TV6_Layer · Access: read-only

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

Read-only; set CurrentLayerV7 to change the current layer.

CurrentLayerV7​

The current layer of the board's view.

V7_LayerBase GetState_CurrentLayerV7();
void SetState_CurrentLayerV7(V7_LayerBase argValue);

Type: V7_LayerBase · Access: read/write

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

Reads no layer when the board has no view; setting the property then has no effect.

DesignatorDisplayMode​

No description yet.

TDesignatorDisplayMode GetState_DesignatorDisplayMode();
void SetState_DesignatorDisplayMode(TDesignatorDisplayMode argMode);

Type: TDesignatorDisplayMode · Access: read/write

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

DisplayUnit​

This property retrieves or sets the measurement units for the PCB document display purposes in Imperial or Metric units.

TUnit GetState_DisplayUnit();
void SetState_DisplayUnit(TUnit argValue);

Type: TUnit · Access: read/write

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

Setting the property also updates the cursor coordinates shown on the status bar.

Example: Show the file name and the display unit of the current board.

using PCB;

IPCB_Board board = PCB.GlobalVars.PCBServer?.GetCurrentPCBBoard();
if (board == null)
return;
DXP.Utils.ShowMessage("Board Filename =" + board.GetState_FileName() + "\r" +
"Board Units = " + board.GetState_DisplayUnit());

DrawDotGrid​

Whether the grid is drawn as dots (true) or as continuous lines (false).

bool GetState_DrawDotGrid();
void SetState_DrawDotGrid(bool argValue);

Type: bool · Access: read/write

DrawMode​

No description yet.

TDrawMode GetState_DrawMode(TObjectId argOId);
void SetState_DrawMode(TObjectId argOId, TDrawMode argValue);

Type: TDrawMode · Access: read/write · Index: argOId (TObjectId)

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

DrillLayerPairsCount​

This property returns the number of drill layer pairs for the board. A drill layer pair is represented by the IPCB_DrillLayerPair interface.

int GetState_DrillLayerPairsCount();

Type: int · Access: read-only

Read each pair with LayerPair, at indexes 0 to DrillLayerPairsCount - 1.

See also: IPCB_Board.LayerPair, IPCB_DrillLayerPair

ECOOptions​

This property returns you the IPCB_ECOOptions interface which represents the Options for the Engineering Order Change facility in the PCB editor.

IPCB_ECOOptions GetState_ECOOptions();

Type: IPCB_ECOOptions · Access: read-only

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

See also: IPCB_ECOOptions

FileName​

The FileName property denotes the filename of the PCB document that the IPCB_Board interface is associated with. The Filename property is read only, which means you can retrieve the filename string only.

string GetState_FileName();

Type: string · Access: read-only

Examples: Extension_CreatePCBLib

GerberOptions​

This property returns you the IPCB_GerberOptions interface which represents the Options for the Gerbers facility in the PCB editor.

IPCB_GerberOptions GetState_GerberOptions();

Type: IPCB_GerberOptions · Access: read-only

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

See also: IPCB_GerberOptions

InternalPlane1NetName​

The net name of internal plane 1.

string GetState_InternalPlane1NetName();
void SetState_InternalPlane1NetName(string argNetName);

Type: string · Access: read/write

Empty when the board has no internal plane 1; setting the property then has no effect.

InternalPlane2NetName​

The net name of internal plane 2.

string GetState_InternalPlane2NetName();
void SetState_InternalPlane2NetName(string argNetName);

Type: string · Access: read/write

Empty when the board has no internal plane 2; setting the property then has no effect.

InternalPlane3NetName​

The net name of internal plane 3.

string GetState_InternalPlane3NetName();
void SetState_InternalPlane3NetName(string argNetName);

Type: string · Access: read/write

Empty when the board has no internal plane 3; setting the property then has no effect.

InternalPlane4NetName​

The net name of internal plane 4.

string GetState_InternalPlane4NetName();
void SetState_InternalPlane4NetName(string argNetName);

Type: string · Access: read/write

Empty when the board has no internal plane 4; setting the property then has no effect.

InternalPlaneNetName​

This property returns or sets the net name for the targeted internal plane.

string GetState_InternalPlaneNetName(V7_LayerBase argL);
void SetState_InternalPlaneNetName(V7_LayerBase argL, string argNetName);

Type: string · Access: read/write · Index: argL (V7_LayerBase)

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

Empty when the layer is not an internal plane in the board's layer stack; setting the property then has no effect.

LayerColor​

The display colour of a layer.

uint GetState_LayerColor(TV6_Layer argL);

Type: uint · Access: read-only · Index: argL (TV6_Layer)

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

The colour comes from the application's layer colour settings, so it is the same for every board.

LayerIsDisplayed​

Whether a layer is shown in the board's view.

bool GetState_LayerIsDisplayed(V7_LayerBase argL);
void SetState_LayerIsDisplayed(V7_LayerBase argL, bool argB);

Type: bool · Access: read/write · Index: argL (V7_LayerBase)

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

Setting the property has no effect for a layer that is not in the board's layer stack, or when the board has no view.

See also: IPCB_Board.LayerIsUsed

LayerIsUsed​

This property retrieves or sets the boolean value for whether the layer is used by primitives or not. Normally when a layer has primitives (design objects) on it, the layer is used.

bool GetState_LayerIsUsed(V7_LayerBase argL);
void SetState_LayerIsUsed(V7_LayerBase argL, bool argB);

Type: bool · Access: read/write · Index: argL (V7_LayerBase)

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

Reads false for a layer that is not in the board's layer stack; setting the property then has no effect.

After creating a layer with IPCB_MasterLayerStack.CreateLayer, the examples make it appear by setting LayerIsUsed and then LayerIsDisplayed to true.

Example: Check which layers of the current board are used and displayed.

using PCB;

IPCB_Board pcbBoard = PCB.GlobalVars.PCBServer?.GetCurrentPCBBoard();
if (pcbBoard == null)
return;
// Check for each signal layer for used/display setting
for (TV6_Layer layer = TV6_Layer.eV6_TopLayer; layer <= TV6_Layer.eV6_MultiLayer; layer++)
if (pcbBoard.GetState_LayerIsUsed(new V7_Layer(layer)))
if (pcbBoard.GetState_LayerIsDisplayed(new V7_Layer(layer)))
{
// do something
}

LayerPair​

This property returns you the layer pair associated with the IPCB_DrillLayerPair interface. A drill layer pair has two drill layers.

IPCB_DrillLayerPair GetState_LayerPair(int argI);

Type: IPCB_DrillLayerPair · Access: read-only · Index: argI (int)

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

Null when the index is outside 0 to DrillLayerPairsCount - 1.

LayerPairByPair​

Deprecated: use LayerPairByPairEx.

IPCB_DrillLayerPair GetState_LayerPairByPair(TV6_Layer argLowLay, TV6_Layer argHighLay);

Type: IPCB_DrillLayerPair · Access: read-only · Index: argLowLay (TV6_Layer), argHighLay (TV6_Layer)

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

LayerPairByPairEx​

No description yet.

IPCB_DrillLayerPair GetState_LayerPairByPairEx(V7_LayerBase argLowLayer, V7_LayerBase argHighLayer, TDrillLayerPairType argDrillLayerPairType);

Type: IPCB_DrillLayerPair · Access: read-only · Index: argLowLayer (V7_LayerBase), argHighLayer (V7_LayerBase), argDrillLayerPairType (TDrillLayerPairType)

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

LayerStack​

The layer stack property fetches the IPCB_LayerStack interface for the current PCB document. The Layer stack only stores copper layers (signal and internal planes).

IPCB_LayerStack GetState_LayerStack();

Type: IPCB_LayerStack · Access: read-only

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

Example: List the copper layers in the layer stack of the current board.

using PCB;

IPCB_Board pcbBoard = PCB.GlobalVars.PCBServer?.GetCurrentPCBBoard();
if (pcbBoard == null)
return;
// Note that the Layer stack only stores existing copper based layers.
// But you can use the LayerObject method to fetch all layers.
IPCB_LayerStack theLayerStack = pcbBoard.GetState_LayerStack();
if (theLayerStack == null)
return;
string ls = "";
IPCB_LayerObject layerObj = theLayerStack.First(TLayerClassID.eLayerClass_Electrical);
while (layerObj != null)
{
ls = ls + EDP.Utils.LayerToString(new V7_Layer(layerObj.V6_LayerID())) + "\r\n";
layerObj = theLayerStack.Next(TLayerClassID.eLayerClass_Electrical, layerObj);
}
DXP.Utils.ShowInfo("The Layer Stack has :\r\n" + ls, "Layer stack");

See also: IPCB_LayerStack, IPCB_LayerObject

LayerStack_V7​

The master layer stack of the board, the same stack as MasterStack, as an IPCB_LayerStack_V7.

IPCB_LayerStack_V7 GetState_LayerStack_V7();

Type: IPCB_LayerStack_V7 · Access: read-only

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

The examples walk its layers with IPCB_LayerStack_V7.FirstLayer and IPCB_LayerStack_V7.NextLayer, change a layer's IPCB_LayerObject_V7.IsDisplayed, and then call Update_PCBGraphicalView to show the change.

MainGraphicalView​

The graphical view of the board.

IPCB_GraphicalView GetState_MainGraphicalView();

Type: IPCB_GraphicalView · Access: read-only

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

The examples read and set the 3D camera of this view with IPCB_GraphicalView.GetState_Camera and IPCB_GraphicalView.Camera.

MasterStack​

No description yet.

IPCB_MasterLayerStack GetState_MasterStack();

Type: IPCB_MasterLayerStack · Access: read-only

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

MechanicalPairs​

The mechanical layer pairs of the board, as an IPCB_MechanicalLayerPairs.

IPCB_MechanicalLayerPairs GetState_MechanicalPairs();

Type: IPCB_MechanicalLayerPairs · Access: read-only

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

There are 16 general purpose mechanical layers for defining the board layout, placing dimensions on, including fabrication details on, or any other mechanical details the design requires.

The purpose of the IPCB_MechanicalLayerPairs Interface is to provide which Mechanical layers are paired to one another.

When a component incorporates objects on one or more Mechanical layers which have been paired, the Layer property of those objects changes when the Layer property of the component is toggled (between the Top and Bottom layers), just like objects on the non-Mechanical layers which have always been paired to one another, along with the Top and Bottom (copper) layers, the Top and Bottom Overlay layers, the Top and Bottom Paste Mask layers, and the Top and Bottom Solder Mask layers.

MeshViewMode​

No description yet.

TPCBMeshViewMode GetState_MeshViewMode(int argID);
void SetState_MeshViewMode(int argID, TPCBMeshViewMode argViewMode);

Type: TPCBMeshViewMode · Access: read/write · Index: argID (int)

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

Highlights the objects in the board's highlight list with the given highlight methods.

void SetState_Navigate_HighlightObjectList(THighlightMethodSet argHighlightMethods, bool argClearExisting);

Type: bool · Access: write-only · Index: argHighlightMethods (THighlightMethodSet)

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

The assigned value says whether the existing highlighting is cleared first.

See also: IPCB_Board.AddObjectToHighlightObjectList

Examples: Extension_PlacePad

OutputOptions​

This property returns you the IPCB_OutputOptions interface which represents the Options for the Output facility in the PCB editor.

IPCB_OutputOptions GetState_OutputOptions();

Type: IPCB_OutputOptions · Access: read-only

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

See also: IPCB_OutputOptions

PadViaCache​

No description yet.

IPCB_PadViaLibrary GetState_PadViaCache();

Type: IPCB_PadViaLibrary · Access: read-only

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

PadViaLibrary​

No description yet.

IPCB_PadViaLibrary GetState_PadViaLibrary();

Type: IPCB_PadViaLibrary · Access: read-only

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

PCB3DMovieManager​

No description yet.

IPCB_3DMovieManager GetState_PCB3DMovieManager();

Type: IPCB_3DMovieManager · Access: read-only

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

PCBSheet​

This property returns the IPCB_Sheet interface which is represented by the sheet workspace. A sheet encapsulates the sheet borders, the fabrication and assembly information, and the board outline.

IPCB_Sheet GetState_PCBSheet();

Type: IPCB_Sheet · Access: read-only

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

See also: IPCB_Sheet

PinPairsManager​

The manager of the board's pin pairs.

IPCB_PinPairsManager GetState_PinPairsManager();

Type: IPCB_PinPairsManager · Access: read-only

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

The examples check the result for null, create a pin pair with IPCB_PinPairsManager.CreateFromPinsDescriptors from a descriptor such as "U1-16|U4-23", and then call IPCB_PinPairsManager.InvalidateAll.

PlacerOptions​

This property returns you the IPCB_AdvancedPlacerOptions interface which represents the Options for the Placement facility in the PCB editor.

IPCB_AdvancedPlacerOptions GetState_PlacerOptions();

Type: IPCB_AdvancedPlacerOptions · Access: read-only

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

See also: IPCB_AdvancedPlacerOptions

PolygonNameTemplate​

No description yet.

TPolygonNameTemplates GetState_PolygonNameTemplate();
void SetState_PolygonNameTemplate(TPolygonNameTemplates argTemplate);

Type: TPolygonNameTemplates · Access: read/write

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

PrinterOptions​

This property returns you the IPCB_PrinterOptions interface which represents the Options for the Printer setup facility in the PCB editor.

IPCB_PrinterOptions GetState_PrinterOptions();

Type: IPCB_PrinterOptions · Access: read-only

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

See also: IPCB_PrinterOptions

RouteToolPathLayer​

No description yet.

V7_LayerBase GetState_RouteToolPathLayer();
void SetState_RouteToolPathLayer(V7_LayerBase argLayer);

Type: V7_LayerBase · Access: read/write

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

RoutingOptions​

No description yet.

IPCB_BoardRoutingOptions GetState_RoutingOptions();

Type: IPCB_BoardRoutingOptions · Access: read-only

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

SelectecObject​

This property represents the indexed selected object found on the PCB document. This is to be used in conjunction with the SelectecObjectCount property.

IPCB_Primitive GetState_SelectecObject(int argI);

Type: IPCB_Primitive · Access: read-only · Index: argI (int)

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

Null when the selected item at the index is not a primitive.

SelectecObjectCount​

This property represents the number of selected objects found on the PCB document. This is to be used in conjunction with the SelectecObject property.

int GetState_SelectecObjectCount();

Type: int · Access: read-only

See also: IPCB_Board.SelectecObject

SnapGridSize​

The SnapGridSize property sets the X and Y values for the Snap Grid simultaneously. If you want to have different X and Y values for this snap grid, use the SnapGridSizeX and SnapGridSizeY properties.

double GetState_SnapGridSize();
void SetState_SnapGridSize(double argValue);

Type: double · Access: read/write

See also: IPCB_Board.SnapGridSizeX, IPCB_Board.SnapGridSizeY

SnapGridSizeX​

This property retrieves or sets the Snap Grid size X value. To set both X and Y values simultaneously for the Snap Grid, use the SnapGridSize property.

double GetState_SnapGridSizeX();
void SetState_SnapGridSizeX(double argValue);

Type: double · Access: read/write

See also: IPCB_Board.SnapGridSizeY, IPCB_Board.SnapGridSize

SnapGridSizeY​

This property retrieves or sets the Snap Grid size Y value. To set both X and Y values simultaneously for the Snap Grid, use the SnapGridSize property.

double GetState_SnapGridSizeY();
void SetState_SnapGridSizeY(double argValue);

Type: double · Access: read/write

See also: IPCB_Board.SnapGridSizeX, IPCB_Board.SnapGridSize

SnapGridUnit​

The SnapGridUnit property retrieves or sets the measurement unit for the Snap Grid Unit. It can be in Imperial or Metric units.

TUnit GetState_SnapGridUnit();
void SetState_SnapGridUnit(TUnit argValue);

Type: TUnit · Access: read/write

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

See also: TUnit

SwitchOutputCapabilityMode​

No description yet.

void SetState_SwitchOutputCapabilityMode(bool argOutputCapability);

Type: bool · Access: write-only

SystemValid​

No description yet.

bool GetState_SystemValid(string argProcessorName);
void SetState_SystemValid(string argProcessorName, bool argValid);

Type: bool · Access: read/write · Index: argProcessorName (string)

TrackGridSize​

This property retrieves or sets the track grid size in both X and Y directions simultaneously.

double GetState_TrackGridSize();
void SetState_TrackGridSize(double argValue);

Type: double · Access: read/write

See also: IPCB_Board.ViaGridSize

ViaGridSize​

This property retrieves or sets the via grid size in both X and Y directions simultaneously.

double GetState_ViaGridSize();
void SetState_ViaGridSize(double argValue);

Type: double · Access: read/write

See also: IPCB_Board.TrackGridSize

ViewConfigColor2D​

No description yet.

uint GetState_ViewConfigColor2D(V7_LayerBase argLayer);

Type: uint · Access: read-only · Index: argLayer (V7_LayerBase)

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

ViewConfigColor3D​

No description yet.

uint GetState_ViewConfigColor3D(V7_LayerBase argLayer);

Type: uint · Access: read-only · Index: argLayer (V7_LayerBase)

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

ViewConfigFromString​

No description yet.

bool SetState_ViewConfigFromString(string argConfigType, string argConfig);

Type: string · Access: write-only · Index: argConfigType (string)

ViewConfigFromString_ForceRebuild​

No description yet.

bool SetState_ViewConfigFromString_ForceRebuild(string argConfigType, string argConfig);

Type: string · Access: write-only · Index: argConfigType (string)

ViewConfigIs3D​

No description yet.

bool GetState_ViewConfigIs3D();

Type: bool · Access: read-only

ViewConfigOpacity2D​

No description yet.

float GetState_ViewConfigOpacity2D(V7_LayerBase argLayer, TObjectId argObjectId);

Type: float · Access: read-only · Index: argLayer (V7_LayerBase), argObjectId (TObjectId)

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

ViewConfigOpacity3D​

No description yet.

float GetState_ViewConfigOpacity3D(V7_LayerBase argLayer);

Type: float · Access: read-only · Index: argLayer (V7_LayerBase)

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

ViewConfigTopSolderMaskColor3D​

No description yet.

uint GetState_ViewConfigTopSolderMaskColor3D();

Type: uint · Access: read-only

Viewport​

No description yet.

IPCB_Viewport GetState_Viewport();
void SetState_Viewport(IPCB_Viewport argValue);

Type: IPCB_Viewport · Access: read/write

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

VisibleGridMultFactor​

No description yet.

double GetState_VisibleGridMultFactor();
void SetState_VisibleGridMultFactor(double argMultFact);

Type: double · Access: read/write

VisibleGridSize​

The size of the (fine) visible grid. This grid is used for reference purposes and there are two visible grids.

double GetState_VisibleGridSize();
void SetState_VisibleGridSize(double argValue);

Type: double · Access: read/write

See also: IPCB_Board.BigVisibleGridSize

VisibleGridUnit​

The measurement unit of the (fine) visible grid, imperial or metric. There are two visible grids to use for reference purposes.

TUnit GetState_VisibleGridUnit();
void SetState_VisibleGridUnit(TUnit argValue);

Type: TUnit · Access: read/write

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

See also: IPCB_Board.BigVisibleGridUnit, TUnit

Window​

This property returns the raw Windows handle for a window handle of a PCB document in Altium Designer.

uint GetState_Window();

Type: uint · Access: read-only

Returns 0 when the document is not open in a PCB editor view.

WorldXOrigin​

The X coordinate of the world origin of the board, in internal units (10,000 per mil).

int GetState_WorldXOrigin();
void SetState_WorldXOrigin(int argValue);

Type: int · Access: read/write

WorldYOrigin​

The Y coordinate of the world origin of the board, in internal units (10,000 per mil).

int GetState_WorldYOrigin();
void SetState_WorldYOrigin(int argValue);

Type: int · Access: read/write

XCursor​

The X coordinate of the cursor in the current PCB view, in internal units (10,000 per mil).

int GetState_XCursor();
void SetState_XCursor(int argValue);

Type: int · Access: read/write

Reads 0 when there is no current PCB view. Setting the property moves the cursor in that view.

Examples: Extension_PlacePad

XOrigin​

This property sets or retrieves the X coordinate of the absolute origin of the board, in internal units (10,000 per mil).

int GetState_XOrigin();
void SetState_XOrigin(int argValue);

Type: int · Access: read/write

To get a coordinate relative to the board origin, the examples subtract XOrigin from the absolute coordinate.

YCursor​

The Y coordinate of the cursor in the current PCB view, in internal units (10,000 per mil).

int GetState_YCursor();
void SetState_YCursor(int argValue);

Type: int · Access: read/write

Reads 0 when there is no current PCB view. Setting the property moves the cursor in that view.

Examples: Extension_PlacePad

YOrigin​

This property sets or retrieves the Y coordinate of the absolute origin of the board, in internal units (10,000 per mil).

int GetState_YOrigin();
void SetState_YOrigin(int argValue);

Type: int · Access: read/write

To get a coordinate relative to the board origin, the examples subtract YOrigin from the absolute coordinate.

Methods​

MethodReturnsDescription
AddLayerPairvoid
AddMeshint
AddObjectToHighlightObjectListvoidAdds a primitive to the board's list of objects to highlight.
AddPCBObjectvoidAdds an object created with IPCB_ServerInterface.PCBObjectFactory to the board.
AddPolygonMeshint
AnalyzeNetvoidThis method analyzes a supplied net object in the form of IPCB_Net interface.
BoardIterator_CreateIPCB_BoardIteratorThe BoardIterator_Create method creates a board iterator which is used to search for design objects on the PCB document.
BoardIterator_DestroyvoidThe BoardIterator_Destroy method destroys the board iterator object after it has been used to conduct a search on the PCB document for specified board objects.
ChooseLocationboolThe method returns you the X1 and Y1 coordinates of the PCB Document after you have clicked on a location on the PCB document.
ChooseRectangleByCornersboolThe ChooseRectangleByCorners method prompts you twice to choose the two sets of coordinates that define a boundary rectangle on the PCB document.
ClassNameIsUniquebool
CleanNetvoidCleans up a net by re-organizing and re-arranging its net topology.
ClearMeshesvoid
ClearUndoRedovoidHas no effect.
ConnectivelyValidateNetsvoidThis method validates the connectivity of nets on the PCB document.
ContextMenuObjectCountintReturns the number of objects of the given kind that the context menu of the board's view applies to.
CreateBoardOutlineIPCB_BoardOutlineCreates a board outline with default settings, makes it the outline of the board and returns it.
DeleteMeshbool
DifferentialPairNameIsUniquebool
DispatchMessagevoidSends a PCB message with a source, a destination and message data to the board's message handlers.
DoRedovoidHas no effect.
DoUndovoidHas no effect.
ElectricalLayerIteratorIPCB_LayerObjectIterator
ElectricalLayersIPCB_LayerSet
EnableAllPrimitivesvoidEnables or disables all primitives on the PCB document.
EndUndovoidHas no effect.
FindDominantRuleForObjectIPCB_RuleThis method returns the dominant specified rule for the primitive which is targeted by this rule.
FindDominantRuleForObjectPairIPCB_RuleThis method returns the dominant specified binary rule for the two primitives which are targeted by this rule.
FindLinkedBoardLibraryIPCB_PadViaLibrary
FindLinkedBoardTemplateIPCB_PadViaTemplateReturns the pad and via template that a primitive, for example a pad, is linked to.
GenerateUniqueIDstring
GetLastClickedObjectIPCB_Primitive
GetMeshPatchFromPointbool
GetObjectAtCursorIPCB_PrimitiveAsks the user to click on the PCB document and returns the design object at the clicked point.
GetObjectAtXYAskUserIfAmbiguousIPCB_PrimitiveThis method returns you the specified object with the specified X and Y coordinates which could be retrieved by the ChooseLocation method for example.
GetPcbComponentByRefDesIPCB_ComponentReturns the component with the given designator, or null when the board has none.
GetPrimitiveCountintReturns the number of primitives that match the object kinds, the layers and the search method supplied.
GetPrimitiveCounterIPCB_PrimitiveCounterReturns the primitive counter of the board, which gives the object count, hole count and string count of the PCB document.
GetState_ViewConfigAsStringbool
GetState_ZTopBottomvoid
GraphicalView_ViewportRectCoordRect
GraphicalView_ZoomOnRectvoid
GraphicalView_ZoomRedrawvoidRedraws the board's view.
HasServerDocumentbool
HideHoleSymbolsvoid
HidePCBObjectvoidThis method hides the specified object on the PCB document from view.
InternalPlaneLayerIteratorIPCB_LayerObjectIteratorReturns an iterator over the internal plane layers of the board.
InvalidatePlanevoid
InvalidateScopeTestervoid
InvertPCBObjectvoidThis method inverts the colors of the specified object on the PCB document.
IsEmptyHoleToleranceValuebool
LayerIteratorIPCB_LayerObjectIterator
LayerIterator_IncludeNonEditableIPCB_LayerObjectIterator
LayerNamestringReturns the name of a layer.
LayerPositionInSetintThis method returns a positive value with 1 being the first layer and a higher number being the lower layer in the list.
LinkToTemplatevoid
LoadMeshFileint
MechanicalLayerIteratorIPCB_LayerObjectIteratorReturns an iterator over the mechanical layers of the board.
MechanicalLayersIPCB_LayerSet
Navigate_RedrawChangedObjectsInBoardvoidHas no effect.
NetNameIsUniqueboolReturns whether no other net on the board has the given name.
NewUndovoidHas no effect.
PrimPrimDistanceintReturns the distance between two primitives, in internal units (10,000 per mil).
RebuildBoardOutlinevoidRebuilds the board outline from the given defining layer.
RebuildPadCachesvoid
RebuildSplitBoardRegionsvoid
RecreateHandlesvoid
ReDrawToDCvoid
RemovePCBObjectvoidRemoves an object from the board without destroying it.
ReportStackupCompatibilityForEmbeddedBoardsbool
RuleNameUniqueboolReturns whether no other rule on the board has the given name.
RunBatchDesignRuleCheckbool
SelectedObjects_Addvoid
SelectedObjects_BeginUpdatevoid
SelectedObjects_Clearvoid
SelectedObjects_EndUpdatevoid
SelectedObjectsCountint
SelectNewViewConfigurationbool
SetState_DocumentHasChangedvoidThis method forces the document has changed flag to true denoting that the document has been marked dirty so that when you close this document, you are prompted to save this document.
SetState_SaveCurrentStatusOfObjectsInBoardvoidHas no effect.
SetState_ViewManager_FilterChangingvoidTells the board's views that the object filter is changing.
ShowHoleSymbolsvoid
ShowPCBObjectvoidThis method makes this hidden PCB object visible on the PCB document.
SignalLayerIteratorIPCB_LayerObjectIterator
SpatialIterator_CreateIPCB_SpatialIteratorThis method creates a spatial iterator which conducts a search within defined boundary on a PCB document.
SpatialIterator_DestroyvoidThis method destroys the spatial iterator object after it has finished conducting a search within a defined boundary on the PCB document.
UnlinkFromTemplatevoid
Update_PCBGraphicalViewvoidUpdates the board's view.
UpdateBoardOutlinevoidThis method refreshes the Board outline on the PCB document for example if you have programmatically altered the outline, it is a good time to invoke the UpdateBoardOutline method to refresh the PCB…
UpdateCachedVCSRevisionNumberSpecialStringsvoid
ValidateInvalidPlanesvoid
ValidateScopeTestervoid
ViewManager_FullUpdatevoidThis method invokes a full update of all panels that are associated with the current PCB document.
ViewManager_GraphicallyInvalidatePrimitivevoidThis method forces a repaint of the targeted design object (PCBObject parameter) on the PCB document.
ViewManager_UpdateLayerTabsvoidRefreshes the layer tabs of the board's view.
VisibleLayersIPCB_LayerSet
WindowBoundingRectangleCoordRectThis method returns the coordinates of the bounds of a PCB window.

AddLayerPair​

No description yet.

void AddLayerPair(V7_LayerBase argLowLayer, V7_LayerBase argHighLayer);
void AddLayerPair(IV7_Layer argLowLayer, IV7_Layer argHighLayer);
ParameterTypePassing
argLowLayerV7_LayerBasevalue
argHighLayerV7_LayerBasevalue

Returns: nothing (void)

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

AddMesh​

No description yet.

int AddMesh(string argMeshString);
ParameterTypePassing
argMeshStringstringvalue

Returns: int

AddObjectToHighlightObjectList​

Adds a primitive to the board's list of objects to highlight.

void AddObjectToHighlightObjectList(IPCB_Primitive argiPrimitive);
void AddObjectToHighlightObjectList(object argiPrimitive);
ParameterTypePassing
argiPrimitiveIPCB_Primitivevalue

Returns: nothing (void)

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

See also: IPCB_Board.Navigate_HighlightObjectList

Examples: Extension_PlacePad

AddPCBObject​

Adds an object created with IPCB_ServerInterface.PCBObjectFactory to the board.

void AddPCBObject(IPCB_Primitive argPCBObject);
void AddPCBObject(object argPCBObject);
ParameterTypePassing
argPCBObjectIPCB_Primitivevalue

Returns: nothing (void)

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

Does nothing when the object is null. When the board is fully loaded, references that the object holds to a component, net, polygon, dimension or coordinate of another board are cleared before it is added.

A rule (IPCB_Rule) without a name is named after its kind, for example Clearance. When the name is already used by another rule of the board, trailing digits and underscores are removed from it and an underscore and a number are appended that make it unique.

On a PCB library board, adding an IPCB_LibComponent inserts a copy of that footprint into the library; the object passed in is not added itself.

Make the change between IPCB_ServerInterface.PreProcess and IPCB_ServerInterface.PostProcess, then refresh the document with ViewManager_FullUpdate (see the example).

The examples assign the board to the new object (IPCB_Primitive.Board) and set its layer and location before adding it, and redraw the view with GraphicalView_ZoomRedraw afterwards. Rules created with IPCB_ServerInterface.PCBRuleFactory are added in the same way.

Example: Put a via with custom pad cache settings near the bottom left corner of the current board.

using PCB;

IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
// Grab the board interface representing the current PCB document.
IPCB_Board board = pcbServer?.GetCurrentPCBBoard();
// If the board interface doesnt exist (no PCB document) then exit.
if (board == null)
return;
// Initialize the systems in the PCB Editor.
pcbServer.PreProcess();
IPCB_Sheet sheet = board.GetState_PCBSheet();
// Create a Via object with the PCBObjectFactory method
// and then with the new attributes.
// Note we convert values in Mils to internal coordinates
// using the MilsToCoord function. All PCB objects locations and sizes
// have internal coordinate units where 1 mil = 10000 internal units
var via = pcbServer.PCBObjectFactory(TObjectId.eViaObject, TDimensionKind.eNoDimension, TObjectCreationMode.eCreate_Default) as IPCB_Via;
// obtain the bottom left coordinates of the board outline
CoordRect br = board.GetState_BoardOutline().BoundingRectangle();
via.SetState_XLocation(br.Left + EDP.Utils.MilsToCoord(500));
via.SetState_YLocation(br.Bottom + EDP.Utils.MilsToCoord(500));
// via.SetState_XLocation(sheet.GetState_SheetX() + EDP.Utils.MilsToCoord(500));
// via.SetState_YLocation(sheet.GetState_SheetY() + EDP.Utils.MilsToCoord(500));
via.SetState_Size(EDP.Utils.MilsToCoord(50));
via.SetState_HoleSize(EDP.Utils.MilsToCoord(20));
// Assign Via to the Top layer and bottom layer.
via.SetState_LowLayer(new V7_Layer(TV6_Layer.eV6_TopLayer));
via.SetState_HighLayer(new V7_Layer(TV6_Layer.eV6_BottomLayer));
// Set up Cache info for Via
// which consists mainly solder mask, paste mask and power plane values from design rules
V7_PadCache padCache = via.GetState_Cache();
padCache.ReliefAirGap = EDP.Utils.MilsToCoord(11);
padCache.PowerPlaneReliefExpansion = EDP.Utils.MilsToCoord(11);
padCache.PowerPlaneClearance = EDP.Utils.MilsToCoord(11);
padCache.ReliefConductorWidth = EDP.Utils.MilsToCoord(11);
padCache.SolderMaskExpansion = EDP.Utils.MilsToCoord(11);
padCache.SolderMaskExpansionValid = TCacheState.eCacheManual;
padCache.PasteMaskExpansion = EDP.Utils.MilsToCoord(11);
padCache.PasteMaskExpansionValid = TCacheState.eCacheManual;
// Assign the new pad cache to the via
via.SetState_Cache(padCache);
// Put the new Via object on the board
board.AddPCBObject(via);
// Finalize the systems in the PCB Editor.
pcbServer.PostProcess();
//Full PCB system update
board.ViewManager_FullUpdate();
// Refresh PCB screen
DXP.Utils.RunCommand("PCB:Zoom", "Action=Redraw");

Examples: Extension_PcbLibComponentToSTEP, Extension_PlaceAndMovePcbComponent, Extension_PlacePad

AddPolygonMesh​

No description yet.

int AddPolygonMesh(IPCB_Contour argShape, int argz, uint argColor);
int AddPolygonMesh(object argShape, int argz, uint argColor);
ParameterTypePassing
argShapeIPCB_Contourvalue
argzintvalue
argColoruintvalue

Returns: int

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

AnalyzeNet​

This method analyzes a supplied net object in the form of IPCB_Net interface.

void AnalyzeNet(IPCB_Net argNet);
void AnalyzeNet(object argNet);
ParameterTypePassing
argNetIPCB_Netvalue

Returns: nothing (void)

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

Does nothing when the argument is null or is not a net.

BoardIterator_Create​

The BoardIterator_Create method creates a board iterator which is used to search for design objects on the PCB document. After the search has been conducted, invoke the BoardIterator_Destroy method to destroy the board iterator object.

IPCB_BoardIterator BoardIterator_Create();

Returns: IPCB_BoardIterator

Extension method of IPCB_BoardHelper (using PCB;).

The examples set the filters with IPCB_AbstractIterator.AddFilter_ObjectSet, IPCB_AbstractIterator.AddFilter_LayerSet and IPCB_BoardIterator.AddFilter_Method, walk the objects with IPCB_AbstractIterator.FirstPCBObject and IPCB_AbstractIterator.NextPCBObject, and call BoardIterator_Destroy in a finally block.

Examples: Extension_BOMManager, Extension_PCBUndoRedo, Extension_Pad_SolderMask

BoardIterator_Destroy​

The BoardIterator_Destroy method destroys the board iterator object after it has been used to conduct a search on the PCB document for specified board objects.

void BoardIterator_Destroy(ref IPCB_BoardIterator argIterator);
void BoardIterator_Destroy(ref object argIterator);
ParameterTypePassing
argIteratorIPCB_BoardIteratorref

Returns: nothing (void)

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

The variable passed by reference is set to null.

Examples: Extension_BOMManager, Extension_PCBUndoRedo, Extension_Pad_SolderMask

ChooseLocation​

The method returns you the X1 and Y1 coordinates of the PCB Document after you have clicked on a location on the PCB document. When this method is executed, you are prompted with a cross hair cursor (being in the interactive mode) and the status bar of the Altium Designer appears with the Prompt string.

bool ChooseLocation(ref int argx1, ref int argy1, string argPrompt);
ParameterTypePassing
argx1intref
argy1intref
argPromptstringvalue

Returns: bool

Returns whether a location was chosen; if you press the Escape key, the method returns false.

The coordinates are in internal units (10,000 per mil) and are set to 0 before the prompt. When the board has no view, the method returns false without prompting.

Example: Let the user pick pairs of components on the current board.

using PCB;

IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
int x = 0, y = 0;
try
{
IPCB_Board board = pcbServer.GetCurrentPCBBoard();
if (board == null)
{
DXP.Utils.ShowMessage("The Current Document is not a PCB Document.");
return;
}
IPCB_Primitive comp1, comp2;
do
{
board.ChooseLocation(ref x, ref y, "Choose Component1");
comp1 = board.GetObjectAtXYAskUserIfAmbiguous(x, y, new PCB.TObjectSet { TObjectId.eComponentObject },
PCBConstant.V6AllLayersSet, TEditingAction.eEditAction_Select);
if (comp1 == null)
return;
board.ChooseLocation(ref x, ref y, "Choose Component2");
comp2 = board.GetObjectAtXYAskUserIfAmbiguous(x, y, new PCB.TObjectSet { TObjectId.eComponentObject },
PCBConstant.V6AllLayersSet, TEditingAction.eEditAction_Select);
if (comp2 == null)
return;
// do what you want with comp1 and comp2
// click on the board to exit or RMB
} while ((comp1 != null) && (comp2 != null));
}
finally
{
pcbServer.PostProcess();
DXP.Utils.RunCommand("PCB:Zoom", "Action=Redraw");
}

ChooseRectangleByCorners​

The ChooseRectangleByCorners method prompts you twice to choose the two sets of coordinates that define a boundary rectangle on the PCB document. When this method is executed, the PCB is in interactive mode with a cross hair cursor, waiting for the user to click on the PCB document.

bool ChooseRectangleByCorners(string argPrompt1, string argPrompt2, ref int argx1, ref int argy1, ref int argx2, ref int argy2);
ParameterTypePassing
argPrompt1stringvalue
argPrompt2stringvalue
argx1intref
argy1intref
argx2intref
argy2intref

Returns: bool

The method returns you the X1,Y1, X2, Y2 values that can be used for calculations or for the spatial iterator for example and a true value.

However if the method was exit prematurely for example the user clicks Escape key or the right mouse button, the method returns a false value.

The coordinates are in internal units (10,000 per mil) and are set to 0 before the prompts. When the board has no view, the method returns false without prompting.

Example: Ask the user to choose a rectangle on the current board.

using PCB;

int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
IPCB_Board board = PCB.GlobalVars.PCBServer?.GetCurrentPCBBoard();
if (board == null)
return;
if (!board.ChooseRectangleByCorners("Choose first corner", "Choose final corner", ref x1, ref y1, ref x2, ref y2))
return;
// The coordinates from the ChooseRectangleByCorners method
// can be used for a spatial iterator for example

See also: IPCB_SpatialIterator, IPCB_Board.ChooseLocation

ClassNameIsUnique​

No description yet.

bool ClassNameIsUnique(IPCB_ObjectClass argObjectClass, string argName);
bool ClassNameIsUnique(object argObjectClass, string argName);
ParameterTypePassing
argObjectClassIPCB_ObjectClassvalue
argNamestringvalue

Returns: bool

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

CleanNet​

Cleans up a net by re-organizing and re-arranging its net topology.

void CleanNet(IPCB_Net argNet);
void CleanNet(object argNet);
ParameterTypePassingDescription
argNetIPCB_NetvalueThe net to clean up.

Returns: nothing (void)

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

Does nothing when the argument is null or is not a net.

ClearMeshes​

No description yet.

void ClearMeshes();

Returns: nothing (void)

ClearUndoRedo​

Has no effect.

void ClearUndoRedo();

Returns: nothing (void)

ConnectivelyValidateNets​

This method validates the connectivity of nets on the PCB document.

void ConnectivelyValidateNets();

Returns: nothing (void)

ContextMenuObjectCount​

Returns the number of objects of the given kind that the context menu of the board's view applies to.

int ContextMenuObjectCount(TObjectId argObjectId);
int ContextMenuObjectCount(int argObjectId);
ParameterTypePassing
argObjectIdTObjectIdvalue

Returns: int

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

Returns 0 when the board has no view.

CreateBoardOutline​

Creates a board outline with default settings, makes it the outline of the board and returns it.

IPCB_BoardOutline CreateBoardOutline();

Returns: IPCB_BoardOutline

Extension method of IPCB_BoardHelper (using PCB;).

To adjust the parameters of the board outline, see the IPCB_BoardOutline interface.

See also: IPCB_BoardOutline

DeleteMesh​

No description yet.

bool DeleteMesh(int argID);
ParameterTypePassing
argIDintvalue

Returns: bool

DifferentialPairNameIsUnique​

No description yet.

bool DifferentialPairNameIsUnique(IPCB_DifferentialPair argDifferentialPair, string argName);
bool DifferentialPairNameIsUnique(object argDifferentialPair, string argName);
ParameterTypePassing
argDifferentialPairIPCB_DifferentialPairvalue
argNamestringvalue

Returns: bool

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

DispatchMessage​

Sends a PCB message with a source, a destination and message data to the board's message handlers.

void DispatchMessage(IPCB_Primitive argSource, IPCB_Primitive argDestination, ushort argMessageID, IPCB_Primitive argMessageData);
void DispatchMessage(object argSource, object argDestination, ushort argMessageID, object argMessageData);
ParameterTypePassing
argSourceIPCB_Primitivevalue
argDestinationIPCB_Primitivevalue
argMessageIDushortvalue
argMessageDataIPCB_Primitivevalue

Returns: nothing (void)

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

In the overload that takes IPCB_Primitive arguments, a null source, destination or data object is sent as no object.

Examples: Extension_PCBUndoRedo

DoRedo​

Has no effect.

void DoRedo();

Returns: nothing (void)

DoUndo​

Has no effect.

void DoUndo();

Returns: nothing (void)

ElectricalLayerIterator​

No description yet.

IPCB_LayerObjectIterator ElectricalLayerIterator();

Returns: IPCB_LayerObjectIterator

Extension method of IPCB_BoardHelper (using PCB;).

ElectricalLayers​

No description yet.

IPCB_LayerSet ElectricalLayers();

Returns: IPCB_LayerSet

Extension method of IPCB_BoardHelper (using PCB;).

EnableAllPrimitives​

Enables or disables all primitives on the PCB document.

void EnableAllPrimitives(bool argenable);
ParameterTypePassing
argenableboolvalue

Returns: nothing (void)

Sets IPCB_Primitive.Enabled of every primitive, and of the board outline, to the argument, and clears the highlighting. On a PCB library board it applies to the primitives of all footprints.

EndUndo​

Has no effect.

void EndUndo();

Returns: nothing (void)

FindDominantRuleForObject​

This method returns the dominant specified rule for the primitive which is targeted by this rule.

IPCB_Rule FindDominantRuleForObject(IPCB_Primitive argPrimitive, TRuleKind argRuleKind);
ParameterTypePassing
argPrimitiveIPCB_Primitivevalue
argRuleKindTRuleKindvalue

Returns: IPCB_Rule

Extension method of IPCB_BoardHelper (using PCB;).

Returns null when the primitive is null.

FindDominantRuleForObjectPair​

This method returns the dominant specified binary rule for the two primitives which are targeted by this rule.

IPCB_Rule FindDominantRuleForObjectPair(IPCB_Primitive argPrimitive1, IPCB_Primitive argPrimitive2, TRuleKind argRuleKind);
ParameterTypePassing
argPrimitive1IPCB_Primitivevalue
argPrimitive2IPCB_Primitivevalue
argRuleKindTRuleKindvalue

Returns: IPCB_Rule

Extension method of IPCB_BoardHelper (using PCB;).

Returns null when either primitive is null or belongs to another board.

FindLinkedBoardLibrary​

No description yet.

IPCB_PadViaLibrary FindLinkedBoardLibrary(IPCB_Primitive argPrimitive);
ParameterTypePassing
argPrimitiveIPCB_Primitivevalue

Returns: IPCB_PadViaLibrary

Extension method of IPCB_BoardHelper (using PCB;).

FindLinkedBoardTemplate​

Returns the pad and via template that a primitive, for example a pad, is linked to.

IPCB_PadViaTemplate FindLinkedBoardTemplate(IPCB_Primitive argPrimitive);
ParameterTypePassing
argPrimitiveIPCB_Primitivevalue

Returns: IPCB_PadViaTemplate

Extension method of IPCB_BoardHelper (using PCB;).

The examples treat null as "not linked"; otherwise they read the template's IPCB_PadViaTemplate.LibraryID, IPCB_PadViaTemplate.TemplateID, IPCB_PadViaTemplate.RevisionID, IPCB_PadViaTemplate.TemplateName and IPCB_PadViaTemplate.TemplateDescription.

GenerateUniqueID​

No description yet.

string GenerateUniqueID();

Returns: string

GetLastClickedObject​

No description yet.

IPCB_Primitive GetLastClickedObject(TObjectSet argObjectSet, TEditingAction argction);
ParameterTypePassing
argObjectSetTObjectSetvalue
argctionTEditingActionvalue

Returns: IPCB_Primitive

Extension method of IPCB_BoardHelper (using PCB;).

GetMeshPatchFromPoint​

No description yet.

bool GetMeshPatchFromPoint(int argx, int argy, ref int argMeshID, ref int argPatchIndex0, ref int argPatchIndex1, ref int argPatchIndex2, ref int argIntersectionX, ref int argIntersectionY, ref int argIntersectionZ);
ParameterTypePassing
argxintvalue
argyintvalue
argMeshIDintref
argPatchIndex0intref
argPatchIndex1intref
argPatchIndex2intref
argIntersectionXintref
argIntersectionYintref
argIntersectionZintref

Returns: bool

GetObjectAtCursor​

Asks the user to click on the PCB document and returns the design object at the clicked point.

IPCB_Primitive GetObjectAtCursor(TObjectSet argObjectSet, TV6_LayerSet argLayerSet, string argStatusBarText);
ParameterTypePassingDescription
argObjectSetTObjectSetvalueThe object types that can be returned.
argLayerSetTV6_LayerSetvalueThe layers whose objects can be returned.
argStatusBarTextstringvalueThe text on the status bar of the Altium Designer application when the method is invoked.

Returns: IPCB_Primitive

Extension method of IPCB_BoardHelper (using PCB;).

The prompt repeats until the user clicks an object that matches the object set and the layer set, or cancels; when several objects overlap, the user chooses one. Returns null when the user cancels or when the board has no view.

GetObjectAtXYAskUserIfAmbiguous​

This method returns you the specified object with the specified X and Y coordinates which could be retrieved by the ChooseLocation method for example.

IPCB_Primitive GetObjectAtXYAskUserIfAmbiguous(int argHitX, int argHitY, TObjectSet argObjectSet, TV6_LayerSet argLayerSet, TEditingAction argction);
ParameterTypePassingDescription
argHitXintvalueThe X coordinate, in internal units (10,000 per mil).
argHitYintvalueThe Y coordinate, in internal units (10,000 per mil).
argObjectSetTObjectSetvalueThe object types that can be returned.
argLayerSetTV6_LayerSetvalueThe layers whose objects can be returned.
argctionTEditingActionvalueWhat is happening when the method is invoked.

Returns: IPCB_Primitive

Extension method of IPCB_BoardHelper (using PCB;).

This method is useful when there are overlapping objects on the PCB document and you need to retrieve the specific object type.

Returns null when the board has no view. The examples get the point with ChooseLocation, pass TEditingAction.eEditAction_Select, and stop when the result is null.

Example: Let the user click components on the current board until they click elsewhere.

using PCB;

IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
int x = 0, y = 0;
pcbServer.PreProcess();
try
{
IPCB_Board board = pcbServer.GetCurrentPCBBoard();
if (board == null)
{
DXP.Utils.ShowMessage("The Current Document is not a PCB Document.");
return;
}
IPCB_Primitive comp1;
do
{
board.ChooseLocation(ref x, ref y, "Choose Component1");
comp1 = board.GetObjectAtXYAskUserIfAmbiguous(x, y, new PCB.TObjectSet { TObjectId.eComponentObject },
PCBConstant.V6AllLayersSet, TEditingAction.eEditAction_Select);
if (comp1 == null)
return;
// click on the board to exit or RMB
} while (comp1 != null);
}
finally
{
pcbServer.PostProcess();
DXP.Utils.RunCommand("PCB:Zoom", "Action=Redraw");
}

See also: IPCB_Board.ChooseLocation, TObjectSet, TEditingAction

GetPcbComponentByRefDes​

Returns the component with the given designator, or null when the board has none.

IPCB_Component GetPcbComponentByRefDes(string argValue);
ParameterTypePassing
argValuestringvalue

Returns: IPCB_Component

Extension method of IPCB_BoardHelper (using PCB;).

GetPrimitiveCount​

Returns the number of primitives that match the object kinds, the layers and the search method supplied.

int GetPrimitiveCount(TObjectSet argObjSet, TV6_LayerSet argLayerSet, TIterationMethod argMethod);
int GetPrimitiveCount(ITransportSet argObjSet, ITransportSet argLayerSet, int argMethod);
ParameterTypePassingDescription
argObjSetTObjectSetvalueThe object kinds to look for.
argLayerSetTV6_LayerSetvalueThe layers to look in.
argMethodTIterationMethodvalueHow the search is conducted.

Returns: int

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

See also: TObjectSet, TIterationMethod

GetPrimitiveCounter​

Returns the primitive counter of the board, which gives the object count, hole count and string count of the PCB document.

IPCB_PrimitiveCounter GetPrimitiveCounter();

Returns: IPCB_PrimitiveCounter

Extension method of IPCB_BoardHelper (using PCB;).

See also: IPCB_PrimitiveCounter

GetState_ViewConfigAsString​

No description yet.

bool GetState_ViewConfigAsString(out string argConfigType, out string argConfig);
ParameterTypePassing
argConfigTypestringout
argConfigstringout

Returns: bool

GetState_ZTopBottom​

No description yet.

void GetState_ZTopBottom(out float argZTop, out float argZBottom);
ParameterTypePassing
argZTopfloatout
argZBottomfloatout

Returns: nothing (void)

GraphicalView_ViewportRect​

No description yet.

CoordRect GraphicalView_ViewportRect();

Returns: CoordRect

Extension method of IPCB_BoardHelper (using PCB;).

GraphicalView_ZoomOnRect​

No description yet.

void GraphicalView_ZoomOnRect(int argx1, int argy1, int argx2, int argy2);
ParameterTypePassing
argx1intvalue
argy1intvalue
argx2intvalue
argy2intvalue

Returns: nothing (void)

GraphicalView_ZoomRedraw​

Redraws the board's view.

void GraphicalView_ZoomRedraw();

Returns: nothing (void)

The examples call it right after AddPCBObject to show the new object.

HasServerDocument​

No description yet.

bool HasServerDocument();

Returns: bool

HideHoleSymbols​

No description yet.

void HideHoleSymbols();

Returns: nothing (void)

HidePCBObject​

This method hides the specified object on the PCB document from view.

void HidePCBObject(IPCB_Primitive argPCBObject);
void HidePCBObject(object argPCBObject);
ParameterTypePassing
argPCBObjectIPCB_Primitivevalue

Returns: nothing (void)

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

Does nothing when the object is null or belongs to another board.

See also: IPCB_Board.InvertPCBObject, IPCB_Board.ShowPCBObject

InternalPlaneLayerIterator​

Returns an iterator over the internal plane layers of the board.

IPCB_LayerObjectIterator InternalPlaneLayerIterator();

Returns: IPCB_LayerObjectIterator

Extension method of IPCB_BoardHelper (using PCB;).

The examples call IPCB_LayerIterator.SetBeforeFirst, then IPCB_LayerIterator.Next in a loop, and read each layer with IPCB_LayerIterator.Layer.

Examples: Extension_InternalPlaneLayer

InvalidatePlane​

No description yet.

void InvalidatePlane(TV6_Layer argL);
void InvalidatePlane(int argL);
ParameterTypePassing
argLTV6_Layervalue

Returns: nothing (void)

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

InvalidateScopeTester​

No description yet.

void InvalidateScopeTester();

Returns: nothing (void)

InvertPCBObject​

This method inverts the colors of the specified object on the PCB document.

void InvertPCBObject(IPCB_Primitive argPCBObject);
void InvertPCBObject(object argPCBObject);
ParameterTypePassing
argPCBObjectIPCB_Primitivevalue

Returns: nothing (void)

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

Does nothing when the object is null or belongs to another board.

See also: IPCB_Board.ShowPCBObject, IPCB_Board.HidePCBObject

IsEmptyHoleToleranceValue​

No description yet.

bool IsEmptyHoleToleranceValue(int argValue);
ParameterTypePassing
argValueintvalue

Returns: bool

LayerIterator​

No description yet.

IPCB_LayerObjectIterator LayerIterator();

Returns: IPCB_LayerObjectIterator

Extension method of IPCB_BoardHelper (using PCB;).

LayerIterator_IncludeNonEditable​

No description yet.

IPCB_LayerObjectIterator LayerIterator_IncludeNonEditable();

Returns: IPCB_LayerObjectIterator

Extension method of IPCB_BoardHelper (using PCB;).

LayerName​

Returns the name of a layer.

string LayerName(V7_LayerBase argL);
string LayerName(IV7_Layer argL);
ParameterTypePassing
argLV7_LayerBasevalue

Returns: string

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

When the board has more than one substack (IPCB_MasterLayerStack.SubstackCount), the name is taken from the first substack.

LayerPositionInSet​

This method returns a positive value with 1 being the first layer and a higher number being the lower layer in the list. This method is useful for checking low and high layers of a layer pair.

int LayerPositionInSet(TV6_LayerSet argLayerSet, IPCB_LayerObject argLayerObj);
int LayerPositionInSet(ITransportSet argLayerSet, object argLayerObj);
ParameterTypePassing
argLayerSetTV6_LayerSetvalue
argLayerObjIPCB_LayerObjectvalue

Returns: int

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

Only the layers of the set are counted, from the top of the layer stack. Returns 0 when the layer object is null or its layer is not in the set.

See also: IPCB_LayerObject, IPCB_DrillLayerPair

LinkToTemplate​

No description yet.

void LinkToTemplate(IPCB_Primitive argPrimitive, IPCB_PadViaTemplate argTemplate);
void LinkToTemplate(object argPrimitive, object argTemplate);
ParameterTypePassing
argPrimitiveIPCB_Primitivevalue
argTemplateIPCB_PadViaTemplatevalue

Returns: nothing (void)

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

LoadMeshFile​

No description yet.

int LoadMeshFile(string argMeshFile);
ParameterTypePassing
argMeshFilestringvalue

Returns: int

MechanicalLayerIterator​

Returns an iterator over the mechanical layers of the board.

IPCB_LayerObjectIterator MechanicalLayerIterator();

Returns: IPCB_LayerObjectIterator

Extension method of IPCB_BoardHelper (using PCB;).

The examples walk it with IPCB_LayerIterator.First and IPCB_LayerIterator.Next and read each layer with IPCB_LayerObjectIterator.LayerObject, as an IPCB_MechanicalLayer.

MechanicalLayers​

No description yet.

IPCB_LayerSet MechanicalLayers();

Returns: IPCB_LayerSet

Extension method of IPCB_BoardHelper (using PCB;).

Has no effect.

void Navigate_RedrawChangedObjectsInBoard();

Returns: nothing (void)

NetNameIsUnique​

Returns whether no other net on the board has the given name.

bool NetNameIsUnique(IPCB_Net argNet, string argName);
bool NetNameIsUnique(object argNet, string argName);
ParameterTypePassing
argNetIPCB_Netvalue
argNamestringvalue

Returns: bool

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

The net passed in may itself have the name. Returns false for an empty name.

NewUndo​

Has no effect.

void NewUndo();

Returns: nothing (void)

PrimPrimDistance​

Returns the distance between two primitives, in internal units (10,000 per mil).

int PrimPrimDistance(IPCB_Primitive argPrimitive1, IPCB_Primitive argPrimitive2);
int PrimPrimDistance(object argPrimitive1, object argPrimitive2);
ParameterTypePassing
argPrimitive1IPCB_Primitivevalue
argPrimitive2IPCB_Primitivevalue

Returns: int

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

Returns PCBConstant.MaxCoord when either primitive is null or does not belong to this board.

The example collects the primitives with a board iterator first, destroys the iterator, and then measures every pair.

RebuildBoardOutline​

Rebuilds the board outline from the given defining layer.

void RebuildBoardOutline(V7_LayerBase argDefiningLayer);
void RebuildBoardOutline(IV7_Layer argDefiningLayer);
ParameterTypePassing
argDefiningLayerV7_LayerBasevalue

Returns: nothing (void)

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

After changing the outline's segments, the example calls UpdateBoardOutline and then RebuildBoardOutline with the outline's own layer.

RebuildPadCaches​

No description yet.

void RebuildPadCaches();

Returns: nothing (void)

RebuildSplitBoardRegions​

No description yet.

void RebuildSplitBoardRegions(bool argFullRebuild);
ParameterTypePassing
argFullRebuildboolvalue

Returns: nothing (void)

RecreateHandles​

No description yet.

void RecreateHandles();

Returns: nothing (void)

ReDrawToDC​

No description yet.

void ReDrawToDC(UIntPtr argDC, int argPrintKind, int argPrintWhat, TV6_LayerSet argLayers);
void ReDrawToDC(object argDC, int argPrintKind, int argPrintWhat, ITransportSet argLayers);
ParameterTypePassing
argDCUIntPtrvalue
argPrintKindintvalue
argPrintWhatintvalue
argLayersTV6_LayerSetvalue

Returns: nothing (void)

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

RemovePCBObject​

Removes an object from the board without destroying it.

void RemovePCBObject(IPCB_Primitive argPCBObject);
void RemovePCBObject(object argPCBObject);
ParameterTypePassing
argPCBObjectIPCB_Primitivevalue

Returns: nothing (void)

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

Does nothing when the object is null or is not a primitive, a rule, a class or a union. On a PCB library board only footprints (IPCB_LibComponent) are removed, from the library's list of footprints; other objects stay in place.

Do not remove objects while an iterator is walking the board, because it changes the data the iterator traverses: collect the objects in a list first, then remove them (see the example). The examples also remove rules and violations that were added only for a check.

Example: Remove all tracks on the top layer of the current board.

using System.Collections.Generic;
using PCB;

IPCB_ServerInterface pcbServer = PCB.GlobalVars.PCBServer;
IPCB_Board currentPCBBoard = pcbServer?.GetCurrentPCBBoard();
if (currentPCBBoard == null)
return;
IPCB_BoardIterator iterator = currentPCBBoard.BoardIterator_Create();
if (iterator == null)
return;
iterator.AddFilter_ObjectSet(new PCB.TObjectSet { TObjectId.eTrackObject });
iterator.AddFilter_LayerSet(new TV6_LayerSet { TV6_Layer.eV6_TopLayer });
// store tracks in a list that are to be deleted later...
var trackList = new List<IPCB_Primitive>();
try
{
IPCB_Primitive track = iterator.FirstPCBObject();
while (track != null)
{
trackList.Add(track);
track = iterator.NextPCBObject();
}
}
finally
{
currentPCBBoard.BoardIterator_Destroy(ref iterator);
}
try
{
pcbServer.PreProcess();
for (int i = 0; i < trackList.Count; i++)
currentPCBBoard.RemovePCBObject(trackList[i]);
}
finally
{
pcbServer.PostProcess();
}
// Refresh the PCB document.
currentPCBBoard.ViewManager_FullUpdate();
DXP.Utils.RunCommand("PCB:Zoom", "Action=Redraw");

Examples: Extension_PcbLibComponentToSTEP, Extension_PlacePad

ReportStackupCompatibilityForEmbeddedBoards​

No description yet.

bool ReportStackupCompatibilityForEmbeddedBoards(bool argRunReport);
ParameterTypePassing
argRunReportboolvalue

Returns: bool

RuleNameUnique​

Returns whether no other rule on the board has the given name.

bool RuleNameUnique(IPCB_Rule argRule, string argName);
bool RuleNameUnique(object argRule, string argName);
ParameterTypePassing
argRuleIPCB_Rulevalue
argNamestringvalue

Returns: bool

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

The rule passed in may itself have the name. Returns false for an empty name.

RunBatchDesignRuleCheck​

No description yet.

bool RunBatchDesignRuleCheck(string argReportFilename, TDRCReportFileFormat argDRCReportFormat, bool argDisplayReportFile, bool argPublishToWeb);
bool RunBatchDesignRuleCheck(string argReportFilename, int argDRCReportFormat, bool argDisplayReportFile, bool argPublishToWeb);
ParameterTypePassing
argReportFilenamestringvalue
argDRCReportFormatTDRCReportFileFormatvalue
argDisplayReportFileboolvalue
argPublishToWebboolvalue

Returns: bool

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

SelectedObjects_Add​

No description yet.

void SelectedObjects_Add(IPCB_Primitive argP);
void SelectedObjects_Add(object argP);
ParameterTypePassing
argPIPCB_Primitivevalue

Returns: nothing (void)

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

SelectedObjects_BeginUpdate​

No description yet.

void SelectedObjects_BeginUpdate();

Returns: nothing (void)

SelectedObjects_Clear​

No description yet.

void SelectedObjects_Clear();

Returns: nothing (void)

SelectedObjects_EndUpdate​

No description yet.

void SelectedObjects_EndUpdate();

Returns: nothing (void)

SelectedObjectsCount​

No description yet.

int SelectedObjectsCount();

Returns: int

SelectNewViewConfiguration​

No description yet.

bool SelectNewViewConfiguration(string argCurConfigType, string argCurConfig, out string argConfigType, out string argConfig);
ParameterTypePassing
argCurConfigTypestringvalue
argCurConfigstringvalue
argConfigTypestringout
argConfigstringout

Returns: bool

SetState_DocumentHasChanged​

This method forces the document has changed flag to true denoting that the document has been marked dirty so that when you close this document, you are prompted to save this document.

void SetState_DocumentHasChanged();

Returns: nothing (void)

SetState_SaveCurrentStatusOfObjectsInBoard​

Has no effect.

void SetState_SaveCurrentStatusOfObjectsInBoard();

Returns: nothing (void)

SetState_ViewManager_FilterChanging​

Tells the board's views that the object filter is changing.

void SetState_ViewManager_FilterChanging();

Returns: nothing (void)

ShowHoleSymbols​

No description yet.

void ShowHoleSymbols(int argSymbolType, int argSymbolSize, int argLayerPairIndex);
ParameterTypePassing
argSymbolTypeintvalue
argSymbolSizeintvalue
argLayerPairIndexintvalue

Returns: nothing (void)

ShowPCBObject​

This method makes this hidden PCB object visible on the PCB document.

void ShowPCBObject(IPCB_Primitive argPCBObject);
void ShowPCBObject(object argPCBObject);
ParameterTypePassing
argPCBObjectIPCB_Primitivevalue

Returns: nothing (void)

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

Does nothing when the object is null or belongs to another board.

See also: IPCB_Board.InvertPCBObject, IPCB_Board.HidePCBObject

SignalLayerIterator​

No description yet.

IPCB_LayerObjectIterator SignalLayerIterator();

Returns: IPCB_LayerObjectIterator

Extension method of IPCB_BoardHelper (using PCB;).

SpatialIterator_Create​

This method creates a spatial iterator which conducts a search within defined boundary on a PCB document. A spatial iterator only looks for primitive objects on a PCB document such as tracks and arcs not group objects such as dimensions and components.

IPCB_SpatialIterator SpatialIterator_Create();

Returns: IPCB_SpatialIterator

Extension method of IPCB_BoardHelper (using PCB;).

The examples set the filters with IPCB_AbstractIterator.AddFilter_ObjectSet, IPCB_AbstractIterator.AddFilter_AllLayers and IPCB_AbstractIterator.AddFilter_Area (corners in internal units), walk the objects with IPCB_AbstractIterator.FirstPCBObject and IPCB_AbstractIterator.NextPCBObject, and then call SpatialIterator_Destroy.

See also: IPCB_Board.SpatialIterator_Destroy

SpatialIterator_Destroy​

This method destroys the spatial iterator object after it has finished conducting a search within a defined boundary on the PCB document. A spatial iterator only looks for primitive objects on a PCB document such as tracks and arcs not group objects such as dimensions and components.

void SpatialIterator_Destroy(ref IPCB_SpatialIterator argIterator);
void SpatialIterator_Destroy(ref object argIterator);
ParameterTypePassing
argIteratorIPCB_SpatialIteratorref

Returns: nothing (void)

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

The variable passed by reference is set to null.

See also: IPCB_Board.SpatialIterator_Create

UnlinkFromTemplate​

No description yet.

void UnlinkFromTemplate(IPCB_Primitive argPrimitive);
void UnlinkFromTemplate(object argPrimitive);
ParameterTypePassing
argPrimitiveIPCB_Primitivevalue

Returns: nothing (void)

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

Update_PCBGraphicalView​

Updates the board's view.

void Update_PCBGraphicalView(bool argForceRebuild, bool argRedrawView);
ParameterTypePassing
argForceRebuildboolvalue
argRedrawViewboolvalue

Returns: nothing (void)

The examples call Update_PCBGraphicalView(false, true) after changing which layers are displayed or the current layer, to show the change.

UpdateBoardOutline​

This method refreshes the Board outline on the PCB document for example if you have programmatically altered the outline, it is a good time to invoke the UpdateBoardOutline method to refresh the PCB document.

void UpdateBoardOutline();

Returns: nothing (void)

Recalculates the size of the outline and rebuilds its region, including the board cutouts. Does nothing when the board has no outline.

After changing the outline's segments, the example calls UpdateBoardOutline and then RebuildBoardOutline.

UpdateCachedVCSRevisionNumberSpecialStrings​

No description yet.

void UpdateCachedVCSRevisionNumberSpecialStrings();

Returns: nothing (void)

ValidateInvalidPlanes​

No description yet.

void ValidateInvalidPlanes();

Returns: nothing (void)

ValidateScopeTester​

No description yet.

void ValidateScopeTester();

Returns: nothing (void)

ViewManager_FullUpdate​

This method invokes a full update of all panels that are associated with the current PCB document. This method is useful if a document has been modified programmatically especially with library documents.

void ViewManager_FullUpdate();

Returns: nothing (void)

ViewManager_GraphicallyInvalidatePrimitive​

This method forces a repaint of the targeted design object (PCBObject parameter) on the PCB document.

void ViewManager_GraphicallyInvalidatePrimitive(IPCB_Primitive argPCBObject);
void ViewManager_GraphicallyInvalidatePrimitive(object argPCBObject);
ParameterTypePassing
argPCBObjectIPCB_Primitivevalue

Returns: nothing (void)

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

The example passes the board itself to redraw it after changing the board outline.

ViewManager_UpdateLayerTabs​

Refreshes the layer tabs of the board's view.

void ViewManager_UpdateLayerTabs();

Returns: nothing (void)

VisibleLayers​

No description yet.

IPCB_LayerSet VisibleLayers();

Returns: IPCB_LayerSet

Extension method of IPCB_BoardHelper (using PCB;).

WindowBoundingRectangle​

This method returns the coordinates of the bounds of a PCB window.

CoordRect WindowBoundingRectangle();

Returns: CoordRect

Extension method of IPCB_BoardHelper (using PCB;).

The coordinates are in internal units (10,000 per mil).

Inherited members​

Returned by​

ILayerStackServerDocumentHelper.GetBoard, IPCB_BoardEx3.GetBaseVCSBoard, IPCB_BoardEx3.GetLastRemoteBoard, IPCB_ComponentPainterView.GetDummyBoard, IPCB_DrillLayerPair.Board, IPCB_EmbeddedBoard.ChildBoard, IPCB_LayerStack.Board, IPCB_LayerStack_V7.Board, IPCB_Library.Board, IPCB_MasterLayerStack.Board, IPCB_PlacementGuide.GetOwnerBoard, IPCB_Primitive.Board, IPCB_ServerInterface.GetCurrentPCBBoard, IPCB_ServerInterface.GetPCBBoardByBoardID, IPCB_ServerInterface.GetPCBBoardByPath, IPCB_ServerInterface.LoadPCBBoardByPath

Accepted by​

ILayerStackManager.GetLayerStackProvider, ILayerStackManager.OpenDocumentFromPcb, ILayerStackManager.RemoveLayerStackProvider, IPCB_Board3DModelExporter.ExportBoard3DModel, IPCB_Board3DModelExporter.ExportBoard3DModelToOCCDoc, IPCB_Board3DModelExporter.GetCopperBodyList, IPCB_Board3DModelExporter.GetCopperBodyList2, IPCB_DocumentPainterView.SetBoard, IPCB_ExpressionManager.ExecRuleExpression, IPCB_ExpressionManager.HighlightByExpression, IPCB_ExpressionManager.IsExpressionValid, IPCB_ExpressionManager.ShowExpressionBuilder, IPCB_ExpressionManager.ShowExpressionHelper, IPCB_GridManager.RunGridEditor, IPCB_LayerObject_V7.IsDisplayed, IPCB_MechanicalLayer.MirroredLayer, IPCB_PadViaLibraryManager.AddRemoveLibraries, IPCB_PadViaLibraryManager.FindLibrary, IPCB_PadViaLibraryManager.GetLinkedToLibrary_1, IPCB_PrimitiveComparator.Compare, IPCB_SMDToPlaneConstraint.IsInternalPlaneNet

Examples​

Used in the SDK examples: Extension_BOMManager, Extension_BOMManager, Extension_BOMManager, Extension_BOMManager, Extension_CreatePCBLib, Extension_InternalPlaneLayer, Extension_PCBToImage, Extension_PCBUndoRedo, Extension_Pad_SolderMask, Extension_PlaceAndMovePcbComponent, Extension_PlacePad.