@windypro-rourou/dsh-eda 0.1.0 → 0.1.2

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