Updates
Developed examples:
Use of new IPCB_LayerStack inteface to show available layers:
{----- for reference ------
TLayerClassID:
eLayerClass_All
eLayerClass_Mechanical
eLayerClass_Physical
eLayerClass_Electrical
eLayerClass_Dielectric
eLayerClass_Signal
eLayerClass_InternalPlane
eLayerClass_SolderMask
eLayerClass_Overlay
eLayerClass_PasteMask
---------------------------}
Procedure LayerInfo;
Var
Board : IPCB_Board;
Stack : IPCB_LayerStack;
LyrObj : IPCB_LayerObject;
LyrClass : string;
Begin
// layer class type nominated (see TLayerClassID list above).
LyrClass : = eLayerClass_Signal;
Board := PCBServer.GetCurrentPCBBoard;
Stack := Board.LayerStack;
// get first layer of the class type.
LyrObj := Stack.First(LyrClass);
// exit if layer type is not available in stack
If LyrObj = Nil then Exit;
// iterate through layers and display each layer name
Repeat
ShowMessage(LyrObj.Name);
LyrObj := Stack.Next(LyrClass, LyrObj);
Until LyrObj = Nil;
End;
Use of IPCB_MasterLayerStack interface to show Sub Stack infomation:
Procedure SubStackInfo;
Var
Board : IPCB_Board;
masterStack : IPCB_MasterLayerStack;
subStack : IPCB_LayerStack;
Begin
Board := PCBServer.GetCurrentPCBBoard;
masterStack := Board.MasterLayerStack;
subStack := masterStack.Substacks[0]; // nominate first substack: 0
ShowInfo('Number of sub stacks: ' + OleStrToString(masterStack.SubstackCount));
ShowInfo('Layers in first sub stack: ' + OleStrToString(subStack.Count));
ShowInfo('Is a flex layer: ' + OleStrToString(subStack.IsFlex));
// if available, select second substack: 1
if masterStack.SubstackCount > 1 then
begin
subStack := masterStack.Substacks[1];
ShowInfo('Layers in second sub stack: ' + OleStrToString(subStack.Count));
ShowInfo('Is a flex layer: ' + OleStrToString(subStack.IsFlex));
end
else Exit;
End;
IPCB_MechanicalLayer interface used to display enabled mechanical layers:
Procedure MechLayerInfo;
Var
Board : IPCB_Board;
Stack : IPCB_LayerStack;
mLyrObj : IPCB_MechanicalLayer;
Lyr : TLayer;
Begin
Board := PCBServer.GetCurrentPCBBoard;
Stack := Board.LayerStack;
for Lyr := eMechanical1 to eMechanical16 do
begin
mLyrObj := Stack.LayerObject[Lyr];
If mLyrObj.MechanicalLayerEnabled then ShowInfo(mLyrObj.Name);
end;
End;
IPCB_LayerStack
IPCB_LayerStackBase
*
IPCB_LayerStack *
IPCB_LayerStack_V7
IPCB_LayerStack - Deprecated |
IPCB_LayerStack_V7 |
IPCB_LayerStack (inherits from IPCB_LayerStackBase) |
|
|
|
|
|
|
IPCB_LayerObject
Inheritance
IPCB_LayerObject
*
IPCB_PhysicalLayer
IPCB_ElectricalLayer
IPCB_LayerObject_V7 *
IPCB_LayerObject - Deprecated |
IPCB_LayerObject_V7 (inherits from -->> ) |
IPCB_LayerObject |
Methods |
|
|
|
|
Properties |
IPCB_InternalPlane
Inheritance
IPCB_LayerObject
IPCB_PhysicalLayer
IPCB_ElectricalLayer
IPCB_LayerObject_V7
IPCB_InternalPlane *
IPCB_InternalPlane_V7 *
IPCB_InternalPlane - Deprecated |
IPCB_InternalPlane_V7 |
IPCB_InternalPlane |
Methods |
see -> | Methods |
Properties - GetState_LayerStack; - GetState_LayerID; |
see -> |
|
IPCB_LayerSet & IPCB_LayerStackBase
- introduced interfaces.
Inheritance
IPCB_LayerStackBase
IPCB_MasterLayerStack *
IPCB_LayerStack *
IPCB_LayerSet |
IPCB_LayerStackBase |
IPCB_MasterLayerStack |
|
Methods/Functions |
Methods/Functions
|
|
Properties
|
IPCB_LayerSet
IPCB_LayerStackBase
IPCB_MasterLayerStack
IPCB_LayerSetUtils
IPCB_LayerUtils
IPCB_LayerIterator
IPCB_LayerListIterator
IPCB_LayerObjectIterator
IPCB_PhysicalLayer - Note: = IPCB_LayerObject
IPCB_SolderMaskLayer - Note: = IPCB_DielectricLayer
IPCB_OverlayLayer - Note: = IPCB_PhysicalLayer
IPCB_PasteMaskLayer - Note: = IPCB_PhysicalLayer
IPCB_ElectricalLayer
IPCB_SignalLayer
IPCB_InternalPlane_V7 - Note: = IPCB_InternalPlane
IPCB_DielectricObject - Note: now = IPCB_DielectricLayer
IPCB_SplitPlane - from IPCB_Group
IPCB_SplitPlaneRegion - from IPCB_Region
IPCB_ObjectClass
IPCB_ObjectClass2
IPCB_ObjectClassBase
IPCB_ObjectClass1
Note:
- If Scripting system
TLayer = Integer;
Else
TLayer = TV7_Layer;
End
Constant definitions:
- If Scripting system
eNoLayer = eV6_NoLayer;
...
eTopLayer = eV6_TopLayer;
etc
Else
eNoLayer = eV7_NoLayer;
...
eTopLayer = eV7_TopLayer;
etc
End
Note: 'Else' indicates SDK
Type: TLayerClassID
TLayerClassID = (eLayerClass_All, eLayerClass_Mechanical, eLayerClass_Physical, eLayerClass_Electrical, eLayerClass_Dielectric, eLayerClass_Signal, eLayerClass_InternalPlane, eLayerClass_SolderMask, eLayerClass_Overlay, eLayerClass_PasteMask);
Type: TV6_Layer
- (equiv TLayer; Enum Type)
TV6_Layer = ( eV6_NoLayer, eV6_TopLayer, eV6_MidLayer1, eV6_MidLayer2, eV6_MidLayer3, eV6_MidLayer4, eV6_MidLayer5, eV6_MidLayer6, eV6_MidLayer7, eV6_MidLayer8, eV6_MidLayer9, eV6_MidLayer10, eV6_MidLayer11, eV6_MidLayer12, eV6_MidLayer13, eV6_MidLayer14, eV6_MidLayer15, eV6_MidLayer16, eV6_MidLayer17, eV6_MidLayer18, eV6_MidLayer19, eV6_MidLayer20, eV6_MidLayer21, eV6_MidLayer22, eV6_MidLayer23, eV6_MidLayer24, eV6_MidLayer25, eV6_MidLayer26, eV6_MidLayer27, eV6_MidLayer28, eV6_MidLayer29, eV6_MidLayer30, eV6_BottomLayer, eV6_TopOverlay, eV6_BottomOverlay, eV6_TopPaste, eV6_BottomPaste, eV6_TopSolder, eV6_BottomSolder, eV6_InternalPlane1, eV6_InternalPlane2, eV6_InternalPlane3, eV6_InternalPlane4, eV6_InternalPlane5, eV6_InternalPlane6, eV6_InternalPlane7, eV6_InternalPlane8, eV6_InternalPlane9, eV6_InternalPlane10, eV6_InternalPlane11, eV6_InternalPlane12, eV6_InternalPlane13, eV6_InternalPlane14, eV6_InternalPlane15, eV6_InternalPlane16, eV6_DrillGuide, eV6_KeepOutLayer, eV6_Mechanical1, eV6_Mechanical2, eV6_Mechanical3, eV6_Mechanical4, eV6_Mechanical5, eV6_Mechanical6, eV6_Mechanical7, eV6_Mechanical8, eV6_Mechanical9, eV6_Mechanical10, eV6_Mechanical11, eV6_Mechanical12, eV6_Mechanical13, eV6_Mechanical14, eV6_Mechanical15, eV6_Mechanical16, eV6_DrillDrawing, eV6_MultiLayer, eV6_ConnectLayer, eV6_BackGroundLayer, eV6_DRCErrorLayer, eV6_HighlightLayer, eV6_GridColor1, eV6_GridColor10, eV6_PadHoleLayer, eV6_ViaHoleLayer );
Enum Type: TV6_PlotLayer
- (equiv TPlotLayer)
TV6_PlotLayer = ( eV6_NullPlot, eV6_TopLayerPlot, eV6_MidLayer1Plot, eV6_MidLayer2Plot, eV6_MidLayer3Plot, eV6_MidLayer4Plot, eV6_MidLayer5Plot, eV6_MidLayer6Plot, eV6_MidLayer7Plot, eV6_MidLayer8Plot, eV6_MidLayer9Plot, eV6_MidLayer10Plot, eV6_MidLayer11Plot, eV6_MidLayer12Plot, eV6_MidLayer13Plot, eV6_MidLayer14Plot, eV6_MidLayer15Plot, eV6_MidLayer16Plot, eV6_MidLayer17Plot, eV6_MidLayer18Plot, eV6_MidLayer19Plot, eV6_MidLayer20Plot, eV6_MidLayer21Plot, eV6_MidLayer22Plot, eV6_MidLayer23Plot, eV6_MidLayer24Plot, eV6_MidLayer25Plot, eV6_MidLayer26Plot, eV6_MidLayer27Plot, eV6_MidLayer28Plot, eV6_MidLayer29Plot, eV6_MidLayer30Plot, eV6_BottomLayerPlot, eV6_TopOverlayPlot, eV6_BottomOverlayPlot, eV6_TopPastePlot, eV6_BottomPastePlot, eV6_TopSolderPlot, eV6_BottomSolderPlot, eV6_InternalPlane1Plot, eV6_InternalPlane2Plot, eV6_InternalPlane3Plot, eV6_InternalPlane4Plot, eV6_InternalPlane5Plot, eV6_InternalPlane6Plot, eV6_InternalPlane7Plot, eV6_InternalPlane8Plot, eV6_InternalPlane9Plot, eV6_InternalPlane10Plot, eV6_InternalPlane11Plot, eV6_InternalPlane12Plot, eV6_InternalPlane13Plot, eV6_InternalPlane14Plot, eV6_InternalPlane15Plot, eV6_InternalPlane16Plot, eV6_DrillGuide_Top_BottomPlot, eV6_DrillGuide_Top_Mid1Plot, eV6_DrillGuide_Mid2_Mid3Plot, eV6_DrillGuide_Mid4_Mid5Plot, eV6_DrillGuide_Mid6_Mid7Plot, eV6_DrillGuide_Mid8_Mid9Plot, eV6_DrillGuide_Mid10_Mid11Plot, eV6_DrillGuide_Mid12_Mid13Plot, eV6_DrillGuide_Mid14_Mid15Plot, eV6_DrillGuide_Mid16_Mid17Plot, eV6_DrillGuide_Mid18_Mid19Plot, eV6_DrillGuide_Mid20_Mid21Plot, eV6_DrillGuide_Mid22_Mid23Plot, eV6_DrillGuide_Mid24_Mid25Plot, eV6_DrillGuide_Mid26_Mid27Plot, eV6_DrillGuide_Mid28_Mid29Plot, eV6_DrillGuide_Mid30_BottomPlot, eV6_DrillGuide_SpecialPlot, eV6_KeepOutLayerPlot, eV6_Mechanical1Plot, eV6_Mechanical2Plot, eV6_Mechanical3Plot, eV6_Mechanical4Plot, eV6_Mechanical5Plot, eV6_Mechanical6Plot, eV6_Mechanical7Plot, eV6_Mechanical8Plot, eV6_Mechanical9Plot, eV6_Mechanical10Plot, eV6_Mechanical11Plot, eV6_Mechanical12Plot, eV6_Mechanical13Plot, eV6_Mechanical14Plot, eV6_Mechanical15Plot, eV6_Mechanical16Plot, eV6_DrillDrawing_Top_BottomPlot, eV6_DrillDrawing_Top_Mid1Plot, eV6_DrillDrawing_Mid2_Mid3Plot, eV6_DrillDrawing_Mid4_Mid5Plot, eV6_DrillDrawing_Mid6_Mid7Plot, eV6_DrillDrawing_Mid8_Mid9Plot, eV6_DrillDrawing_Mid10_Mid11Plot, eV6_DrillDrawing_Mid12_Mid13Plot, eV6_DrillDrawing_Mid14_Mid15Plot, eV6_DrillDrawing_Mid16_Mid17Plot, eV6_DrillDrawing_Mid18_Mid19Plot, eV6_DrillDrawing_Mid20_Mid21Plot, eV6_DrillDrawing_Mid22_Mid23Plot, eV6_DrillDrawing_Mid24_Mid25Plot, eV6_DrillDrawing_Mid26_Mid27Plot, eV6_DrillDrawing_Mid28_Mid29Plot, eV6_DrillDrawing_Mid30_BottomPlot, eV6_DrillDrawing_SpecialPlot, eV6_TopPadMasterPlot, eV6_BottomPadMasterPlot );
Constant: cLayerStrings
- as before
cLayerStrings : Array[TV6_Layer] Of TDynamicString = ( 'NoLayer', 'TopLayer', 'MidLayer1', 'MidLayer2', 'MidLayer3', 'MidLayer4', 'MidLayer5', 'MidLayer6', 'MidLayer7', 'MidLayer8', 'MidLayer9', 'MidLayer10', 'MidLayer11', 'MidLayer12', 'MidLayer13', 'MidLayer14', 'MidLayer15', 'MidLayer16', 'MidLayer17', 'MidLayer18', 'MidLayer19', 'MidLayer20', 'MidLayer21', 'MidLayer22', 'MidLayer23', 'MidLayer24', 'MidLayer25', 'MidLayer26', 'MidLayer27', 'MidLayer28', 'MidLayer29', 'MidLayer30', 'BottomLayer', 'TopOverlay', 'BottomOverlay', 'TopPaste', 'BottomPaste', 'TopSolder', 'BottomSolder', 'InternalPlane1', 'InternalPlane2', 'InternalPlane3', 'InternalPlane4', 'InternalPlane5', 'InternalPlane6', 'InternalPlane7', 'InternalPlane8', 'InternalPlane9', 'InternalPlane10', 'InternalPlane11', 'InternalPlane12', 'InternalPlane13', 'InternalPlane14', 'InternalPlane15', 'InternalPlane16', 'DrillGuide', 'KeepOutLayer', 'Mechanical1', 'Mechanical2', 'Mechanical3', 'Mechanical4', 'Mechanical5', 'Mechanical6', 'Mechanical7', 'Mechanical8', 'Mechanical9', 'Mechanical10', 'Mechanical11', 'Mechanical12', 'Mechanical13', 'Mechanical14', 'Mechanical15', 'Mechanical16', 'DrillDrawing', 'MultiLayer', 'ConnectLayer', 'BackGroundLayer', 'DRCErrorLayer', 'HighlightLayer', 'GridColor1', 'GridColor10', 'PadHoleLayer', 'ViaHoleLayer' );
Constant (V7_Layer): TLayerConstant
TLayerConstant = ( cNoLayer, cIgnoreLayer, cTopLayer, cMidLayer1, cMidLayer2, cMidLayer3, cMidLayer4, cMidLayer5, cMidLayer6, cMidLayer7, cMidLayer8, cMidLayer9, cMidLayer10, cMidLayer11, cMidLayer12, cMidLayer13, cMidLayer14, cMidLayer15, cMidLayer16, cMidLayer17, cMidLayer18, cMidLayer19, cMidLayer20, cMidLayer21, cMidLayer22, cMidLayer23, cMidLayer24, cMidLayer25, cMidLayer26, cMidLayer27, cMidLayer28, cMidLayer29, cMidLayer30, cBottomLayer, cTopOverlay, cBottomOverlay, cTopPaste, cBottomPaste, cTopSolder, cBottomSolder, cInternalPlane1, cInternalPlane2, cInternalPlane3, cInternalPlane4, cInternalPlane5, cInternalPlane6, cInternalPlane7, cInternalPlane8, cInternalPlane9, cInternalPlane10, cInternalPlane11, cInternalPlane12, cInternalPlane13, cInternalPlane14, cInternalPlane15, cInternalPlane16, cDrillGuide, cKeepOutLayer, cMechanical1, cMechanical2, cMechanical3, cMechanical4, cMechanical5, cMechanical6, cMechanical7, cMechanical8, cMechanical9, cMechanical10, cMechanical11, cMechanical12, cMechanical13, cMechanical14, cMechanical15, cMechanical16, cDrillDrawing, cMultiLayer, cConnectLayer, cBackGroundLayer, cDRCErrorLayer, cDRCDetailLayer, cHighlightLayer, cGridColor1, cGridColor10, cPadHoleLayer, cViaHoleLayer, cTopPadMasterPlot, cBottomPadMasterPlot, cV7_MidLayers, cAllLayers, cSignalLayers, cInternalPlaneLayers, cElectricalLayers, cMechanicalLayers, cDielectricLayers );