@windypro-rourou/dsh-eda 0.1.4 → 0.1.6

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 (484) hide show
  1. package/README.md +1 -1
  2. package/lib/backend.js +49 -0
  3. package/lib/capabilities.js +6 -2
  4. package/lib/client.js +33 -0
  5. package/lib/index.js +197 -3
  6. package/package.json +10 -1
  7. package/skill/INDEX.md +10 -8
  8. package/skill/README.md +125 -0
  9. package/skill/README.zh-Hans.md +125 -0
  10. package/skill/SKILL.md +746 -746
  11. package/skill/format/index.md +152 -152
  12. package/skill/format/pcb/3d.md +166 -166
  13. package/skill/format/pcb/attr.md +63 -63
  14. package/skill/format/pcb/common.md +306 -306
  15. package/skill/format/pcb/component.md +132 -132
  16. package/skill/format/pcb/dimension.md +58 -58
  17. package/skill/format/pcb/index.md +17 -17
  18. package/skill/format/pcb/obj.md +43 -43
  19. package/skill/format/pcb/pad_via.md +151 -151
  20. package/skill/format/pcb/panel.md +64 -64
  21. package/skill/format/pcb/partition.md +43 -43
  22. package/skill/format/pcb/primitive.md +196 -196
  23. package/skill/format/pcb/rule.md +71 -71
  24. package/skill/format/pcb/shape.md +441 -441
  25. package/skill/format/pcb/text.md +62 -62
  26. package/skill/format/project/blob.md +30 -30
  27. package/skill/format/project/common.md +42 -42
  28. package/skill/format/project/group.md +62 -62
  29. package/skill/format/project/index.md +12 -12
  30. package/skill/format/project/instance.md +32 -32
  31. package/skill/format/project/meta.md +189 -189
  32. package/skill/format/project/variant.md +30 -30
  33. package/skill/format/schematic/attr.md +41 -41
  34. package/skill/format/schematic/common.md +47 -47
  35. package/skill/format/schematic/component.md +91 -91
  36. package/skill/format/schematic/index.md +14 -14
  37. package/skill/format/schematic/obj.md +41 -41
  38. package/skill/format/schematic/pin.md +59 -59
  39. package/skill/format/schematic/shape.md +231 -231
  40. package/skill/format/schematic/structure.md +53 -53
  41. package/skill/format/schematic/table.md +109 -109
  42. package/skill/format/schematic/text.md +47 -47
  43. package/skill/format/schematic/wire.md +132 -132
  44. package/skill/guide/ancillary-projects/easyeda-api-sdk.md +1 -0
  45. package/skill/guide/ancillary-projects/pro-api-types.md +5 -5
  46. package/skill/guide/ancillary-projects.md +10 -10
  47. package/skill/guide/cli.md +1510 -0
  48. package/skill/guide/error-handling.md +38 -38
  49. package/skill/guide/extension-json.md +135 -135
  50. package/skill/guide/extensions-marketplace.md +61 -61
  51. package/skill/guide/how-to-start.md +316 -301
  52. package/skill/guide/i18n.md +57 -57
  53. package/skill/guide/index.md +7 -7
  54. package/skill/guide/inline-frame.md +20 -20
  55. package/skill/guide/invoke-apis.md +81 -81
  56. package/skill/guide/stability.md +37 -37
  57. package/skill/references/_index.md +471 -398
  58. package/skill/references/_quick-reference.md +3103 -3028
  59. package/skill/references/classes/DMT_Board.md +537 -533
  60. package/skill/references/classes/DMT_EditorControl.md +1736 -1736
  61. package/skill/references/classes/DMT_Event.md +356 -356
  62. package/skill/references/classes/DMT_Folder.md +775 -775
  63. package/skill/references/classes/DMT_Panel.md +531 -531
  64. package/skill/references/classes/DMT_Pcb.md +579 -575
  65. package/skill/references/classes/DMT_Project.md +734 -573
  66. package/skill/references/classes/DMT_Schematic.md +1482 -1477
  67. package/skill/references/classes/DMT_SelectControl.md +96 -96
  68. package/skill/references/classes/DMT_Team.md +172 -172
  69. package/skill/references/classes/DMT_Workspace.md +198 -198
  70. package/skill/references/classes/EDA.md +1001 -961
  71. package/skill/references/classes/IPCB_ComplexPolygon.md +299 -299
  72. package/skill/references/classes/IPCB_Polygon.md +175 -175
  73. package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -1901
  74. package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -2993
  75. package/skill/references/classes/IPCB_PrimitiveComponent.md +2624 -2627
  76. package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -410
  77. package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -1419
  78. package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -1325
  79. package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -1461
  80. package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -1639
  81. package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -1700
  82. package/skill/references/classes/IPCB_PrimitivePad.md +3155 -3155
  83. package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -1193
  84. package/skill/references/classes/IPCB_PrimitivePour.md +1858 -1858
  85. package/skill/references/classes/IPCB_PrimitivePoured.md +556 -556
  86. package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -1332
  87. package/skill/references/classes/IPCB_PrimitiveString.md +2315 -2315
  88. package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -1588
  89. package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -1676
  90. package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -2541
  91. package/skill/references/classes/ISCH_PrimitiveBus.md +973 -973
  92. package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -260
  93. package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -1392
  94. package/skill/references/classes/ISCH_PrimitiveComponent.md +2910 -2913
  95. package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -155
  96. package/skill/references/classes/ISCH_PrimitiveObject.md +960 -960
  97. package/skill/references/classes/ISCH_PrimitivePin.md +2402 -2402
  98. package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -1028
  99. package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -1777
  100. package/skill/references/classes/ISCH_PrimitiveText.md +1771 -1771
  101. package/skill/references/classes/ISCH_PrimitiveWire.md +973 -973
  102. package/skill/references/classes/LIB_3DModel.md +782 -780
  103. package/skill/references/classes/LIB_Cbb.md +957 -957
  104. package/skill/references/classes/LIB_Classification.md +969 -965
  105. package/skill/references/classes/LIB_Device.md +1222 -1221
  106. package/skill/references/classes/LIB_Footprint.md +1298 -1153
  107. package/skill/references/classes/LIB_LibrariesList.md +361 -329
  108. package/skill/references/classes/LIB_PanelLibrary.md +855 -855
  109. package/skill/references/classes/LIB_SelectControl.md +89 -89
  110. package/skill/references/classes/LIB_SimulationModel.md +807 -821
  111. package/skill/references/classes/LIB_Symbol.md +1341 -1195
  112. package/skill/references/classes/PCB_Document.md +1770 -1754
  113. package/skill/references/classes/PCB_Drc.md +3379 -3375
  114. package/skill/references/classes/PCB_Event.md +1166 -1081
  115. package/skill/references/classes/PCB_ImageTool.md +363 -0
  116. package/skill/references/classes/PCB_Layer.md +1915 -1911
  117. package/skill/references/classes/PCB_ManufactureData.md +2968 -2968
  118. package/skill/references/classes/PCB_MathPolygon.md +916 -785
  119. package/skill/references/classes/PCB_Net.md +1128 -1128
  120. package/skill/references/classes/PCB_Primitive.md +217 -217
  121. package/skill/references/classes/PCB_PrimitiveArc.md +820 -894
  122. package/skill/references/classes/PCB_PrimitiveAttribute.md +635 -717
  123. package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -1050
  124. package/skill/references/classes/PCB_PrimitiveDimension.md +789 -833
  125. package/skill/references/classes/PCB_PrimitiveFill.md +783 -861
  126. package/skill/references/classes/PCB_PrimitiveImage.md +803 -875
  127. package/skill/references/classes/PCB_PrimitiveLine.md +787 -858
  128. package/skill/references/classes/PCB_PrimitiveObject.md +796 -800
  129. package/skill/references/classes/PCB_PrimitivePad.md +947 -944
  130. package/skill/references/classes/PCB_PrimitivePolyline.md +744 -819
  131. package/skill/references/classes/PCB_PrimitivePour.md +808 -845
  132. package/skill/references/classes/PCB_PrimitivePoured.md +363 -363
  133. package/skill/references/classes/PCB_PrimitiveRegion.md +765 -799
  134. package/skill/references/classes/PCB_PrimitiveString.md +828 -910
  135. package/skill/references/classes/PCB_PrimitiveVia.md +761 -765
  136. package/skill/references/classes/PCB_RayTracerEngine.md +603 -263
  137. package/skill/references/classes/PCB_SelectControl.md +495 -495
  138. package/skill/references/classes/PCB_Tool.md +9 -0
  139. package/skill/references/classes/PNL_Document.md +83 -83
  140. package/skill/references/classes/SCH_Document.md +797 -809
  141. package/skill/references/classes/SCH_Drc.md +246 -242
  142. package/skill/references/classes/SCH_Event.md +583 -583
  143. package/skill/references/classes/SCH_ManufactureData.md +1209 -1205
  144. package/skill/references/classes/SCH_Net.md +200 -200
  145. package/skill/references/classes/SCH_Netlist.md +191 -191
  146. package/skill/references/classes/SCH_Primitive.md +337 -337
  147. package/skill/references/classes/SCH_PrimitiveArc.md +686 -692
  148. package/skill/references/classes/SCH_PrimitiveAttribute.md +579 -590
  149. package/skill/references/classes/SCH_PrimitiveBus.md +618 -624
  150. package/skill/references/classes/SCH_PrimitiveCircle.md +667 -683
  151. package/skill/references/classes/SCH_PrimitiveComponent.md +2256 -2240
  152. package/skill/references/classes/SCH_PrimitiveObject.md +666 -666
  153. package/skill/references/classes/SCH_PrimitivePin.md +737 -754
  154. package/skill/references/classes/SCH_PrimitivePolygon.md +621 -627
  155. package/skill/references/classes/SCH_PrimitiveRectangle.md +715 -731
  156. package/skill/references/classes/SCH_PrimitiveText.md +736 -746
  157. package/skill/references/classes/SCH_PrimitiveWire.md +701 -703
  158. package/skill/references/classes/SCH_SelectControl.md +520 -520
  159. package/skill/references/classes/SCH_SimulationEngine.md +133 -133
  160. package/skill/references/classes/SCH_Utils.md +121 -121
  161. package/skill/references/classes/SYS_ClientUrl.md +173 -173
  162. package/skill/references/classes/SYS_Dialog.md +825 -825
  163. package/skill/references/classes/SYS_Environment.md +640 -502
  164. package/skill/references/classes/SYS_ExternalApi.md +246 -0
  165. package/skill/references/classes/SYS_FileManager.md +1664 -1686
  166. package/skill/references/classes/SYS_FileSystem.md +1366 -1171
  167. package/skill/references/classes/SYS_FontManager.md +224 -224
  168. package/skill/references/classes/SYS_FormatConversion.md +349 -349
  169. package/skill/references/classes/SYS_HeaderMenu.md +480 -479
  170. package/skill/references/classes/SYS_Help.md +141 -0
  171. package/skill/references/classes/SYS_I18n.md +861 -861
  172. package/skill/references/classes/SYS_IFrame.md +541 -535
  173. package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -246
  174. package/skill/references/classes/SYS_Log.md +422 -424
  175. package/skill/references/classes/SYS_Math.md +1565 -1565
  176. package/skill/references/classes/SYS_Message.md +363 -363
  177. package/skill/references/classes/SYS_MessageBox.md +285 -285
  178. package/skill/references/classes/SYS_MessageBus.md +1618 -1618
  179. package/skill/references/classes/SYS_PanelControl.md +696 -696
  180. package/skill/references/classes/SYS_RightClickMenu.md +175 -175
  181. package/skill/references/classes/SYS_Setting.md +134 -85
  182. package/skill/references/classes/SYS_ShortcutKey.md +623 -623
  183. package/skill/references/classes/SYS_Storage.md +484 -484
  184. package/skill/references/classes/SYS_Timer.md +447 -447
  185. package/skill/references/classes/SYS_ToastMessage.md +194 -194
  186. package/skill/references/classes/SYS_Tool.md +317 -241
  187. package/skill/references/classes/SYS_Unit.md +594 -594
  188. package/skill/references/classes/SYS_WebSocket.md +401 -401
  189. package/skill/references/classes/SYS_Window.md +849 -850
  190. package/skill/references/enums/EDMT_EditorDocumentType.md +324 -278
  191. package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +51 -47
  192. package/skill/references/enums/EDMT_EditorTabEventType.md +68 -62
  193. package/skill/references/enums/EDMT_IndicatorMarkerType.md +90 -80
  194. package/skill/references/enums/EDMT_ItemType.md +181 -157
  195. package/skill/references/enums/EDMT_ProjectCollaborationMode.md +51 -47
  196. package/skill/references/enums/EDMT_ProjectFileFormat.md +60 -0
  197. package/skill/references/enums/EDMT_ProjectReadyState.md +82 -0
  198. package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +51 -47
  199. package/skill/references/enums/ELIB_LibraryType.md +129 -113
  200. package/skill/references/enums/ELIB_PreviewType.md +77 -69
  201. package/skill/references/enums/ELIB_SimulationModelType.md +51 -47
  202. package/skill/references/enums/ELIB_SymbolType.md +142 -124
  203. package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +51 -47
  204. package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +51 -47
  205. package/skill/references/enums/EPCB_AutoRoutingOptimization.md +51 -47
  206. package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +51 -47
  207. package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +55 -51
  208. package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +64 -58
  209. package/skill/references/enums/EPCB_LayerColorConfiguration.md +90 -80
  210. package/skill/references/enums/EPCB_LayerId.md +1169 -881
  211. package/skill/references/enums/EPCB_LayerStatus.md +64 -58
  212. package/skill/references/enums/EPCB_LayerType.md +129 -113
  213. package/skill/references/enums/EPCB_MouseEventType.md +64 -58
  214. package/skill/references/enums/EPCB_NetEventType.md +64 -58
  215. package/skill/references/enums/EPCB_PcbPlateType.md +51 -47
  216. package/skill/references/enums/EPCB_PdfOutputMethod.md +64 -58
  217. package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +51 -47
  218. package/skill/references/enums/EPCB_PrimitiveDimensionType.md +64 -58
  219. package/skill/references/enums/EPCB_PrimitiveEventType.md +64 -58
  220. package/skill/references/enums/EPCB_PrimitiveFillMode.md +68 -62
  221. package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +64 -58
  222. package/skill/references/enums/EPCB_PrimitivePadHoleType.md +64 -58
  223. package/skill/references/enums/EPCB_PrimitivePadShapeType.md +90 -80
  224. package/skill/references/enums/EPCB_PrimitivePadType.md +64 -58
  225. package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +64 -58
  226. package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +107 -95
  227. package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +142 -124
  228. package/skill/references/enums/EPCB_PrimitiveType.md +233 -201
  229. package/skill/references/enums/EPCB_PrimitiveViaType.md +64 -58
  230. package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +116 -102
  231. package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +90 -80
  232. package/skill/references/enums/ESCH_ExportDocumentFileType.md +64 -58
  233. package/skill/references/enums/ESCH_MouseEventType.md +51 -47
  234. package/skill/references/enums/ESCH_PrimitiveComponentType.md +142 -124
  235. package/skill/references/enums/ESCH_PrimitiveEventType.md +77 -69
  236. package/skill/references/enums/ESCH_PrimitiveFillStyle.md +129 -113
  237. package/skill/references/enums/ESCH_PrimitiveLineType.md +77 -69
  238. package/skill/references/enums/ESCH_PrimitivePinShape.md +77 -69
  239. package/skill/references/enums/ESCH_PrimitivePinType.md +168 -146
  240. package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +142 -124
  241. package/skill/references/enums/ESCH_PrimitiveType.md +207 -179
  242. package/skill/references/enums/ESCH_SimulationNetlistType.md +38 -36
  243. package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +51 -47
  244. package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +77 -69
  245. package/skill/references/enums/ESYS_BottomPanelTab.md +94 -80
  246. package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +181 -157
  247. package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +55 -51
  248. package/skill/references/enums/ESYS_ImportProjectImportOption.md +64 -58
  249. package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +51 -47
  250. package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +55 -51
  251. package/skill/references/enums/ESYS_JobState.md +95 -0
  252. package/skill/references/enums/ESYS_LeftPanelTab.md +94 -80
  253. package/skill/references/enums/ESYS_LogType.md +77 -102
  254. package/skill/references/enums/ESYS_NetlistType.md +129 -113
  255. package/skill/references/enums/ESYS_PanelPosition.md +69 -0
  256. package/skill/references/enums/ESYS_PanelTab.md +368 -0
  257. package/skill/references/enums/ESYS_RightPanelTab.md +237 -201
  258. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +220 -190
  259. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +103 -91
  260. package/skill/references/enums/ESYS_StartPageQuickStartItem.md +237 -205
  261. package/skill/references/enums/ESYS_Theme.md +51 -47
  262. package/skill/references/enums/ESYS_ToastMessageType.md +90 -80
  263. package/skill/references/enums/ESYS_Unit.md +116 -102
  264. package/skill/references/enums/ESYS_WindowEventType.md +64 -47
  265. package/skill/references/enums/ESYS_WindowOpenTarget.md +51 -47
  266. package/skill/references/enums/NetportDeviceName.md +146 -146
  267. package/skill/references/enums/SchToolBarDeviceName.md +278 -278
  268. package/skill/references/interfaces/BoardProps.md +169 -169
  269. package/skill/references/interfaces/BorderConfig.md +109 -0
  270. package/skill/references/interfaces/ButtonProps.md +196 -169
  271. package/skill/references/interfaces/CellClickInfo.md +142 -0
  272. package/skill/references/interfaces/CellCoord.md +88 -0
  273. package/skill/references/interfaces/CheckBoxProps.md +223 -196
  274. package/skill/references/interfaces/CheckChangeDetail.md +88 -0
  275. package/skill/references/interfaces/CheckboxEditConfig.md +159 -0
  276. package/skill/references/interfaces/ClipboardCellData.md +142 -0
  277. package/skill/references/interfaces/ClipboardConfig.md +115 -0
  278. package/skill/references/interfaces/ColorPickerProps.md +169 -0
  279. package/skill/references/interfaces/ColumnDef.md +605 -0
  280. package/skill/references/interfaces/ColumnEditTrigger.md +57 -0
  281. package/skill/references/interfaces/ColumnGroupDef.md +192 -0
  282. package/skill/references/interfaces/ColumnResizeConfig.md +142 -0
  283. package/skill/references/interfaces/ComponentPropsMap.md +517 -448
  284. package/skill/references/interfaces/CustomHeaderConfig.md +169 -0
  285. package/skill/references/interfaces/DialogProps.md +385 -385
  286. package/skill/references/interfaces/DragSortConfig.md +115 -0
  287. package/skill/references/interfaces/EditingConfig.md +196 -0
  288. package/skill/references/interfaces/FilteringConfig.md +250 -0
  289. package/skill/references/interfaces/FixedColumnConfig.md +88 -0
  290. package/skill/references/interfaces/FlexItemProps.md +116 -116
  291. package/skill/references/interfaces/FlexProps.md +224 -224
  292. package/skill/references/interfaces/GridItemProps.md +143 -143
  293. package/skill/references/interfaces/GridProps.md +143 -143
  294. package/skill/references/interfaces/IDMT_BoardItem.md +171 -171
  295. package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -171
  296. package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -169
  297. package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -173
  298. package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -169
  299. package/skill/references/interfaces/IDMT_FolderItem.md +225 -225
  300. package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -393
  301. package/skill/references/interfaces/IDMT_PanelItem.md +144 -144
  302. package/skill/references/interfaces/IDMT_PcbItem.md +171 -171
  303. package/skill/references/interfaces/IDMT_ProjectItem.md +143 -143
  304. package/skill/references/interfaces/IDMT_SchematicItem.md +225 -225
  305. package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -198
  306. package/skill/references/interfaces/IDMT_TeamItem.md +144 -144
  307. package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -117
  308. package/skill/references/interfaces/IDesignPortal.md +103 -103
  309. package/skill/references/interfaces/ILIB_3DModelItem.md +198 -198
  310. package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -277
  311. package/skill/references/interfaces/ILIB_CbbItem.md +225 -225
  312. package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -277
  313. package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -150
  314. package/skill/references/interfaces/ILIB_ClassificationNode.md +98 -0
  315. package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -210
  316. package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -304
  317. package/skill/references/interfaces/ILIB_DeviceItem.md +279 -279
  318. package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -250
  319. package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -521
  320. package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -64
  321. package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +93 -99
  322. package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -150
  323. package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +143 -157
  324. package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -63
  325. package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -123
  326. package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -97
  327. package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -98
  328. package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -115
  329. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -169
  330. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -234
  331. package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +91 -105
  332. package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -96
  333. package/skill/references/interfaces/ILIB_FootprintItem.md +256 -198
  334. package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -61
  335. package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -277
  336. package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -92
  337. package/skill/references/interfaces/ILIB_LibraryItem.md +115 -115
  338. package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -198
  339. package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -277
  340. package/skill/references/interfaces/ILIB_RegisterExtendLibraryProps.md +71 -0
  341. package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -306
  342. package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -304
  343. package/skill/references/interfaces/ILIB_SymbolItem.md +306 -279
  344. package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -61
  345. package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -304
  346. package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -169
  347. package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -220
  348. package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -169
  349. package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -169
  350. package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -115
  351. package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -65
  352. package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -88
  353. package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -115
  354. package/skill/references/interfaces/IPCB_LayerItem.md +277 -277
  355. package/skill/references/interfaces/IPCB_NetClassItem.md +115 -115
  356. package/skill/references/interfaces/IPCB_NetInfo.md +115 -115
  357. package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -88
  358. package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -88
  359. package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -115
  360. package/skill/references/interfaces/IPCB_Primitive.md +218 -218
  361. package/skill/references/interfaces/IPCB_PrimitiveAPI.md +174 -175
  362. package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -151
  363. package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -142
  364. package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -154
  365. package/skill/references/interfaces/IPCB_RayTracerBackgroundConfig.md +223 -0
  366. package/skill/references/interfaces/IPCB_RayTracerLightConfig.md +412 -0
  367. package/skill/references/interfaces/IPCB_RayTracerMaterialConfig.md +547 -0
  368. package/skill/references/interfaces/IPCB_RayTracerPcbMaterialConfig.md +196 -0
  369. package/skill/references/interfaces/IPCB_RayTracerRenderConfigurations.md +200 -0
  370. package/skill/references/interfaces/IPCB_RayTracerRendererConfig.md +196 -0
  371. package/skill/references/interfaces/IPCB_RayTracerSceneElement.md +115 -0
  372. package/skill/references/interfaces/IPCB_RayTracerSceneElementTransform.md +123 -0
  373. package/skill/references/interfaces/IPCB_RayTracerTexture.md +88 -0
  374. package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -88
  375. package/skill/references/interfaces/IRawNet.md +103 -103
  376. package/skill/references/interfaces/IRawPureSchematic.md +80 -80
  377. package/skill/references/interfaces/IRawSchematic.md +103 -103
  378. package/skill/references/interfaces/IRawWire.md +149 -149
  379. package/skill/references/interfaces/ISCH_DrcError.md +142 -142
  380. package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -142
  381. package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -94
  382. package/skill/references/interfaces/ISCH_NetInfo.md +88 -88
  383. package/skill/references/interfaces/ISCH_Primitive.md +218 -219
  384. package/skill/references/interfaces/ISCH_PrimitiveAPI.md +174 -175
  385. package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -142
  386. package/skill/references/interfaces/ISCH_WireInfo.md +169 -169
  387. package/skill/references/interfaces/ISYS_ComparisonResponse.md +115 -0
  388. package/skill/references/interfaces/ISYS_ExtensionExternalApiIndex.md +13 -0
  389. package/skill/references/interfaces/ISYS_ExtensionRegisteredExternalApis.md +13 -0
  390. package/skill/references/interfaces/ISYS_ExternalApiHelp.md +173 -0
  391. package/skill/references/interfaces/ISYS_ExternalApiRegistration.md +146 -0
  392. package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -169
  393. package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +205 -174
  394. package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +178 -147
  395. package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -115
  396. package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -408
  397. package/skill/references/interfaces/ISYS_HelpAudienceEntry.md +92 -0
  398. package/skill/references/interfaces/ISYS_HelpClassSummary.md +205 -0
  399. package/skill/references/interfaces/ISYS_HelpData.md +92 -0
  400. package/skill/references/interfaces/ISYS_HelpMethodDetail.md +310 -0
  401. package/skill/references/interfaces/ISYS_JobHandle.md +65 -0
  402. package/skill/references/interfaces/ISYS_JobLogEntry.md +142 -0
  403. package/skill/references/interfaces/ISYS_JobStatus.md +176 -0
  404. package/skill/references/interfaces/ISYS_LogLine.md +115 -115
  405. package/skill/references/interfaces/ISYS_MathBBox.md +142 -142
  406. package/skill/references/interfaces/ISYS_MathPoint.md +88 -88
  407. package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -92
  408. package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -115
  409. package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +12 -12
  410. package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -174
  411. package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -169
  412. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -62
  413. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -62
  414. package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -109
  415. package/skill/references/interfaces/IconProps.md +88 -88
  416. package/skill/references/interfaces/ImageProps.md +115 -115
  417. package/skill/references/interfaces/InputEditConfig.md +182 -0
  418. package/skill/references/interfaces/InputProps.md +547 -520
  419. package/skill/references/interfaces/KeyboardConfig.md +61 -0
  420. package/skill/references/interfaces/ListChildren.md +223 -223
  421. package/skill/references/interfaces/ListProps.md +250 -223
  422. package/skill/references/interfaces/ModalProps.md +358 -358
  423. package/skill/references/interfaces/NumberEditConfig.md +234 -0
  424. package/skill/references/interfaces/RadioGroupProps.md +196 -196
  425. package/skill/references/interfaces/RadioItem.md +115 -115
  426. package/skill/references/interfaces/RichTableProps.md +1357 -0
  427. package/skill/references/interfaces/RowMetaConfig.md +142 -0
  428. package/skill/references/interfaces/ScrollerProps.md +169 -169
  429. package/skill/references/interfaces/SelectEditConfig.md +211 -0
  430. package/skill/references/interfaces/SelectListItem.md +142 -142
  431. package/skill/references/interfaces/SelectOption.md +142 -0
  432. package/skill/references/interfaces/SelectProps.md +169 -169
  433. package/skill/references/interfaces/SelectionConfig.md +358 -0
  434. package/skill/references/interfaces/SliderProps.md +142 -0
  435. package/skill/references/interfaces/SlotProps.md +88 -88
  436. package/skill/references/interfaces/SortState.md +88 -0
  437. package/skill/references/interfaces/SortingConfig.md +169 -0
  438. package/skill/references/interfaces/StyleProps.md +439 -385
  439. package/skill/references/interfaces/TextAreaProps.md +196 -196
  440. package/skill/references/interfaces/TextProps.md +169 -169
  441. package/skill/references/interfaces/TextareaEditConfig.md +182 -0
  442. package/skill/references/interfaces/ValidationRule.md +223 -0
  443. package/skill/references/interfaces/VirtualScrollConfig.md +115 -0
  444. package/skill/references/types/Align.md +9 -0
  445. package/skill/references/types/CellContentType.md +9 -0
  446. package/skill/references/types/ColumnDefOrGroup.md +12 -0
  447. package/skill/references/types/ColumnEditConfig.md +13 -0
  448. package/skill/references/types/ColumnType.md +9 -0
  449. package/skill/references/types/DataChangeType.md +9 -0
  450. package/skill/references/types/FilterMatchMode.md +9 -0
  451. package/skill/references/types/RichTableRow.md +12 -0
  452. package/skill/references/types/Serializable.md +10 -0
  453. package/skill/references/types/SerializablePrimitive.md +9 -0
  454. package/skill/references/types/SortOrder.md +9 -0
  455. package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +11 -11
  456. package/skill/references/types/TPCB_LayersInTheSelectable.md +42 -42
  457. package/skill/references/types/TPCB_LayersOfComponent.md +11 -11
  458. package/skill/references/types/TPCB_LayersOfCopper.md +15 -15
  459. package/skill/references/types/TPCB_LayersOfCustom.md +41 -41
  460. package/skill/references/types/TPCB_LayersOfDimension.md +16 -16
  461. package/skill/references/types/TPCB_LayersOfFill.md +28 -28
  462. package/skill/references/types/TPCB_LayersOfImage.md +22 -22
  463. package/skill/references/types/TPCB_LayersOfInner.md +41 -41
  464. package/skill/references/types/TPCB_LayersOfLine.md +25 -25
  465. package/skill/references/types/TPCB_LayersOfObject.md +12 -12
  466. package/skill/references/types/TPCB_LayersOfPad.md +11 -11
  467. package/skill/references/types/TPCB_LayersOfRegion.md +11 -11
  468. package/skill/references/types/TPCB_NumberOfCopperLayers.md +9 -9
  469. package/skill/references/types/TPCB_PolygonSourceArray.md +85 -83
  470. package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +66 -66
  471. package/skill/references/types/TPCB_PrimitivePadHole.md +30 -30
  472. package/skill/references/types/TPCB_PrimitivePadShape.md +61 -61
  473. package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +19 -19
  474. package/skill/references/types/TSYS_ComparisonErrorCode.md +15 -0
  475. package/skill/references/types/TSYS_LanguageKeyValuePairs.md +13 -0
  476. package/skill/references/types/TSYS_MathPolygonGroup.md +15 -15
  477. package/skill/references/types/TSYS_MathPolygonInput.md +20 -20
  478. package/skill/references/types/TSYS_ShortcutKeys.md +96 -96
  479. package/skill/user-guide/using-extension.md +47 -47
  480. package/src/json-gen.test.js +430 -0
  481. package/skill/guide/ancillary-projects/pro-api-sdk.md +0 -1
  482. package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +0 -115
  483. package/skill/references/types/ISYS_LanguageKeyValuePairs.md +0 -13
  484. package/skill/references/types/TSYS_PcbComparisonErrorCode.md +0 -10
@@ -1,1221 +1,1222 @@
1
- # LIB\_Device class
2
-
3
- Comprehensive library / device class
4
-
5
- ## Signature
6
-
7
- ```typescript
8
- class LIB_Device
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
- [copy(deviceUuid, libraryUuid, targetLibraryUuid, targetClassification, newDeviceName)](./LIB_Device.md)
29
-
30
- </td><td>
31
-
32
- </td><td>
33
-
34
- **_(BETA)_** Copy Device
35
-
36
- </td></tr>
37
- <tr><td>
38
-
39
- [create(libraryUuid, deviceName, classification, association, description, property)](./LIB_Device.md)
40
-
41
- </td><td>
42
-
43
- </td><td>
44
-
45
- **_(BETA)_** Create Device
46
-
47
- </td></tr>
48
- <tr><td>
49
-
50
- [delete(deviceUuid, libraryUuid)](./LIB_Device.md)
51
-
52
- </td><td>
53
-
54
- </td><td>
55
-
56
- **_(BETA)_** Delete Device
57
-
58
- </td></tr>
59
- <tr><td>
60
-
61
- [get(deviceUuid, libraryUuid)](./LIB_Device.md)
62
-
63
- </td><td>
64
-
65
- </td><td>
66
-
67
- **_(BETA)_** Get all properties of the device
68
-
69
- </td></tr>
70
- <tr><td>
71
-
72
- [getByLcscIds(lcscIds, libraryUuid, allowMultiMatch)](./LIB_Device.md)
73
-
74
- </td><td>
75
-
76
- </td><td>
77
-
78
- **_(BETA)_** Get a device using an LCSC C number
79
-
80
- </td></tr>
81
- <tr><td>
82
-
83
- [getByLcscIds(lcscIds, libraryUuid, allowMultiMatch)](./LIB_Device.md)
84
-
85
- </td><td>
86
-
87
- </td><td>
88
-
89
- **_(BETA)_** Batch get devices using LCSC C numbers
90
-
91
- </td></tr>
92
- <tr><td>
93
-
94
- [modify(deviceUuid, libraryUuid, deviceName, classification, association, description, property)](./LIB_Device.md)
95
-
96
- </td><td>
97
-
98
- </td><td>
99
-
100
- **_(BETA)_** Modify Device
101
-
102
- </td></tr>
103
- <tr><td>
104
-
105
- [search(key, libraryUuid, classification, symbolType, itemsOfPage, page)](./LIB_Device.md)
106
-
107
- </td><td>
108
-
109
- </td><td>
110
-
111
- **_(BETA)_** Search device
112
-
113
- </td></tr>
114
- <tr><td>
115
-
116
- [searchByProperties(properties, libraryUuid, classification, symbolType, itemsOfPage, page)](./LIB_Device.md)
117
-
118
- </td><td>
119
-
120
- </td><td>
121
-
122
- **_(BETA)_** Search devices precisely by properties
123
-
124
- </td></tr>
125
- </tbody></table>
126
-
127
- ---
128
-
129
- ## 方法详情
130
-
131
- ### copy
132
-
133
- # LIB\_Device.copy() method
134
-
135
- > 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.
136
-
137
- Copy Device
138
-
139
- ## Signature
140
-
141
- ```typescript
142
- function copy(
143
- deviceUuid: string,
144
- libraryUuid: string,
145
- targetLibraryUuid: string,
146
- targetClassification?: ILIB_ClassificationIndex | Array<string>,
147
- newDeviceName?: string,
148
- ): Promise<string | undefined>;
149
- ```
150
-
151
- ## Parameters
152
-
153
- <table><thead><tr><th>
154
-
155
- Parameter
156
-
157
- </th><th>
158
-
159
- Type
160
-
161
- </th><th>
162
-
163
- Description
164
-
165
- </th></tr></thead>
166
- <tbody><tr><td>
167
-
168
- deviceUuid
169
-
170
- </td><td>
171
-
172
- string
173
-
174
- </td><td>
175
-
176
- Device UUID
177
-
178
- </td></tr>
179
- <tr><td>
180
-
181
- libraryUuid
182
-
183
- </td><td>
184
-
185
- string
186
-
187
- </td><td>
188
-
189
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
190
-
191
- </td></tr>
192
- <tr><td>
193
-
194
- targetLibraryUuid
195
-
196
- </td><td>
197
-
198
- string
199
-
200
- </td><td>
201
-
202
- Target library UUID
203
-
204
- </td></tr>
205
- <tr><td>
206
-
207
- targetClassification
208
-
209
- </td><td>
210
-
211
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
212
-
213
- </td><td>
214
-
215
- _(Optional)_ Classification in the target library
216
-
217
- </td></tr>
218
- <tr><td>
219
-
220
- newDeviceName
221
-
222
- </td><td>
223
-
224
- string
225
-
226
- </td><td>
227
-
228
- _(Optional)_ New device name. If a device with the same name exists in the target library, the copy will fail
229
-
230
- </td></tr>
231
- </tbody></table>
232
-
233
- ## Returns
234
-
235
- Promise&lt;string \| undefined&gt;
236
-
237
- UUID of the new device in the target library
238
-
239
- ## Example
240
-
241
- ```javascript
242
- // 1. 获取个人库 UUID
243
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
244
-
245
- // 2. 新建一个轻量器件作为复制来源
246
- const sourceName = `嘉立创示例_复制源_${Date.now()}`;
247
- const sourceUuid = await eda.lib_Device.create(libraryUuid, sourceName, [], { symbolType: 2 });
248
-
249
- // 3. 复制到同一库,指定新名称避免同名冲突(分类传 [] = 不分类)
250
- const newName = `嘉立创示例_复制品_${Date.now()}`;
251
- const copiedUuid = await eda.lib_Device.copy(sourceUuid, libraryUuid, libraryUuid, [], newName);
252
-
253
- // 创建类保留现场(原件与复制品都留在个人库中供观察)
254
-
255
- console.log('sourceUuid:', sourceUuid);
256
- console.log('copiedUuid:', copiedUuid);
257
- console.log('newName:', newName);
258
- ```
259
-
260
- ### create
261
-
262
- # LIB\_Device.create() method
263
-
264
- > 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.
265
-
266
- Create Device
267
-
268
- ## Signature
269
-
270
- ```typescript
271
- function create(
272
- libraryUuid: string,
273
- deviceName: string,
274
- classification?: ILIB_ClassificationIndex | Array<string>,
275
- association?: {
276
- symbolType?:
277
- | undefined
278
- | ELIB_SymbolType.COMPONENT
279
- | ELIB_SymbolType.NET_FLAG
280
- | ELIB_SymbolType.NET_PORT
281
- | ELIB_SymbolType.DRAWING
282
- | ELIB_SymbolType.NON_ELECTRICAL
283
- | ELIB_SymbolType.SHORT_CIRCUIT_FLAG
284
- | ELIB_SymbolType.OFF_PAGE_CONNECTOR
285
- | ELIB_SymbolType.DIFFERENTIAL_PAIRS_FLAG
286
- | ELIB_SymbolType.CBB_SYMBOL;
287
- symbolUuid?: undefined | string;
288
- symbol?: undefined | { uuid: string; libraryUuid: string };
289
- footprintUuid?: undefined | string;
290
- footprint?: undefined | { uuid: string; libraryUuid: string };
291
- model3D?: undefined | { uuid: string; libraryUuid: string };
292
- imageData?: undefined | File | Blob;
293
- },
294
- description?: string,
295
- property?: ILIB_DeviceExtendPropertyItem,
296
- ): Promise<string | undefined>;
297
- ```
298
-
299
- ## Parameters
300
-
301
- <table><thead><tr><th>
302
-
303
- Parameter
304
-
305
- </th><th>
306
-
307
- Type
308
-
309
- </th><th>
310
-
311
- Description
312
-
313
- </th></tr></thead>
314
- <tbody><tr><td>
315
-
316
- libraryUuid
317
-
318
- </td><td>
319
-
320
- string
321
-
322
- </td><td>
323
-
324
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
325
-
326
- </td></tr>
327
- <tr><td>
328
-
329
- deviceName
330
-
331
- </td><td>
332
-
333
- string
334
-
335
- </td><td>
336
-
337
- Device name
338
-
339
- </td></tr>
340
- <tr><td>
341
-
342
- classification
343
-
344
- </td><td>
345
-
346
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
347
-
348
- </td><td>
349
-
350
- _(Optional)_ Classification
351
-
352
- </td></tr>
353
- <tr><td>
354
-
355
- association
356
-
357
- </td><td>
358
-
359
- { symbolType?: undefined \| [ELIB\_SymbolType.COMPONENT](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.NET\_FLAG](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.NET\_PORT](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.DRAWING](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.NON\_ELECTRICAL](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.SHORT\_CIRCUIT\_FLAG](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.OFF\_PAGE\_CONNECTOR](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.DIFFERENTIAL\_PAIRS\_FLAG](../enums/ELIB_SymbolType.md) \| [ELIB\_SymbolType.CBB\_SYMBOL](../enums/ELIB_SymbolType.md)<!-- -->; symbolUuid?: undefined \| string; symbol?: undefined \| { uuid: string; libraryUuid: string }; footprintUuid?: undefined \| string; footprint?: undefined \| { uuid: string; libraryUuid: string }; model3D?: undefined \| { uuid: string; libraryUuid: string }; imageData?: undefined \| File \| Blob }
360
-
361
- </td><td>
362
-
363
- _(Optional)_ Associate a symbol, footprint, and image. Specifying `symbolType` creates a new symbol; if no new symbol is needed, `symbolType` does not need to be specified. However, note that if no new symbol is created and no symbol association information is specified, the device cannot be created
364
-
365
- </td></tr>
366
- <tr><td>
367
-
368
- description
369
-
370
- </td><td>
371
-
372
- string
373
-
374
- </td><td>
375
-
376
- _(Optional)_ Description
377
-
378
- </td></tr>
379
- <tr><td>
380
-
381
- property
382
-
383
- </td><td>
384
-
385
- [ILIB\_DeviceExtendPropertyItem](../interfaces/ILIB_DeviceExtendPropertyItem.md)
386
-
387
- </td><td>
388
-
389
- _(Optional)_ Other property, only `designator`<!-- -->, `addIntoBom`<!-- -->, `addIntoPcb` exists default value
390
-
391
- </td></tr>
392
- </tbody></table>
393
-
394
- ## Returns
395
-
396
- Promise&lt;string \| undefined&gt;
397
-
398
- Device UUID
399
-
400
- ## Example
401
-
402
- ```javascript
403
- // 1. 获取个人库 UUID
404
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
405
-
406
- // 2. 创建器件:新建元件符号(symbolType: 2)并设置默认属性
407
- const deviceName = `嘉立创示例_新器件_${Date.now()}`;
408
- const deviceUuid = await eda.lib_Device.create(
409
- libraryUuid,
410
- deviceName,
411
- [],
412
- { symbolType: 2 },
413
- '示例器件描述',
414
- { designator: 'R', addIntoBom: true, addIntoPcb: true }
415
- );
416
-
417
- // 创建类保留现场(新器件留在个人库中供观察)
418
-
419
- console.log('deviceUuid:', deviceUuid);
420
- console.log('deviceName:', deviceName);
421
- ```
422
-
423
- ### delete
424
-
425
- # LIB\_Device.delete() method
426
-
427
- > 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.
428
-
429
- Delete Device
430
-
431
- ## Signature
432
-
433
- ```typescript
434
- function delete(deviceUuid: string, libraryUuid: string): Promise<boolean>;
435
- ```
436
-
437
- ## Parameters
438
-
439
- <table><thead><tr><th>
440
-
441
- Parameter
442
-
443
- </th><th>
444
-
445
- Type
446
-
447
- </th><th>
448
-
449
- Description
450
-
451
- </th></tr></thead>
452
- <tbody><tr><td>
453
-
454
- deviceUuid
455
-
456
- </td><td>
457
-
458
- string
459
-
460
- </td><td>
461
-
462
- Device UUID
463
-
464
- </td></tr>
465
- <tr><td>
466
-
467
- libraryUuid
468
-
469
- </td><td>
470
-
471
- string
472
-
473
- </td><td>
474
-
475
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
476
-
477
- </td></tr>
478
- </tbody></table>
479
-
480
- ## Returns
481
-
482
- Promise&lt;boolean&gt;
483
-
484
- Whether the operation is successful
485
-
486
- ## Example
487
-
488
- ```javascript
489
- // 1. 获取个人库 UUID 并新建删除对象
490
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
491
- const deviceUuid = await eda.lib_Device.create(
492
- libraryUuid,
493
- `嘉立创示例_待删除_${Date.now()}`,
494
- [],
495
- { symbolType: 2 }
496
- );
497
-
498
- // 2. 删除该器件
499
- const deleted = await eda.lib_Device.delete(deviceUuid, libraryUuid);
500
-
501
- console.log('deviceUuid:', deviceUuid);
502
- console.log('deleted:', deleted);
503
- ```
504
-
505
- ### get
506
-
507
- # LIB\_Device.get() method
508
-
509
- > 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.
510
-
511
- Get all properties of the device
512
-
513
- ## Signature
514
-
515
- ```typescript
516
- function get(deviceUuid: string, libraryUuid?: string): Promise<ILIB_DeviceItem | undefined>;
517
- ```
518
-
519
- ## Parameters
520
-
521
- <table><thead><tr><th>
522
-
523
- Parameter
524
-
525
- </th><th>
526
-
527
- Type
528
-
529
- </th><th>
530
-
531
- Description
532
-
533
- </th></tr></thead>
534
- <tbody><tr><td>
535
-
536
- deviceUuid
537
-
538
- </td><td>
539
-
540
- string
541
-
542
- </td><td>
543
-
544
- Device UUID
545
-
546
- </td></tr>
547
- <tr><td>
548
-
549
- libraryUuid
550
-
551
- </td><td>
552
-
553
- string
554
-
555
- </td><td>
556
-
557
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
558
-
559
- </td></tr>
560
- </tbody></table>
561
-
562
- ## Returns
563
-
564
- Promise&lt;[ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| undefined&gt;
565
-
566
- Device property
567
-
568
- ### getbylcscids
569
-
570
- # LIB\_Device.getByLcscIds() method
571
-
572
- > 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.
573
-
574
- Get a device using an LCSC C number
575
-
576
- ## Signature
577
-
578
- ```typescript
579
- function getByLcscIds<T extends boolean>(
580
- lcscIds: string,
581
- libraryUuid?: string,
582
- allowMultiMatch?: T,
583
- ): Promise<T extends true ? ILIB_DeviceSearchItem | undefined : Array<ILIB_DeviceSearchItem>>;
584
- ```
585
-
586
- ## Parameters
587
-
588
- <table><thead><tr><th>
589
-
590
- Parameter
591
-
592
- </th><th>
593
-
594
- Type
595
-
596
- </th><th>
597
-
598
- Description
599
-
600
- </th></tr></thead>
601
- <tbody><tr><td>
602
-
603
- lcscIds
604
-
605
- </td><td>
606
-
607
- string
608
-
609
- </td><td>
610
-
611
- LCSC C number
612
-
613
- </td></tr>
614
- <tr><td>
615
-
616
- libraryUuid
617
-
618
- </td><td>
619
-
620
- string
621
-
622
- </td><td>
623
-
624
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
625
-
626
- </td></tr>
627
- <tr><td>
628
-
629
- allowMultiMatch
630
-
631
- </td><td>
632
-
633
- T
634
-
635
- </td><td>
636
-
637
- _(Optional)_ Whether a single LCSC C number is allowed to match multiple results
638
-
639
- </td></tr>
640
- </tbody></table>
641
-
642
- ## Returns
643
-
644
- Promise&lt;T extends true ? [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md) \| undefined : Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt;&gt;
645
-
646
- Searched device properties
647
-
648
- ## Remarks
649
-
650
- By default, if multiple devices with the same C number are matched in the same library, only the first result will be returned;
651
-
652
- If you want to return multiple results, set `allowMultiMatch` to `true`<!-- -->;
653
-
654
- This API is temporarily unavailable in the private deployment environment
655
-
656
- ### getbylcscids_1
657
-
658
- # LIB\_Device.getByLcscIds() method
659
-
660
- > 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.
661
-
662
- Batch get devices using LCSC C numbers
663
-
664
- ## Signature
665
-
666
- ```typescript
667
- function getByLcscIds(
668
- lcscIds: Array<string>,
669
- libraryUuid?: string,
670
- allowMultiMatch?: boolean,
671
- ): Promise<Array<ILIB_DeviceSearchItem>>;
672
- ```
673
-
674
- ## Parameters
675
-
676
- <table><thead><tr><th>
677
-
678
- Parameter
679
-
680
- </th><th>
681
-
682
- Type
683
-
684
- </th><th>
685
-
686
- Description
687
-
688
- </th></tr></thead>
689
- <tbody><tr><td>
690
-
691
- lcscIds
692
-
693
- </td><td>
694
-
695
- Array&lt;string&gt;
696
-
697
- </td><td>
698
-
699
- Array of LCSC C numbers
700
-
701
- </td></tr>
702
- <tr><td>
703
-
704
- libraryUuid
705
-
706
- </td><td>
707
-
708
- string
709
-
710
- </td><td>
711
-
712
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
713
-
714
- </td></tr>
715
- <tr><td>
716
-
717
- allowMultiMatch
718
-
719
- </td><td>
720
-
721
- boolean
722
-
723
- </td><td>
724
-
725
- _(Optional)_ Whether a single LCSC C number is allowed to match multiple results
726
-
727
- </td></tr>
728
- </tbody></table>
729
-
730
- ## Returns
731
-
732
- Promise&lt;Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt;&gt;
733
-
734
- List of searched device properties
735
-
736
- ## Remarks
737
-
738
- By default, if multiple devices with the same C number are matched in the same library, only the first result will be returned;
739
-
740
- If you want to return multiple results, set `allowMultiMatch` to `true`<!-- -->;
741
-
742
- This API is temporarily unavailable in the private deployment environment
743
-
744
- ## Example
745
-
746
- ```javascript
747
- // 1. 单个 C 编号查询(默认搜索系统库)
748
- const one = await eda.lib_Device.getByLcscIds('C1523');
749
- console.log('single count:', one.length);
750
- console.log('[0] uuid:', one[0].uuid, 'supplierId:', one[0].supplierId);
751
-
752
- // 2. 批量查询多个 C 编号
753
- const many = await eda.lib_Device.getByLcscIds(['C1523', 'C17168']);
754
- console.log('batch count:', many.length);
755
- many.forEach((item, i) => {
756
- console.log(`[${i}] uuid:`, item.uuid, 'supplierId:', item.supplierId);
757
- });
758
- ```
759
-
760
- ### modify
761
-
762
- # LIB\_Device.modify() method
763
-
764
- > 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.
765
-
766
- Modify Device
767
-
768
- ## Signature
769
-
770
- ```typescript
771
- function modify(
772
- deviceUuid: string,
773
- libraryUuid: string,
774
- deviceName?: string,
775
- classification?: ILIB_ClassificationIndex | Array<string> | null,
776
- association?: {
777
- symbolUuid?: undefined | string;
778
- symbol?: undefined | { uuid: string; libraryUuid: string };
779
- footprintUuid?: undefined | null | string;
780
- footprint?: undefined | null | { uuid: string; libraryUuid: string };
781
- model3D?: undefined | null | { uuid: string; libraryUuid: string };
782
- imageData?: undefined | null | File | Blob;
783
- },
784
- description?: string | null,
785
- property?: {
786
- name?: undefined | null | string;
787
- designator?: undefined | string;
788
- addIntoBom?: undefined | false | true;
789
- addIntoPcb?: undefined | false | true;
790
- net?: undefined | string;
791
- manufacturer?: undefined | null | string;
792
- manufacturerId?: undefined | null | string;
793
- supplier?: undefined | null | string;
794
- supplierId?: undefined | null | string;
795
- otherProperty?:
796
- undefined | Record<string, undefined | null | string | number | false | true>;
797
- },
798
- ): Promise<boolean>;
799
- ```
800
-
801
- ## Parameters
802
-
803
- <table><thead><tr><th>
804
-
805
- Parameter
806
-
807
- </th><th>
808
-
809
- Type
810
-
811
- </th><th>
812
-
813
- Description
814
-
815
- </th></tr></thead>
816
- <tbody><tr><td>
817
-
818
- deviceUuid
819
-
820
- </td><td>
821
-
822
- string
823
-
824
- </td><td>
825
-
826
- Device UUID
827
-
828
- </td></tr>
829
- <tr><td>
830
-
831
- libraryUuid
832
-
833
- </td><td>
834
-
835
- string
836
-
837
- </td><td>
838
-
839
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
840
-
841
- </td></tr>
842
- <tr><td>
843
-
844
- deviceName
845
-
846
- </td><td>
847
-
848
- string
849
-
850
- </td><td>
851
-
852
- _(Optional)_ Device name
853
-
854
- </td></tr>
855
- <tr><td>
856
-
857
- classification
858
-
859
- </td><td>
860
-
861
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt; \| null
862
-
863
- </td><td>
864
-
865
- _(Optional)_ Classification
866
-
867
- </td></tr>
868
- <tr><td>
869
-
870
- association
871
-
872
- </td><td>
873
-
874
- \{ symbolUuid?: undefined \| string; symbol?: undefined \| \{ uuid: string; libraryUuid: string \}; footprintUuid?: undefined \| null \| string; footprint?: undefined \| null \| \{ uuid: string; libraryUuid: string \}; model3D?: undefined \| null \| \{ uuid: string; libraryUuid: string \}; imageData?: undefined \| null \| File \| Blob \}
875
-
876
- </td><td>
877
-
878
- _(Optional)_ Associated symbol, footprint, image
879
-
880
- </td></tr>
881
- <tr><td>
882
-
883
- description
884
-
885
- </td><td>
886
-
887
- string \| null
888
-
889
- </td><td>
890
-
891
- _(Optional)_ Description
892
-
893
- </td></tr>
894
- <tr><td>
895
-
896
- property
897
-
898
- </td><td>
899
-
900
- { name?: undefined \| null \| string; designator?: undefined \| string; addIntoBom?: undefined \| false \| true; addIntoPcb?: undefined \| false \| true; net?: undefined \| string; manufacturer?: undefined \| null \| string; manufacturerId?: undefined \| null \| string; supplier?: undefined \| null \| string; supplierId?: undefined \| null \| string; otherProperty?: undefined \| Record&lt;string, undefined \| null \| string \| number \| false \| true&gt; }
901
-
902
- </td><td>
903
-
904
- _(Optional)_ Other property
905
-
906
- </td></tr>
907
- </tbody></table>
908
-
909
- ## Returns
910
-
911
- Promise&lt;boolean&gt;
912
-
913
- Whether the operation is successful
914
-
915
- ## Remarks
916
-
917
- If you want to clear certain properties, set their values to `null`
918
-
919
- ## Example
920
-
921
- ```javascript
922
- // 1. 获取个人库 UUID 并新建修改对象
923
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
924
- const deviceUuid = await eda.lib_Device.create(
925
- libraryUuid,
926
- `嘉立创示例_修改前_${Date.now()}`,
927
- [],
928
- { symbolType: 2 },
929
- '修改前的描述'
930
- );
931
-
932
- // 2. 修改名称和描述(分类保持不变传 [])
933
- const newName = `嘉立创示例_修改后_${Date.now()}`;
934
- const modified = await eda.lib_Device.modify(deviceUuid, libraryUuid, newName, [], '修改后的描述');
935
-
936
- // 3. 再补充修改扩展属性(位号、制造商)
937
- await eda.lib_Device.modify(deviceUuid, libraryUuid, undefined, [], undefined, { designator: 'R', manufacturer: '嘉立创' });
938
-
939
- // 修改类保留现场
940
-
941
- console.log('deviceUuid:', deviceUuid);
942
- console.log('modified:', modified);
943
- console.log('newName:', newName);
944
- ```
945
-
946
- ### search
947
-
948
- # LIB\_Device.search() method
949
-
950
- > 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.
951
-
952
- Search device
953
-
954
- ## Signature
955
-
956
- ```typescript
957
- function search(
958
- key: string,
959
- libraryUuid?: string,
960
- classification?: ILIB_ClassificationIndex | Array<string>,
961
- symbolType?: ELIB_SymbolType,
962
- itemsOfPage?: number,
963
- page?: number,
964
- ): Promise<Array<ILIB_DeviceSearchItem>>;
965
- ```
966
-
967
- ## Parameters
968
-
969
- <table><thead><tr><th>
970
-
971
- Parameter
972
-
973
- </th><th>
974
-
975
- Type
976
-
977
- </th><th>
978
-
979
- Description
980
-
981
- </th></tr></thead>
982
- <tbody><tr><td>
983
-
984
- key
985
-
986
- </td><td>
987
-
988
- string
989
-
990
- </td><td>
991
-
992
- Search keyword
993
-
994
- </td></tr>
995
- <tr><td>
996
-
997
- libraryUuid
998
-
999
- </td><td>
1000
-
1001
- string
1002
-
1003
- </td><td>
1004
-
1005
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1006
-
1007
- </td></tr>
1008
- <tr><td>
1009
-
1010
- classification
1011
-
1012
- </td><td>
1013
-
1014
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
1015
-
1016
- </td><td>
1017
-
1018
- _(Optional)_ Classification, defaults to all
1019
-
1020
- </td></tr>
1021
- <tr><td>
1022
-
1023
- symbolType
1024
-
1025
- </td><td>
1026
-
1027
- [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
1028
-
1029
- </td><td>
1030
-
1031
- _(Optional)_ Symbol type, defaults to all
1032
-
1033
- </td></tr>
1034
- <tr><td>
1035
-
1036
- itemsOfPage
1037
-
1038
- </td><td>
1039
-
1040
- number
1041
-
1042
- </td><td>
1043
-
1044
- _(Optional)_ Number of search results per page
1045
-
1046
- </td></tr>
1047
- <tr><td>
1048
-
1049
- page
1050
-
1051
- </td><td>
1052
-
1053
- number
1054
-
1055
- </td><td>
1056
-
1057
- _(Optional)_ Page count
1058
-
1059
- </td></tr>
1060
- </tbody></table>
1061
-
1062
- ## Returns
1063
-
1064
- Promise&lt;Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt;&gt;
1065
-
1066
- List of searched device properties
1067
-
1068
- ## Example
1069
-
1070
- ```javascript
1071
- // 1. 按关键字搜索系统库中的器件,每页 5 条
1072
- const results = await eda.lib_Device.search('0402', undefined, undefined, undefined, 5, 1);
1073
-
1074
- // 2. 输出搜索结果
1075
- console.log('count:', results.length);
1076
- results.forEach((item, i) => {
1077
- console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'supplierId:', item.supplierId);
1078
- });
1079
- ```
1080
-
1081
- ### searchbyproperties
1082
-
1083
- # LIB\_Device.searchByProperties() method
1084
-
1085
- > 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.
1086
-
1087
- Search devices precisely by properties
1088
-
1089
- ## Signature
1090
-
1091
- ```typescript
1092
- function searchByProperties(
1093
- properties: ILIB_DevicePropertiesForSearch,
1094
- libraryUuid?: string,
1095
- classification?: Array<string>,
1096
- symbolType?: ELIB_SymbolType,
1097
- itemsOfPage?: number,
1098
- page?: number,
1099
- ): Promise<Array<ILIB_DeviceSearchItem>>;
1100
- ```
1101
-
1102
- ## Parameters
1103
-
1104
- <table><thead><tr><th>
1105
-
1106
- Parameter
1107
-
1108
- </th><th>
1109
-
1110
- Type
1111
-
1112
- </th><th>
1113
-
1114
- Description
1115
-
1116
- </th></tr></thead>
1117
- <tbody><tr><td>
1118
-
1119
- properties
1120
-
1121
- </td><td>
1122
-
1123
- [ILIB\_DevicePropertiesForSearch](../interfaces/ILIB_DevicePropertiesForSearch.md)
1124
-
1125
- </td><td>
1126
-
1127
- Property
1128
-
1129
- </td></tr>
1130
- <tr><td>
1131
-
1132
- libraryUuid
1133
-
1134
- </td><td>
1135
-
1136
- string
1137
-
1138
- </td><td>
1139
-
1140
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1141
-
1142
- </td></tr>
1143
- <tr><td>
1144
-
1145
- classification
1146
-
1147
- </td><td>
1148
-
1149
- Array&lt;string&gt;
1150
-
1151
- </td><td>
1152
-
1153
- _(Optional)_ Classification, defaults to all ADD since EDA v4
1154
-
1155
- </td></tr>
1156
- <tr><td>
1157
-
1158
- symbolType
1159
-
1160
- </td><td>
1161
-
1162
- [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
1163
-
1164
- </td><td>
1165
-
1166
- _(Optional)_ Symbol type, defaults to all
1167
-
1168
- </td></tr>
1169
- <tr><td>
1170
-
1171
- itemsOfPage
1172
-
1173
- </td><td>
1174
-
1175
- number
1176
-
1177
- </td><td>
1178
-
1179
- _(Optional)_ Number of search results per page
1180
-
1181
- </td></tr>
1182
- <tr><td>
1183
-
1184
- page
1185
-
1186
- </td><td>
1187
-
1188
- number
1189
-
1190
- </td><td>
1191
-
1192
- _(Optional)_ Page count
1193
-
1194
- </td></tr>
1195
- </tbody></table>
1196
-
1197
- ## Returns
1198
-
1199
- Promise&lt;Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt;&gt;
1200
-
1201
- List of searched device properties
1202
-
1203
- ## Example
1204
-
1205
- ```javascript
1206
- // 1. 按立创 C 编号精确搜索,每页 5 条
1207
- const results = await eda.lib_Device.searchByProperties(
1208
- { supplierId: 'C1523' },
1209
- undefined,
1210
- undefined,
1211
- undefined,
1212
- 5,
1213
- 1
1214
- );
1215
-
1216
- // 2. 输出搜索结果
1217
- console.log('count:', results.length);
1218
- results.forEach((item, i) => {
1219
- console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'supplierId:', item.supplierId);
1220
- });
1221
- ```
1
+ # LIB\_Device class
2
+
3
+ Comprehensive library / device class
4
+
5
+ ## Signature
6
+
7
+ ```typescript
8
+ class LIB_Device
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
+ [copy(deviceUuid, libraryUuid, targetLibraryUuid, targetClassification, newDeviceName)](./LIB_Device.md)
29
+
30
+ </td><td>
31
+
32
+ </td><td>
33
+
34
+ **_(BETA)_** Copy Device
35
+
36
+ </td></tr>
37
+ <tr><td>
38
+
39
+ [create(libraryUuid, deviceName, classification, association, description, property)](./LIB_Device.md)
40
+
41
+ </td><td>
42
+
43
+ </td><td>
44
+
45
+ **_(BETA)_** Create Device
46
+
47
+ </td></tr>
48
+ <tr><td>
49
+
50
+ [delete(deviceUuid, libraryUuid)](./LIB_Device.md)
51
+
52
+ </td><td>
53
+
54
+ </td><td>
55
+
56
+ **_(BETA)_** Delete Device
57
+
58
+ </td></tr>
59
+ <tr><td>
60
+
61
+ [get(deviceUuid, libraryUuid)](./LIB_Device.md)
62
+
63
+ </td><td>
64
+
65
+ </td><td>
66
+
67
+ **_(BETA)_** Get all properties of the device
68
+
69
+ </td></tr>
70
+ <tr><td>
71
+
72
+ [getByLcscIds(lcscIds, libraryUuid, allowMultiMatch)](./LIB_Device.md)
73
+
74
+ </td><td>
75
+
76
+ </td><td>
77
+
78
+ **_(BETA)_** Get a device using an LCSC C number
79
+
80
+ </td></tr>
81
+ <tr><td>
82
+
83
+ [getByLcscIds(lcscIds, libraryUuid, allowMultiMatch)](./LIB_Device.md)
84
+
85
+ </td><td>
86
+
87
+ </td><td>
88
+
89
+ **_(BETA)_** Batch get devices using LCSC C numbers
90
+
91
+ </td></tr>
92
+ <tr><td>
93
+
94
+ [modify(deviceUuid, libraryUuid, deviceName, classification, association, description, property)](./LIB_Device.md)
95
+
96
+ </td><td>
97
+
98
+ </td><td>
99
+
100
+ **_(BETA)_** Modify Device
101
+
102
+ </td></tr>
103
+ <tr><td>
104
+
105
+ [search(key, libraryUuid, classification, symbolType, itemsOfPage, page)](./LIB_Device.md)
106
+
107
+ </td><td>
108
+
109
+ </td><td>
110
+
111
+ **_(BETA)_** Search device
112
+
113
+ </td></tr>
114
+ <tr><td>
115
+
116
+ [searchByProperties(properties, libraryUuid, classification, symbolType, itemsOfPage, page)](./LIB_Device.md)
117
+
118
+ </td><td>
119
+
120
+ </td><td>
121
+
122
+ **_(BETA)_** Search devices precisely by properties
123
+
124
+ </td></tr>
125
+ </tbody></table>
126
+
127
+ ---
128
+
129
+ ## 方法详情
130
+
131
+ ### copy
132
+
133
+ # LIB\_Device.copy() method
134
+
135
+ > 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.
136
+
137
+ Copy Device
138
+
139
+ ## Signature
140
+
141
+ ```typescript
142
+ function copy(
143
+ deviceUuid: string,
144
+ libraryUuid: string,
145
+ targetLibraryUuid: string,
146
+ targetClassification?: ILIB_ClassificationIndex | Array<string>,
147
+ newDeviceName?: string,
148
+ ): Promise<string | undefined>;
149
+ ```
150
+
151
+ ## Parameters
152
+
153
+ <table><thead><tr><th>
154
+
155
+ Parameter
156
+
157
+ </th><th>
158
+
159
+ Type
160
+
161
+ </th><th>
162
+
163
+ Description
164
+
165
+ </th></tr></thead>
166
+ <tbody><tr><td>
167
+
168
+ deviceUuid
169
+
170
+ </td><td>
171
+
172
+ string
173
+
174
+ </td><td>
175
+
176
+ Device UUID
177
+
178
+ </td></tr>
179
+ <tr><td>
180
+
181
+ libraryUuid
182
+
183
+ </td><td>
184
+
185
+ string
186
+
187
+ </td><td>
188
+
189
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
190
+
191
+ </td></tr>
192
+ <tr><td>
193
+
194
+ targetLibraryUuid
195
+
196
+ </td><td>
197
+
198
+ string
199
+
200
+ </td><td>
201
+
202
+ Target library UUID
203
+
204
+ </td></tr>
205
+ <tr><td>
206
+
207
+ targetClassification
208
+
209
+ </td><td>
210
+
211
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
212
+
213
+ </td><td>
214
+
215
+ _(Optional)_ Classification in the target library
216
+
217
+ </td></tr>
218
+ <tr><td>
219
+
220
+ newDeviceName
221
+
222
+ </td><td>
223
+
224
+ string
225
+
226
+ </td><td>
227
+
228
+ _(Optional)_ New device name. If a device with the same name exists in the target library, the copy will fail
229
+
230
+ </td></tr>
231
+ </tbody></table>
232
+
233
+ ## Returns
234
+
235
+ Promise&lt;string \| undefined&gt;
236
+
237
+ UUID of the new device in the target library
238
+
239
+ ## Example
240
+
241
+ ```javascript
242
+ // 1. 获取个人库 UUID
243
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
244
+
245
+ // 2. 新建一个轻量器件作为复制来源
246
+ const sourceName = `嘉立创示例_复制源_${Date.now()}`;
247
+ const sourceUuid = await eda.lib_Device.create(libraryUuid, sourceName, [], { symbolType: 2 });
248
+
249
+ // 3. 复制到同一库,指定新名称避免同名冲突(分类传 [] = 不分类)
250
+ const newName = `嘉立创示例_复制品_${Date.now()}`;
251
+ const copiedUuid = await eda.lib_Device.copy(sourceUuid, libraryUuid, libraryUuid, [], newName);
252
+
253
+ // 创建类保留现场(原件与复制品都留在个人库中供观察)
254
+
255
+ console.log('sourceUuid:', sourceUuid);
256
+ console.log('copiedUuid:', copiedUuid);
257
+ console.log('newName:', newName);
258
+ ```
259
+
260
+ ### create
261
+
262
+ # LIB\_Device.create() method
263
+
264
+ > 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.
265
+
266
+ Create Device
267
+
268
+ ## Signature
269
+
270
+ ```typescript
271
+ function create(
272
+ libraryUuid: string,
273
+ deviceName: string,
274
+ classification?: ILIB_ClassificationIndex | Array<string>,
275
+ association?: {
276
+ symbolType?: ELIB_SymbolType;
277
+ symbolUuid?: string;
278
+ symbol?: { uuid: string; libraryUuid: string };
279
+ footprintUuid?: string;
280
+ footprint?: { uuid: string; libraryUuid: string };
281
+ model3D?: { uuid: string; libraryUuid: string };
282
+ imageData?: File | Blob;
283
+ },
284
+ description?: string,
285
+ property?: ILIB_DeviceExtendPropertyItem,
286
+ ): Promise<string | undefined>;
287
+ ```
288
+
289
+ ## Parameters
290
+
291
+ <table><thead><tr><th>
292
+
293
+ Parameter
294
+
295
+ </th><th>
296
+
297
+ Type
298
+
299
+ </th><th>
300
+
301
+ Description
302
+
303
+ </th></tr></thead>
304
+ <tbody><tr><td>
305
+
306
+ libraryUuid
307
+
308
+ </td><td>
309
+
310
+ string
311
+
312
+ </td><td>
313
+
314
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
315
+
316
+ </td></tr>
317
+ <tr><td>
318
+
319
+ deviceName
320
+
321
+ </td><td>
322
+
323
+ string
324
+
325
+ </td><td>
326
+
327
+ Device name
328
+
329
+ </td></tr>
330
+ <tr><td>
331
+
332
+ classification
333
+
334
+ </td><td>
335
+
336
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
337
+
338
+ </td><td>
339
+
340
+ _(Optional)_ Classification
341
+
342
+ </td></tr>
343
+ <tr><td>
344
+
345
+ association
346
+
347
+ </td><td>
348
+
349
+ { symbolType?: [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)<!-- -->; symbolUuid?: string; symbol?: { uuid: string; libraryUuid: string }; footprintUuid?: string; footprint?: { uuid: string; libraryUuid: string }; model3D?: { uuid: string; libraryUuid: string }; imageData?: File \| Blob }
350
+
351
+ </td><td>
352
+
353
+ _(Optional)_ Associate a symbol, footprint, and image. Specifying `symbolType` creates a new symbol; if no new symbol is needed, `symbolType` does not need to be specified. However, note that if no new symbol is created and no symbol association information is specified, the device cannot be created
354
+
355
+ </td></tr>
356
+ <tr><td>
357
+
358
+ description
359
+
360
+ </td><td>
361
+
362
+ string
363
+
364
+ </td><td>
365
+
366
+ _(Optional)_ Description
367
+
368
+ </td></tr>
369
+ <tr><td>
370
+
371
+ property
372
+
373
+ </td><td>
374
+
375
+ [ILIB\_DeviceExtendPropertyItem](../interfaces/ILIB_DeviceExtendPropertyItem.md)
376
+
377
+ </td><td>
378
+
379
+ _(Optional)_ Other property, only `designator`<!-- -->, `addIntoBom`<!-- -->, `addIntoPcb` exists default value
380
+
381
+ </td></tr>
382
+ </tbody></table>
383
+
384
+ ## Returns
385
+
386
+ Promise&lt;string \| undefined&gt;
387
+
388
+ Device UUID
389
+
390
+ ## Example
391
+
392
+ ```javascript
393
+ // 1. 获取个人库 UUID
394
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
395
+
396
+ // 2. 创建器件:新建元件符号(symbolType: 2)并设置默认属性
397
+ const deviceName = `嘉立创示例_新器件_${Date.now()}`;
398
+ const deviceUuid = await eda.lib_Device.create(
399
+ libraryUuid,
400
+ deviceName,
401
+ [],
402
+ { symbolType: 2 },
403
+ '示例器件描述',
404
+ { designator: 'R', addIntoBom: true, addIntoPcb: true }
405
+ );
406
+
407
+ // 创建类保留现场(新器件留在个人库中供观察)
408
+
409
+ console.log('deviceUuid:', deviceUuid);
410
+ console.log('deviceName:', deviceName);
411
+ ```
412
+
413
+ ### delete
414
+
415
+ # LIB\_Device.delete() method
416
+
417
+ > 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.
418
+
419
+ Delete Device
420
+
421
+ ## Signature
422
+
423
+ ```typescript
424
+ function delete(deviceUuid: string, libraryUuid: string): Promise<boolean | undefined>;
425
+ ```
426
+
427
+ ## Parameters
428
+
429
+ <table><thead><tr><th>
430
+
431
+ Parameter
432
+
433
+ </th><th>
434
+
435
+ Type
436
+
437
+ </th><th>
438
+
439
+ Description
440
+
441
+ </th></tr></thead>
442
+ <tbody><tr><td>
443
+
444
+ deviceUuid
445
+
446
+ </td><td>
447
+
448
+ string
449
+
450
+ </td><td>
451
+
452
+ Device UUID
453
+
454
+ </td></tr>
455
+ <tr><td>
456
+
457
+ libraryUuid
458
+
459
+ </td><td>
460
+
461
+ string
462
+
463
+ </td><td>
464
+
465
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
466
+
467
+ </td></tr>
468
+ </tbody></table>
469
+
470
+ ## Returns
471
+
472
+ Promise&lt;boolean \| undefined&gt;
473
+
474
+ Whether the operation is successful
475
+
476
+ ## Example
477
+
478
+ ```javascript
479
+ // 1. 获取个人库 UUID 并新建删除对象
480
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
481
+ const deviceUuid = await eda.lib_Device.create(
482
+ libraryUuid,
483
+ `嘉立创示例_待删除_${Date.now()}`,
484
+ [],
485
+ { symbolType: 2 }
486
+ );
487
+
488
+ // 2. 删除该器件
489
+ const deleted = await eda.lib_Device.delete(deviceUuid, libraryUuid);
490
+
491
+ console.log('deviceUuid:', deviceUuid);
492
+ console.log('deleted:', deleted);
493
+ ```
494
+
495
+ ### get
496
+
497
+ # LIB\_Device.get() method
498
+
499
+ > 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.
500
+
501
+ Get all properties of the device
502
+
503
+ ## Signature
504
+
505
+ ```typescript
506
+ function get(deviceUuid: string, libraryUuid?: string): Promise<ILIB_DeviceItem | undefined>;
507
+ ```
508
+
509
+ ## Parameters
510
+
511
+ <table><thead><tr><th>
512
+
513
+ Parameter
514
+
515
+ </th><th>
516
+
517
+ Type
518
+
519
+ </th><th>
520
+
521
+ Description
522
+
523
+ </th></tr></thead>
524
+ <tbody><tr><td>
525
+
526
+ deviceUuid
527
+
528
+ </td><td>
529
+
530
+ string
531
+
532
+ </td><td>
533
+
534
+ Device UUID
535
+
536
+ </td></tr>
537
+ <tr><td>
538
+
539
+ libraryUuid
540
+
541
+ </td><td>
542
+
543
+ string
544
+
545
+ </td><td>
546
+
547
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
548
+
549
+ </td></tr>
550
+ </tbody></table>
551
+
552
+ ## Returns
553
+
554
+ Promise&lt;[ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| undefined&gt;
555
+
556
+ Device property
557
+
558
+ ### getbylcscids
559
+
560
+ # LIB\_Device.getByLcscIds() method
561
+
562
+ > 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.
563
+
564
+ Get a device using an LCSC C number
565
+
566
+ ## Signature
567
+
568
+ ```typescript
569
+ function getByLcscIds<T extends boolean>(
570
+ lcscIds: string,
571
+ libraryUuid?: string,
572
+ allowMultiMatch?: T,
573
+ ): Promise<T extends true ? Array<ILIB_DeviceSearchItem> : ILIB_DeviceSearchItem | undefined>;
574
+ ```
575
+
576
+ ## Parameters
577
+
578
+ <table><thead><tr><th>
579
+
580
+ Parameter
581
+
582
+ </th><th>
583
+
584
+ Type
585
+
586
+ </th><th>
587
+
588
+ Description
589
+
590
+ </th></tr></thead>
591
+ <tbody><tr><td>
592
+
593
+ lcscIds
594
+
595
+ </td><td>
596
+
597
+ string
598
+
599
+ </td><td>
600
+
601
+ LCSC C number
602
+
603
+ </td></tr>
604
+ <tr><td>
605
+
606
+ libraryUuid
607
+
608
+ </td><td>
609
+
610
+ string
611
+
612
+ </td><td>
613
+
614
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
615
+
616
+ </td></tr>
617
+ <tr><td>
618
+
619
+ allowMultiMatch
620
+
621
+ </td><td>
622
+
623
+ T
624
+
625
+ </td><td>
626
+
627
+ _(Optional)_ Whether a single LCSC C number is allowed to match multiple results
628
+
629
+ </td></tr>
630
+ </tbody></table>
631
+
632
+ ## Returns
633
+
634
+ Promise&lt;T extends true ? Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt; : [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md) \| undefined&gt;
635
+
636
+ Searched device properties
637
+
638
+ ## Remarks
639
+
640
+ By default, if multiple devices with the same C number are matched in the same library, only the first result will be returned;
641
+
642
+ If you want to return multiple results, set `allowMultiMatch` to `true`<!-- -->;
643
+
644
+ This API is temporarily unavailable in the private deployment environment
645
+
646
+ 私有化部署环境暂无法使用本接口
647
+
648
+ ### getbylcscids_1
649
+
650
+ # LIB\_Device.getByLcscIds() method
651
+
652
+ > 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.
653
+
654
+ Batch get devices using LCSC C numbers
655
+
656
+ ## Signature
657
+
658
+ ```typescript
659
+ function getByLcscIds(
660
+ lcscIds: Array<string>,
661
+ libraryUuid?: string,
662
+ allowMultiMatch?: boolean,
663
+ ): Promise<Array<ILIB_DeviceSearchItem>>;
664
+ ```
665
+
666
+ ## Parameters
667
+
668
+ <table><thead><tr><th>
669
+
670
+ Parameter
671
+
672
+ </th><th>
673
+
674
+ Type
675
+
676
+ </th><th>
677
+
678
+ Description
679
+
680
+ </th></tr></thead>
681
+ <tbody><tr><td>
682
+
683
+ lcscIds
684
+
685
+ </td><td>
686
+
687
+ Array&lt;string&gt;
688
+
689
+ </td><td>
690
+
691
+ Array of LCSC C numbers
692
+
693
+ </td></tr>
694
+ <tr><td>
695
+
696
+ libraryUuid
697
+
698
+ </td><td>
699
+
700
+ string
701
+
702
+ </td><td>
703
+
704
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
705
+
706
+ </td></tr>
707
+ <tr><td>
708
+
709
+ allowMultiMatch
710
+
711
+ </td><td>
712
+
713
+ boolean
714
+
715
+ </td><td>
716
+
717
+ _(Optional)_ Whether a single LCSC C number is allowed to match multiple results
718
+
719
+ </td></tr>
720
+ </tbody></table>
721
+
722
+ ## Returns
723
+
724
+ Promise&lt;Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt;&gt;
725
+
726
+ List of searched device properties
727
+
728
+ ## Remarks
729
+
730
+ By default, if multiple devices with the same C number are matched in the same library, only the first result will be returned;
731
+
732
+ If you want to return multiple results, set `allowMultiMatch` to `true`<!-- -->;
733
+
734
+ This API is temporarily unavailable in the private deployment environment
735
+
736
+ 私有化部署环境暂无法使用本接口
737
+
738
+ ## Example
739
+
740
+ ```javascript
741
+ // 1. 单个 C 编号查询(默认搜索系统库)
742
+ const one = await eda.lib_Device.getByLcscIds('C1523');
743
+ console.log('single count:', one.length);
744
+ console.log('[0] uuid:', one[0].uuid, 'supplierId:', one[0].supplierId);
745
+
746
+ // 2. 批量查询多个 C 编号
747
+ const many = await eda.lib_Device.getByLcscIds(['C1523', 'C17168']);
748
+ console.log('batch count:', many.length);
749
+ many.forEach((item, i) => {
750
+ console.log(`[${i}] uuid:`, item.uuid, 'supplierId:', item.supplierId);
751
+ });
752
+ ```
753
+
754
+ ### modify
755
+
756
+ # LIB\_Device.modify() method
757
+
758
+ > 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.
759
+
760
+ Modify Device
761
+
762
+ ## Signature
763
+
764
+ ```typescript
765
+ function modify(
766
+ deviceUuid: string,
767
+ libraryUuid: string,
768
+ deviceName?: string,
769
+ classification?: ILIB_ClassificationIndex | Array<string> | null,
770
+ association?: {
771
+ symbolUuid?: string;
772
+ symbol?: { uuid: string; libraryUuid: string };
773
+ footprintUuid?: string | null;
774
+ footprint?: { uuid: string; libraryUuid: string } | null;
775
+ model3D?: { uuid: string; libraryUuid: string } | null;
776
+ imageData?: File | Blob | null;
777
+ },
778
+ description?: string | null,
779
+ property?: {
780
+ name?: string | null;
781
+ designator?: string;
782
+ addIntoBom?: boolean;
783
+ addIntoPcb?: boolean;
784
+ net?: string;
785
+ manufacturer?: string | null;
786
+ manufacturerId?: string | null;
787
+ supplier?: string | null;
788
+ supplierId?: string | null;
789
+ otherProperty?: Record<string, boolean | number | string | undefined | null>;
790
+ },
791
+ ): Promise<boolean>;
792
+ ```
793
+
794
+ ## Parameters
795
+
796
+ <table><thead><tr><th>
797
+
798
+ Parameter
799
+
800
+ </th><th>
801
+
802
+ Type
803
+
804
+ </th><th>
805
+
806
+ Description
807
+
808
+ </th></tr></thead>
809
+ <tbody><tr><td>
810
+
811
+ deviceUuid
812
+
813
+ </td><td>
814
+
815
+ string
816
+
817
+ </td><td>
818
+
819
+ Device UUID
820
+
821
+ </td></tr>
822
+ <tr><td>
823
+
824
+ libraryUuid
825
+
826
+ </td><td>
827
+
828
+ string
829
+
830
+ </td><td>
831
+
832
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
833
+
834
+ </td></tr>
835
+ <tr><td>
836
+
837
+ deviceName
838
+
839
+ </td><td>
840
+
841
+ string
842
+
843
+ </td><td>
844
+
845
+ _(Optional)_ Device name
846
+
847
+ </td></tr>
848
+ <tr><td>
849
+
850
+ classification
851
+
852
+ </td><td>
853
+
854
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt; \| null
855
+
856
+ </td><td>
857
+
858
+ _(Optional)_ Classification
859
+
860
+ </td></tr>
861
+ <tr><td>
862
+
863
+ association
864
+
865
+ </td><td>
866
+
867
+ \{ symbolUuid?: string; symbol?: \{ uuid: string; libraryUuid: string \}; footprintUuid?: string \| null; footprint?: \{ uuid: string; libraryUuid: string \} \| null; model3D?: \{ uuid: string; libraryUuid: string \} \| null; imageData?: File \| Blob \| null \}
868
+
869
+ </td><td>
870
+
871
+ _(Optional)_ Associated symbol, footprint, image
872
+
873
+ </td></tr>
874
+ <tr><td>
875
+
876
+ description
877
+
878
+ </td><td>
879
+
880
+ string \| null
881
+
882
+ </td><td>
883
+
884
+ _(Optional)_ Description
885
+
886
+ </td></tr>
887
+ <tr><td>
888
+
889
+ property
890
+
891
+ </td><td>
892
+
893
+ { name?: string \| null; designator?: string; addIntoBom?: boolean; addIntoPcb?: boolean; net?: string; manufacturer?: string \| null; manufacturerId?: string \| null; supplier?: string \| null; supplierId?: string \| null; otherProperty?: Record&lt;string, boolean \| number \| string \| undefined \| null&gt; }
894
+
895
+ </td><td>
896
+
897
+ _(Optional)_ Other property
898
+
899
+ </td></tr>
900
+ </tbody></table>
901
+
902
+ ## Returns
903
+
904
+ Promise&lt;boolean&gt;
905
+
906
+ Whether the operation is successful
907
+
908
+ ## Remarks
909
+
910
+ If you want to clear certain properties, set their values to `null`
911
+
912
+ ## Example
913
+
914
+ ```javascript
915
+ // 1. 获取个人库 UUID 并新建修改对象
916
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
917
+ const deviceUuid = await eda.lib_Device.create(
918
+ libraryUuid,
919
+ `嘉立创示例_修改前_${Date.now()}`,
920
+ [],
921
+ { symbolType: 2 },
922
+ '修改前的描述'
923
+ );
924
+
925
+ // 2. 修改名称和描述(分类保持不变传 [])
926
+ const newName = `嘉立创示例_修改后_${Date.now()}`;
927
+ const modified = await eda.lib_Device.modify(deviceUuid, libraryUuid, newName, [], '修改后的描述');
928
+
929
+ // 3. 再补充修改扩展属性(位号、制造商)
930
+ await eda.lib_Device.modify(deviceUuid, libraryUuid, undefined, [], undefined, { designator: 'R', manufacturer: '嘉立创' });
931
+
932
+ // 修改类保留现场
933
+
934
+ console.log('deviceUuid:', deviceUuid);
935
+ console.log('modified:', modified);
936
+ console.log('newName:', newName);
937
+ ```
938
+
939
+ ### search
940
+
941
+ # LIB\_Device.search() method
942
+
943
+ > 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.
944
+
945
+ Search device
946
+
947
+ ## Signature
948
+
949
+ ```typescript
950
+ function search(
951
+ key: string,
952
+ libraryUuid?: string,
953
+ classification?: ILIB_ClassificationIndex | Array<string>,
954
+ symbolType?: ELIB_SymbolType,
955
+ itemsOfPage?: number,
956
+ page?: number,
957
+ ): Promise<Array<ILIB_DeviceSearchItem>>;
958
+ ```
959
+
960
+ ## Parameters
961
+
962
+ <table><thead><tr><th>
963
+
964
+ Parameter
965
+
966
+ </th><th>
967
+
968
+ Type
969
+
970
+ </th><th>
971
+
972
+ Description
973
+
974
+ </th></tr></thead>
975
+ <tbody><tr><td>
976
+
977
+ key
978
+
979
+ </td><td>
980
+
981
+ string
982
+
983
+ </td><td>
984
+
985
+ Search keyword
986
+
987
+ </td></tr>
988
+ <tr><td>
989
+
990
+ libraryUuid
991
+
992
+ </td><td>
993
+
994
+ string
995
+
996
+ </td><td>
997
+
998
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
999
+
1000
+ </td></tr>
1001
+ <tr><td>
1002
+
1003
+ classification
1004
+
1005
+ </td><td>
1006
+
1007
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
1008
+
1009
+ </td><td>
1010
+
1011
+ _(Optional)_ Classification, defaults to all
1012
+
1013
+ </td></tr>
1014
+ <tr><td>
1015
+
1016
+ symbolType
1017
+
1018
+ </td><td>
1019
+
1020
+ [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
1021
+
1022
+ </td><td>
1023
+
1024
+ _(Optional)_ Symbol type, defaults to all
1025
+
1026
+ </td></tr>
1027
+ <tr><td>
1028
+
1029
+ itemsOfPage
1030
+
1031
+ </td><td>
1032
+
1033
+ number
1034
+
1035
+ </td><td>
1036
+
1037
+ _(Optional)_ Number of search results per page
1038
+
1039
+ </td></tr>
1040
+ <tr><td>
1041
+
1042
+ page
1043
+
1044
+ </td><td>
1045
+
1046
+ number
1047
+
1048
+ </td><td>
1049
+
1050
+ _(Optional)_ Page count
1051
+
1052
+ </td></tr>
1053
+ </tbody></table>
1054
+
1055
+ ## Returns
1056
+
1057
+ Promise&lt;Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt;&gt;
1058
+
1059
+ List of searched device properties
1060
+
1061
+ ## Remarks
1062
+
1063
+ 本接口为 \*\*模糊搜索\*\*,可能返回社区伪编号(如 `C99xxxxxxx`<!-- -->)或近似结果(如 `C14604` 命中近似型号); 需要按属性精确检索请用 [searchByProperties](./LIB_Device.md)<!-- -->(如 `{ supplierId: 'C1523' }`<!-- -->)
1064
+
1065
+ ## Example
1066
+
1067
+ ```javascript
1068
+ // 1. 按关键字搜索系统库中的器件,每页 5 条
1069
+ const results = await eda.lib_Device.search('0402', undefined, undefined, undefined, 5, 1);
1070
+
1071
+ // 2. 输出搜索结果
1072
+ console.log('count:', results.length);
1073
+ results.forEach((item, i) => {
1074
+ console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'supplierId:', item.supplierId);
1075
+ });
1076
+ ```
1077
+
1078
+ ### searchbyproperties
1079
+
1080
+ # LIB\_Device.searchByProperties() method
1081
+
1082
+ > 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.
1083
+
1084
+ Search devices precisely by properties
1085
+
1086
+ ## Signature
1087
+
1088
+ ```typescript
1089
+ function searchByProperties(
1090
+ properties: ILIB_DevicePropertiesForSearch,
1091
+ libraryUuid?: string,
1092
+ classification?: Array<string>,
1093
+ symbolType?: ELIB_SymbolType,
1094
+ itemsOfPage?: number,
1095
+ page?: number,
1096
+ ): Promise<Array<ILIB_DeviceSearchItem>>;
1097
+ ```
1098
+
1099
+ ## Parameters
1100
+
1101
+ <table><thead><tr><th>
1102
+
1103
+ Parameter
1104
+
1105
+ </th><th>
1106
+
1107
+ Type
1108
+
1109
+ </th><th>
1110
+
1111
+ Description
1112
+
1113
+ </th></tr></thead>
1114
+ <tbody><tr><td>
1115
+
1116
+ properties
1117
+
1118
+ </td><td>
1119
+
1120
+ [ILIB\_DevicePropertiesForSearch](../interfaces/ILIB_DevicePropertiesForSearch.md)
1121
+
1122
+ </td><td>
1123
+
1124
+ Property
1125
+
1126
+ </td></tr>
1127
+ <tr><td>
1128
+
1129
+ libraryUuid
1130
+
1131
+ </td><td>
1132
+
1133
+ string
1134
+
1135
+ </td><td>
1136
+
1137
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1138
+
1139
+ </td></tr>
1140
+ <tr><td>
1141
+
1142
+ classification
1143
+
1144
+ </td><td>
1145
+
1146
+ Array&lt;string&gt;
1147
+
1148
+ </td><td>
1149
+
1150
+ _(Optional)_ Classification, defaults to all ADD since EDA v4
1151
+
1152
+ </td></tr>
1153
+ <tr><td>
1154
+
1155
+ symbolType
1156
+
1157
+ </td><td>
1158
+
1159
+ [ELIB\_SymbolType](../enums/ELIB_SymbolType.md)
1160
+
1161
+ </td><td>
1162
+
1163
+ _(Optional)_ Symbol type, defaults to all
1164
+
1165
+ </td></tr>
1166
+ <tr><td>
1167
+
1168
+ itemsOfPage
1169
+
1170
+ </td><td>
1171
+
1172
+ number
1173
+
1174
+ </td><td>
1175
+
1176
+ _(Optional)_ Number of search results per page
1177
+
1178
+ </td></tr>
1179
+ <tr><td>
1180
+
1181
+ page
1182
+
1183
+ </td><td>
1184
+
1185
+ number
1186
+
1187
+ </td><td>
1188
+
1189
+ _(Optional)_ Page count
1190
+
1191
+ </td></tr>
1192
+ </tbody></table>
1193
+
1194
+ ## Returns
1195
+
1196
+ Promise&lt;Array&lt;[ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)<!-- -->&gt;&gt;
1197
+
1198
+ List of searched device properties
1199
+
1200
+ ## Remarks
1201
+
1202
+ 该接口暂时不支持工程库的精确搜索; 需精确检索时传 `{ supplierId, partNumber, partCode, … }` 等属性,与 [search](./LIB_Device.md) 的模糊搜索互补
1203
+
1204
+ ## Example
1205
+
1206
+ ```javascript
1207
+ // 1. 按立创 C 编号精确搜索,每页 5 条
1208
+ const results = await eda.lib_Device.searchByProperties(
1209
+ { supplierId: 'C1523' },
1210
+ undefined,
1211
+ undefined,
1212
+ undefined,
1213
+ 5,
1214
+ 1
1215
+ );
1216
+
1217
+ // 2. 输出搜索结果
1218
+ console.log('count:', results.length);
1219
+ results.forEach((item, i) => {
1220
+ console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'supplierId:', item.supplierId);
1221
+ });
1222
+ ```