Skip to main content
View as Markdown

IPCB_PrimitiveComparator interface

Compares the objects of two boards, or of two groups such as two footprints, layer by layer.

public interface IPCB_PrimitiveComparator

Namespace: PCB · Assembly: Altium.SDK.Interfaces

Remarks​

Get it with IPCB_ServerInterface.PrimitiveComparator. Both methods switch on the display of difference objects in the PCB editor.

Methods​

MethodReturnsDescription
CompareboolCompares two boards layer by layer and returns true when no differences are found.
CompareGroupIPCB_GroupComparisionResultCompares two groups, such as two footprints, layer by layer and returns the result.

Compare​

Compares two boards layer by layer and returns true when no differences are found.

bool Compare(IPCB_Board argBoardA, IPCB_Board argBoardB, double argTolerance);
bool Compare(object argBoardA, object argBoardB, double argTolerance);
ParameterTypePassingDescription
argBoardAIPCB_BoardvalueThe first board.
argBoardBIPCB_BoardvalueThe second board.
argTolerancedoublevalueThe smallest area of difference that counts, in square internal units: a connected area without holes that is covered on one board and not on the other is ignored when its area is smaller than this value. One square mil is 100,000,000.

Returns: bool

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

The layers of argBoardA, except the multi-layer, are compared with the same layers of argBoardB. Progress is shown while the comparison runs; pressing Esc cancels it and raises an exception.

CompareGroup​

Compares two groups, such as two footprints, layer by layer and returns the result.

IPCB_GroupComparisionResult CompareGroup(IPCB_Group argGroupA, IPCB_Group argGroupB, ref IPCB_LayerSet argLayers, object argPCBViewA, int argNumberOfCells, bool argBShowStatus, string argGroupADescription, string argGroupBDescription);
ParameterTypePassingDescription
argGroupAIPCB_GroupvalueThe first group.
argGroupBIPCB_GroupvalueThe second group.
argLayersIPCB_LayerSetrefThe layers to compare, or null for all layers that apply. On return it holds the layers that were compared.
argPCBViewAobjectvalueThe PCB editor view in which the differences are shown. It can be null only when argBShowStatus is false; then no differences are drawn.
argNumberOfCellsintvalueThe number of cells into which the longer side of the compared area is divided. Ignored when argPCBViewA is null.
argBShowStatusboolvalueTrue to show the progress of the comparison.
argGroupADescriptionstringvalueA label for the first group, put in front of the descriptions of its differences (IPCB_GroupComparisionResult.GetPrimitiveDescriptorForLayer).
argGroupBDescriptionstringvalueA label for the second group, put in front of the descriptions of its differences (IPCB_GroupComparisionResult.GetPrimitiveDescriptorForLayer).

Returns: IPCB_GroupComparisionResult

Extension method of IPCB_PrimitiveComparatorHelper (using PCB;).

Footprint parameters are compared as well. The layers compared are the layers that the two groups use, the pad and via hole layers, the top and bottom paste and solder mask layers and the multi-layer, limited to the layers in argLayers.

Returned by​

IPCB_ServerInterface.PrimitiveComparator