@windypro-rourou/dsh-eda 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/lib/capabilities.js +3 -2
- package/lib/client.js +576 -452
- package/lib/index.js +89 -2
- package/package.json +10 -1
- package/skill/INDEX.md +10 -8
- package/skill/README.md +125 -0
- package/skill/README.zh-Hans.md +125 -0
- package/skill/SKILL.md +746 -746
- package/skill/format/index.md +152 -152
- package/skill/format/pcb/3d.md +166 -166
- package/skill/format/pcb/attr.md +63 -63
- package/skill/format/pcb/common.md +306 -306
- package/skill/format/pcb/component.md +132 -132
- package/skill/format/pcb/dimension.md +58 -58
- package/skill/format/pcb/index.md +17 -17
- package/skill/format/pcb/obj.md +43 -43
- package/skill/format/pcb/pad_via.md +151 -151
- package/skill/format/pcb/panel.md +64 -64
- package/skill/format/pcb/partition.md +43 -43
- package/skill/format/pcb/primitive.md +196 -196
- package/skill/format/pcb/rule.md +71 -71
- package/skill/format/pcb/shape.md +441 -441
- package/skill/format/pcb/text.md +62 -62
- package/skill/format/project/blob.md +30 -30
- package/skill/format/project/common.md +42 -42
- package/skill/format/project/group.md +62 -62
- package/skill/format/project/index.md +12 -12
- package/skill/format/project/instance.md +32 -32
- package/skill/format/project/meta.md +189 -189
- package/skill/format/project/variant.md +30 -30
- package/skill/format/schematic/attr.md +41 -41
- package/skill/format/schematic/common.md +47 -47
- package/skill/format/schematic/component.md +91 -91
- package/skill/format/schematic/index.md +14 -14
- package/skill/format/schematic/obj.md +41 -41
- package/skill/format/schematic/pin.md +59 -59
- package/skill/format/schematic/shape.md +231 -231
- package/skill/format/schematic/structure.md +53 -53
- package/skill/format/schematic/table.md +109 -109
- package/skill/format/schematic/text.md +47 -47
- package/skill/format/schematic/wire.md +132 -132
- package/skill/guide/ancillary-projects/easyeda-api-sdk.md +1 -0
- package/skill/guide/ancillary-projects/pro-api-types.md +5 -5
- package/skill/guide/ancillary-projects.md +10 -10
- package/skill/guide/cli.md +1510 -0
- package/skill/guide/error-handling.md +38 -38
- package/skill/guide/extension-json.md +135 -135
- package/skill/guide/extensions-marketplace.md +61 -61
- package/skill/guide/how-to-start.md +316 -301
- package/skill/guide/i18n.md +57 -57
- package/skill/guide/index.md +7 -7
- package/skill/guide/inline-frame.md +20 -20
- package/skill/guide/invoke-apis.md +81 -81
- package/skill/guide/stability.md +37 -37
- package/skill/references/_index.md +471 -398
- package/skill/references/_quick-reference.md +3103 -3028
- package/skill/references/classes/DMT_Board.md +537 -533
- package/skill/references/classes/DMT_EditorControl.md +1736 -1736
- package/skill/references/classes/DMT_Event.md +356 -356
- package/skill/references/classes/DMT_Folder.md +775 -775
- package/skill/references/classes/DMT_Panel.md +531 -531
- package/skill/references/classes/DMT_Pcb.md +579 -575
- package/skill/references/classes/DMT_Project.md +734 -573
- package/skill/references/classes/DMT_Schematic.md +1482 -1477
- package/skill/references/classes/DMT_SelectControl.md +96 -96
- package/skill/references/classes/DMT_Team.md +172 -172
- package/skill/references/classes/DMT_Workspace.md +198 -198
- package/skill/references/classes/EDA.md +1001 -961
- package/skill/references/classes/IPCB_ComplexPolygon.md +299 -299
- package/skill/references/classes/IPCB_Polygon.md +175 -175
- package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -1901
- package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -2993
- package/skill/references/classes/IPCB_PrimitiveComponent.md +2624 -2627
- package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -410
- package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -1419
- package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -1325
- package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -1461
- package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -1639
- package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -1700
- package/skill/references/classes/IPCB_PrimitivePad.md +3155 -3155
- package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -1193
- package/skill/references/classes/IPCB_PrimitivePour.md +1858 -1858
- package/skill/references/classes/IPCB_PrimitivePoured.md +556 -556
- package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -1332
- package/skill/references/classes/IPCB_PrimitiveString.md +2315 -2315
- package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -1588
- package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -1676
- package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -2541
- package/skill/references/classes/ISCH_PrimitiveBus.md +973 -973
- package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -260
- package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -1392
- package/skill/references/classes/ISCH_PrimitiveComponent.md +2910 -2913
- package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -155
- package/skill/references/classes/ISCH_PrimitiveObject.md +960 -960
- package/skill/references/classes/ISCH_PrimitivePin.md +2402 -2402
- package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -1028
- package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -1777
- package/skill/references/classes/ISCH_PrimitiveText.md +1771 -1771
- package/skill/references/classes/ISCH_PrimitiveWire.md +973 -973
- package/skill/references/classes/LIB_3DModel.md +782 -780
- package/skill/references/classes/LIB_Cbb.md +957 -957
- package/skill/references/classes/LIB_Classification.md +969 -965
- package/skill/references/classes/LIB_Device.md +1222 -1221
- package/skill/references/classes/LIB_Footprint.md +1298 -1153
- package/skill/references/classes/LIB_LibrariesList.md +361 -329
- package/skill/references/classes/LIB_PanelLibrary.md +855 -855
- package/skill/references/classes/LIB_SelectControl.md +89 -89
- package/skill/references/classes/LIB_SimulationModel.md +807 -821
- package/skill/references/classes/LIB_Symbol.md +1341 -1195
- package/skill/references/classes/PCB_Document.md +1770 -1754
- package/skill/references/classes/PCB_Drc.md +3379 -3375
- package/skill/references/classes/PCB_Event.md +1166 -1081
- package/skill/references/classes/PCB_ImageTool.md +363 -0
- package/skill/references/classes/PCB_Layer.md +1915 -1911
- package/skill/references/classes/PCB_ManufactureData.md +2968 -2968
- package/skill/references/classes/PCB_MathPolygon.md +916 -785
- package/skill/references/classes/PCB_Net.md +1128 -1128
- package/skill/references/classes/PCB_Primitive.md +217 -217
- package/skill/references/classes/PCB_PrimitiveArc.md +820 -894
- package/skill/references/classes/PCB_PrimitiveAttribute.md +635 -717
- package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -1050
- package/skill/references/classes/PCB_PrimitiveDimension.md +789 -833
- package/skill/references/classes/PCB_PrimitiveFill.md +783 -861
- package/skill/references/classes/PCB_PrimitiveImage.md +803 -875
- package/skill/references/classes/PCB_PrimitiveLine.md +787 -858
- package/skill/references/classes/PCB_PrimitiveObject.md +796 -800
- package/skill/references/classes/PCB_PrimitivePad.md +947 -944
- package/skill/references/classes/PCB_PrimitivePolyline.md +744 -819
- package/skill/references/classes/PCB_PrimitivePour.md +808 -845
- package/skill/references/classes/PCB_PrimitivePoured.md +363 -363
- package/skill/references/classes/PCB_PrimitiveRegion.md +765 -799
- package/skill/references/classes/PCB_PrimitiveString.md +828 -910
- package/skill/references/classes/PCB_PrimitiveVia.md +761 -765
- package/skill/references/classes/PCB_RayTracerEngine.md +603 -263
- package/skill/references/classes/PCB_SelectControl.md +495 -495
- package/skill/references/classes/PCB_Tool.md +9 -0
- package/skill/references/classes/PNL_Document.md +83 -83
- package/skill/references/classes/SCH_Document.md +797 -809
- package/skill/references/classes/SCH_Drc.md +246 -242
- package/skill/references/classes/SCH_Event.md +583 -583
- package/skill/references/classes/SCH_ManufactureData.md +1209 -1205
- package/skill/references/classes/SCH_Net.md +200 -200
- package/skill/references/classes/SCH_Netlist.md +191 -191
- package/skill/references/classes/SCH_Primitive.md +337 -337
- package/skill/references/classes/SCH_PrimitiveArc.md +686 -692
- package/skill/references/classes/SCH_PrimitiveAttribute.md +579 -590
- package/skill/references/classes/SCH_PrimitiveBus.md +618 -624
- package/skill/references/classes/SCH_PrimitiveCircle.md +667 -683
- package/skill/references/classes/SCH_PrimitiveComponent.md +2256 -2240
- package/skill/references/classes/SCH_PrimitiveObject.md +666 -666
- package/skill/references/classes/SCH_PrimitivePin.md +737 -754
- package/skill/references/classes/SCH_PrimitivePolygon.md +621 -627
- package/skill/references/classes/SCH_PrimitiveRectangle.md +715 -731
- package/skill/references/classes/SCH_PrimitiveText.md +736 -746
- package/skill/references/classes/SCH_PrimitiveWire.md +701 -703
- package/skill/references/classes/SCH_SelectControl.md +520 -520
- package/skill/references/classes/SCH_SimulationEngine.md +133 -133
- package/skill/references/classes/SCH_Utils.md +121 -121
- package/skill/references/classes/SYS_ClientUrl.md +173 -173
- package/skill/references/classes/SYS_Dialog.md +825 -825
- package/skill/references/classes/SYS_Environment.md +640 -502
- package/skill/references/classes/SYS_ExternalApi.md +246 -0
- package/skill/references/classes/SYS_FileManager.md +1664 -1686
- package/skill/references/classes/SYS_FileSystem.md +1366 -1171
- package/skill/references/classes/SYS_FontManager.md +224 -224
- package/skill/references/classes/SYS_FormatConversion.md +349 -349
- package/skill/references/classes/SYS_HeaderMenu.md +480 -479
- package/skill/references/classes/SYS_Help.md +141 -0
- package/skill/references/classes/SYS_I18n.md +861 -861
- package/skill/references/classes/SYS_IFrame.md +541 -535
- package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -246
- package/skill/references/classes/SYS_Log.md +422 -424
- package/skill/references/classes/SYS_Math.md +1565 -1565
- package/skill/references/classes/SYS_Message.md +363 -363
- package/skill/references/classes/SYS_MessageBox.md +285 -285
- package/skill/references/classes/SYS_MessageBus.md +1618 -1618
- package/skill/references/classes/SYS_PanelControl.md +696 -696
- package/skill/references/classes/SYS_RightClickMenu.md +175 -175
- package/skill/references/classes/SYS_Setting.md +134 -85
- package/skill/references/classes/SYS_ShortcutKey.md +623 -623
- package/skill/references/classes/SYS_Storage.md +484 -484
- package/skill/references/classes/SYS_Timer.md +447 -447
- package/skill/references/classes/SYS_ToastMessage.md +194 -194
- package/skill/references/classes/SYS_Tool.md +317 -241
- package/skill/references/classes/SYS_Unit.md +594 -594
- package/skill/references/classes/SYS_WebSocket.md +401 -401
- package/skill/references/classes/SYS_Window.md +849 -850
- package/skill/references/enums/EDMT_EditorDocumentType.md +324 -278
- package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +51 -47
- package/skill/references/enums/EDMT_EditorTabEventType.md +68 -62
- package/skill/references/enums/EDMT_IndicatorMarkerType.md +90 -80
- package/skill/references/enums/EDMT_ItemType.md +181 -157
- package/skill/references/enums/EDMT_ProjectCollaborationMode.md +51 -47
- package/skill/references/enums/EDMT_ProjectFileFormat.md +60 -0
- package/skill/references/enums/EDMT_ProjectReadyState.md +82 -0
- package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +51 -47
- package/skill/references/enums/ELIB_LibraryType.md +129 -113
- package/skill/references/enums/ELIB_PreviewType.md +77 -69
- package/skill/references/enums/ELIB_SimulationModelType.md +51 -47
- package/skill/references/enums/ELIB_SymbolType.md +142 -124
- package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +51 -47
- package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +51 -47
- package/skill/references/enums/EPCB_AutoRoutingOptimization.md +51 -47
- package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +51 -47
- package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +55 -51
- package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +64 -58
- package/skill/references/enums/EPCB_LayerColorConfiguration.md +90 -80
- package/skill/references/enums/EPCB_LayerId.md +1169 -881
- package/skill/references/enums/EPCB_LayerStatus.md +64 -58
- package/skill/references/enums/EPCB_LayerType.md +129 -113
- package/skill/references/enums/EPCB_MouseEventType.md +64 -58
- package/skill/references/enums/EPCB_NetEventType.md +64 -58
- package/skill/references/enums/EPCB_PcbPlateType.md +51 -47
- package/skill/references/enums/EPCB_PdfOutputMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +51 -47
- package/skill/references/enums/EPCB_PrimitiveDimensionType.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveEventType.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveFillMode.md +68 -62
- package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePadHoleType.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePadShapeType.md +90 -80
- package/skill/references/enums/EPCB_PrimitivePadType.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +107 -95
- package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +142 -124
- package/skill/references/enums/EPCB_PrimitiveType.md +233 -201
- package/skill/references/enums/EPCB_PrimitiveViaType.md +64 -58
- package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +116 -102
- package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +90 -80
- package/skill/references/enums/ESCH_ExportDocumentFileType.md +64 -58
- package/skill/references/enums/ESCH_MouseEventType.md +51 -47
- package/skill/references/enums/ESCH_PrimitiveComponentType.md +142 -124
- package/skill/references/enums/ESCH_PrimitiveEventType.md +77 -69
- package/skill/references/enums/ESCH_PrimitiveFillStyle.md +129 -113
- package/skill/references/enums/ESCH_PrimitiveLineType.md +77 -69
- package/skill/references/enums/ESCH_PrimitivePinShape.md +77 -69
- package/skill/references/enums/ESCH_PrimitivePinType.md +168 -146
- package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +142 -124
- package/skill/references/enums/ESCH_PrimitiveType.md +207 -179
- package/skill/references/enums/ESCH_SimulationNetlistType.md +38 -36
- package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +51 -47
- package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +77 -69
- package/skill/references/enums/ESYS_BottomPanelTab.md +94 -80
- package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +181 -157
- package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +55 -51
- package/skill/references/enums/ESYS_ImportProjectImportOption.md +64 -58
- package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +51 -47
- package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +55 -51
- package/skill/references/enums/ESYS_JobState.md +95 -0
- package/skill/references/enums/ESYS_LeftPanelTab.md +94 -80
- package/skill/references/enums/ESYS_LogType.md +77 -102
- package/skill/references/enums/ESYS_NetlistType.md +129 -113
- package/skill/references/enums/ESYS_PanelPosition.md +69 -0
- package/skill/references/enums/ESYS_PanelTab.md +368 -0
- package/skill/references/enums/ESYS_RightPanelTab.md +237 -201
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +220 -190
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +103 -91
- package/skill/references/enums/ESYS_StartPageQuickStartItem.md +237 -205
- package/skill/references/enums/ESYS_Theme.md +51 -47
- package/skill/references/enums/ESYS_ToastMessageType.md +90 -80
- package/skill/references/enums/ESYS_Unit.md +116 -102
- package/skill/references/enums/ESYS_WindowEventType.md +64 -47
- package/skill/references/enums/ESYS_WindowOpenTarget.md +51 -47
- package/skill/references/enums/NetportDeviceName.md +146 -146
- package/skill/references/enums/SchToolBarDeviceName.md +278 -278
- package/skill/references/interfaces/BoardProps.md +169 -169
- package/skill/references/interfaces/BorderConfig.md +109 -0
- package/skill/references/interfaces/ButtonProps.md +196 -169
- package/skill/references/interfaces/CellClickInfo.md +142 -0
- package/skill/references/interfaces/CellCoord.md +88 -0
- package/skill/references/interfaces/CheckBoxProps.md +223 -196
- package/skill/references/interfaces/CheckChangeDetail.md +88 -0
- package/skill/references/interfaces/CheckboxEditConfig.md +159 -0
- package/skill/references/interfaces/ClipboardCellData.md +142 -0
- package/skill/references/interfaces/ClipboardConfig.md +115 -0
- package/skill/references/interfaces/ColorPickerProps.md +169 -0
- package/skill/references/interfaces/ColumnDef.md +605 -0
- package/skill/references/interfaces/ColumnEditTrigger.md +57 -0
- package/skill/references/interfaces/ColumnGroupDef.md +192 -0
- package/skill/references/interfaces/ColumnResizeConfig.md +142 -0
- package/skill/references/interfaces/ComponentPropsMap.md +517 -448
- package/skill/references/interfaces/CustomHeaderConfig.md +169 -0
- package/skill/references/interfaces/DialogProps.md +385 -385
- package/skill/references/interfaces/DragSortConfig.md +115 -0
- package/skill/references/interfaces/EditingConfig.md +196 -0
- package/skill/references/interfaces/FilteringConfig.md +250 -0
- package/skill/references/interfaces/FixedColumnConfig.md +88 -0
- package/skill/references/interfaces/FlexItemProps.md +116 -116
- package/skill/references/interfaces/FlexProps.md +224 -224
- package/skill/references/interfaces/GridItemProps.md +143 -143
- package/skill/references/interfaces/GridProps.md +143 -143
- package/skill/references/interfaces/IDMT_BoardItem.md +171 -171
- package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -171
- package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -169
- package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -173
- package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -169
- package/skill/references/interfaces/IDMT_FolderItem.md +225 -225
- package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -393
- package/skill/references/interfaces/IDMT_PanelItem.md +144 -144
- package/skill/references/interfaces/IDMT_PcbItem.md +171 -171
- package/skill/references/interfaces/IDMT_ProjectItem.md +143 -143
- package/skill/references/interfaces/IDMT_SchematicItem.md +225 -225
- package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -198
- package/skill/references/interfaces/IDMT_TeamItem.md +144 -144
- package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -117
- package/skill/references/interfaces/IDesignPortal.md +103 -103
- package/skill/references/interfaces/ILIB_3DModelItem.md +198 -198
- package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_CbbItem.md +225 -225
- package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -150
- package/skill/references/interfaces/ILIB_ClassificationNode.md +98 -0
- package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -210
- package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -304
- package/skill/references/interfaces/ILIB_DeviceItem.md +279 -279
- package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -250
- package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -521
- package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -64
- package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +93 -99
- package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -150
- package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +143 -157
- package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -63
- package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -123
- package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -97
- package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -98
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -115
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -169
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -234
- package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +91 -105
- package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -96
- package/skill/references/interfaces/ILIB_FootprintItem.md +256 -198
- package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -61
- package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -92
- package/skill/references/interfaces/ILIB_LibraryItem.md +115 -115
- package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -198
- package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_RegisterExtendLibraryProps.md +71 -0
- package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -306
- package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -304
- package/skill/references/interfaces/ILIB_SymbolItem.md +306 -279
- package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -61
- package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -304
- package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -169
- package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -220
- package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -169
- package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -169
- package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -115
- package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -65
- package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -88
- package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -115
- package/skill/references/interfaces/IPCB_LayerItem.md +277 -277
- package/skill/references/interfaces/IPCB_NetClassItem.md +115 -115
- package/skill/references/interfaces/IPCB_NetInfo.md +115 -115
- package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -88
- package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -88
- package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -115
- package/skill/references/interfaces/IPCB_Primitive.md +218 -218
- package/skill/references/interfaces/IPCB_PrimitiveAPI.md +174 -175
- package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -151
- package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -142
- package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -154
- package/skill/references/interfaces/IPCB_RayTracerBackgroundConfig.md +223 -0
- package/skill/references/interfaces/IPCB_RayTracerLightConfig.md +412 -0
- package/skill/references/interfaces/IPCB_RayTracerMaterialConfig.md +547 -0
- package/skill/references/interfaces/IPCB_RayTracerPcbMaterialConfig.md +196 -0
- package/skill/references/interfaces/IPCB_RayTracerRenderConfigurations.md +200 -0
- package/skill/references/interfaces/IPCB_RayTracerRendererConfig.md +196 -0
- package/skill/references/interfaces/IPCB_RayTracerSceneElement.md +115 -0
- package/skill/references/interfaces/IPCB_RayTracerSceneElementTransform.md +123 -0
- package/skill/references/interfaces/IPCB_RayTracerTexture.md +88 -0
- package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -88
- package/skill/references/interfaces/IRawNet.md +103 -103
- package/skill/references/interfaces/IRawPureSchematic.md +80 -80
- package/skill/references/interfaces/IRawSchematic.md +103 -103
- package/skill/references/interfaces/IRawWire.md +149 -149
- package/skill/references/interfaces/ISCH_DrcError.md +142 -142
- package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -142
- package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -94
- package/skill/references/interfaces/ISCH_NetInfo.md +88 -88
- package/skill/references/interfaces/ISCH_Primitive.md +218 -219
- package/skill/references/interfaces/ISCH_PrimitiveAPI.md +174 -175
- package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -142
- package/skill/references/interfaces/ISCH_WireInfo.md +169 -169
- package/skill/references/interfaces/ISYS_ComparisonResponse.md +115 -0
- package/skill/references/interfaces/ISYS_ExtensionExternalApiIndex.md +13 -0
- package/skill/references/interfaces/ISYS_ExtensionRegisteredExternalApis.md +13 -0
- package/skill/references/interfaces/ISYS_ExternalApiHelp.md +173 -0
- package/skill/references/interfaces/ISYS_ExternalApiRegistration.md +146 -0
- package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -169
- package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +205 -174
- package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +178 -147
- package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -115
- package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -408
- package/skill/references/interfaces/ISYS_HelpAudienceEntry.md +92 -0
- package/skill/references/interfaces/ISYS_HelpClassSummary.md +205 -0
- package/skill/references/interfaces/ISYS_HelpData.md +92 -0
- package/skill/references/interfaces/ISYS_HelpMethodDetail.md +310 -0
- package/skill/references/interfaces/ISYS_JobHandle.md +65 -0
- package/skill/references/interfaces/ISYS_JobLogEntry.md +142 -0
- package/skill/references/interfaces/ISYS_JobStatus.md +176 -0
- package/skill/references/interfaces/ISYS_LogLine.md +115 -115
- package/skill/references/interfaces/ISYS_MathBBox.md +142 -142
- package/skill/references/interfaces/ISYS_MathPoint.md +88 -88
- package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -92
- package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -115
- package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +12 -12
- package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -174
- package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -169
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -62
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -62
- package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -109
- package/skill/references/interfaces/IconProps.md +88 -88
- package/skill/references/interfaces/ImageProps.md +115 -115
- package/skill/references/interfaces/InputEditConfig.md +182 -0
- package/skill/references/interfaces/InputProps.md +547 -520
- package/skill/references/interfaces/KeyboardConfig.md +61 -0
- package/skill/references/interfaces/ListChildren.md +223 -223
- package/skill/references/interfaces/ListProps.md +250 -223
- package/skill/references/interfaces/ModalProps.md +358 -358
- package/skill/references/interfaces/NumberEditConfig.md +234 -0
- package/skill/references/interfaces/RadioGroupProps.md +196 -196
- package/skill/references/interfaces/RadioItem.md +115 -115
- package/skill/references/interfaces/RichTableProps.md +1357 -0
- package/skill/references/interfaces/RowMetaConfig.md +142 -0
- package/skill/references/interfaces/ScrollerProps.md +169 -169
- package/skill/references/interfaces/SelectEditConfig.md +211 -0
- package/skill/references/interfaces/SelectListItem.md +142 -142
- package/skill/references/interfaces/SelectOption.md +142 -0
- package/skill/references/interfaces/SelectProps.md +169 -169
- package/skill/references/interfaces/SelectionConfig.md +358 -0
- package/skill/references/interfaces/SliderProps.md +142 -0
- package/skill/references/interfaces/SlotProps.md +88 -88
- package/skill/references/interfaces/SortState.md +88 -0
- package/skill/references/interfaces/SortingConfig.md +169 -0
- package/skill/references/interfaces/StyleProps.md +439 -385
- package/skill/references/interfaces/TextAreaProps.md +196 -196
- package/skill/references/interfaces/TextProps.md +169 -169
- package/skill/references/interfaces/TextareaEditConfig.md +182 -0
- package/skill/references/interfaces/ValidationRule.md +223 -0
- package/skill/references/interfaces/VirtualScrollConfig.md +115 -0
- package/skill/references/types/Align.md +9 -0
- package/skill/references/types/CellContentType.md +9 -0
- package/skill/references/types/ColumnDefOrGroup.md +12 -0
- package/skill/references/types/ColumnEditConfig.md +13 -0
- package/skill/references/types/ColumnType.md +9 -0
- package/skill/references/types/DataChangeType.md +9 -0
- package/skill/references/types/FilterMatchMode.md +9 -0
- package/skill/references/types/RichTableRow.md +12 -0
- package/skill/references/types/Serializable.md +10 -0
- package/skill/references/types/SerializablePrimitive.md +9 -0
- package/skill/references/types/SortOrder.md +9 -0
- package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +11 -11
- package/skill/references/types/TPCB_LayersInTheSelectable.md +42 -42
- package/skill/references/types/TPCB_LayersOfComponent.md +11 -11
- package/skill/references/types/TPCB_LayersOfCopper.md +15 -15
- package/skill/references/types/TPCB_LayersOfCustom.md +41 -41
- package/skill/references/types/TPCB_LayersOfDimension.md +16 -16
- package/skill/references/types/TPCB_LayersOfFill.md +28 -28
- package/skill/references/types/TPCB_LayersOfImage.md +22 -22
- package/skill/references/types/TPCB_LayersOfInner.md +41 -41
- package/skill/references/types/TPCB_LayersOfLine.md +25 -25
- package/skill/references/types/TPCB_LayersOfObject.md +12 -12
- package/skill/references/types/TPCB_LayersOfPad.md +11 -11
- package/skill/references/types/TPCB_LayersOfRegion.md +11 -11
- package/skill/references/types/TPCB_NumberOfCopperLayers.md +9 -9
- package/skill/references/types/TPCB_PolygonSourceArray.md +85 -83
- package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +66 -66
- package/skill/references/types/TPCB_PrimitivePadHole.md +30 -30
- package/skill/references/types/TPCB_PrimitivePadShape.md +61 -61
- package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +19 -19
- package/skill/references/types/TSYS_ComparisonErrorCode.md +15 -0
- package/skill/references/types/TSYS_LanguageKeyValuePairs.md +13 -0
- package/skill/references/types/TSYS_MathPolygonGroup.md +15 -15
- package/skill/references/types/TSYS_MathPolygonInput.md +20 -20
- package/skill/references/types/TSYS_ShortcutKeys.md +96 -96
- package/skill/user-guide/using-extension.md +47 -47
- package/src/json-gen.test.js +430 -0
- package/skill/guide/ancillary-projects/pro-api-sdk.md +0 -1
- package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +0 -115
- package/skill/references/types/ISYS_LanguageKeyValuePairs.md +0 -13
- package/skill/references/types/TSYS_PcbComparisonErrorCode.md +0 -10
|
@@ -1,1911 +1,1915 @@
|
|
|
1
|
-
# PCB\_Layer class
|
|
2
|
-
|
|
3
|
-
PCB & footprint / layer operation class
|
|
4
|
-
|
|
5
|
-
## Signature
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
class PCB_Layer
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Methods
|
|
12
|
-
|
|
13
|
-
<table><thead><tr><th>
|
|
14
|
-
|
|
15
|
-
Method
|
|
16
|
-
|
|
17
|
-
</th><th>
|
|
18
|
-
|
|
19
|
-
Modifiers
|
|
20
|
-
|
|
21
|
-
</th><th>
|
|
22
|
-
|
|
23
|
-
Description
|
|
24
|
-
|
|
25
|
-
</th></tr></thead>
|
|
26
|
-
<tbody><tr><td>
|
|
27
|
-
|
|
28
|
-
[addCustomLayer()](./PCB_Layer.md)
|
|
29
|
-
|
|
30
|
-
</td><td>
|
|
31
|
-
|
|
32
|
-
</td><td>
|
|
33
|
-
|
|
34
|
-
**_(BETA)_** Add a custom layer
|
|
35
|
-
|
|
36
|
-
</td></tr>
|
|
37
|
-
<tr><td>
|
|
38
|
-
|
|
39
|
-
[deletePhysicalStackingConfiguration(configurationName, physicalProps)](./PCB_Layer.md)
|
|
40
|
-
|
|
41
|
-
</td><td>
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
**_(BETA)_** Delete Physical stacking configuration
|
|
46
|
-
|
|
47
|
-
</td></tr>
|
|
48
|
-
<tr><td>
|
|
49
|
-
|
|
50
|
-
[getAllLayers()](./PCB_Layer.md)
|
|
51
|
-
|
|
52
|
-
</td><td>
|
|
53
|
-
|
|
54
|
-
</td><td>
|
|
55
|
-
|
|
56
|
-
**_(BETA)_** Get the detailed properties of all layers
|
|
57
|
-
|
|
58
|
-
</td></tr>
|
|
59
|
-
<tr><td>
|
|
60
|
-
|
|
61
|
-
[getAllPhysicalStackingConfigurations(physicalProps)](./PCB_Layer.md)
|
|
62
|
-
|
|
63
|
-
</td><td>
|
|
64
|
-
|
|
65
|
-
</td><td>
|
|
66
|
-
|
|
67
|
-
**_(BETA)_** Get all Physical stacking configuration
|
|
68
|
-
|
|
69
|
-
</td></tr>
|
|
70
|
-
<tr><td>
|
|
71
|
-
|
|
72
|
-
[getCurrentLayer()](./PCB_Layer.md)
|
|
73
|
-
|
|
74
|
-
</td><td>
|
|
75
|
-
|
|
76
|
-
</td><td>
|
|
77
|
-
|
|
78
|
-
**_(BETA)_** Get the detailed properties of the current layer
|
|
79
|
-
|
|
80
|
-
</td></tr>
|
|
81
|
-
<tr><td>
|
|
82
|
-
|
|
83
|
-
[getCurrentPhysicalStackingConfiguration()](./PCB_Layer.md)
|
|
84
|
-
|
|
85
|
-
</td><td>
|
|
86
|
-
|
|
87
|
-
</td><td>
|
|
88
|
-
|
|
89
|
-
**_(BETA)_** Get Current physical stacking configuration
|
|
90
|
-
|
|
91
|
-
</td></tr>
|
|
92
|
-
<tr><td>
|
|
93
|
-
|
|
94
|
-
[getCurrentPhysicalStackingConfigurationName()](./PCB_Layer.md)
|
|
95
|
-
|
|
96
|
-
</td><td>
|
|
97
|
-
|
|
98
|
-
</td><td>
|
|
99
|
-
|
|
100
|
-
**_(BETA)_** Get Current physical stacking configuration name
|
|
101
|
-
|
|
102
|
-
</td></tr>
|
|
103
|
-
<tr><td>
|
|
104
|
-
|
|
105
|
-
[getDefaultPhysicalStackingConfigurationName(physicalProps)](./PCB_Layer.md)
|
|
106
|
-
|
|
107
|
-
</td><td>
|
|
108
|
-
|
|
109
|
-
</td><td>
|
|
110
|
-
|
|
111
|
-
**_(BETA)_** Get the name of the default physical stacking configuration for new PCBs
|
|
112
|
-
|
|
113
|
-
</td></tr>
|
|
114
|
-
<tr><td>
|
|
115
|
-
|
|
116
|
-
[getPhysicalStackingConfiguration(configurationName, physicalProps)](./PCB_Layer.md)
|
|
117
|
-
|
|
118
|
-
</td><td>
|
|
119
|
-
|
|
120
|
-
</td><td>
|
|
121
|
-
|
|
122
|
-
**_(BETA)_** Get Specify physical stacking configuration
|
|
123
|
-
|
|
124
|
-
</td></tr>
|
|
125
|
-
<tr><td>
|
|
126
|
-
|
|
127
|
-
[lockLayer(layer)](./PCB_Layer.md)
|
|
128
|
-
|
|
129
|
-
</td><td>
|
|
130
|
-
|
|
131
|
-
</td><td>
|
|
132
|
-
|
|
133
|
-
**_(BETA)_** Lock the layer
|
|
134
|
-
|
|
135
|
-
</td></tr>
|
|
136
|
-
<tr><td>
|
|
137
|
-
|
|
138
|
-
[modifyLayer(layer, property)](./PCB_Layer.md)
|
|
139
|
-
|
|
140
|
-
</td><td>
|
|
141
|
-
|
|
142
|
-
</td><td>
|
|
143
|
-
|
|
144
|
-
**_(BETA)_** Modify Layer properties
|
|
145
|
-
|
|
146
|
-
</td></tr>
|
|
147
|
-
<tr><td>
|
|
148
|
-
|
|
149
|
-
[overwriteCurrentPhysicalStackingConfiguration(physicalStackingConfiguration)](./PCB_Layer.md)
|
|
150
|
-
|
|
151
|
-
</td><td>
|
|
152
|
-
|
|
153
|
-
</td><td>
|
|
154
|
-
|
|
155
|
-
**_(BETA)_** Overwrite current physical stacking configuration
|
|
156
|
-
|
|
157
|
-
</td></tr>
|
|
158
|
-
<tr><td>
|
|
159
|
-
|
|
160
|
-
[removeLayer(layer)](./PCB_Layer.md)
|
|
161
|
-
|
|
162
|
-
</td><td>
|
|
163
|
-
|
|
164
|
-
</td><td>
|
|
165
|
-
|
|
166
|
-
**_(BETA)_** Remove Layer
|
|
167
|
-
|
|
168
|
-
</td></tr>
|
|
169
|
-
<tr><td>
|
|
170
|
-
|
|
171
|
-
[renamePhysicalStackingConfiguration(originalConfigurationName, configurationName, physicalProps)](./PCB_Layer.md)
|
|
172
|
-
|
|
173
|
-
</td><td>
|
|
174
|
-
|
|
175
|
-
</td><td>
|
|
176
|
-
|
|
177
|
-
**_(BETA)_** Rename the physical stacking configuration
|
|
178
|
-
|
|
179
|
-
</td></tr>
|
|
180
|
-
<tr><td>
|
|
181
|
-
|
|
182
|
-
[savePhysicalStackingConfiguration(physicalStackingConfiguration, configurationName, physicalProps, allowOverwrite)](./PCB_Layer.md)
|
|
183
|
-
|
|
184
|
-
</td><td>
|
|
185
|
-
|
|
186
|
-
</td><td>
|
|
187
|
-
|
|
188
|
-
**_(BETA)_** Save Physical stacking configuration
|
|
189
|
-
|
|
190
|
-
</td></tr>
|
|
191
|
-
<tr><td>
|
|
192
|
-
|
|
193
|
-
[selectLayer(layer)](./PCB_Layer.md)
|
|
194
|
-
|
|
195
|
-
</td><td>
|
|
196
|
-
|
|
197
|
-
</td><td>
|
|
198
|
-
|
|
199
|
-
Select a layer
|
|
200
|
-
|
|
201
|
-
</td></tr>
|
|
202
|
-
<tr><td>
|
|
203
|
-
|
|
204
|
-
[setAsDefaultPhysicalStackingConfiguration(configurationName, physicalProps)](./PCB_Layer.md)
|
|
205
|
-
|
|
206
|
-
</td><td>
|
|
207
|
-
|
|
208
|
-
</td><td>
|
|
209
|
-
|
|
210
|
-
**_(BETA)_** Set as the default physical stacking configuration for new PCBs
|
|
211
|
-
|
|
212
|
-
</td></tr>
|
|
213
|
-
<tr><td>
|
|
214
|
-
|
|
215
|
-
[setInactiveLayerDisplayMode(displayMode)](./PCB_Layer.md)
|
|
216
|
-
|
|
217
|
-
</td><td>
|
|
218
|
-
|
|
219
|
-
</td><td>
|
|
220
|
-
|
|
221
|
-
**_(BETA)_** Set Inactive layer display mode
|
|
222
|
-
|
|
223
|
-
</td></tr>
|
|
224
|
-
<tr><td>
|
|
225
|
-
|
|
226
|
-
[setInactiveLayerTransparency(transparency)](./PCB_Layer.md)
|
|
227
|
-
|
|
228
|
-
</td><td>
|
|
229
|
-
|
|
230
|
-
</td><td>
|
|
231
|
-
|
|
232
|
-
**_(BETA)_** Set the inactive layer transparency
|
|
233
|
-
|
|
234
|
-
</td></tr>
|
|
235
|
-
<tr><td>
|
|
236
|
-
|
|
237
|
-
[setLayerColorConfiguration(colorConfiguration)](./PCB_Layer.md)
|
|
238
|
-
|
|
239
|
-
</td><td>
|
|
240
|
-
|
|
241
|
-
</td><td>
|
|
242
|
-
|
|
243
|
-
**_(BETA)_** Set the layer color configuration
|
|
244
|
-
|
|
245
|
-
</td></tr>
|
|
246
|
-
<tr><td>
|
|
247
|
-
|
|
248
|
-
[setLayerInvisible(layer, setOtherLayerVisible)](./PCB_Layer.md)
|
|
249
|
-
|
|
250
|
-
</td><td>
|
|
251
|
-
|
|
252
|
-
</td><td>
|
|
253
|
-
|
|
254
|
-
**_(BETA)_** Set the layer to invisible
|
|
255
|
-
|
|
256
|
-
</td></tr>
|
|
257
|
-
<tr><td>
|
|
258
|
-
|
|
259
|
-
[setLayerVisible(layer, setOtherLayerInvisible)](./PCB_Layer.md)
|
|
260
|
-
|
|
261
|
-
</td><td>
|
|
262
|
-
|
|
263
|
-
</td><td>
|
|
264
|
-
|
|
265
|
-
**_(BETA)_** Set the layer to visible
|
|
266
|
-
|
|
267
|
-
</td></tr>
|
|
268
|
-
<tr><td>
|
|
269
|
-
|
|
270
|
-
[setPcbType(pcbType)](./PCB_Layer.md)
|
|
271
|
-
|
|
272
|
-
</td><td>
|
|
273
|
-
|
|
274
|
-
</td><td>
|
|
275
|
-
|
|
276
|
-
**_(BETA)_** Set PCB type
|
|
277
|
-
|
|
278
|
-
</td></tr>
|
|
279
|
-
<tr><td>
|
|
280
|
-
|
|
281
|
-
[setTheNumberOfCopperLayers(numberOfLayers)](./PCB_Layer.md)
|
|
282
|
-
|
|
283
|
-
</td><td>
|
|
284
|
-
|
|
285
|
-
</td><td>
|
|
286
|
-
|
|
287
|
-
**_(BETA)_** Set Number of copper layers
|
|
288
|
-
|
|
289
|
-
</td></tr>
|
|
290
|
-
<tr><td>
|
|
291
|
-
|
|
292
|
-
[unlockLayer(layer)](./PCB_Layer.md)
|
|
293
|
-
|
|
294
|
-
</td><td>
|
|
295
|
-
|
|
296
|
-
</td><td>
|
|
297
|
-
|
|
298
|
-
**_(BETA)_** Unlock the layer
|
|
299
|
-
|
|
300
|
-
</td></tr>
|
|
301
|
-
</tbody></table>
|
|
302
|
-
|
|
303
|
-
---
|
|
304
|
-
|
|
305
|
-
## 方法详情
|
|
306
|
-
|
|
307
|
-
### addcustomlayer
|
|
308
|
-
|
|
309
|
-
# PCB\_Layer.addCustomLayer() method
|
|
310
|
-
|
|
311
|
-
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
312
|
-
|
|
313
|
-
Add a custom layer
|
|
314
|
-
|
|
315
|
-
## Signature
|
|
316
|
-
|
|
317
|
-
```typescript
|
|
318
|
-
function addCustomLayer(): Promise<TPCB_LayersOfCustom | undefined>;
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
## Returns
|
|
322
|
-
|
|
323
|
-
Promise<[TPCB\_LayersOfCustom](../types/TPCB_LayersOfCustom.md) \| undefined>
|
|
324
|
-
|
|
325
|
-
The layer ID of the newly added custom layer. If it is `undefined`<!-- -->, the addition failed, possibly because the number of custom layers has reached the upper limit
|
|
326
|
-
|
|
327
|
-
## Example
|
|
328
|
-
|
|
329
|
-
```javascript
|
|
330
|
-
// 1. 先移除历史运行遗留的自定义层,保证案例可以反复执行
|
|
331
|
-
const layers = await eda.pcb_Layer.getAllLayers();
|
|
332
|
-
for (const item of layers.filter(l => l.type === 'CUSTOM')) {
|
|
333
|
-
await eda.pcb_Layer.removeLayer(item.id);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
// 2. 新增自定义层,返回新层的图层 ID(CUSTOM_1=71 起顺延分配)
|
|
337
|
-
const customLayerId = await eda.pcb_Layer.addCustomLayer();
|
|
338
|
-
|
|
339
|
-
// 3. 从图层列表确认新层已存在(保留现场,可在图层面板观察)
|
|
340
|
-
const after = await eda.pcb_Layer.getAllLayers();
|
|
341
|
-
const newLayer = after.find(l => l.id === customLayerId);
|
|
342
|
-
|
|
343
|
-
console.log('customLayerId:', customLayerId);
|
|
344
|
-
console.log('newLayerName:', newLayer?.name);
|
|
345
|
-
console.log('customLayerCount:', after.filter(l => l.type === 'CUSTOM').length);
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
### deletephysicalstackingconfiguration
|
|
349
|
-
|
|
350
|
-
# PCB\_Layer.deletePhysicalStackingConfiguration() method
|
|
351
|
-
|
|
352
|
-
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
353
|
-
|
|
354
|
-
Delete Physical stacking configuration
|
|
355
|
-
|
|
356
|
-
## Signature
|
|
357
|
-
|
|
358
|
-
```typescript
|
|
359
|
-
function deletePhysicalStackingConfiguration(
|
|
360
|
-
configurationName: string,
|
|
361
|
-
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
362
|
-
): Promise<boolean>;
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
## Parameters
|
|
366
|
-
|
|
367
|
-
<table><thead><tr><th>
|
|
368
|
-
|
|
369
|
-
Parameter
|
|
370
|
-
|
|
371
|
-
</th><th>
|
|
372
|
-
|
|
373
|
-
Type
|
|
374
|
-
|
|
375
|
-
</th><th>
|
|
376
|
-
|
|
377
|
-
Description
|
|
378
|
-
|
|
379
|
-
</th></tr></thead>
|
|
380
|
-
<tbody><tr><td>
|
|
381
|
-
|
|
382
|
-
configurationName
|
|
383
|
-
|
|
384
|
-
</td><td>
|
|
385
|
-
|
|
386
|
-
string
|
|
387
|
-
|
|
388
|
-
</td><td>
|
|
389
|
-
|
|
390
|
-
Configuration name
|
|
391
|
-
|
|
392
|
-
</td></tr>
|
|
393
|
-
<tr><td>
|
|
394
|
-
|
|
395
|
-
physicalProps
|
|
396
|
-
|
|
397
|
-
</td><td>
|
|
398
|
-
|
|
399
|
-
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
400
|
-
|
|
401
|
-
</td><td>
|
|
402
|
-
|
|
403
|
-
_(Optional)_
|
|
404
|
-
|
|
405
|
-
</td></tr>
|
|
406
|
-
</tbody></table>
|
|
407
|
-
|
|
408
|
-
## Returns
|
|
409
|
-
|
|
410
|
-
Promise<boolean>
|
|
411
|
-
|
|
412
|
-
Delete Whether Successful
|
|
413
|
-
|
|
414
|
-
## Remarks
|
|
415
|
-
|
|
416
|
-
ADD since EDA v4.2
|
|
417
|
-
|
|
418
|
-
### getalllayers
|
|
419
|
-
|
|
420
|
-
# PCB\_Layer.getAllLayers() method
|
|
421
|
-
|
|
422
|
-
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
423
|
-
|
|
424
|
-
Get the detailed properties of all layers
|
|
425
|
-
|
|
426
|
-
## Signature
|
|
427
|
-
|
|
428
|
-
```typescript
|
|
429
|
-
function getAllLayers(): Promise<Array<IPCB_LayerItem>>;
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
## Returns
|
|
433
|
-
|
|
434
|
-
Promise<Array<[IPCB\_LayerItem](../interfaces/IPCB_LayerItem.md)<!-- -->>>
|
|
435
|
-
|
|
436
|
-
Detailed properties of all layers
|
|
437
|
-
|
|
438
|
-
##
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
console.log('
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
</th><th>
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
</th
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
</td><td>
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
</td
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
```
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
```
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
</th><th>
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
</th
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
</td><td>
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
</td
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
</th><th>
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
</th
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
</td><td>
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
</td
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
</td><td>
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
</td
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
```
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
</th><th>
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
</th
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
</td><td>
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
</td
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
//
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
</th><th>
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
</th
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
</td><td>
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
</td
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
</td><td>
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
</td
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
##
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
```
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
</th><th>
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
</th
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
</td><td>
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
</th><th>
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
</th
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
</td><td>
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
</td
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
##
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
</th><th>
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
</th
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
</td><td>
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
</td
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
</td><td>
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
</td
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
</td><td>
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
</td
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
</th><th>
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
</th
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
</td><td>
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
</td
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
</td><td>
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
</td
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
</td><td>
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
</td
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
</td><td>
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
</td
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
</th><th>
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
</th
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
</td><td>
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
</td
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
</th><th>
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
</th
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
</td><td>
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
</td
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
</td><td>
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
</td
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
</th><th>
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
</th
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
</td><td>
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
</td
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
</th><th>
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
</th
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
</td><td>
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
</td
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
```
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
</th><th>
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
</th
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
</td><td>
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
</td
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
</th><th>
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
</th
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
</td><td>
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
</td
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
</td><td>
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
</td
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1596
|
-
//
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
</th><th>
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
</th
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
</td><td>
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
</td
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
</td><td>
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
</td
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
const
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
</th><th>
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
</th
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
</td><td>
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
</td
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
</th><th>
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
</th
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
</td><td>
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
</td
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
##
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
```
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
</th><th>
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
</th
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
</td><td>
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
</td
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1
|
+
# PCB\_Layer class
|
|
2
|
+
|
|
3
|
+
PCB & footprint / layer operation class
|
|
4
|
+
|
|
5
|
+
## Signature
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
class PCB_Layer
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Methods
|
|
12
|
+
|
|
13
|
+
<table><thead><tr><th>
|
|
14
|
+
|
|
15
|
+
Method
|
|
16
|
+
|
|
17
|
+
</th><th>
|
|
18
|
+
|
|
19
|
+
Modifiers
|
|
20
|
+
|
|
21
|
+
</th><th>
|
|
22
|
+
|
|
23
|
+
Description
|
|
24
|
+
|
|
25
|
+
</th></tr></thead>
|
|
26
|
+
<tbody><tr><td>
|
|
27
|
+
|
|
28
|
+
[addCustomLayer()](./PCB_Layer.md)
|
|
29
|
+
|
|
30
|
+
</td><td>
|
|
31
|
+
|
|
32
|
+
</td><td>
|
|
33
|
+
|
|
34
|
+
**_(BETA)_** Add a custom layer
|
|
35
|
+
|
|
36
|
+
</td></tr>
|
|
37
|
+
<tr><td>
|
|
38
|
+
|
|
39
|
+
[deletePhysicalStackingConfiguration(configurationName, physicalProps)](./PCB_Layer.md)
|
|
40
|
+
|
|
41
|
+
</td><td>
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
**_(BETA)_** Delete Physical stacking configuration
|
|
46
|
+
|
|
47
|
+
</td></tr>
|
|
48
|
+
<tr><td>
|
|
49
|
+
|
|
50
|
+
[getAllLayers()](./PCB_Layer.md)
|
|
51
|
+
|
|
52
|
+
</td><td>
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
**_(BETA)_** Get the detailed properties of all layers
|
|
57
|
+
|
|
58
|
+
</td></tr>
|
|
59
|
+
<tr><td>
|
|
60
|
+
|
|
61
|
+
[getAllPhysicalStackingConfigurations(physicalProps)](./PCB_Layer.md)
|
|
62
|
+
|
|
63
|
+
</td><td>
|
|
64
|
+
|
|
65
|
+
</td><td>
|
|
66
|
+
|
|
67
|
+
**_(BETA)_** Get all Physical stacking configuration
|
|
68
|
+
|
|
69
|
+
</td></tr>
|
|
70
|
+
<tr><td>
|
|
71
|
+
|
|
72
|
+
[getCurrentLayer()](./PCB_Layer.md)
|
|
73
|
+
|
|
74
|
+
</td><td>
|
|
75
|
+
|
|
76
|
+
</td><td>
|
|
77
|
+
|
|
78
|
+
**_(BETA)_** Get the detailed properties of the current layer
|
|
79
|
+
|
|
80
|
+
</td></tr>
|
|
81
|
+
<tr><td>
|
|
82
|
+
|
|
83
|
+
[getCurrentPhysicalStackingConfiguration()](./PCB_Layer.md)
|
|
84
|
+
|
|
85
|
+
</td><td>
|
|
86
|
+
|
|
87
|
+
</td><td>
|
|
88
|
+
|
|
89
|
+
**_(BETA)_** Get Current physical stacking configuration
|
|
90
|
+
|
|
91
|
+
</td></tr>
|
|
92
|
+
<tr><td>
|
|
93
|
+
|
|
94
|
+
[getCurrentPhysicalStackingConfigurationName()](./PCB_Layer.md)
|
|
95
|
+
|
|
96
|
+
</td><td>
|
|
97
|
+
|
|
98
|
+
</td><td>
|
|
99
|
+
|
|
100
|
+
**_(BETA)_** Get Current physical stacking configuration name
|
|
101
|
+
|
|
102
|
+
</td></tr>
|
|
103
|
+
<tr><td>
|
|
104
|
+
|
|
105
|
+
[getDefaultPhysicalStackingConfigurationName(physicalProps)](./PCB_Layer.md)
|
|
106
|
+
|
|
107
|
+
</td><td>
|
|
108
|
+
|
|
109
|
+
</td><td>
|
|
110
|
+
|
|
111
|
+
**_(BETA)_** Get the name of the default physical stacking configuration for new PCBs
|
|
112
|
+
|
|
113
|
+
</td></tr>
|
|
114
|
+
<tr><td>
|
|
115
|
+
|
|
116
|
+
[getPhysicalStackingConfiguration(configurationName, physicalProps)](./PCB_Layer.md)
|
|
117
|
+
|
|
118
|
+
</td><td>
|
|
119
|
+
|
|
120
|
+
</td><td>
|
|
121
|
+
|
|
122
|
+
**_(BETA)_** Get Specify physical stacking configuration
|
|
123
|
+
|
|
124
|
+
</td></tr>
|
|
125
|
+
<tr><td>
|
|
126
|
+
|
|
127
|
+
[lockLayer(layer)](./PCB_Layer.md)
|
|
128
|
+
|
|
129
|
+
</td><td>
|
|
130
|
+
|
|
131
|
+
</td><td>
|
|
132
|
+
|
|
133
|
+
**_(BETA)_** Lock the layer
|
|
134
|
+
|
|
135
|
+
</td></tr>
|
|
136
|
+
<tr><td>
|
|
137
|
+
|
|
138
|
+
[modifyLayer(layer, property)](./PCB_Layer.md)
|
|
139
|
+
|
|
140
|
+
</td><td>
|
|
141
|
+
|
|
142
|
+
</td><td>
|
|
143
|
+
|
|
144
|
+
**_(BETA)_** Modify Layer properties
|
|
145
|
+
|
|
146
|
+
</td></tr>
|
|
147
|
+
<tr><td>
|
|
148
|
+
|
|
149
|
+
[overwriteCurrentPhysicalStackingConfiguration(physicalStackingConfiguration)](./PCB_Layer.md)
|
|
150
|
+
|
|
151
|
+
</td><td>
|
|
152
|
+
|
|
153
|
+
</td><td>
|
|
154
|
+
|
|
155
|
+
**_(BETA)_** Overwrite current physical stacking configuration
|
|
156
|
+
|
|
157
|
+
</td></tr>
|
|
158
|
+
<tr><td>
|
|
159
|
+
|
|
160
|
+
[removeLayer(layer)](./PCB_Layer.md)
|
|
161
|
+
|
|
162
|
+
</td><td>
|
|
163
|
+
|
|
164
|
+
</td><td>
|
|
165
|
+
|
|
166
|
+
**_(BETA)_** Remove Layer
|
|
167
|
+
|
|
168
|
+
</td></tr>
|
|
169
|
+
<tr><td>
|
|
170
|
+
|
|
171
|
+
[renamePhysicalStackingConfiguration(originalConfigurationName, configurationName, physicalProps)](./PCB_Layer.md)
|
|
172
|
+
|
|
173
|
+
</td><td>
|
|
174
|
+
|
|
175
|
+
</td><td>
|
|
176
|
+
|
|
177
|
+
**_(BETA)_** Rename the physical stacking configuration
|
|
178
|
+
|
|
179
|
+
</td></tr>
|
|
180
|
+
<tr><td>
|
|
181
|
+
|
|
182
|
+
[savePhysicalStackingConfiguration(physicalStackingConfiguration, configurationName, physicalProps, allowOverwrite)](./PCB_Layer.md)
|
|
183
|
+
|
|
184
|
+
</td><td>
|
|
185
|
+
|
|
186
|
+
</td><td>
|
|
187
|
+
|
|
188
|
+
**_(BETA)_** Save Physical stacking configuration
|
|
189
|
+
|
|
190
|
+
</td></tr>
|
|
191
|
+
<tr><td>
|
|
192
|
+
|
|
193
|
+
[selectLayer(layer)](./PCB_Layer.md)
|
|
194
|
+
|
|
195
|
+
</td><td>
|
|
196
|
+
|
|
197
|
+
</td><td>
|
|
198
|
+
|
|
199
|
+
Select a layer
|
|
200
|
+
|
|
201
|
+
</td></tr>
|
|
202
|
+
<tr><td>
|
|
203
|
+
|
|
204
|
+
[setAsDefaultPhysicalStackingConfiguration(configurationName, physicalProps)](./PCB_Layer.md)
|
|
205
|
+
|
|
206
|
+
</td><td>
|
|
207
|
+
|
|
208
|
+
</td><td>
|
|
209
|
+
|
|
210
|
+
**_(BETA)_** Set as the default physical stacking configuration for new PCBs
|
|
211
|
+
|
|
212
|
+
</td></tr>
|
|
213
|
+
<tr><td>
|
|
214
|
+
|
|
215
|
+
[setInactiveLayerDisplayMode(displayMode)](./PCB_Layer.md)
|
|
216
|
+
|
|
217
|
+
</td><td>
|
|
218
|
+
|
|
219
|
+
</td><td>
|
|
220
|
+
|
|
221
|
+
**_(BETA)_** Set Inactive layer display mode
|
|
222
|
+
|
|
223
|
+
</td></tr>
|
|
224
|
+
<tr><td>
|
|
225
|
+
|
|
226
|
+
[setInactiveLayerTransparency(transparency)](./PCB_Layer.md)
|
|
227
|
+
|
|
228
|
+
</td><td>
|
|
229
|
+
|
|
230
|
+
</td><td>
|
|
231
|
+
|
|
232
|
+
**_(BETA)_** Set the inactive layer transparency
|
|
233
|
+
|
|
234
|
+
</td></tr>
|
|
235
|
+
<tr><td>
|
|
236
|
+
|
|
237
|
+
[setLayerColorConfiguration(colorConfiguration)](./PCB_Layer.md)
|
|
238
|
+
|
|
239
|
+
</td><td>
|
|
240
|
+
|
|
241
|
+
</td><td>
|
|
242
|
+
|
|
243
|
+
**_(BETA)_** Set the layer color configuration
|
|
244
|
+
|
|
245
|
+
</td></tr>
|
|
246
|
+
<tr><td>
|
|
247
|
+
|
|
248
|
+
[setLayerInvisible(layer, setOtherLayerVisible)](./PCB_Layer.md)
|
|
249
|
+
|
|
250
|
+
</td><td>
|
|
251
|
+
|
|
252
|
+
</td><td>
|
|
253
|
+
|
|
254
|
+
**_(BETA)_** Set the layer to invisible
|
|
255
|
+
|
|
256
|
+
</td></tr>
|
|
257
|
+
<tr><td>
|
|
258
|
+
|
|
259
|
+
[setLayerVisible(layer, setOtherLayerInvisible)](./PCB_Layer.md)
|
|
260
|
+
|
|
261
|
+
</td><td>
|
|
262
|
+
|
|
263
|
+
</td><td>
|
|
264
|
+
|
|
265
|
+
**_(BETA)_** Set the layer to visible
|
|
266
|
+
|
|
267
|
+
</td></tr>
|
|
268
|
+
<tr><td>
|
|
269
|
+
|
|
270
|
+
[setPcbType(pcbType)](./PCB_Layer.md)
|
|
271
|
+
|
|
272
|
+
</td><td>
|
|
273
|
+
|
|
274
|
+
</td><td>
|
|
275
|
+
|
|
276
|
+
**_(BETA)_** Set PCB type
|
|
277
|
+
|
|
278
|
+
</td></tr>
|
|
279
|
+
<tr><td>
|
|
280
|
+
|
|
281
|
+
[setTheNumberOfCopperLayers(numberOfLayers)](./PCB_Layer.md)
|
|
282
|
+
|
|
283
|
+
</td><td>
|
|
284
|
+
|
|
285
|
+
</td><td>
|
|
286
|
+
|
|
287
|
+
**_(BETA)_** Set Number of copper layers
|
|
288
|
+
|
|
289
|
+
</td></tr>
|
|
290
|
+
<tr><td>
|
|
291
|
+
|
|
292
|
+
[unlockLayer(layer)](./PCB_Layer.md)
|
|
293
|
+
|
|
294
|
+
</td><td>
|
|
295
|
+
|
|
296
|
+
</td><td>
|
|
297
|
+
|
|
298
|
+
**_(BETA)_** Unlock the layer
|
|
299
|
+
|
|
300
|
+
</td></tr>
|
|
301
|
+
</tbody></table>
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## 方法详情
|
|
306
|
+
|
|
307
|
+
### addcustomlayer
|
|
308
|
+
|
|
309
|
+
# PCB\_Layer.addCustomLayer() method
|
|
310
|
+
|
|
311
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
312
|
+
|
|
313
|
+
Add a custom layer
|
|
314
|
+
|
|
315
|
+
## Signature
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
function addCustomLayer(): Promise<TPCB_LayersOfCustom | undefined>;
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## Returns
|
|
322
|
+
|
|
323
|
+
Promise<[TPCB\_LayersOfCustom](../types/TPCB_LayersOfCustom.md) \| undefined>
|
|
324
|
+
|
|
325
|
+
The layer ID of the newly added custom layer. If it is `undefined`<!-- -->, the addition failed, possibly because the number of custom layers has reached the upper limit
|
|
326
|
+
|
|
327
|
+
## Example
|
|
328
|
+
|
|
329
|
+
```javascript
|
|
330
|
+
// 1. 先移除历史运行遗留的自定义层,保证案例可以反复执行
|
|
331
|
+
const layers = await eda.pcb_Layer.getAllLayers();
|
|
332
|
+
for (const item of layers.filter(l => l.type === 'CUSTOM')) {
|
|
333
|
+
await eda.pcb_Layer.removeLayer(item.id);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// 2. 新增自定义层,返回新层的图层 ID(CUSTOM_1=71 起顺延分配)
|
|
337
|
+
const customLayerId = await eda.pcb_Layer.addCustomLayer();
|
|
338
|
+
|
|
339
|
+
// 3. 从图层列表确认新层已存在(保留现场,可在图层面板观察)
|
|
340
|
+
const after = await eda.pcb_Layer.getAllLayers();
|
|
341
|
+
const newLayer = after.find(l => l.id === customLayerId);
|
|
342
|
+
|
|
343
|
+
console.log('customLayerId:', customLayerId);
|
|
344
|
+
console.log('newLayerName:', newLayer?.name);
|
|
345
|
+
console.log('customLayerCount:', after.filter(l => l.type === 'CUSTOM').length);
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### deletephysicalstackingconfiguration
|
|
349
|
+
|
|
350
|
+
# PCB\_Layer.deletePhysicalStackingConfiguration() method
|
|
351
|
+
|
|
352
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
353
|
+
|
|
354
|
+
Delete Physical stacking configuration
|
|
355
|
+
|
|
356
|
+
## Signature
|
|
357
|
+
|
|
358
|
+
```typescript
|
|
359
|
+
function deletePhysicalStackingConfiguration(
|
|
360
|
+
configurationName: string,
|
|
361
|
+
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
362
|
+
): Promise<boolean>;
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
## Parameters
|
|
366
|
+
|
|
367
|
+
<table><thead><tr><th>
|
|
368
|
+
|
|
369
|
+
Parameter
|
|
370
|
+
|
|
371
|
+
</th><th>
|
|
372
|
+
|
|
373
|
+
Type
|
|
374
|
+
|
|
375
|
+
</th><th>
|
|
376
|
+
|
|
377
|
+
Description
|
|
378
|
+
|
|
379
|
+
</th></tr></thead>
|
|
380
|
+
<tbody><tr><td>
|
|
381
|
+
|
|
382
|
+
configurationName
|
|
383
|
+
|
|
384
|
+
</td><td>
|
|
385
|
+
|
|
386
|
+
string
|
|
387
|
+
|
|
388
|
+
</td><td>
|
|
389
|
+
|
|
390
|
+
Configuration name
|
|
391
|
+
|
|
392
|
+
</td></tr>
|
|
393
|
+
<tr><td>
|
|
394
|
+
|
|
395
|
+
physicalProps
|
|
396
|
+
|
|
397
|
+
</td><td>
|
|
398
|
+
|
|
399
|
+
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
400
|
+
|
|
401
|
+
</td><td>
|
|
402
|
+
|
|
403
|
+
_(Optional)_ 物理属性,如若不传入则默认为当前 PCB 属性
|
|
404
|
+
|
|
405
|
+
</td></tr>
|
|
406
|
+
</tbody></table>
|
|
407
|
+
|
|
408
|
+
## Returns
|
|
409
|
+
|
|
410
|
+
Promise<boolean>
|
|
411
|
+
|
|
412
|
+
Delete Whether Successful
|
|
413
|
+
|
|
414
|
+
## Remarks
|
|
415
|
+
|
|
416
|
+
ADD since EDA v4.2
|
|
417
|
+
|
|
418
|
+
### getalllayers
|
|
419
|
+
|
|
420
|
+
# PCB\_Layer.getAllLayers() method
|
|
421
|
+
|
|
422
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
423
|
+
|
|
424
|
+
Get the detailed properties of all layers
|
|
425
|
+
|
|
426
|
+
## Signature
|
|
427
|
+
|
|
428
|
+
```typescript
|
|
429
|
+
function getAllLayers(): Promise<Array<IPCB_LayerItem>>;
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
## Returns
|
|
433
|
+
|
|
434
|
+
Promise<Array<[IPCB\_LayerItem](../interfaces/IPCB_LayerItem.md)<!-- -->>>
|
|
435
|
+
|
|
436
|
+
Detailed properties of all layers
|
|
437
|
+
|
|
438
|
+
## Remarks
|
|
439
|
+
|
|
440
|
+
返回结果 \*\*包含停用的内层\*\*(如 16 铜层下可能返回 34 个 `SIGNAL`<!-- -->,其中多个 `layerStatus=0`<!-- -->); 筛选可用层的条件为 `type === 'SIGNAL' && layerStatus === 1`<!-- -->(或 `layerStatus !== EPCB_LayerStatus.NOT_USED`<!-- -->)
|
|
441
|
+
|
|
442
|
+
## Example
|
|
443
|
+
|
|
444
|
+
```javascript
|
|
445
|
+
// 1. 一次性取回当前 PCB 的全部图层
|
|
446
|
+
const layers = await eda.pcb_Layer.getAllLayers();
|
|
447
|
+
|
|
448
|
+
// 2. 查看顶层(TOP=1)的典型属性
|
|
449
|
+
const top = layers.find(l => l.id === 1);
|
|
450
|
+
|
|
451
|
+
// 3. 统计信号层(铜箔层)数量
|
|
452
|
+
const copperCount = layers.filter(l => l.type === 'SIGNAL').length;
|
|
453
|
+
|
|
454
|
+
console.log('totalCount:', layers.length);
|
|
455
|
+
console.log('topLayerName:', top?.name);
|
|
456
|
+
console.log('topLayerColor:', top?.color);
|
|
457
|
+
console.log('topLayerLocked:', top?.locked);
|
|
458
|
+
console.log('copperLayerCount:', copperCount);
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### getallphysicalstackingconfigurations
|
|
462
|
+
|
|
463
|
+
# PCB\_Layer.getAllPhysicalStackingConfigurations() method
|
|
464
|
+
|
|
465
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
466
|
+
|
|
467
|
+
Get all Physical stacking configuration
|
|
468
|
+
|
|
469
|
+
## Signature
|
|
470
|
+
|
|
471
|
+
```typescript
|
|
472
|
+
function getAllPhysicalStackingConfigurations(
|
|
473
|
+
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
474
|
+
): Promise<Array<IPCB_PhysicalStackingConfiguration>>;
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
## Parameters
|
|
478
|
+
|
|
479
|
+
<table><thead><tr><th>
|
|
480
|
+
|
|
481
|
+
Parameter
|
|
482
|
+
|
|
483
|
+
</th><th>
|
|
484
|
+
|
|
485
|
+
Type
|
|
486
|
+
|
|
487
|
+
</th><th>
|
|
488
|
+
|
|
489
|
+
Description
|
|
490
|
+
|
|
491
|
+
</th></tr></thead>
|
|
492
|
+
<tbody><tr><td>
|
|
493
|
+
|
|
494
|
+
physicalProps
|
|
495
|
+
|
|
496
|
+
</td><td>
|
|
497
|
+
|
|
498
|
+
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
499
|
+
|
|
500
|
+
</td><td>
|
|
501
|
+
|
|
502
|
+
_(Optional)_ 物理属性,如若不传入则默认为当前 PCB 属性
|
|
503
|
+
|
|
504
|
+
</td></tr>
|
|
505
|
+
</tbody></table>
|
|
506
|
+
|
|
507
|
+
## Returns
|
|
508
|
+
|
|
509
|
+
Promise<Array<[IPCB\_PhysicalStackingConfiguration](../interfaces/IPCB_PhysicalStackingConfiguration.md)<!-- -->>>
|
|
510
|
+
|
|
511
|
+
All physical stacking configurations
|
|
512
|
+
|
|
513
|
+
## Remarks
|
|
514
|
+
|
|
515
|
+
ADD since EDA v4.2
|
|
516
|
+
|
|
517
|
+
### getcurrentlayer
|
|
518
|
+
|
|
519
|
+
# PCB\_Layer.getCurrentLayer() method
|
|
520
|
+
|
|
521
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
522
|
+
|
|
523
|
+
Get the detailed properties of the current layer
|
|
524
|
+
|
|
525
|
+
## Signature
|
|
526
|
+
|
|
527
|
+
```typescript
|
|
528
|
+
function getCurrentLayer(): Promise<IPCB_LayerItem | undefined>;
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
## Returns
|
|
532
|
+
|
|
533
|
+
Promise<[IPCB\_LayerItem](../interfaces/IPCB_LayerItem.md) \| undefined>
|
|
534
|
+
|
|
535
|
+
Detailed properties of the current layer. `undefined` is returned when there is no active layer or no PCB canvas
|
|
536
|
+
|
|
537
|
+
## Remarks
|
|
538
|
+
|
|
539
|
+
ADD since EDA v4.2
|
|
540
|
+
|
|
541
|
+
### getcurrentphysicalstackingconfiguration
|
|
542
|
+
|
|
543
|
+
# PCB\_Layer.getCurrentPhysicalStackingConfiguration() method
|
|
544
|
+
|
|
545
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
546
|
+
|
|
547
|
+
Get Current physical stacking configuration
|
|
548
|
+
|
|
549
|
+
## Signature
|
|
550
|
+
|
|
551
|
+
```typescript
|
|
552
|
+
function getCurrentPhysicalStackingConfiguration(): Promise<
|
|
553
|
+
IPCB_PhysicalStackingConfiguration | undefined
|
|
554
|
+
>;
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
## Returns
|
|
558
|
+
|
|
559
|
+
Promise<[IPCB\_PhysicalStackingConfiguration](../interfaces/IPCB_PhysicalStackingConfiguration.md) \| undefined>
|
|
560
|
+
|
|
561
|
+
Current physical stacking configuration; `undefined` indicates that the retrieval failed
|
|
562
|
+
|
|
563
|
+
## Remarks
|
|
564
|
+
|
|
565
|
+
ADD since EDA v4.2
|
|
566
|
+
|
|
567
|
+
### getcurrentphysicalstackingconfigurationname
|
|
568
|
+
|
|
569
|
+
# PCB\_Layer.getCurrentPhysicalStackingConfigurationName() method
|
|
570
|
+
|
|
571
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
572
|
+
|
|
573
|
+
Get Current physical stacking configuration name
|
|
574
|
+
|
|
575
|
+
## Signature
|
|
576
|
+
|
|
577
|
+
```typescript
|
|
578
|
+
function getCurrentPhysicalStackingConfigurationName(): Promise<string | undefined>;
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
## Returns
|
|
582
|
+
|
|
583
|
+
Promise<string \| undefined>
|
|
584
|
+
|
|
585
|
+
Current physical stacking configuration name; `undefined` indicates that the retrieval failed
|
|
586
|
+
|
|
587
|
+
## Remarks
|
|
588
|
+
|
|
589
|
+
ADD since EDA v4.2
|
|
590
|
+
|
|
591
|
+
### getdefaultphysicalstackingconfigurationname
|
|
592
|
+
|
|
593
|
+
# PCB\_Layer.getDefaultPhysicalStackingConfigurationName() method
|
|
594
|
+
|
|
595
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
596
|
+
|
|
597
|
+
Get the name of the default physical stacking configuration for new PCBs
|
|
598
|
+
|
|
599
|
+
## Signature
|
|
600
|
+
|
|
601
|
+
```typescript
|
|
602
|
+
function getDefaultPhysicalStackingConfigurationName(
|
|
603
|
+
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
604
|
+
): Promise<string | undefined>;
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
## Parameters
|
|
608
|
+
|
|
609
|
+
<table><thead><tr><th>
|
|
610
|
+
|
|
611
|
+
Parameter
|
|
612
|
+
|
|
613
|
+
</th><th>
|
|
614
|
+
|
|
615
|
+
Type
|
|
616
|
+
|
|
617
|
+
</th><th>
|
|
618
|
+
|
|
619
|
+
Description
|
|
620
|
+
|
|
621
|
+
</th></tr></thead>
|
|
622
|
+
<tbody><tr><td>
|
|
623
|
+
|
|
624
|
+
physicalProps
|
|
625
|
+
|
|
626
|
+
</td><td>
|
|
627
|
+
|
|
628
|
+
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
629
|
+
|
|
630
|
+
</td><td>
|
|
631
|
+
|
|
632
|
+
_(Optional)_ 物理属性,如若不传入则默认为当前 PCB 属性
|
|
633
|
+
|
|
634
|
+
</td></tr>
|
|
635
|
+
</tbody></table>
|
|
636
|
+
|
|
637
|
+
## Returns
|
|
638
|
+
|
|
639
|
+
Promise<string \| undefined>
|
|
640
|
+
|
|
641
|
+
Default physical stacking configuration name of; `undefined` indicates that the retrieval failed
|
|
642
|
+
|
|
643
|
+
## Remarks
|
|
644
|
+
|
|
645
|
+
ADD since EDA v4.2
|
|
646
|
+
|
|
647
|
+
### getphysicalstackingconfiguration
|
|
648
|
+
|
|
649
|
+
# PCB\_Layer.getPhysicalStackingConfiguration() method
|
|
650
|
+
|
|
651
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
652
|
+
|
|
653
|
+
Get Specify physical stacking configuration
|
|
654
|
+
|
|
655
|
+
## Signature
|
|
656
|
+
|
|
657
|
+
```typescript
|
|
658
|
+
function getPhysicalStackingConfiguration(
|
|
659
|
+
configurationName: string,
|
|
660
|
+
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
661
|
+
): Promise<IPCB_PhysicalStackingConfiguration | undefined>;
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
## Parameters
|
|
665
|
+
|
|
666
|
+
<table><thead><tr><th>
|
|
667
|
+
|
|
668
|
+
Parameter
|
|
669
|
+
|
|
670
|
+
</th><th>
|
|
671
|
+
|
|
672
|
+
Type
|
|
673
|
+
|
|
674
|
+
</th><th>
|
|
675
|
+
|
|
676
|
+
Description
|
|
677
|
+
|
|
678
|
+
</th></tr></thead>
|
|
679
|
+
<tbody><tr><td>
|
|
680
|
+
|
|
681
|
+
configurationName
|
|
682
|
+
|
|
683
|
+
</td><td>
|
|
684
|
+
|
|
685
|
+
string
|
|
686
|
+
|
|
687
|
+
</td><td>
|
|
688
|
+
|
|
689
|
+
Configuration name
|
|
690
|
+
|
|
691
|
+
</td></tr>
|
|
692
|
+
<tr><td>
|
|
693
|
+
|
|
694
|
+
physicalProps
|
|
695
|
+
|
|
696
|
+
</td><td>
|
|
697
|
+
|
|
698
|
+
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
699
|
+
|
|
700
|
+
</td><td>
|
|
701
|
+
|
|
702
|
+
_(Optional)_ 物理属性,如若不传入则默认为当前 PCB 属性
|
|
703
|
+
|
|
704
|
+
</td></tr>
|
|
705
|
+
</tbody></table>
|
|
706
|
+
|
|
707
|
+
## Returns
|
|
708
|
+
|
|
709
|
+
Promise<[IPCB\_PhysicalStackingConfiguration](../interfaces/IPCB_PhysicalStackingConfiguration.md) \| undefined>
|
|
710
|
+
|
|
711
|
+
Physical stacking configuration, `undefined` is does not exist this physical stacking
|
|
712
|
+
|
|
713
|
+
## Remarks
|
|
714
|
+
|
|
715
|
+
ADD since EDA v4.2
|
|
716
|
+
|
|
717
|
+
### locklayer
|
|
718
|
+
|
|
719
|
+
# PCB\_Layer.lockLayer() method
|
|
720
|
+
|
|
721
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
722
|
+
|
|
723
|
+
Lock the layer
|
|
724
|
+
|
|
725
|
+
## Signature
|
|
726
|
+
|
|
727
|
+
```typescript
|
|
728
|
+
function lockLayer(
|
|
729
|
+
layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>,
|
|
730
|
+
): Promise<boolean>;
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
## Parameters
|
|
734
|
+
|
|
735
|
+
<table><thead><tr><th>
|
|
736
|
+
|
|
737
|
+
Parameter
|
|
738
|
+
|
|
739
|
+
</th><th>
|
|
740
|
+
|
|
741
|
+
Type
|
|
742
|
+
|
|
743
|
+
</th><th>
|
|
744
|
+
|
|
745
|
+
Description
|
|
746
|
+
|
|
747
|
+
</th></tr></thead>
|
|
748
|
+
<tbody><tr><td>
|
|
749
|
+
|
|
750
|
+
layer
|
|
751
|
+
|
|
752
|
+
</td><td>
|
|
753
|
+
|
|
754
|
+
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
|
|
755
|
+
|
|
756
|
+
</td><td>
|
|
757
|
+
|
|
758
|
+
_(Optional)_ Layer. If no layer is specified, all layers are used by default
|
|
759
|
+
|
|
760
|
+
</td></tr>
|
|
761
|
+
</tbody></table>
|
|
762
|
+
|
|
763
|
+
## Returns
|
|
764
|
+
|
|
765
|
+
Promise<boolean>
|
|
766
|
+
|
|
767
|
+
Whether the operation is successful
|
|
768
|
+
|
|
769
|
+
## Example
|
|
770
|
+
|
|
771
|
+
```javascript
|
|
772
|
+
// 1. 锁定顶层(TOP=1)与底层(BOTTOM=2),传入层数组
|
|
773
|
+
const lockResult = await eda.pcb_Layer.lockLayer([1, 2]);
|
|
774
|
+
|
|
775
|
+
// 2. 从图层列表确认锁定状态
|
|
776
|
+
const layers = await eda.pcb_Layer.getAllLayers();
|
|
777
|
+
const top = layers.find(l => l.id === 1);
|
|
778
|
+
|
|
779
|
+
// 3. 恢复现场:解锁这两层,避免影响后续编辑
|
|
780
|
+
const restoreResult = await eda.pcb_Layer.unlockLayer([1, 2]);
|
|
781
|
+
|
|
782
|
+
console.log('lockResult:', lockResult);
|
|
783
|
+
console.log('topLockedNow:', top?.locked);
|
|
784
|
+
console.log('restoreResult:', restoreResult);
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
### modifylayer
|
|
788
|
+
|
|
789
|
+
# PCB\_Layer.modifyLayer() method
|
|
790
|
+
|
|
791
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
792
|
+
|
|
793
|
+
Modify Layer properties
|
|
794
|
+
|
|
795
|
+
## Signature
|
|
796
|
+
|
|
797
|
+
```typescript
|
|
798
|
+
function modifyLayer(
|
|
799
|
+
layer: TPCB_LayersInTheSelectable,
|
|
800
|
+
property: {
|
|
801
|
+
name?: string;
|
|
802
|
+
type?: TPCB_LayerTypesOfInnerLayer;
|
|
803
|
+
color?: string;
|
|
804
|
+
transparency?: number;
|
|
805
|
+
},
|
|
806
|
+
): Promise<boolean>;
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
## Parameters
|
|
810
|
+
|
|
811
|
+
<table><thead><tr><th>
|
|
812
|
+
|
|
813
|
+
Parameter
|
|
814
|
+
|
|
815
|
+
</th><th>
|
|
816
|
+
|
|
817
|
+
Type
|
|
818
|
+
|
|
819
|
+
</th><th>
|
|
820
|
+
|
|
821
|
+
Description
|
|
822
|
+
|
|
823
|
+
</th></tr></thead>
|
|
824
|
+
<tbody><tr><td>
|
|
825
|
+
|
|
826
|
+
layer
|
|
827
|
+
|
|
828
|
+
</td><td>
|
|
829
|
+
|
|
830
|
+
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)
|
|
831
|
+
|
|
832
|
+
</td><td>
|
|
833
|
+
|
|
834
|
+
Layer
|
|
835
|
+
|
|
836
|
+
</td></tr>
|
|
837
|
+
<tr><td>
|
|
838
|
+
|
|
839
|
+
property
|
|
840
|
+
|
|
841
|
+
</td><td>
|
|
842
|
+
|
|
843
|
+
{ name?: string; type?: [TPCB\_LayerTypesOfInnerLayer](../types/TPCB_LayerTypesOfInnerLayer.md)<!-- -->; color?: string; transparency?: number }
|
|
844
|
+
|
|
845
|
+
</td><td>
|
|
846
|
+
|
|
847
|
+
Property
|
|
848
|
+
|
|
849
|
+
</td></tr>
|
|
850
|
+
</tbody></table>
|
|
851
|
+
|
|
852
|
+
## Returns
|
|
853
|
+
|
|
854
|
+
Promise<boolean>
|
|
855
|
+
|
|
856
|
+
The modified layer properties. If it is `undefined`<!-- -->, the modification failed or the layer does not exist
|
|
857
|
+
|
|
858
|
+
## Remarks
|
|
859
|
+
|
|
860
|
+
Only inner layers and custom layers can have their names modified; only inner layers can have their types modified. Transparency only supports values between 0-100
|
|
861
|
+
|
|
862
|
+
## Example
|
|
863
|
+
|
|
864
|
+
```javascript
|
|
865
|
+
// 1. 新增一个自定义层作为修改对象
|
|
866
|
+
const customLayerId = await eda.pcb_Layer.addCustomLayer();
|
|
867
|
+
|
|
868
|
+
// 2. 读取修改前的名称与颜色
|
|
869
|
+
const before = (await eda.pcb_Layer.getAllLayers()).find(l => l.id === customLayerId);
|
|
870
|
+
|
|
871
|
+
// 3. 修改名称、颜色与透明度(保留现场供观察)
|
|
872
|
+
const modifyResult = await eda.pcb_Layer.modifyLayer(customLayerId, {
|
|
873
|
+
name: '嘉立创示例_工艺说明',
|
|
874
|
+
color: '#FF6600',
|
|
875
|
+
transparency: 30,
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
// 4. 重新读取图层列表确认修改生效
|
|
879
|
+
const after = (await eda.pcb_Layer.getAllLayers()).find(l => l.id === customLayerId);
|
|
880
|
+
|
|
881
|
+
console.log('modifyResult:', modifyResult);
|
|
882
|
+
console.log('nameBefore:', before?.name, '→ nameAfter:', after?.name);
|
|
883
|
+
console.log('colorBefore:', before?.color, '→ colorAfter:', after?.color);
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
### overwritecurrentphysicalstackingconfiguration
|
|
887
|
+
|
|
888
|
+
# PCB\_Layer.overwriteCurrentPhysicalStackingConfiguration() method
|
|
889
|
+
|
|
890
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
891
|
+
|
|
892
|
+
Overwrite current physical stacking configuration
|
|
893
|
+
|
|
894
|
+
## Signature
|
|
895
|
+
|
|
896
|
+
```typescript
|
|
897
|
+
function overwriteCurrentPhysicalStackingConfiguration(
|
|
898
|
+
physicalStackingConfiguration: IPCB_PhysicalStackingConfiguration,
|
|
899
|
+
): Promise<boolean>;
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
## Parameters
|
|
903
|
+
|
|
904
|
+
<table><thead><tr><th>
|
|
905
|
+
|
|
906
|
+
Parameter
|
|
907
|
+
|
|
908
|
+
</th><th>
|
|
909
|
+
|
|
910
|
+
Type
|
|
911
|
+
|
|
912
|
+
</th><th>
|
|
913
|
+
|
|
914
|
+
Description
|
|
915
|
+
|
|
916
|
+
</th></tr></thead>
|
|
917
|
+
<tbody><tr><td>
|
|
918
|
+
|
|
919
|
+
physicalStackingConfiguration
|
|
920
|
+
|
|
921
|
+
</td><td>
|
|
922
|
+
|
|
923
|
+
[IPCB\_PhysicalStackingConfiguration](../interfaces/IPCB_PhysicalStackingConfiguration.md)
|
|
924
|
+
|
|
925
|
+
</td><td>
|
|
926
|
+
|
|
927
|
+
</td></tr>
|
|
928
|
+
</tbody></table>
|
|
929
|
+
|
|
930
|
+
## Returns
|
|
931
|
+
|
|
932
|
+
Promise<boolean>
|
|
933
|
+
|
|
934
|
+
Overwrite whether it is successful
|
|
935
|
+
|
|
936
|
+
## Remarks
|
|
937
|
+
|
|
938
|
+
It will overwrite the current physical stacking configuration of the PCB. Please note the risk of data loss
|
|
939
|
+
|
|
940
|
+
如果传入的物理叠层配置不符合当前 PCB 的物理属性,将会直接返回 `false` 且不进行修改 ADD since EDA v4.2
|
|
941
|
+
|
|
942
|
+
### removelayer
|
|
943
|
+
|
|
944
|
+
# PCB\_Layer.removeLayer() method
|
|
945
|
+
|
|
946
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
947
|
+
|
|
948
|
+
Remove Layer
|
|
949
|
+
|
|
950
|
+
## Signature
|
|
951
|
+
|
|
952
|
+
```typescript
|
|
953
|
+
function removeLayer(layer: TPCB_LayersOfCustom): Promise<boolean>;
|
|
954
|
+
```
|
|
955
|
+
|
|
956
|
+
## Parameters
|
|
957
|
+
|
|
958
|
+
<table><thead><tr><th>
|
|
959
|
+
|
|
960
|
+
Parameter
|
|
961
|
+
|
|
962
|
+
</th><th>
|
|
963
|
+
|
|
964
|
+
Type
|
|
965
|
+
|
|
966
|
+
</th><th>
|
|
967
|
+
|
|
968
|
+
Description
|
|
969
|
+
|
|
970
|
+
</th></tr></thead>
|
|
971
|
+
<tbody><tr><td>
|
|
972
|
+
|
|
973
|
+
layer
|
|
974
|
+
|
|
975
|
+
</td><td>
|
|
976
|
+
|
|
977
|
+
[TPCB\_LayersOfCustom](../types/TPCB_LayersOfCustom.md)
|
|
978
|
+
|
|
979
|
+
</td><td>
|
|
980
|
+
|
|
981
|
+
Layer
|
|
982
|
+
|
|
983
|
+
</td></tr>
|
|
984
|
+
</tbody></table>
|
|
985
|
+
|
|
986
|
+
## Returns
|
|
987
|
+
|
|
988
|
+
Promise<boolean>
|
|
989
|
+
|
|
990
|
+
Whether the operation is successful
|
|
991
|
+
|
|
992
|
+
## Remarks
|
|
993
|
+
|
|
994
|
+
Currently only custom layers can be removed
|
|
995
|
+
|
|
996
|
+
## Example
|
|
997
|
+
|
|
998
|
+
```javascript
|
|
999
|
+
// 1. 新增一个自定义层作为移除对象
|
|
1000
|
+
const customLayerId = await eda.pcb_Layer.addCustomLayer();
|
|
1001
|
+
|
|
1002
|
+
// 2. 移除该自定义层,返回操作是否成功
|
|
1003
|
+
const removeResult = await eda.pcb_Layer.removeLayer(customLayerId);
|
|
1004
|
+
|
|
1005
|
+
// 3. 确认该层已从图层列表消失
|
|
1006
|
+
const rest = (await eda.pcb_Layer.getAllLayers()).filter(l => l.type === 'CUSTOM');
|
|
1007
|
+
|
|
1008
|
+
console.log('removeResult:', removeResult);
|
|
1009
|
+
console.log('removedLayerId:', customLayerId);
|
|
1010
|
+
console.log('customLayerLeft:', rest.length);
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
### renamephysicalstackingconfiguration
|
|
1014
|
+
|
|
1015
|
+
# PCB\_Layer.renamePhysicalStackingConfiguration() method
|
|
1016
|
+
|
|
1017
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1018
|
+
|
|
1019
|
+
Rename the physical stacking configuration
|
|
1020
|
+
|
|
1021
|
+
## Signature
|
|
1022
|
+
|
|
1023
|
+
```typescript
|
|
1024
|
+
function renamePhysicalStackingConfiguration(
|
|
1025
|
+
originalConfigurationName: string,
|
|
1026
|
+
configurationName: string,
|
|
1027
|
+
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
1028
|
+
): Promise<boolean>;
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
## Parameters
|
|
1032
|
+
|
|
1033
|
+
<table><thead><tr><th>
|
|
1034
|
+
|
|
1035
|
+
Parameter
|
|
1036
|
+
|
|
1037
|
+
</th><th>
|
|
1038
|
+
|
|
1039
|
+
Type
|
|
1040
|
+
|
|
1041
|
+
</th><th>
|
|
1042
|
+
|
|
1043
|
+
Description
|
|
1044
|
+
|
|
1045
|
+
</th></tr></thead>
|
|
1046
|
+
<tbody><tr><td>
|
|
1047
|
+
|
|
1048
|
+
originalConfigurationName
|
|
1049
|
+
|
|
1050
|
+
</td><td>
|
|
1051
|
+
|
|
1052
|
+
string
|
|
1053
|
+
|
|
1054
|
+
</td><td>
|
|
1055
|
+
|
|
1056
|
+
Original physical stacking configuration name
|
|
1057
|
+
|
|
1058
|
+
</td></tr>
|
|
1059
|
+
<tr><td>
|
|
1060
|
+
|
|
1061
|
+
configurationName
|
|
1062
|
+
|
|
1063
|
+
</td><td>
|
|
1064
|
+
|
|
1065
|
+
string
|
|
1066
|
+
|
|
1067
|
+
</td><td>
|
|
1068
|
+
|
|
1069
|
+
New physical stacking configuration name
|
|
1070
|
+
|
|
1071
|
+
</td></tr>
|
|
1072
|
+
<tr><td>
|
|
1073
|
+
|
|
1074
|
+
physicalProps
|
|
1075
|
+
|
|
1076
|
+
</td><td>
|
|
1077
|
+
|
|
1078
|
+
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
1079
|
+
|
|
1080
|
+
</td><td>
|
|
1081
|
+
|
|
1082
|
+
_(Optional)_ 物理属性,如若不传入则默认为当前 PCB 属性
|
|
1083
|
+
|
|
1084
|
+
</td></tr>
|
|
1085
|
+
</tbody></table>
|
|
1086
|
+
|
|
1087
|
+
## Returns
|
|
1088
|
+
|
|
1089
|
+
Promise<boolean>
|
|
1090
|
+
|
|
1091
|
+
Whether the rename was successful
|
|
1092
|
+
|
|
1093
|
+
## Remarks
|
|
1094
|
+
|
|
1095
|
+
ADD since EDA v4.2
|
|
1096
|
+
|
|
1097
|
+
### savephysicalstackingconfiguration
|
|
1098
|
+
|
|
1099
|
+
# PCB\_Layer.savePhysicalStackingConfiguration() method
|
|
1100
|
+
|
|
1101
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1102
|
+
|
|
1103
|
+
Save Physical stacking configuration
|
|
1104
|
+
|
|
1105
|
+
## Signature
|
|
1106
|
+
|
|
1107
|
+
```typescript
|
|
1108
|
+
function savePhysicalStackingConfiguration(
|
|
1109
|
+
physicalStackingConfiguration: IPCB_PhysicalStackingConfiguration,
|
|
1110
|
+
configurationName: string,
|
|
1111
|
+
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
1112
|
+
allowOverwrite?: boolean,
|
|
1113
|
+
): Promise<boolean>;
|
|
1114
|
+
```
|
|
1115
|
+
|
|
1116
|
+
## Parameters
|
|
1117
|
+
|
|
1118
|
+
<table><thead><tr><th>
|
|
1119
|
+
|
|
1120
|
+
Parameter
|
|
1121
|
+
|
|
1122
|
+
</th><th>
|
|
1123
|
+
|
|
1124
|
+
Type
|
|
1125
|
+
|
|
1126
|
+
</th><th>
|
|
1127
|
+
|
|
1128
|
+
Description
|
|
1129
|
+
|
|
1130
|
+
</th></tr></thead>
|
|
1131
|
+
<tbody><tr><td>
|
|
1132
|
+
|
|
1133
|
+
physicalStackingConfiguration
|
|
1134
|
+
|
|
1135
|
+
</td><td>
|
|
1136
|
+
|
|
1137
|
+
[IPCB\_PhysicalStackingConfiguration](../interfaces/IPCB_PhysicalStackingConfiguration.md)
|
|
1138
|
+
|
|
1139
|
+
</td><td>
|
|
1140
|
+
|
|
1141
|
+
Physical stacking configuration
|
|
1142
|
+
|
|
1143
|
+
</td></tr>
|
|
1144
|
+
<tr><td>
|
|
1145
|
+
|
|
1146
|
+
configurationName
|
|
1147
|
+
|
|
1148
|
+
</td><td>
|
|
1149
|
+
|
|
1150
|
+
string
|
|
1151
|
+
|
|
1152
|
+
</td><td>
|
|
1153
|
+
|
|
1154
|
+
Configuration name
|
|
1155
|
+
|
|
1156
|
+
</td></tr>
|
|
1157
|
+
<tr><td>
|
|
1158
|
+
|
|
1159
|
+
physicalProps
|
|
1160
|
+
|
|
1161
|
+
</td><td>
|
|
1162
|
+
|
|
1163
|
+
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
1164
|
+
|
|
1165
|
+
</td><td>
|
|
1166
|
+
|
|
1167
|
+
_(Optional)_ 物理属性,如若不传入则默认为当前 PCB 属性
|
|
1168
|
+
|
|
1169
|
+
</td></tr>
|
|
1170
|
+
<tr><td>
|
|
1171
|
+
|
|
1172
|
+
allowOverwrite
|
|
1173
|
+
|
|
1174
|
+
</td><td>
|
|
1175
|
+
|
|
1176
|
+
boolean
|
|
1177
|
+
|
|
1178
|
+
</td><td>
|
|
1179
|
+
|
|
1180
|
+
_(Optional)_ Whether to allow overwriting a physical stacking configuration with the same name. If `false`<!-- -->, `false` will be returned when a configuration with the same name is encountered. Please note the possible risk of data loss
|
|
1181
|
+
|
|
1182
|
+
</td></tr>
|
|
1183
|
+
</tbody></table>
|
|
1184
|
+
|
|
1185
|
+
## Returns
|
|
1186
|
+
|
|
1187
|
+
Promise<boolean>
|
|
1188
|
+
|
|
1189
|
+
Save Whether Successful
|
|
1190
|
+
|
|
1191
|
+
## Remarks
|
|
1192
|
+
|
|
1193
|
+
ADD since EDA v4.2
|
|
1194
|
+
|
|
1195
|
+
### selectlayer
|
|
1196
|
+
|
|
1197
|
+
# PCB\_Layer.selectLayer() method
|
|
1198
|
+
|
|
1199
|
+
Select a layer
|
|
1200
|
+
|
|
1201
|
+
## Signature
|
|
1202
|
+
|
|
1203
|
+
```typescript
|
|
1204
|
+
function selectLayer(layer: TPCB_LayersInTheSelectable): Promise<boolean>;
|
|
1205
|
+
```
|
|
1206
|
+
|
|
1207
|
+
## Parameters
|
|
1208
|
+
|
|
1209
|
+
<table><thead><tr><th>
|
|
1210
|
+
|
|
1211
|
+
Parameter
|
|
1212
|
+
|
|
1213
|
+
</th><th>
|
|
1214
|
+
|
|
1215
|
+
Type
|
|
1216
|
+
|
|
1217
|
+
</th><th>
|
|
1218
|
+
|
|
1219
|
+
Description
|
|
1220
|
+
|
|
1221
|
+
</th></tr></thead>
|
|
1222
|
+
<tbody><tr><td>
|
|
1223
|
+
|
|
1224
|
+
layer
|
|
1225
|
+
|
|
1226
|
+
</td><td>
|
|
1227
|
+
|
|
1228
|
+
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)
|
|
1229
|
+
|
|
1230
|
+
</td><td>
|
|
1231
|
+
|
|
1232
|
+
Layer
|
|
1233
|
+
|
|
1234
|
+
</td></tr>
|
|
1235
|
+
</tbody></table>
|
|
1236
|
+
|
|
1237
|
+
## Returns
|
|
1238
|
+
|
|
1239
|
+
Promise<boolean>
|
|
1240
|
+
|
|
1241
|
+
Whether the operation was successful. `false` is returned if the specified layer does not exist
|
|
1242
|
+
|
|
1243
|
+
## Example
|
|
1244
|
+
|
|
1245
|
+
```javascript
|
|
1246
|
+
// 1. 切换当前工作层到底层(BOTTOM=2)
|
|
1247
|
+
const selectResult = await eda.pcb_Layer.selectLayer(2);
|
|
1248
|
+
|
|
1249
|
+
// 2. 再切回顶层(TOP=1),恢复常用工作层
|
|
1250
|
+
const restoreResult = await eda.pcb_Layer.selectLayer(1);
|
|
1251
|
+
|
|
1252
|
+
console.log('selectResult:', selectResult);
|
|
1253
|
+
console.log('restoreResult:', restoreResult);
|
|
1254
|
+
```
|
|
1255
|
+
|
|
1256
|
+
### setasdefaultphysicalstackingconfiguration
|
|
1257
|
+
|
|
1258
|
+
# PCB\_Layer.setAsDefaultPhysicalStackingConfiguration() method
|
|
1259
|
+
|
|
1260
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1261
|
+
|
|
1262
|
+
Set as the default physical stacking configuration for new PCBs
|
|
1263
|
+
|
|
1264
|
+
## Signature
|
|
1265
|
+
|
|
1266
|
+
```typescript
|
|
1267
|
+
function setAsDefaultPhysicalStackingConfiguration(
|
|
1268
|
+
configurationName: string,
|
|
1269
|
+
physicalProps?: IPCB_SubstratePhysicalProperties,
|
|
1270
|
+
): Promise<boolean>;
|
|
1271
|
+
```
|
|
1272
|
+
|
|
1273
|
+
## Parameters
|
|
1274
|
+
|
|
1275
|
+
<table><thead><tr><th>
|
|
1276
|
+
|
|
1277
|
+
Parameter
|
|
1278
|
+
|
|
1279
|
+
</th><th>
|
|
1280
|
+
|
|
1281
|
+
Type
|
|
1282
|
+
|
|
1283
|
+
</th><th>
|
|
1284
|
+
|
|
1285
|
+
Description
|
|
1286
|
+
|
|
1287
|
+
</th></tr></thead>
|
|
1288
|
+
<tbody><tr><td>
|
|
1289
|
+
|
|
1290
|
+
configurationName
|
|
1291
|
+
|
|
1292
|
+
</td><td>
|
|
1293
|
+
|
|
1294
|
+
string
|
|
1295
|
+
|
|
1296
|
+
</td><td>
|
|
1297
|
+
|
|
1298
|
+
Configuration name
|
|
1299
|
+
|
|
1300
|
+
</td></tr>
|
|
1301
|
+
<tr><td>
|
|
1302
|
+
|
|
1303
|
+
physicalProps
|
|
1304
|
+
|
|
1305
|
+
</td><td>
|
|
1306
|
+
|
|
1307
|
+
[IPCB\_SubstratePhysicalProperties](../interfaces/IPCB_SubstratePhysicalProperties.md)
|
|
1308
|
+
|
|
1309
|
+
</td><td>
|
|
1310
|
+
|
|
1311
|
+
_(Optional)_ 物理属性,如若不传入则默认为当前 PCB 属性
|
|
1312
|
+
|
|
1313
|
+
</td></tr>
|
|
1314
|
+
</tbody></table>
|
|
1315
|
+
|
|
1316
|
+
## Returns
|
|
1317
|
+
|
|
1318
|
+
Promise<boolean>
|
|
1319
|
+
|
|
1320
|
+
Set Whether Successful
|
|
1321
|
+
|
|
1322
|
+
## Remarks
|
|
1323
|
+
|
|
1324
|
+
The return value is result-oriented. Repeatedly setting the same physical stacking as the default will also return `true` ADD since EDA v4.2
|
|
1325
|
+
|
|
1326
|
+
### setinactivelayerdisplaymode
|
|
1327
|
+
|
|
1328
|
+
# PCB\_Layer.setInactiveLayerDisplayMode() method
|
|
1329
|
+
|
|
1330
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1331
|
+
|
|
1332
|
+
Set Inactive layer display mode
|
|
1333
|
+
|
|
1334
|
+
## Signature
|
|
1335
|
+
|
|
1336
|
+
```typescript
|
|
1337
|
+
function setInactiveLayerDisplayMode(displayMode?: EPCB_InactiveLayerDisplayMode): Promise<boolean>;
|
|
1338
|
+
```
|
|
1339
|
+
|
|
1340
|
+
## Parameters
|
|
1341
|
+
|
|
1342
|
+
<table><thead><tr><th>
|
|
1343
|
+
|
|
1344
|
+
Parameter
|
|
1345
|
+
|
|
1346
|
+
</th><th>
|
|
1347
|
+
|
|
1348
|
+
Type
|
|
1349
|
+
|
|
1350
|
+
</th><th>
|
|
1351
|
+
|
|
1352
|
+
Description
|
|
1353
|
+
|
|
1354
|
+
</th></tr></thead>
|
|
1355
|
+
<tbody><tr><td>
|
|
1356
|
+
|
|
1357
|
+
displayMode
|
|
1358
|
+
|
|
1359
|
+
</td><td>
|
|
1360
|
+
|
|
1361
|
+
[EPCB\_InactiveLayerDisplayMode](../enums/EPCB_InactiveLayerDisplayMode.md)
|
|
1362
|
+
|
|
1363
|
+
</td><td>
|
|
1364
|
+
|
|
1365
|
+
_(Optional)_ Display mode
|
|
1366
|
+
|
|
1367
|
+
</td></tr>
|
|
1368
|
+
</tbody></table>
|
|
1369
|
+
|
|
1370
|
+
## Returns
|
|
1371
|
+
|
|
1372
|
+
Promise<boolean>
|
|
1373
|
+
|
|
1374
|
+
Whether Set Successful
|
|
1375
|
+
|
|
1376
|
+
## Example
|
|
1377
|
+
|
|
1378
|
+
```javascript
|
|
1379
|
+
// 1. 将非激活层设为置灰模式(TURN_GRAY=1)
|
|
1380
|
+
const setResult = await eda.pcb_Layer.setInactiveLayerDisplayMode(1);
|
|
1381
|
+
|
|
1382
|
+
// 2. 恢复为正常亮度(NORMAL_BRIGHTNESS=0),避免影响日常查看
|
|
1383
|
+
const restoreResult = await eda.pcb_Layer.setInactiveLayerDisplayMode(0);
|
|
1384
|
+
|
|
1385
|
+
console.log('setResult:', setResult);
|
|
1386
|
+
console.log('restoreResult:', restoreResult);
|
|
1387
|
+
```
|
|
1388
|
+
|
|
1389
|
+
### setinactivelayertransparency
|
|
1390
|
+
|
|
1391
|
+
# PCB\_Layer.setInactiveLayerTransparency() method
|
|
1392
|
+
|
|
1393
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1394
|
+
|
|
1395
|
+
Set the inactive layer transparency
|
|
1396
|
+
|
|
1397
|
+
## Signature
|
|
1398
|
+
|
|
1399
|
+
```typescript
|
|
1400
|
+
function setInactiveLayerTransparency(transparency: number): Promise<boolean>;
|
|
1401
|
+
```
|
|
1402
|
+
|
|
1403
|
+
## Parameters
|
|
1404
|
+
|
|
1405
|
+
<table><thead><tr><th>
|
|
1406
|
+
|
|
1407
|
+
Parameter
|
|
1408
|
+
|
|
1409
|
+
</th><th>
|
|
1410
|
+
|
|
1411
|
+
Type
|
|
1412
|
+
|
|
1413
|
+
</th><th>
|
|
1414
|
+
|
|
1415
|
+
Description
|
|
1416
|
+
|
|
1417
|
+
</th></tr></thead>
|
|
1418
|
+
<tbody><tr><td>
|
|
1419
|
+
|
|
1420
|
+
transparency
|
|
1421
|
+
|
|
1422
|
+
</td><td>
|
|
1423
|
+
|
|
1424
|
+
number
|
|
1425
|
+
|
|
1426
|
+
</td><td>
|
|
1427
|
+
|
|
1428
|
+
Transparency, range `0-100`
|
|
1429
|
+
|
|
1430
|
+
</td></tr>
|
|
1431
|
+
</tbody></table>
|
|
1432
|
+
|
|
1433
|
+
## Returns
|
|
1434
|
+
|
|
1435
|
+
Promise<boolean>
|
|
1436
|
+
|
|
1437
|
+
Whether the operation is successful
|
|
1438
|
+
|
|
1439
|
+
## Example
|
|
1440
|
+
|
|
1441
|
+
```javascript
|
|
1442
|
+
// 1. 将非激活层透明度设为 60,让当前编辑层更突出
|
|
1443
|
+
const setResult = await eda.pcb_Layer.setInactiveLayerTransparency(60);
|
|
1444
|
+
|
|
1445
|
+
// 2. 恢复为 0(不透明),避免影响日常查看
|
|
1446
|
+
const restoreResult = await eda.pcb_Layer.setInactiveLayerTransparency(0);
|
|
1447
|
+
|
|
1448
|
+
console.log('setResult:', setResult);
|
|
1449
|
+
console.log('restoreResult:', restoreResult);
|
|
1450
|
+
```
|
|
1451
|
+
|
|
1452
|
+
### setlayercolorconfiguration
|
|
1453
|
+
|
|
1454
|
+
# PCB\_Layer.setLayerColorConfiguration() method
|
|
1455
|
+
|
|
1456
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1457
|
+
|
|
1458
|
+
Set the layer color configuration
|
|
1459
|
+
|
|
1460
|
+
## Signature
|
|
1461
|
+
|
|
1462
|
+
```typescript
|
|
1463
|
+
function setLayerColorConfiguration(
|
|
1464
|
+
colorConfiguration: EPCB_LayerColorConfiguration,
|
|
1465
|
+
): Promise<boolean>;
|
|
1466
|
+
```
|
|
1467
|
+
|
|
1468
|
+
## Parameters
|
|
1469
|
+
|
|
1470
|
+
<table><thead><tr><th>
|
|
1471
|
+
|
|
1472
|
+
Parameter
|
|
1473
|
+
|
|
1474
|
+
</th><th>
|
|
1475
|
+
|
|
1476
|
+
Type
|
|
1477
|
+
|
|
1478
|
+
</th><th>
|
|
1479
|
+
|
|
1480
|
+
Description
|
|
1481
|
+
|
|
1482
|
+
</th></tr></thead>
|
|
1483
|
+
<tbody><tr><td>
|
|
1484
|
+
|
|
1485
|
+
colorConfiguration
|
|
1486
|
+
|
|
1487
|
+
</td><td>
|
|
1488
|
+
|
|
1489
|
+
[EPCB\_LayerColorConfiguration](../enums/EPCB_LayerColorConfiguration.md)
|
|
1490
|
+
|
|
1491
|
+
</td><td>
|
|
1492
|
+
|
|
1493
|
+
Color configuration
|
|
1494
|
+
|
|
1495
|
+
</td></tr>
|
|
1496
|
+
</tbody></table>
|
|
1497
|
+
|
|
1498
|
+
## Returns
|
|
1499
|
+
|
|
1500
|
+
Promise<boolean>
|
|
1501
|
+
|
|
1502
|
+
Whether the operation is successful
|
|
1503
|
+
|
|
1504
|
+
## Example
|
|
1505
|
+
|
|
1506
|
+
```javascript
|
|
1507
|
+
// 1. 记录切换前顶层的颜色
|
|
1508
|
+
const before = (await eda.pcb_Layer.getAllLayers()).find(l => l.id === 1);
|
|
1509
|
+
|
|
1510
|
+
// 2. 切换为 Altium Designer 配色(ALTIUM_DESIGNER=2)
|
|
1511
|
+
const setResult = await eda.pcb_Layer.setLayerColorConfiguration(2);
|
|
1512
|
+
|
|
1513
|
+
// 3. 查看切换后顶层的颜色
|
|
1514
|
+
const after = (await eda.pcb_Layer.getAllLayers()).find(l => l.id === 1);
|
|
1515
|
+
|
|
1516
|
+
// 4. 恢复嘉立创 EDA 默认配色(EASYEDA=1)
|
|
1517
|
+
const restoreResult = await eda.pcb_Layer.setLayerColorConfiguration(1);
|
|
1518
|
+
|
|
1519
|
+
console.log('setResult:', setResult);
|
|
1520
|
+
console.log('topColorBefore:', before?.color, '→ topColorAfter:', after?.color);
|
|
1521
|
+
console.log('restoreResult:', restoreResult);
|
|
1522
|
+
```
|
|
1523
|
+
|
|
1524
|
+
### setlayerinvisible
|
|
1525
|
+
|
|
1526
|
+
# PCB\_Layer.setLayerInvisible() method
|
|
1527
|
+
|
|
1528
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1529
|
+
|
|
1530
|
+
Set the layer to invisible
|
|
1531
|
+
|
|
1532
|
+
## Signature
|
|
1533
|
+
|
|
1534
|
+
```typescript
|
|
1535
|
+
function setLayerInvisible(
|
|
1536
|
+
layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>,
|
|
1537
|
+
setOtherLayerVisible?: boolean,
|
|
1538
|
+
): Promise<boolean>;
|
|
1539
|
+
```
|
|
1540
|
+
|
|
1541
|
+
## Parameters
|
|
1542
|
+
|
|
1543
|
+
<table><thead><tr><th>
|
|
1544
|
+
|
|
1545
|
+
Parameter
|
|
1546
|
+
|
|
1547
|
+
</th><th>
|
|
1548
|
+
|
|
1549
|
+
Type
|
|
1550
|
+
|
|
1551
|
+
</th><th>
|
|
1552
|
+
|
|
1553
|
+
Description
|
|
1554
|
+
|
|
1555
|
+
</th></tr></thead>
|
|
1556
|
+
<tbody><tr><td>
|
|
1557
|
+
|
|
1558
|
+
layer
|
|
1559
|
+
|
|
1560
|
+
</td><td>
|
|
1561
|
+
|
|
1562
|
+
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
|
|
1563
|
+
|
|
1564
|
+
</td><td>
|
|
1565
|
+
|
|
1566
|
+
_(Optional)_ Layer. If no layer is specified, all layers are used by default
|
|
1567
|
+
|
|
1568
|
+
</td></tr>
|
|
1569
|
+
<tr><td>
|
|
1570
|
+
|
|
1571
|
+
setOtherLayerVisible
|
|
1572
|
+
|
|
1573
|
+
</td><td>
|
|
1574
|
+
|
|
1575
|
+
boolean
|
|
1576
|
+
|
|
1577
|
+
</td><td>
|
|
1578
|
+
|
|
1579
|
+
_(Optional)_ Whether to set other layers to visible
|
|
1580
|
+
|
|
1581
|
+
</td></tr>
|
|
1582
|
+
</tbody></table>
|
|
1583
|
+
|
|
1584
|
+
## Returns
|
|
1585
|
+
|
|
1586
|
+
Promise<boolean>
|
|
1587
|
+
|
|
1588
|
+
Whether the operation is successful
|
|
1589
|
+
|
|
1590
|
+
## Example
|
|
1591
|
+
|
|
1592
|
+
```javascript
|
|
1593
|
+
// 1. 隐藏底层丝印层(BOTTOM_SILKSCREEN=4)
|
|
1594
|
+
const hideResult = await eda.pcb_Layer.setLayerInvisible(4);
|
|
1595
|
+
|
|
1596
|
+
// 2. 从图层列表确认显隐状态(HIDDEN=2)
|
|
1597
|
+
const layers = await eda.pcb_Layer.getAllLayers();
|
|
1598
|
+
const silk = layers.find(l => l.id === 4);
|
|
1599
|
+
|
|
1600
|
+
// 3. 恢复可见,避免影响后续查看
|
|
1601
|
+
const restoreResult = await eda.pcb_Layer.setLayerVisible(4);
|
|
1602
|
+
|
|
1603
|
+
console.log('hideResult:', hideResult);
|
|
1604
|
+
console.log('silkLayerStatus:', silk?.layerStatus);
|
|
1605
|
+
console.log('restoreResult:', restoreResult);
|
|
1606
|
+
```
|
|
1607
|
+
|
|
1608
|
+
### setlayervisible
|
|
1609
|
+
|
|
1610
|
+
# PCB\_Layer.setLayerVisible() method
|
|
1611
|
+
|
|
1612
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1613
|
+
|
|
1614
|
+
Set the layer to visible
|
|
1615
|
+
|
|
1616
|
+
## Signature
|
|
1617
|
+
|
|
1618
|
+
```typescript
|
|
1619
|
+
function setLayerVisible(
|
|
1620
|
+
layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>,
|
|
1621
|
+
setOtherLayerInvisible?: boolean,
|
|
1622
|
+
): Promise<boolean>;
|
|
1623
|
+
```
|
|
1624
|
+
|
|
1625
|
+
## Parameters
|
|
1626
|
+
|
|
1627
|
+
<table><thead><tr><th>
|
|
1628
|
+
|
|
1629
|
+
Parameter
|
|
1630
|
+
|
|
1631
|
+
</th><th>
|
|
1632
|
+
|
|
1633
|
+
Type
|
|
1634
|
+
|
|
1635
|
+
</th><th>
|
|
1636
|
+
|
|
1637
|
+
Description
|
|
1638
|
+
|
|
1639
|
+
</th></tr></thead>
|
|
1640
|
+
<tbody><tr><td>
|
|
1641
|
+
|
|
1642
|
+
layer
|
|
1643
|
+
|
|
1644
|
+
</td><td>
|
|
1645
|
+
|
|
1646
|
+
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
|
|
1647
|
+
|
|
1648
|
+
</td><td>
|
|
1649
|
+
|
|
1650
|
+
_(Optional)_ Layer. If no layer is specified, all layers are used by default
|
|
1651
|
+
|
|
1652
|
+
</td></tr>
|
|
1653
|
+
<tr><td>
|
|
1654
|
+
|
|
1655
|
+
setOtherLayerInvisible
|
|
1656
|
+
|
|
1657
|
+
</td><td>
|
|
1658
|
+
|
|
1659
|
+
boolean
|
|
1660
|
+
|
|
1661
|
+
</td><td>
|
|
1662
|
+
|
|
1663
|
+
_(Optional)_ Whether to set other layers to invisible
|
|
1664
|
+
|
|
1665
|
+
</td></tr>
|
|
1666
|
+
</tbody></table>
|
|
1667
|
+
|
|
1668
|
+
## Returns
|
|
1669
|
+
|
|
1670
|
+
Promise<boolean>
|
|
1671
|
+
|
|
1672
|
+
Whether the operation is successful
|
|
1673
|
+
|
|
1674
|
+
## Example
|
|
1675
|
+
|
|
1676
|
+
```javascript
|
|
1677
|
+
// 1. 先隐藏底层丝印层(BOTTOM_SILKSCREEN=4)制造初始状态
|
|
1678
|
+
await eda.pcb_Layer.setLayerInvisible(4);
|
|
1679
|
+
|
|
1680
|
+
// 2. 恢复底层丝印层可见
|
|
1681
|
+
const showResult = await eda.pcb_Layer.setLayerVisible(4);
|
|
1682
|
+
|
|
1683
|
+
// 3. 从图层列表确认显隐状态(SHOW=1)
|
|
1684
|
+
const layers = await eda.pcb_Layer.getAllLayers();
|
|
1685
|
+
const silk = layers.find(l => l.id === 4);
|
|
1686
|
+
|
|
1687
|
+
console.log('showResult:', showResult);
|
|
1688
|
+
console.log('silkLayerStatus:', silk?.layerStatus);
|
|
1689
|
+
```
|
|
1690
|
+
|
|
1691
|
+
### setpcbtype
|
|
1692
|
+
|
|
1693
|
+
# PCB\_Layer.setPcbType() method
|
|
1694
|
+
|
|
1695
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1696
|
+
|
|
1697
|
+
Set PCB type
|
|
1698
|
+
|
|
1699
|
+
## Signature
|
|
1700
|
+
|
|
1701
|
+
```typescript
|
|
1702
|
+
function setPcbType(pcbType: EPCB_PcbPlateType): Promise<boolean>;
|
|
1703
|
+
```
|
|
1704
|
+
|
|
1705
|
+
## Parameters
|
|
1706
|
+
|
|
1707
|
+
<table><thead><tr><th>
|
|
1708
|
+
|
|
1709
|
+
Parameter
|
|
1710
|
+
|
|
1711
|
+
</th><th>
|
|
1712
|
+
|
|
1713
|
+
Type
|
|
1714
|
+
|
|
1715
|
+
</th><th>
|
|
1716
|
+
|
|
1717
|
+
Description
|
|
1718
|
+
|
|
1719
|
+
</th></tr></thead>
|
|
1720
|
+
<tbody><tr><td>
|
|
1721
|
+
|
|
1722
|
+
pcbType
|
|
1723
|
+
|
|
1724
|
+
</td><td>
|
|
1725
|
+
|
|
1726
|
+
[EPCB\_PcbPlateType](../enums/EPCB_PcbPlateType.md)
|
|
1727
|
+
|
|
1728
|
+
</td><td>
|
|
1729
|
+
|
|
1730
|
+
PCB type
|
|
1731
|
+
|
|
1732
|
+
</td></tr>
|
|
1733
|
+
</tbody></table>
|
|
1734
|
+
|
|
1735
|
+
## Returns
|
|
1736
|
+
|
|
1737
|
+
Promise<boolean>
|
|
1738
|
+
|
|
1739
|
+
Whether the operation is successful
|
|
1740
|
+
|
|
1741
|
+
## Remarks
|
|
1742
|
+
|
|
1743
|
+
This is mainly to support FPC flexible board design. If the PCB type is set to FPC flexible board, an FPC stiffener layer will be added.
|
|
1744
|
+
|
|
1745
|
+
Please note:
|
|
1746
|
+
|
|
1747
|
+
1. EasyEDA does not yet support FPC flexible board production with more than 2 copper layers;
|
|
1748
|
+
|
|
1749
|
+
2. When switching the PCB type from FPC flexible board to ordinary board, any primitives on the FPC stiffener layer must be deleted in advance; otherwise, the switch will fail and `false` will be returned.
|
|
1750
|
+
|
|
1751
|
+
## Example
|
|
1752
|
+
|
|
1753
|
+
```javascript
|
|
1754
|
+
// 1. 记录切换前的图层总数
|
|
1755
|
+
const before = await eda.pcb_Layer.getAllLayers();
|
|
1756
|
+
|
|
1757
|
+
// 2. 切换为 FPC 软板(FPC=2),自动新增补强层
|
|
1758
|
+
const fpcResult = await eda.pcb_Layer.setPcbType(2);
|
|
1759
|
+
|
|
1760
|
+
// 3. 查看切换后的图层总数变化
|
|
1761
|
+
const fpcLayers = await eda.pcb_Layer.getAllLayers();
|
|
1762
|
+
|
|
1763
|
+
// 4. 切回普通板材(NORMAL=1),恢复原板材类型
|
|
1764
|
+
const restoreResult = await eda.pcb_Layer.setPcbType(1);
|
|
1765
|
+
|
|
1766
|
+
console.log('fpcResult:', fpcResult);
|
|
1767
|
+
console.log('layerCountBefore:', before.length, '→ layerCountAfter:', fpcLayers.length);
|
|
1768
|
+
console.log('restoreResult:', restoreResult);
|
|
1769
|
+
```
|
|
1770
|
+
|
|
1771
|
+
### setthenumberofcopperlayers
|
|
1772
|
+
|
|
1773
|
+
# PCB\_Layer.setTheNumberOfCopperLayers() method
|
|
1774
|
+
|
|
1775
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1776
|
+
|
|
1777
|
+
Set Number of copper layers
|
|
1778
|
+
|
|
1779
|
+
## Signature
|
|
1780
|
+
|
|
1781
|
+
```typescript
|
|
1782
|
+
function setTheNumberOfCopperLayers(numberOfLayers: TPCB_NumberOfCopperLayers): Promise<boolean>;
|
|
1783
|
+
```
|
|
1784
|
+
|
|
1785
|
+
## Parameters
|
|
1786
|
+
|
|
1787
|
+
<table><thead><tr><th>
|
|
1788
|
+
|
|
1789
|
+
Parameter
|
|
1790
|
+
|
|
1791
|
+
</th><th>
|
|
1792
|
+
|
|
1793
|
+
Type
|
|
1794
|
+
|
|
1795
|
+
</th><th>
|
|
1796
|
+
|
|
1797
|
+
Description
|
|
1798
|
+
|
|
1799
|
+
</th></tr></thead>
|
|
1800
|
+
<tbody><tr><td>
|
|
1801
|
+
|
|
1802
|
+
numberOfLayers
|
|
1803
|
+
|
|
1804
|
+
</td><td>
|
|
1805
|
+
|
|
1806
|
+
[TPCB\_NumberOfCopperLayers](../types/TPCB_NumberOfCopperLayers.md)
|
|
1807
|
+
|
|
1808
|
+
</td><td>
|
|
1809
|
+
|
|
1810
|
+
Number of copper layers
|
|
1811
|
+
|
|
1812
|
+
</td></tr>
|
|
1813
|
+
</tbody></table>
|
|
1814
|
+
|
|
1815
|
+
## Returns
|
|
1816
|
+
|
|
1817
|
+
Promise<boolean>
|
|
1818
|
+
|
|
1819
|
+
Whether the operation is successful
|
|
1820
|
+
|
|
1821
|
+
## Remarks
|
|
1822
|
+
|
|
1823
|
+
A newly created PCB document has two copper layers by default
|
|
1824
|
+
|
|
1825
|
+
## Example
|
|
1826
|
+
|
|
1827
|
+
```javascript
|
|
1828
|
+
// 1. 记录调整前的信号层(铜箔层)数量
|
|
1829
|
+
const before = (await eda.pcb_Layer.getAllLayers()).filter(l => l.type === 'SIGNAL').length;
|
|
1830
|
+
|
|
1831
|
+
// 2. 将铜箔层数调整为 4 层,新增 INNER_1(15)、INNER_2(16)两个内层
|
|
1832
|
+
const setResult = await eda.pcb_Layer.setTheNumberOfCopperLayers(4);
|
|
1833
|
+
|
|
1834
|
+
// 3. 确认内层已加入图层列表
|
|
1835
|
+
const afterLayers = await eda.pcb_Layer.getAllLayers();
|
|
1836
|
+
const after = afterLayers.filter(l => l.type === 'SIGNAL').length;
|
|
1837
|
+
const inner1 = afterLayers.find(l => l.id === 15);
|
|
1838
|
+
|
|
1839
|
+
// 4. 恢复为 2 层板,移除空的内层(内层上有图元时无法减少层数)
|
|
1840
|
+
const restoreResult = await eda.pcb_Layer.setTheNumberOfCopperLayers(2);
|
|
1841
|
+
|
|
1842
|
+
console.log('setResult:', setResult);
|
|
1843
|
+
console.log('copperCountBefore:', before, '→ copperCountAfter:', after);
|
|
1844
|
+
console.log('inner1Name:', inner1?.name);
|
|
1845
|
+
console.log('restoreResult:', restoreResult);
|
|
1846
|
+
```
|
|
1847
|
+
|
|
1848
|
+
### unlocklayer
|
|
1849
|
+
|
|
1850
|
+
# PCB\_Layer.unlockLayer() method
|
|
1851
|
+
|
|
1852
|
+
> This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
1853
|
+
|
|
1854
|
+
Unlock the layer
|
|
1855
|
+
|
|
1856
|
+
## Signature
|
|
1857
|
+
|
|
1858
|
+
```typescript
|
|
1859
|
+
function unlockLayer(
|
|
1860
|
+
layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>,
|
|
1861
|
+
): Promise<boolean>;
|
|
1862
|
+
```
|
|
1863
|
+
|
|
1864
|
+
## Parameters
|
|
1865
|
+
|
|
1866
|
+
<table><thead><tr><th>
|
|
1867
|
+
|
|
1868
|
+
Parameter
|
|
1869
|
+
|
|
1870
|
+
</th><th>
|
|
1871
|
+
|
|
1872
|
+
Type
|
|
1873
|
+
|
|
1874
|
+
</th><th>
|
|
1875
|
+
|
|
1876
|
+
Description
|
|
1877
|
+
|
|
1878
|
+
</th></tr></thead>
|
|
1879
|
+
<tbody><tr><td>
|
|
1880
|
+
|
|
1881
|
+
layer
|
|
1882
|
+
|
|
1883
|
+
</td><td>
|
|
1884
|
+
|
|
1885
|
+
[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md) \| Array<[TPCB\_LayersInTheSelectable](../types/TPCB_LayersInTheSelectable.md)<!-- -->>
|
|
1886
|
+
|
|
1887
|
+
</td><td>
|
|
1888
|
+
|
|
1889
|
+
_(Optional)_ Layer. If no layer is specified, all layers are used by default
|
|
1890
|
+
|
|
1891
|
+
</td></tr>
|
|
1892
|
+
</tbody></table>
|
|
1893
|
+
|
|
1894
|
+
## Returns
|
|
1895
|
+
|
|
1896
|
+
Promise<boolean>
|
|
1897
|
+
|
|
1898
|
+
Whether the operation is successful
|
|
1899
|
+
|
|
1900
|
+
## Example
|
|
1901
|
+
|
|
1902
|
+
```javascript
|
|
1903
|
+
// 1. 先锁定顶层(TOP=1)制造初始状态
|
|
1904
|
+
await eda.pcb_Layer.lockLayer(1);
|
|
1905
|
+
|
|
1906
|
+
// 2. 解锁顶层,返回操作是否成功
|
|
1907
|
+
const unlockResult = await eda.pcb_Layer.unlockLayer(1);
|
|
1908
|
+
|
|
1909
|
+
// 3. 从图层列表确认锁定已解除
|
|
1910
|
+
const layers = await eda.pcb_Layer.getAllLayers();
|
|
1911
|
+
const top = layers.find(l => l.id === 1);
|
|
1912
|
+
|
|
1913
|
+
console.log('unlockResult:', unlockResult);
|
|
1914
|
+
console.log('topStillLocked:', top?.locked);
|
|
1915
|
+
```
|