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
| Property | Type | Access | Description |
|---|---|---|---|
| AutomaticSplitPlanes | bool | get; set | Whether split planes are generated automatically; always true. |
| BigVisibleGridMultFactor | double | get; set | |
| BigVisibleGridSize | double | get; set | The size of the big (coarse) visible grid. |
| BigVisibleGridUnit | TUnit | get; set | The measurement unit of the big (coarse) visible grid, imperial or metric. |
| BoardID | int | get | |
| BoardLayerSetManager | IPCB_BoardLayerSetManager | get | |
| BoardOutline | IPCB_BoardOutline | get | The Board Outline represents the board outline which encompasses a board design on a PCB document. |
| BoardVersion | double | get | The file format version that was read from the board's file. |
| ComponentGridSize | double | get; set | The component placement grid size, for X and Y together. |
| ComponentGridSizeX | double | get; set | The X size of the component placement grid. |
| ComponentGridSizeY | double | get; set | The Y size of the component placement grid. |
| CurrentLayer | TV6_Layer | get | This property denotes the current PCB layer being displayed in the PCB workspace in Altium Designer. |
| CurrentLayerV7 | V7_LayerBase | get; set | The current layer of the board's view. |
| DesignatorDisplayMode | TDesignatorDisplayMode | get; set | |
| DisplayUnit | TUnit | get; set | This property retrieves or sets the measurement units for the PCB document display purposes in Imperial or Metric units. |
| DrawDotGrid | bool | get; set | Whether the grid is drawn as dots (true) or as continuous lines (false). |
| DrawMode | TDrawMode | get; set | |
| DrillLayerPairsCount | int | get | This property returns the number of drill layer pairs for the board. |
| ECOOptions | IPCB_ECOOptions | get | This property returns you the IPCB_ECOOptions interface which represents the Options for the Engineering Order Change facility in the PCB editor. |
| FileName | string | get | The FileName property denotes the filename of the PCB document that the IPCB_Board interface is associated with. |
| GerberOptions | IPCB_GerberOptions | get | This property returns you the IPCB_GerberOptions interface which represents the Options for the Gerbers facility in the PCB editor. |
| InternalPlane1NetName | string | get; set | The net name of internal plane 1. |
| InternalPlane2NetName | string | get; set | The net name of internal plane 2. |
| InternalPlane3NetName | string | get; set | The net name of internal plane 3. |
| InternalPlane4NetName | string | get; set | The net name of internal plane 4. |
| InternalPlaneNetName | string | get; set | This property returns or sets the net name for the targeted internal plane. |
| LayerColor | uint | get | The display colour of a layer. |
| LayerIsDisplayed | bool | get; set | Whether a layer is shown in the board's view. |
| LayerIsUsed | bool | get; set | This property retrieves or sets the boolean value for whether the layer is used by primitives or not. |
| LayerPair | IPCB_DrillLayerPair | get | This property returns you the layer pair associated with the IPCB_DrillLayerPair interface. |
| LayerPairByPair | IPCB_DrillLayerPair | get | Deprecated: use LayerPairByPairEx. |
| LayerPairByPairEx | IPCB_DrillLayerPair | get | |
| LayerStack | IPCB_LayerStack | get | The layer stack property fetches the IPCB_LayerStack interface for the current PCB document. |
| LayerStack_V7 | IPCB_LayerStack_V7 | get | The master layer stack of the board, the same stack as MasterStack, as an IPCB_LayerStack_V7. |
| MainGraphicalView | IPCB_GraphicalView | get | The graphical view of the board. |
| MasterStack | IPCB_MasterLayerStack | get | |
| MechanicalPairs | IPCB_MechanicalLayerPairs | get | The mechanical layer pairs of the board, as an IPCB_MechanicalLayerPairs. |
| MeshViewMode | TPCBMeshViewMode | get; set | |
| Navigate_HighlightObjectList | bool | set | Highlights the objects in the board's highlight list with the given highlight methods. |
| OutputOptions | IPCB_OutputOptions | get | This property returns you the IPCB_OutputOptions interface which represents the Options for the Output facility in the PCB editor. |
| PadViaCache | IPCB_PadViaLibrary | get | |
| PadViaLibrary | IPCB_PadViaLibrary | get | |
| PCB3DMovieManager | IPCB_3DMovieManager | get | |
| PCBSheet | IPCB_Sheet | get | This property returns the IPCB_Sheet interface which is represented by the sheet workspace. |
| PinPairsManager | IPCB_PinPairsManager | get | The manager of the board's pin pairs. |
| PlacerOptions | IPCB_AdvancedPlacerOptions | get | This property returns you the IPCB_AdvancedPlacerOptions interface which represents the Options for the Placement facility in the PCB editor. |
| PolygonNameTemplate | TPolygonNameTemplates | get; set | |
| PrinterOptions | IPCB_PrinterOptions | get | This property returns you the IPCB_PrinterOptions interface which represents the Options for the Printer setup facility in the PCB editor. |
| RouteToolPathLayer | V7_LayerBase | get; set | |
| RoutingOptions | IPCB_BoardRoutingOptions | get | |
| SelectecObject | IPCB_Primitive | get | This property represents the indexed selected object found on the PCB document. |
| SelectecObjectCount | int | get | This property represents the number of selected objects found on the PCB document. |
| SnapGridSize | double | get; set | The SnapGridSize property sets the X and Y values for the Snap Grid simultaneously. |
| SnapGridSizeX | double | get; set | This property retrieves or sets the Snap Grid size X value. |
| SnapGridSizeY | double | get; set | This property retrieves or sets the Snap Grid size Y value. |
| SnapGridUnit | TUnit | get; set | The SnapGridUnit property retrieves or sets the measurement unit for the Snap Grid Unit. |
| SwitchOutputCapabilityMode | bool | set | |
| SystemValid | bool | get; set | |
| TrackGridSize | double | get; set | This property retrieves or sets the track grid size in both X and Y directions simultaneously. |
| ViaGridSize | double | get; set | This property retrieves or sets the via grid size in both X and Y directions simultaneously. |
| ViewConfigColor2D | uint | get | |
| ViewConfigColor3D | uint | get | |
| ViewConfigFromString | string | set | |
| ViewConfigFromString_ForceRebuild | string | set | |
| ViewConfigIs3D | bool | get | |
| ViewConfigOpacity2D | float | get | |
| ViewConfigOpacity3D | float | get | |
| ViewConfigTopSolderMaskColor3D | uint | get | |
| Viewport | IPCB_Viewport | get; set | |
| VisibleGridMultFactor | double | get; set | |
| VisibleGridSize | double | get; set | The size of the (fine) visible grid. |
| VisibleGridUnit | TUnit | get; set | The measurement unit of the (fine) visible grid, imperial or metric. |
| Window | uint | get | This property returns the raw Windows handle for a window handle of a PCB document in Altium Designer. |
| WorldXOrigin | int | get; set | The X coordinate of the world origin of the board, in internal units (10,000 per mil). |
| WorldYOrigin | int | get; set | The Y coordinate of the world origin of the board, in internal units (10,000 per mil). |
| XCursor | int | get; set | The X coordinate of the cursor in the current PCB view, in internal units (10,000 per mil). |
| XOrigin | int | get; set | This property sets or retrieves the X coordinate of the absolute origin of the board, in internal units (10,000 per mil). |
| YCursor | int | get; set | The Y coordinate of the cursor in the current PCB view, in internal units (10,000 per mil). |
| YOrigin | int | get; set | This 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;).
Navigate_HighlightObjectList
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
| Method | Returns | Description |
|---|---|---|
| AddLayerPair | void | |
| AddMesh | int | |
| AddObjectToHighlightObjectList | void | Adds a primitive to the board's list of objects to highlight. |
| AddPCBObject | void | Adds an object created with IPCB_ServerInterface.PCBObjectFactory to the board. |
| AddPolygonMesh | int | |
| AnalyzeNet | void | This method analyzes a supplied net object in the form of IPCB_Net interface. |
| BoardIterator_Create | IPCB_BoardIterator | The BoardIterator_Create method creates a board iterator which is used to search for design objects on the PCB document. |
| BoardIterator_Destroy | void | 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. |
| ChooseLocation | bool | The method returns you the X1 and Y1 coordinates of the PCB Document after you have clicked on a location on the PCB document. |
| ChooseRectangleByCorners | bool | The ChooseRectangleByCorners method prompts you twice to choose the two sets of coordinates that define a boundary rectangle on the PCB document. |
| ClassNameIsUnique | bool | |
| CleanNet | void | Cleans up a net by re-organizing and re-arranging its net topology. |
| ClearMeshes | void | |
| ClearUndoRedo | void | Has no effect. |
| ConnectivelyValidateNets | void | This method validates the connectivity of nets on the PCB document. |
| ContextMenuObjectCount | int | Returns the number of objects of the given kind that the context menu of the board's view applies to. |
| CreateBoardOutline | IPCB_BoardOutline | Creates a board outline with default settings, makes it the outline of the board and returns it. |
| DeleteMesh | bool | |
| DifferentialPairNameIsUnique | bool | |
| DispatchMessage | void | Sends a PCB message with a source, a destination and message data to the board's message handlers. |
| DoRedo | void | Has no effect. |
| DoUndo | void | Has no effect. |
| ElectricalLayerIterator | IPCB_LayerObjectIterator | |
| ElectricalLayers | IPCB_LayerSet | |
| EnableAllPrimitives | void | Enables or disables all primitives on the PCB document. |
| EndUndo | void | Has no effect. |
| FindDominantRuleForObject | IPCB_Rule | This method returns the dominant specified rule for the primitive which is targeted by this rule. |
| FindDominantRuleForObjectPair | IPCB_Rule | This method returns the dominant specified binary rule for the two primitives which are targeted by this rule. |
| FindLinkedBoardLibrary | IPCB_PadViaLibrary | |
| FindLinkedBoardTemplate | IPCB_PadViaTemplate | Returns the pad and via template that a primitive, for example a pad, is linked to. |
| GenerateUniqueID | string | |
| GetLastClickedObject | IPCB_Primitive | |
| GetMeshPatchFromPoint | bool | |
| GetObjectAtCursor | IPCB_Primitive | Asks the user to click on the PCB document and returns the design object at the clicked point. |
| GetObjectAtXYAskUserIfAmbiguous | IPCB_Primitive | This method returns you the specified object with the specified X and Y coordinates which could be retrieved by the ChooseLocation method for example. |
| GetPcbComponentByRefDes | IPCB_Component | Returns the component with the given designator, or null when the board has none. |
| GetPrimitiveCount | int | Returns the number of primitives that match the object kinds, the layers and the search method supplied. |
| GetPrimitiveCounter | IPCB_PrimitiveCounter | Returns the primitive counter of the board, which gives the object count, hole count and string count of the PCB document. |
| GetState_ViewConfigAsString | bool | |
| GetState_ZTopBottom | void | |
| GraphicalView_ViewportRect | CoordRect | |
| GraphicalView_ZoomOnRect | void | |
| GraphicalView_ZoomRedraw | void | Redraws the board's view. |
| HasServerDocument | bool | |
| HideHoleSymbols | void | |
| HidePCBObject | void | This method hides the specified object on the PCB document from view. |
| InternalPlaneLayerIterator | IPCB_LayerObjectIterator | Returns an iterator over the internal plane layers of the board. |
| InvalidatePlane | void | |
| InvalidateScopeTester | void | |
| InvertPCBObject | void | This method inverts the colors of the specified object on the PCB document. |
| IsEmptyHoleToleranceValue | bool | |
| LayerIterator | IPCB_LayerObjectIterator | |
| LayerIterator_IncludeNonEditable | IPCB_LayerObjectIterator | |
| LayerName | string | Returns the name of a layer. |
| LayerPositionInSet | int | This method returns a positive value with 1 being the first layer and a higher number being the lower layer in the list. |
| LinkToTemplate | void | |
| LoadMeshFile | int | |
| MechanicalLayerIterator | IPCB_LayerObjectIterator | Returns an iterator over the mechanical layers of the board. |
| MechanicalLayers | IPCB_LayerSet | |
| Navigate_RedrawChangedObjectsInBoard | void | Has no effect. |
| NetNameIsUnique | bool | Returns whether no other net on the board has the given name. |
| NewUndo | void | Has no effect. |
| PrimPrimDistance | int | Returns the distance between two primitives, in internal units (10,000 per mil). |
| RebuildBoardOutline | void | Rebuilds the board outline from the given defining layer. |
| RebuildPadCaches | void | |
| RebuildSplitBoardRegions | void | |
| RecreateHandles | void | |
| ReDrawToDC | void | |
| RemovePCBObject | void | Removes an object from the board without destroying it. |
| ReportStackupCompatibilityForEmbeddedBoards | bool | |
| RuleNameUnique | bool | Returns whether no other rule on the board has the given name. |
| RunBatchDesignRuleCheck | bool | |
| SelectedObjects_Add | void | |
| SelectedObjects_BeginUpdate | void | |
| SelectedObjects_Clear | void | |
| SelectedObjects_EndUpdate | void | |
| SelectedObjectsCount | int | |
| SelectNewViewConfiguration | bool | |
| SetState_DocumentHasChanged | void | 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. |
| SetState_SaveCurrentStatusOfObjectsInBoard | void | Has no effect. |
| SetState_ViewManager_FilterChanging | void | Tells the board's views that the object filter is changing. |
| ShowHoleSymbols | void | |
| ShowPCBObject | void | This method makes this hidden PCB object visible on the PCB document. |
| SignalLayerIterator | IPCB_LayerObjectIterator | |
| SpatialIterator_Create | IPCB_SpatialIterator | This method creates a spatial iterator which conducts a search within defined boundary on a PCB document. |
| SpatialIterator_Destroy | void | This method destroys the spatial iterator object after it has finished conducting a search within a defined boundary on the PCB document. |
| UnlinkFromTemplate | void | |
| Update_PCBGraphicalView | void | Updates the board's view. |
| UpdateBoardOutline | void | 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… |
| UpdateCachedVCSRevisionNumberSpecialStrings | void | |
| ValidateInvalidPlanes | void | |
| ValidateScopeTester | void | |
| ViewManager_FullUpdate | void | This method invokes a full update of all panels that are associated with the current PCB document. |
| ViewManager_GraphicallyInvalidatePrimitive | void | This method forces a repaint of the targeted design object (PCBObject parameter) on the PCB document. |
| ViewManager_UpdateLayerTabs | void | Refreshes the layer tabs of the board's view. |
| VisibleLayers | IPCB_LayerSet | |
| WindowBoundingRectangle | CoordRect | This 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);
| Parameter | Type | Passing |
|---|---|---|
argLowLayer | V7_LayerBase | value |
argHighLayer | V7_LayerBase | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argMeshString | string | value |
Returns: int
AddObjectToHighlightObjectList
Adds a primitive to the board's list of objects to highlight.
void AddObjectToHighlightObjectList(IPCB_Primitive argiPrimitive);
void AddObjectToHighlightObjectList(object argiPrimitive);
| Parameter | Type | Passing |
|---|---|---|
argiPrimitive | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPCBObject | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argShape | IPCB_Contour | value |
argz | int | value |
argColor | uint | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argNet | IPCB_Net | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argIterator | IPCB_BoardIterator | ref |
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);
| Parameter | Type | Passing |
|---|---|---|
argx1 | int | ref |
argy1 | int | ref |
argPrompt | string | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrompt1 | string | value |
argPrompt2 | string | value |
argx1 | int | ref |
argy1 | int | ref |
argx2 | int | ref |
argy2 | int | ref |
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);
| Parameter | Type | Passing |
|---|---|---|
argObjectClass | IPCB_ObjectClass | value |
argName | string | value |
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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argNet | IPCB_Net | value | The 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);
| Parameter | Type | Passing |
|---|---|---|
argObjectId | TObjectId | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argID | int | value |
Returns: bool
DifferentialPairNameIsUnique
No description yet.
bool DifferentialPairNameIsUnique(IPCB_DifferentialPair argDifferentialPair, string argName);
bool DifferentialPairNameIsUnique(object argDifferentialPair, string argName);
| Parameter | Type | Passing |
|---|---|---|
argDifferentialPair | IPCB_DifferentialPair | value |
argName | string | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argSource | IPCB_Primitive | value |
argDestination | IPCB_Primitive | value |
argMessageID | ushort | value |
argMessageData | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argenable | bool | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrimitive | IPCB_Primitive | value |
argRuleKind | TRuleKind | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrimitive1 | IPCB_Primitive | value |
argPrimitive2 | IPCB_Primitive | value |
argRuleKind | TRuleKind | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrimitive | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrimitive | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argObjectSet | TObjectSet | value |
argction | TEditingAction | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argx | int | value |
argy | int | value |
argMeshID | int | ref |
argPatchIndex0 | int | ref |
argPatchIndex1 | int | ref |
argPatchIndex2 | int | ref |
argIntersectionX | int | ref |
argIntersectionY | int | ref |
argIntersectionZ | int | ref |
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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argObjectSet | TObjectSet | value | The object types that can be returned. |
argLayerSet | TV6_LayerSet | value | The layers whose objects can be returned. |
argStatusBarText | string | value | The 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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argHitX | int | value | The X coordinate, in internal units (10,000 per mil). |
argHitY | int | value | The Y coordinate, in internal units (10,000 per mil). |
argObjectSet | TObjectSet | value | The object types that can be returned. |
argLayerSet | TV6_LayerSet | value | The layers whose objects can be returned. |
argction | TEditingAction | value | What 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);
| Parameter | Type | Passing |
|---|---|---|
argValue | string | value |
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);
| Parameter | Type | Passing | Description |
|---|---|---|---|
argObjSet | TObjectSet | value | The object kinds to look for. |
argLayerSet | TV6_LayerSet | value | The layers to look in. |
argMethod | TIterationMethod | value | How 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);
| Parameter | Type | Passing |
|---|---|---|
argConfigType | string | out |
argConfig | string | out |
Returns: bool
GetState_ZTopBottom
No description yet.
void GetState_ZTopBottom(out float argZTop, out float argZBottom);
| Parameter | Type | Passing |
|---|---|---|
argZTop | float | out |
argZBottom | float | out |
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);
| Parameter | Type | Passing |
|---|---|---|
argx1 | int | value |
argy1 | int | value |
argx2 | int | value |
argy2 | int | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPCBObject | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argL | TV6_Layer | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPCBObject | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argValue | int | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argL | V7_LayerBase | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argLayerSet | TV6_LayerSet | value |
argLayerObj | IPCB_LayerObject | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrimitive | IPCB_Primitive | value |
argTemplate | IPCB_PadViaTemplate | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argMeshFile | string | value |
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;).
Navigate_RedrawChangedObjectsInBoard
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);
| Parameter | Type | Passing |
|---|---|---|
argNet | IPCB_Net | value |
argName | string | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrimitive1 | IPCB_Primitive | value |
argPrimitive2 | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argDefiningLayer | V7_LayerBase | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argFullRebuild | bool | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argDC | UIntPtr | value |
argPrintKind | int | value |
argPrintWhat | int | value |
argLayers | TV6_LayerSet | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPCBObject | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argRunReport | bool | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argRule | IPCB_Rule | value |
argName | string | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argReportFilename | string | value |
argDRCReportFormat | TDRCReportFileFormat | value |
argDisplayReportFile | bool | value |
argPublishToWeb | bool | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argP | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argCurConfigType | string | value |
argCurConfig | string | value |
argConfigType | string | out |
argConfig | string | out |
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);
| Parameter | Type | Passing |
|---|---|---|
argSymbolType | int | value |
argSymbolSize | int | value |
argLayerPairIndex | int | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPCBObject | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argIterator | IPCB_SpatialIterator | ref |
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);
| Parameter | Type | Passing |
|---|---|---|
argPrimitive | IPCB_Primitive | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argForceRebuild | bool | value |
argRedrawView | bool | value |
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);
| Parameter | Type | Passing |
|---|---|---|
argPCBObject | IPCB_Primitive | value |
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
- From IPCB_Primitive: AllowGlobalEdit, BeginModify, Board, BoundingRectangle, BoundingRectangleChildren, BoundingRectangleForPainting, BoundingRectangleForSelection, CancelModify, Component, Coordinate, DescriptorString, DetailString, Dimension, DrawAsPreview, DRCError, Enabled, Enabled_Direct, Enabled_vComponent, Enabled_vCoordinate, Enabled_vDimension, Enabled_vNet, Enabled_vPolygon, EnableDraw, EndModify, Export_ToParameters, FlipXY, GraphicallyInvalidate, Handle, Identifier, InBoard, InComponent, InCoordinate, Index, InDimension, InNet, InPolygon, InSelectionMemory, IsAssyTestPoint_Bottom, IsAssyTestPoint_Top, IsElectricalPrim, IsFreePrimitive, IsHidden, IsKeepout, IsPreRoute, IsSaveable, IsTenting, IsTenting_Bottom, IsTenting_Top, IsTestPoint_Bottom, IsTestPoint_Top, Layer, MiscFlag1, MiscFlag2, MiscFlag3, Moveable, MoveByXY, MoveToXY, Net, ObjectID, ObjectIDString, PadCacheRobotFlag, PasteMaskExpansion, Polygon, PolygonOutline, PowerPlaneClearance, PowerPlaneConnectStyle, PowerPlaneReliefExpansion, Preview, ReliefAirGap, ReliefConductorWidth, ReliefEntries, Replicate, RequiredParamterSpace, RotateBy, Selected, SolderMaskExpansion, SwapLayerPairs, TearDrop, UnionIndex, UniqueId, UniqueID, Used, UserRouted, V7Layer, ViewableObjectID
Returned by
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.