@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,1153 +1,1298 @@
1
- # LIB\_Footprint class
2
-
3
- Comprehensive library / footprint class
4
-
5
- ## Signature
6
-
7
- ```typescript
8
- class LIB_Footprint
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(footprintUuid, libraryUuid, targetLibraryUuid, targetClassification, newFootprintName)](./LIB_Footprint.md)
29
-
30
- </td><td>
31
-
32
- </td><td>
33
-
34
- **_(BETA)_** Copy Footprint
35
-
36
- </td></tr>
37
- <tr><td>
38
-
39
- [create(libraryUuid, footprintName, classification, description)](./LIB_Footprint.md)
40
-
41
- </td><td>
42
-
43
- </td><td>
44
-
45
- **_(BETA)_** Create Footprint
46
-
47
- </td></tr>
48
- <tr><td>
49
-
50
- [delete(footprintUuid, libraryUuid)](./LIB_Footprint.md)
51
-
52
- </td><td>
53
-
54
- </td><td>
55
-
56
- **_(BETA)_** Delete Footprint
57
-
58
- </td></tr>
59
- <tr><td>
60
-
61
- [get(footprintUuid, libraryUuid)](./LIB_Footprint.md)
62
-
63
- </td><td>
64
-
65
- </td><td>
66
-
67
- **_(BETA)_** Get all properties of the footprint
68
-
69
- </td></tr>
70
- <tr><td>
71
-
72
- [getRenderImage(source)](./LIB_Footprint.md)
73
-
74
- </td><td>
75
-
76
- </td><td>
77
-
78
- **_(BETA)_** Get the footprint render image
79
-
80
- </td></tr>
81
- <tr><td>
82
-
83
- [modify(footprintUuid, libraryUuid, footprintName, classification, description)](./LIB_Footprint.md)
84
-
85
- </td><td>
86
-
87
- </td><td>
88
-
89
- **_(BETA)_** Modify Footprint
90
-
91
- </td></tr>
92
- <tr><td>
93
-
94
- [openInEditor(footprintUuid, libraryUuid, splitScreenId)](./LIB_Footprint.md)
95
-
96
- </td><td>
97
-
98
- </td><td>
99
-
100
- **_(BETA)_** Open in the editor document
101
-
102
- </td></tr>
103
- <tr><td>
104
-
105
- [search(key, libraryUuid, classification, itemsOfPage, page)](./LIB_Footprint.md)
106
-
107
- </td><td>
108
-
109
- </td><td>
110
-
111
- **_(BETA)_** Search footprint
112
-
113
- </td></tr>
114
- <tr><td>
115
-
116
- [searchByProperties(properties, libraryUuid)](./LIB_Footprint.md)
117
-
118
- </td><td>
119
-
120
- </td><td>
121
-
122
- **_(BETA)_** Search footprints precisely by properties
123
-
124
- </td></tr>
125
- <tr><td>
126
-
127
- [updateDocumentSource(footprintUuid, libraryUuid, documentSource)](./LIB_Footprint.md)
128
-
129
- </td><td>
130
-
131
- </td><td>
132
-
133
- **_(BETA)_** Update the document source code of the footprint
134
-
135
- </td></tr>
136
- </tbody></table>
137
-
138
- ---
139
-
140
- ## 方法详情
141
-
142
- ### copy
143
-
144
- # LIB\_Footprint.copy() method
145
-
146
- > 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.
147
-
148
- Copy Footprint
149
-
150
- ## Signature
151
-
152
- ```typescript
153
- function copy(
154
- footprintUuid: string,
155
- libraryUuid: string,
156
- targetLibraryUuid: string,
157
- targetClassification?: ILIB_ClassificationIndex | Array<string>,
158
- newFootprintName?: string,
159
- ): Promise<string | undefined>;
160
- ```
161
-
162
- ## Parameters
163
-
164
- <table><thead><tr><th>
165
-
166
- Parameter
167
-
168
- </th><th>
169
-
170
- Type
171
-
172
- </th><th>
173
-
174
- Description
175
-
176
- </th></tr></thead>
177
- <tbody><tr><td>
178
-
179
- footprintUuid
180
-
181
- </td><td>
182
-
183
- string
184
-
185
- </td><td>
186
-
187
- Footprint UUID
188
-
189
- </td></tr>
190
- <tr><td>
191
-
192
- libraryUuid
193
-
194
- </td><td>
195
-
196
- string
197
-
198
- </td><td>
199
-
200
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
201
-
202
- </td></tr>
203
- <tr><td>
204
-
205
- targetLibraryUuid
206
-
207
- </td><td>
208
-
209
- string
210
-
211
- </td><td>
212
-
213
- Target library UUID
214
-
215
- </td></tr>
216
- <tr><td>
217
-
218
- targetClassification
219
-
220
- </td><td>
221
-
222
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
223
-
224
- </td><td>
225
-
226
- _(Optional)_ Classification in the target library
227
-
228
- </td></tr>
229
- <tr><td>
230
-
231
- newFootprintName
232
-
233
- </td><td>
234
-
235
- string
236
-
237
- </td><td>
238
-
239
- _(Optional)_ New footprint name. If a footprint with the same name exists in the target library, the copy will fail
240
-
241
- </td></tr>
242
- </tbody></table>
243
-
244
- ## Returns
245
-
246
- Promise&lt;string \| undefined&gt;
247
-
248
- UUID of the new footprint in the target library
249
-
250
- ## Example
251
-
252
- ```javascript
253
- // 1. 搜索系统库,取一个封装作为复制来源
254
- const [source] = await eda.lib_Footprint.search('0402', undefined, undefined, 1, 1);
255
-
256
- // 2. 获取个人库 UUID
257
- const targetLibraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
258
-
259
- // 3. 从系统库复制到个人库,指定新名称避免同名冲突(分类传 [] = 不分类)
260
- const newName = `嘉立创示例_封装副本_${Date.now()}`;
261
- const copiedUuid = await eda.lib_Footprint.copy(
262
- source.uuid,
263
- source.libraryUuid,
264
- targetLibraryUuid,
265
- [],
266
- newName
267
- );
268
-
269
- // 创建类保留现场(副本留在个人库中供观察)
270
-
271
- console.log('sourceUuid:', source.uuid);
272
- console.log('copiedUuid:', copiedUuid);
273
- console.log('newName:', newName);
274
- ```
275
-
276
- ### create
277
-
278
- # LIB\_Footprint.create() method
279
-
280
- > 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.
281
-
282
- Create Footprint
283
-
284
- ## Signature
285
-
286
- ```typescript
287
- function create(
288
- libraryUuid: string,
289
- footprintName: string,
290
- classification?: ILIB_ClassificationIndex | Array<string>,
291
- description?: string,
292
- ): Promise<string | undefined>;
293
- ```
294
-
295
- ## Parameters
296
-
297
- <table><thead><tr><th>
298
-
299
- Parameter
300
-
301
- </th><th>
302
-
303
- Type
304
-
305
- </th><th>
306
-
307
- Description
308
-
309
- </th></tr></thead>
310
- <tbody><tr><td>
311
-
312
- libraryUuid
313
-
314
- </td><td>
315
-
316
- string
317
-
318
- </td><td>
319
-
320
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
321
-
322
- </td></tr>
323
- <tr><td>
324
-
325
- footprintName
326
-
327
- </td><td>
328
-
329
- string
330
-
331
- </td><td>
332
-
333
- Footprint name
334
-
335
- </td></tr>
336
- <tr><td>
337
-
338
- classification
339
-
340
- </td><td>
341
-
342
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
343
-
344
- </td><td>
345
-
346
- _(Optional)_ Classification
347
-
348
- </td></tr>
349
- <tr><td>
350
-
351
- description
352
-
353
- </td><td>
354
-
355
- string
356
-
357
- </td><td>
358
-
359
- _(Optional)_ Description
360
-
361
- </td></tr>
362
- </tbody></table>
363
-
364
- ## Returns
365
-
366
- Promise&lt;string \| undefined&gt;
367
-
368
- Footprint UUID
369
-
370
- ## Example
371
-
372
- ```javascript
373
- // 1. 获取个人库 UUID
374
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
375
-
376
- // 2. 创建封装(分类传 [] = 不分类)
377
- const footprintName = `嘉立创示例_新封装_${Date.now()}`;
378
- const footprintUuid = await eda.lib_Footprint.create(libraryUuid, footprintName, [], '示例封装描述');
379
-
380
- // 创建类保留现场(新封装留在个人库中供观察)
381
-
382
- console.log('footprintUuid:', footprintUuid);
383
- console.log('footprintName:', footprintName);
384
- ```
385
-
386
- ### delete
387
-
388
- # LIB\_Footprint.delete() method
389
-
390
- > 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.
391
-
392
- Delete Footprint
393
-
394
- ## Signature
395
-
396
- ```typescript
397
- function delete(footprintUuid: string, libraryUuid: string): Promise<boolean>;
398
- ```
399
-
400
- ## Parameters
401
-
402
- <table><thead><tr><th>
403
-
404
- Parameter
405
-
406
- </th><th>
407
-
408
- Type
409
-
410
- </th><th>
411
-
412
- Description
413
-
414
- </th></tr></thead>
415
- <tbody><tr><td>
416
-
417
- footprintUuid
418
-
419
- </td><td>
420
-
421
- string
422
-
423
- </td><td>
424
-
425
- Footprint UUID
426
-
427
- </td></tr>
428
- <tr><td>
429
-
430
- libraryUuid
431
-
432
- </td><td>
433
-
434
- string
435
-
436
- </td><td>
437
-
438
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
439
-
440
- </td></tr>
441
- </tbody></table>
442
-
443
- ## Returns
444
-
445
- Promise&lt;boolean&gt;
446
-
447
- Whether the operation is successful
448
-
449
- ## Example
450
-
451
- ```javascript
452
- // 1. 获取个人库 UUID 并新建删除对象
453
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
454
- const footprintUuid = await eda.lib_Footprint.create(
455
- libraryUuid,
456
- `嘉立创示例_待删除封装_${Date.now()}`,
457
- []
458
- );
459
-
460
- // 2. 删除该封装
461
- const deleted = await eda.lib_Footprint.delete(footprintUuid, libraryUuid);
462
-
463
- console.log('footprintUuid:', footprintUuid);
464
- console.log('deleted:', deleted);
465
- ```
466
-
467
- ### get
468
-
469
- # LIB\_Footprint.get() method
470
-
471
- > 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.
472
-
473
- Get all properties of the footprint
474
-
475
- ## Signature
476
-
477
- ```typescript
478
- function get(footprintUuid: string, libraryUuid?: string): Promise<ILIB_FootprintItem | undefined>;
479
- ```
480
-
481
- ## Parameters
482
-
483
- <table><thead><tr><th>
484
-
485
- Parameter
486
-
487
- </th><th>
488
-
489
- Type
490
-
491
- </th><th>
492
-
493
- Description
494
-
495
- </th></tr></thead>
496
- <tbody><tr><td>
497
-
498
- footprintUuid
499
-
500
- </td><td>
501
-
502
- string
503
-
504
- </td><td>
505
-
506
- Footprint UUID
507
-
508
- </td></tr>
509
- <tr><td>
510
-
511
- libraryUuid
512
-
513
- </td><td>
514
-
515
- string
516
-
517
- </td><td>
518
-
519
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
520
-
521
- </td></tr>
522
- </tbody></table>
523
-
524
- ## Returns
525
-
526
- Promise&lt;[ILIB\_FootprintItem](../interfaces/ILIB_FootprintItem.md) \| undefined&gt;
527
-
528
- Footprint property
529
-
530
- ### getrenderimage
531
-
532
- # LIB\_Footprint.getRenderImage() method
533
-
534
- > 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.
535
-
536
- Get the footprint render image
537
-
538
- ## Signature
539
-
540
- ```typescript
541
- function getRenderImage(source: {
542
- footprintUuid: string;
543
- libraryUuid: string;
544
- }): Promise<Blob | undefined>;
545
- ```
546
-
547
- ## Parameters
548
-
549
- <table><thead><tr><th>
550
-
551
- Parameter
552
-
553
- </th><th>
554
-
555
- Type
556
-
557
- </th><th>
558
-
559
- Description
560
-
561
- </th></tr></thead>
562
- <tbody><tr><td>
563
-
564
- source
565
-
566
- </td><td>
567
-
568
- \{ footprintUuid: string; libraryUuid: string \}
569
-
570
- </td><td>
571
-
572
- </td></tr>
573
- </tbody></table>
574
-
575
- ## Returns
576
-
577
- Promise&lt;Blob \| undefined&gt;
578
-
579
- Footprint render image
580
-
581
- ## Example
582
-
583
- ```javascript
584
- // 1. 搜索系统库,取一个封装作为渲染来源
585
- const [source] = await eda.lib_Footprint.search('0402', undefined, undefined, 1, 1);
586
-
587
- // 2. 获取渲染图(PNG Blob)
588
- const blob = await eda.lib_Footprint.getRenderImage({
589
- footprintUuid: source.uuid,
590
- libraryUuid: source.libraryUuid,
591
- });
592
-
593
- // 3. Blob 可转成 URL 直接展示:URL.createObjectURL(blob)
594
- console.log('sourceName:', source.name);
595
- console.log('imageSize:', blob.size);
596
- console.log('imageType:', blob.type);
597
- ```
598
-
599
- ### modify
600
-
601
- # LIB\_Footprint.modify() method
602
-
603
- > 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.
604
-
605
- Modify Footprint
606
-
607
- ## Signature
608
-
609
- ```typescript
610
- function modify(
611
- footprintUuid: string,
612
- libraryUuid: string,
613
- footprintName?: string,
614
- classification?: ILIB_ClassificationIndex | Array<string> | null,
615
- description?: string | null,
616
- ): Promise<boolean>;
617
- ```
618
-
619
- ## Parameters
620
-
621
- <table><thead><tr><th>
622
-
623
- Parameter
624
-
625
- </th><th>
626
-
627
- Type
628
-
629
- </th><th>
630
-
631
- Description
632
-
633
- </th></tr></thead>
634
- <tbody><tr><td>
635
-
636
- footprintUuid
637
-
638
- </td><td>
639
-
640
- string
641
-
642
- </td><td>
643
-
644
- Footprint UUID
645
-
646
- </td></tr>
647
- <tr><td>
648
-
649
- libraryUuid
650
-
651
- </td><td>
652
-
653
- string
654
-
655
- </td><td>
656
-
657
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
658
-
659
- </td></tr>
660
- <tr><td>
661
-
662
- footprintName
663
-
664
- </td><td>
665
-
666
- string
667
-
668
- </td><td>
669
-
670
- _(Optional)_ Footprint name
671
-
672
- </td></tr>
673
- <tr><td>
674
-
675
- classification
676
-
677
- </td><td>
678
-
679
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt; \| null
680
-
681
- </td><td>
682
-
683
- _(Optional)_ Classification
684
-
685
- </td></tr>
686
- <tr><td>
687
-
688
- description
689
-
690
- </td><td>
691
-
692
- string \| null
693
-
694
- </td><td>
695
-
696
- _(Optional)_ Description
697
-
698
- </td></tr>
699
- </tbody></table>
700
-
701
- ## Returns
702
-
703
- Promise&lt;boolean&gt;
704
-
705
- Whether the operation is successful
706
-
707
- ## Remarks
708
-
709
- If you want to clear certain properties, set their values to `null`
710
-
711
- ## Example
712
-
713
- ```javascript
714
- // 1. 获取个人库 UUID 并新建修改对象
715
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
716
- const footprintUuid = await eda.lib_Footprint.create(
717
- libraryUuid,
718
- `嘉立创示例_封装修改前_${Date.now()}`,
719
- [],
720
- '修改前的描述'
721
- );
722
-
723
- // 2. 修改名称和描述(分类保持不变传 [])
724
- const newName = `嘉立创示例_封装修改后_${Date.now()}`;
725
- const modified = await eda.lib_Footprint.modify(footprintUuid, libraryUuid, newName, [], '修改后的描述');
726
-
727
- // 修改类保留现场
728
-
729
- console.log('footprintUuid:', footprintUuid);
730
- console.log('modified:', modified);
731
- console.log('newName:', newName);
732
- ```
733
-
734
- ### openineditor
735
-
736
- # LIB\_Footprint.openInEditor() method
737
-
738
- > 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.
739
-
740
- Open in the editor document
741
-
742
- ## Signature
743
-
744
- ```typescript
745
- function openInEditor(
746
- footprintUuid: string,
747
- libraryUuid: string,
748
- splitScreenId?: string,
749
- ): Promise<string | undefined>;
750
- ```
751
-
752
- ## Parameters
753
-
754
- <table><thead><tr><th>
755
-
756
- Parameter
757
-
758
- </th><th>
759
-
760
- Type
761
-
762
- </th><th>
763
-
764
- Description
765
-
766
- </th></tr></thead>
767
- <tbody><tr><td>
768
-
769
- footprintUuid
770
-
771
- </td><td>
772
-
773
- string
774
-
775
- </td><td>
776
-
777
- Footprint UUID
778
-
779
- </td></tr>
780
- <tr><td>
781
-
782
- libraryUuid
783
-
784
- </td><td>
785
-
786
- string
787
-
788
- </td><td>
789
-
790
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
791
-
792
- </td></tr>
793
- <tr><td>
794
-
795
- splitScreenId
796
-
797
- </td><td>
798
-
799
- string
800
-
801
- </td><td>
802
-
803
- _(Optional)_ Split screen ID. If not filled in, it opens in the split screen with the last input focus by default. It can be obtained using the APIs in [DMT\_EditorControl](./DMT_EditorControl.md)
804
-
805
- </td></tr>
806
- </tbody></table>
807
-
808
- ## Returns
809
-
810
- Promise&lt;string \| undefined&gt;
811
-
812
- Tab ID, corresponding to [IDMT\_EditorTabItem.tabId](../interfaces/IDMT_EditorTabItem.md)<!-- -->. You can use [DMT\_EditorControl.getSplitScreenIdByTabId()](./DMT_EditorControl.md) to get the split screen ID
813
-
814
- ## Example
815
-
816
- ```javascript
817
- // 1. 获取个人库 UUID 并新建封装
818
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
819
- const footprintUuid = await eda.lib_Footprint.create(
820
- libraryUuid,
821
- `嘉立创示例_编辑封装_${Date.now()}`,
822
- []
823
- );
824
-
825
- // 2. 在编辑器中打开该封装,返回标签页 ID(uuid@libraryUuid 格式)
826
- const tabId = await eda.lib_Footprint.openInEditor(footprintUuid, libraryUuid);
827
-
828
- // 打开后保留现场(编辑器停留在新封装页供观察;不需要时可传 tabId 给
829
- // dmt_EditorControl.closeDocument 关闭)
830
-
831
- console.log('footprintUuid:', footprintUuid);
832
- console.log('tabId:', tabId);
833
- ```
834
-
835
- ### search
836
-
837
- # LIB\_Footprint.search() method
838
-
839
- > 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.
840
-
841
- Search footprint
842
-
843
- ## Signature
844
-
845
- ```typescript
846
- function search(
847
- key: string,
848
- libraryUuid?: string,
849
- classification?: ILIB_ClassificationIndex | Array<string>,
850
- itemsOfPage?: number,
851
- page?: number,
852
- ): Promise<Array<ILIB_FootprintSearchItem>>;
853
- ```
854
-
855
- ## Parameters
856
-
857
- <table><thead><tr><th>
858
-
859
- Parameter
860
-
861
- </th><th>
862
-
863
- Type
864
-
865
- </th><th>
866
-
867
- Description
868
-
869
- </th></tr></thead>
870
- <tbody><tr><td>
871
-
872
- key
873
-
874
- </td><td>
875
-
876
- string
877
-
878
- </td><td>
879
-
880
- Search keyword
881
-
882
- </td></tr>
883
- <tr><td>
884
-
885
- libraryUuid
886
-
887
- </td><td>
888
-
889
- string
890
-
891
- </td><td>
892
-
893
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
894
-
895
- </td></tr>
896
- <tr><td>
897
-
898
- classification
899
-
900
- </td><td>
901
-
902
- [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
903
-
904
- </td><td>
905
-
906
- _(Optional)_ Classification, defaults to all
907
-
908
- </td></tr>
909
- <tr><td>
910
-
911
- itemsOfPage
912
-
913
- </td><td>
914
-
915
- number
916
-
917
- </td><td>
918
-
919
- _(Optional)_ Number of search results per page
920
-
921
- </td></tr>
922
- <tr><td>
923
-
924
- page
925
-
926
- </td><td>
927
-
928
- number
929
-
930
- </td><td>
931
-
932
- _(Optional)_ Page count
933
-
934
- </td></tr>
935
- </tbody></table>
936
-
937
- ## Returns
938
-
939
- Promise&lt;Array&lt;[ILIB\_FootprintSearchItem](../interfaces/ILIB_FootprintSearchItem.md)<!-- -->&gt;&gt;
940
-
941
- List of searched footprint properties
942
-
943
- ## Example
944
-
945
- ```javascript
946
- // 1. 按关键字搜索系统库中的封装,每页 5 条
947
- const results = await eda.lib_Footprint.search('0402', undefined, undefined, 5, 1);
948
-
949
- // 2. 输出搜索结果
950
- console.log('count:', results.length);
951
- results.forEach((item, i) => {
952
- console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'libraryUuid:', item.libraryUuid);
953
- });
954
- ```
955
-
956
- ### searchbyproperties
957
-
958
- # LIB\_Footprint.searchByProperties() method
959
-
960
- > 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.
961
-
962
- Search footprints precisely by properties
963
-
964
- ## Signature
965
-
966
- ```typescript
967
- function searchByProperties(
968
- properties: ILIB_FootprintPropertiesForSearch,
969
- libraryUuid?: string,
970
- ): Promise<Array<ILIB_FootprintSearchItem>>;
971
- ```
972
-
973
- ## Parameters
974
-
975
- <table><thead><tr><th>
976
-
977
- Parameter
978
-
979
- </th><th>
980
-
981
- Type
982
-
983
- </th><th>
984
-
985
- Description
986
-
987
- </th></tr></thead>
988
- <tbody><tr><td>
989
-
990
- properties
991
-
992
- </td><td>
993
-
994
- [ILIB\_FootprintPropertiesForSearch](../interfaces/ILIB_FootprintPropertiesForSearch.md)
995
-
996
- </td><td>
997
-
998
- Property
999
-
1000
- </td></tr>
1001
- <tr><td>
1002
-
1003
- libraryUuid
1004
-
1005
- </td><td>
1006
-
1007
- string
1008
-
1009
- </td><td>
1010
-
1011
- _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1012
-
1013
- </td></tr>
1014
- </tbody></table>
1015
-
1016
- ## Returns
1017
-
1018
- Promise&lt;Array&lt;[ILIB\_FootprintSearchItem](../interfaces/ILIB_FootprintSearchItem.md)<!-- -->&gt;&gt;
1019
-
1020
- List of searched footprint properties
1021
-
1022
- ## Example
1023
-
1024
- ```javascript
1025
- // 1. 按名称精确搜索(官方属性集合目前仅支持 name)
1026
- // 当前版本该接口不稳定:可能抛错,也可能正常返回 undefined,两种都要兼容
1027
- let results;
1028
- try {
1029
- results = await eda.lib_Footprint.searchByProperties({ name: '0402' });
1030
- }
1031
- catch (e) {
1032
- console.log('当前版本按 name 搜索抛错:', e.message);
1033
- }
1034
- if (!Array.isArray(results))
1035
- results = [];
1036
-
1037
- // 2. 输出搜索结果
1038
- console.log('count:', results.length);
1039
- results.forEach((item, i) => {
1040
- console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'libraryUuid:', item.libraryUuid);
1041
- });
1042
- ```
1043
-
1044
- ### updatedocumentsource
1045
-
1046
- # LIB\_Footprint.updateDocumentSource() method
1047
-
1048
- > 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.
1049
-
1050
- Update the document source code of the footprint
1051
-
1052
- ## Signature
1053
-
1054
- ```typescript
1055
- function updateDocumentSource(
1056
- footprintUuid: string,
1057
- libraryUuid: string,
1058
- documentSource: string,
1059
- ): Promise<boolean | undefined>;
1060
- ```
1061
-
1062
- ## Parameters
1063
-
1064
- <table><thead><tr><th>
1065
-
1066
- Parameter
1067
-
1068
- </th><th>
1069
-
1070
- Type
1071
-
1072
- </th><th>
1073
-
1074
- Description
1075
-
1076
- </th></tr></thead>
1077
- <tbody><tr><td>
1078
-
1079
- footprintUuid
1080
-
1081
- </td><td>
1082
-
1083
- string
1084
-
1085
- </td><td>
1086
-
1087
- Footprint UUID
1088
-
1089
- </td></tr>
1090
- <tr><td>
1091
-
1092
- libraryUuid
1093
-
1094
- </td><td>
1095
-
1096
- string
1097
-
1098
- </td><td>
1099
-
1100
- Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1101
-
1102
- </td></tr>
1103
- <tr><td>
1104
-
1105
- documentSource
1106
-
1107
- </td><td>
1108
-
1109
- string
1110
-
1111
- </td><td>
1112
-
1113
- Document source code
1114
-
1115
- </td></tr>
1116
- </tbody></table>
1117
-
1118
- ## Returns
1119
-
1120
- Promise&lt;boolean \| undefined&gt;
1121
-
1122
- Whether the update is successful
1123
-
1124
- ## Example
1125
-
1126
- ```javascript
1127
- // 1. 获取个人库 UUID 并新建封装
1128
- const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
1129
- const footprintUuid = await eda.lib_Footprint.create(
1130
- libraryUuid,
1131
- `嘉立创示例_源码封装_${Date.now()}`,
1132
- []
1133
- );
1134
-
1135
- // 2. 在编辑器中打开封装,等待文档加载完成
1136
- const tabId = await eda.lib_Footprint.openInEditor(footprintUuid, libraryUuid);
1137
- await new Promise(r => setTimeout(r, 1500));
1138
-
1139
- // 3. 读取当前打开封装的文档源码
1140
- const documentSource = await eda.sys_FileManager.getDocumentSource();
1141
-
1142
- // 4. 把源码写回库中的封装(此处原样写回;实际使用时可先改写 documentSource)
1143
- const updated = await eda.lib_Footprint.updateDocumentSource(footprintUuid, libraryUuid, documentSource);
1144
-
1145
- // 5. 关闭编辑器标签页(封装本体保留在库中)
1146
- await eda.dmt_EditorControl.closeDocument(tabId);
1147
-
1148
- // 修改类保留现场
1149
-
1150
- console.log('footprintUuid:', footprintUuid);
1151
- console.log('sourceLength:', documentSource.length);
1152
- console.log('updated:', updated);
1153
- ```
1
+ # LIB\_Footprint class
2
+
3
+ Comprehensive library / footprint class
4
+
5
+ ## Signature
6
+
7
+ ```typescript
8
+ class LIB_Footprint
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(footprintUuid, libraryUuid, targetLibraryUuid, targetClassification, newFootprintName)](./LIB_Footprint.md)
29
+
30
+ </td><td>
31
+
32
+ </td><td>
33
+
34
+ **_(BETA)_** Copy Footprint
35
+
36
+ </td></tr>
37
+ <tr><td>
38
+
39
+ [create(libraryUuid, footprintName, classification, description, otherProperty, model3D)](./LIB_Footprint.md)
40
+
41
+ </td><td>
42
+
43
+ </td><td>
44
+
45
+ **_(BETA)_** Create Footprint
46
+
47
+ </td></tr>
48
+ <tr><td>
49
+
50
+ [delete(footprintUuid, libraryUuid)](./LIB_Footprint.md)
51
+
52
+ </td><td>
53
+
54
+ </td><td>
55
+
56
+ **_(BETA)_** Delete Footprint
57
+
58
+ </td></tr>
59
+ <tr><td>
60
+
61
+ [get(footprintUuid, libraryUuid)](./LIB_Footprint.md)
62
+
63
+ </td><td>
64
+
65
+ </td><td>
66
+
67
+ **_(BETA)_** Get all properties of the footprint
68
+
69
+ </td></tr>
70
+ <tr><td>
71
+
72
+ [getDocumentSource(footprintUuid, libraryUuid)](./LIB_Footprint.md)
73
+
74
+ </td><td>
75
+
76
+ </td><td>
77
+
78
+ **_(BETA)_** 获取封装的文档源码
79
+
80
+ </td></tr>
81
+ <tr><td>
82
+
83
+ [getRenderImage(source)](./LIB_Footprint.md)
84
+
85
+ </td><td>
86
+
87
+ </td><td>
88
+
89
+ **_(BETA)_** Get the footprint render image
90
+
91
+ </td></tr>
92
+ <tr><td>
93
+
94
+ [modify(footprintUuid, libraryUuid, footprintName, classification, description, otherProperty, model3D)](./LIB_Footprint.md)
95
+
96
+ </td><td>
97
+
98
+ </td><td>
99
+
100
+ **_(BETA)_** Modify Footprint
101
+
102
+ </td></tr>
103
+ <tr><td>
104
+
105
+ [openInEditor(footprintUuid, libraryUuid, splitScreenId)](./LIB_Footprint.md)
106
+
107
+ </td><td>
108
+
109
+ </td><td>
110
+
111
+ **_(BETA)_** Open in the editor document
112
+
113
+ </td></tr>
114
+ <tr><td>
115
+
116
+ [search(key, libraryUuid, classification, itemsOfPage, page)](./LIB_Footprint.md)
117
+
118
+ </td><td>
119
+
120
+ </td><td>
121
+
122
+ **_(BETA)_** Search footprint
123
+
124
+ </td></tr>
125
+ <tr><td>
126
+
127
+ [searchByProperties(properties, libraryUuid)](./LIB_Footprint.md)
128
+
129
+ </td><td>
130
+
131
+ </td><td>
132
+
133
+ **_(BETA)_** Search footprints precisely by properties
134
+
135
+ </td></tr>
136
+ <tr><td>
137
+
138
+ [updateDocumentSource(footprintUuid, libraryUuid, documentSource)](./LIB_Footprint.md)
139
+
140
+ </td><td>
141
+
142
+ </td><td>
143
+
144
+ **_(BETA)_** Update the document source code of the footprint
145
+
146
+ </td></tr>
147
+ </tbody></table>
148
+
149
+ ---
150
+
151
+ ## 方法详情
152
+
153
+ ### copy
154
+
155
+ # LIB\_Footprint.copy() method
156
+
157
+ > 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.
158
+
159
+ Copy Footprint
160
+
161
+ ## Signature
162
+
163
+ ```typescript
164
+ function copy(
165
+ footprintUuid: string,
166
+ libraryUuid: string,
167
+ targetLibraryUuid: string,
168
+ targetClassification?: ILIB_ClassificationIndex | Array<string>,
169
+ newFootprintName?: string,
170
+ ): Promise<string | undefined>;
171
+ ```
172
+
173
+ ## Parameters
174
+
175
+ <table><thead><tr><th>
176
+
177
+ Parameter
178
+
179
+ </th><th>
180
+
181
+ Type
182
+
183
+ </th><th>
184
+
185
+ Description
186
+
187
+ </th></tr></thead>
188
+ <tbody><tr><td>
189
+
190
+ footprintUuid
191
+
192
+ </td><td>
193
+
194
+ string
195
+
196
+ </td><td>
197
+
198
+ Footprint UUID
199
+
200
+ </td></tr>
201
+ <tr><td>
202
+
203
+ libraryUuid
204
+
205
+ </td><td>
206
+
207
+ string
208
+
209
+ </td><td>
210
+
211
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
212
+
213
+ </td></tr>
214
+ <tr><td>
215
+
216
+ targetLibraryUuid
217
+
218
+ </td><td>
219
+
220
+ string
221
+
222
+ </td><td>
223
+
224
+ Target library UUID
225
+
226
+ </td></tr>
227
+ <tr><td>
228
+
229
+ targetClassification
230
+
231
+ </td><td>
232
+
233
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
234
+
235
+ </td><td>
236
+
237
+ _(Optional)_ Classification in the target library
238
+
239
+ </td></tr>
240
+ <tr><td>
241
+
242
+ newFootprintName
243
+
244
+ </td><td>
245
+
246
+ string
247
+
248
+ </td><td>
249
+
250
+ _(Optional)_ New footprint name. If a footprint with the same name exists in the target library, the copy will fail
251
+
252
+ </td></tr>
253
+ </tbody></table>
254
+
255
+ ## Returns
256
+
257
+ Promise&lt;string \| undefined&gt;
258
+
259
+ UUID of the new footprint in the target library
260
+
261
+ ## Example
262
+
263
+ ```javascript
264
+ // 1. 搜索系统库,取一个封装作为复制来源
265
+ const [source] = await eda.lib_Footprint.search('0402', undefined, undefined, 1, 1);
266
+
267
+ // 2. 获取个人库 UUID
268
+ const targetLibraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
269
+
270
+ // 3. 从系统库复制到个人库,指定新名称避免同名冲突(分类传 [] = 不分类)
271
+ const newName = `嘉立创示例_封装副本_${Date.now()}`;
272
+ const copiedUuid = await eda.lib_Footprint.copy(
273
+ source.uuid,
274
+ source.libraryUuid,
275
+ targetLibraryUuid,
276
+ [],
277
+ newName
278
+ );
279
+
280
+ // 创建类保留现场(副本留在个人库中供观察)
281
+
282
+ console.log('sourceUuid:', source.uuid);
283
+ console.log('copiedUuid:', copiedUuid);
284
+ console.log('newName:', newName);
285
+ ```
286
+
287
+ ### create
288
+
289
+ # LIB\_Footprint.create() method
290
+
291
+ > 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.
292
+
293
+ Create Footprint
294
+
295
+ ## Signature
296
+
297
+ ```typescript
298
+ function create(
299
+ libraryUuid: string,
300
+ footprintName: string,
301
+ classification?: ILIB_ClassificationIndex | Array<string>,
302
+ description?: string,
303
+ otherProperty?: Record<string, boolean | number | string | undefined>,
304
+ model3D?: { name: string; uuid: string; libraryUuid: string },
305
+ ): Promise<string | undefined>;
306
+ ```
307
+
308
+ ## Parameters
309
+
310
+ <table><thead><tr><th>
311
+
312
+ Parameter
313
+
314
+ </th><th>
315
+
316
+ Type
317
+
318
+ </th><th>
319
+
320
+ Description
321
+
322
+ </th></tr></thead>
323
+ <tbody><tr><td>
324
+
325
+ libraryUuid
326
+
327
+ </td><td>
328
+
329
+ string
330
+
331
+ </td><td>
332
+
333
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
334
+
335
+ </td></tr>
336
+ <tr><td>
337
+
338
+ footprintName
339
+
340
+ </td><td>
341
+
342
+ string
343
+
344
+ </td><td>
345
+
346
+ Footprint name
347
+
348
+ </td></tr>
349
+ <tr><td>
350
+
351
+ classification
352
+
353
+ </td><td>
354
+
355
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
356
+
357
+ </td><td>
358
+
359
+ _(Optional)_ Classification
360
+
361
+ </td></tr>
362
+ <tr><td>
363
+
364
+ description
365
+
366
+ </td><td>
367
+
368
+ string
369
+
370
+ </td><td>
371
+
372
+ _(Optional)_ Description
373
+
374
+ </td></tr>
375
+ <tr><td>
376
+
377
+ otherProperty
378
+
379
+ </td><td>
380
+
381
+ Record&lt;string, boolean \| number \| string \| undefined&gt;
382
+
383
+ </td><td>
384
+
385
+ _(Optional)_ 其它属性
386
+
387
+ </td></tr>
388
+ <tr><td>
389
+
390
+ model3D
391
+
392
+ </td><td>
393
+
394
+ \{ name: string; uuid: string; libraryUuid: string \}
395
+
396
+ </td><td>
397
+
398
+ _(Optional)_ 关联 3D 模型 ADD since EDA v4.1.22
399
+
400
+ </td></tr>
401
+ </tbody></table>
402
+
403
+ ## Returns
404
+
405
+ Promise&lt;string \| undefined&gt;
406
+
407
+ Footprint UUID
408
+
409
+ ## Example
410
+
411
+ ```javascript
412
+ // 1. 获取个人库 UUID
413
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
414
+
415
+ // 2. 创建封装(分类传 [] = 不分类)
416
+ const footprintName = `嘉立创示例_新封装_${Date.now()}`;
417
+ const footprintUuid = await eda.lib_Footprint.create(libraryUuid, footprintName, [], '示例封装描述');
418
+
419
+ // 创建类保留现场(新封装留在个人库中供观察)
420
+
421
+ console.log('footprintUuid:', footprintUuid);
422
+ console.log('footprintName:', footprintName);
423
+ ```
424
+
425
+ ### delete
426
+
427
+ # LIB\_Footprint.delete() method
428
+
429
+ > 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.
430
+
431
+ Delete Footprint
432
+
433
+ ## Signature
434
+
435
+ ```typescript
436
+ function delete(footprintUuid: string, libraryUuid: string): Promise<boolean | undefined>;
437
+ ```
438
+
439
+ ## Parameters
440
+
441
+ <table><thead><tr><th>
442
+
443
+ Parameter
444
+
445
+ </th><th>
446
+
447
+ Type
448
+
449
+ </th><th>
450
+
451
+ Description
452
+
453
+ </th></tr></thead>
454
+ <tbody><tr><td>
455
+
456
+ footprintUuid
457
+
458
+ </td><td>
459
+
460
+ string
461
+
462
+ </td><td>
463
+
464
+ Footprint UUID
465
+
466
+ </td></tr>
467
+ <tr><td>
468
+
469
+ libraryUuid
470
+
471
+ </td><td>
472
+
473
+ string
474
+
475
+ </td><td>
476
+
477
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
478
+
479
+ </td></tr>
480
+ </tbody></table>
481
+
482
+ ## Returns
483
+
484
+ Promise&lt;boolean \| undefined&gt;
485
+
486
+ Whether the operation is successful
487
+
488
+ ## Example
489
+
490
+ ```javascript
491
+ // 1. 获取个人库 UUID 并新建删除对象
492
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
493
+ const footprintUuid = await eda.lib_Footprint.create(
494
+ libraryUuid,
495
+ `嘉立创示例_待删除封装_${Date.now()}`,
496
+ []
497
+ );
498
+
499
+ // 2. 删除该封装
500
+ const deleted = await eda.lib_Footprint.delete(footprintUuid, libraryUuid);
501
+
502
+ console.log('footprintUuid:', footprintUuid);
503
+ console.log('deleted:', deleted);
504
+ ```
505
+
506
+ ### get
507
+
508
+ # LIB\_Footprint.get() method
509
+
510
+ > 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.
511
+
512
+ Get all properties of the footprint
513
+
514
+ ## Signature
515
+
516
+ ```typescript
517
+ function get(footprintUuid: string, libraryUuid?: string): Promise<ILIB_FootprintItem | undefined>;
518
+ ```
519
+
520
+ ## Parameters
521
+
522
+ <table><thead><tr><th>
523
+
524
+ Parameter
525
+
526
+ </th><th>
527
+
528
+ Type
529
+
530
+ </th><th>
531
+
532
+ Description
533
+
534
+ </th></tr></thead>
535
+ <tbody><tr><td>
536
+
537
+ footprintUuid
538
+
539
+ </td><td>
540
+
541
+ string
542
+
543
+ </td><td>
544
+
545
+ Footprint UUID
546
+
547
+ </td></tr>
548
+ <tr><td>
549
+
550
+ libraryUuid
551
+
552
+ </td><td>
553
+
554
+ string
555
+
556
+ </td><td>
557
+
558
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
559
+
560
+ </td></tr>
561
+ </tbody></table>
562
+
563
+ ## Returns
564
+
565
+ Promise&lt;[ILIB\_FootprintItem](../interfaces/ILIB_FootprintItem.md) \| undefined&gt;
566
+
567
+ Footprint property
568
+
569
+ ### getdocumentsource
570
+
571
+ # LIB\_Footprint.getDocumentSource() method
572
+
573
+ > 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.
574
+
575
+ 获取封装的文档源码
576
+
577
+ ## Signature
578
+
579
+ ```typescript
580
+ function getDocumentSource(
581
+ footprintUuid: string,
582
+ libraryUuid?: string,
583
+ ): Promise<string | undefined>;
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
+ footprintUuid
604
+
605
+ </td><td>
606
+
607
+ string
608
+
609
+ </td><td>
610
+
611
+ 封装 UUID
612
+
613
+ </td></tr>
614
+ <tr><td>
615
+
616
+ libraryUuid
617
+
618
+ </td><td>
619
+
620
+ string
621
+
622
+ </td><td>
623
+
624
+ _(Optional)_ 库 UUID,默认为系统库,可以使用 [LIB\_LibrariesList](./LIB_LibrariesList.md) 内的接口获取
625
+
626
+ </td></tr>
627
+ </tbody></table>
628
+
629
+ ## Returns
630
+
631
+ Promise&lt;string \| undefined&gt;
632
+
633
+ 封装的 3.0 文档源码(efoo JSON 字符串),获取失败返回 `undefined`
634
+
635
+ ## Remarks
636
+
637
+ 与 [LIB\_Footprint.updateDocumentSource()](./LIB_Footprint.md) 对称的读取接口;返回 \*\*3.0 格式\*\*(efoo)的封装源数据, 可直接用于组装 PCB 源数据(如 AI 生成 eprj3 工程)。
638
+
639
+ 支持工程库 / 非工程库(系统库 / 个人库 / 扩展库): - 工程库:从当前打开的工程 worker 读取(含未保存内容); - 非工程库:从 lib.worker 读取(含未保存内容),worker 无缓存时回退网络获取, 自动处理 `history_uuid`<!-- -->(历史版本)、`dataStrId`<!-- -->(远程存储)与 2.0 → 3.0 格式转换。
640
+
641
+ 获取失败(如库条目不存在)将返回 `undefined`
642
+
643
+ ### getrenderimage
644
+
645
+ # LIB\_Footprint.getRenderImage() 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 the footprint render image
650
+
651
+ ## Signature
652
+
653
+ ```typescript
654
+ function getRenderImage(source: {
655
+ footprintUuid: string;
656
+ libraryUuid: string;
657
+ }): Promise<Blob | 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
+ source
678
+
679
+ </td><td>
680
+
681
+ \{ footprintUuid: string; libraryUuid: string \}
682
+
683
+ </td><td>
684
+
685
+ </td></tr>
686
+ </tbody></table>
687
+
688
+ ## Returns
689
+
690
+ Promise&lt;Blob \| undefined&gt;
691
+
692
+ Footprint render image
693
+
694
+ ## Example
695
+
696
+ ```javascript
697
+ // 1. 搜索系统库,取一个封装作为渲染来源
698
+ const [source] = await eda.lib_Footprint.search('0402', undefined, undefined, 1, 1);
699
+
700
+ // 2. 获取渲染图(PNG Blob)
701
+ const blob = await eda.lib_Footprint.getRenderImage({
702
+ footprintUuid: source.uuid,
703
+ libraryUuid: source.libraryUuid,
704
+ });
705
+
706
+ // 3. Blob 可转成 URL 直接展示:URL.createObjectURL(blob)
707
+ console.log('sourceName:', source.name);
708
+ console.log('imageSize:', blob.size);
709
+ console.log('imageType:', blob.type);
710
+ ```
711
+
712
+ ### modify
713
+
714
+ # LIB\_Footprint.modify() method
715
+
716
+ > 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.
717
+
718
+ Modify Footprint
719
+
720
+ ## Signature
721
+
722
+ ```typescript
723
+ function modify(
724
+ footprintUuid: string,
725
+ libraryUuid: string,
726
+ footprintName?: string,
727
+ classification?: ILIB_ClassificationIndex | Array<string> | null,
728
+ description?: string | null,
729
+ otherProperty?: Record<string, boolean | number | string | undefined | null>,
730
+ model3D?: { name: string; uuid: string; libraryUuid: string },
731
+ ): Promise<boolean>;
732
+ ```
733
+
734
+ ## Parameters
735
+
736
+ <table><thead><tr><th>
737
+
738
+ Parameter
739
+
740
+ </th><th>
741
+
742
+ Type
743
+
744
+ </th><th>
745
+
746
+ Description
747
+
748
+ </th></tr></thead>
749
+ <tbody><tr><td>
750
+
751
+ footprintUuid
752
+
753
+ </td><td>
754
+
755
+ string
756
+
757
+ </td><td>
758
+
759
+ Footprint UUID
760
+
761
+ </td></tr>
762
+ <tr><td>
763
+
764
+ libraryUuid
765
+
766
+ </td><td>
767
+
768
+ string
769
+
770
+ </td><td>
771
+
772
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
773
+
774
+ </td></tr>
775
+ <tr><td>
776
+
777
+ footprintName
778
+
779
+ </td><td>
780
+
781
+ string
782
+
783
+ </td><td>
784
+
785
+ _(Optional)_ Footprint name
786
+
787
+ </td></tr>
788
+ <tr><td>
789
+
790
+ classification
791
+
792
+ </td><td>
793
+
794
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt; \| null
795
+
796
+ </td><td>
797
+
798
+ _(Optional)_ Classification
799
+
800
+ </td></tr>
801
+ <tr><td>
802
+
803
+ description
804
+
805
+ </td><td>
806
+
807
+ string \| null
808
+
809
+ </td><td>
810
+
811
+ _(Optional)_ Description
812
+
813
+ </td></tr>
814
+ <tr><td>
815
+
816
+ otherProperty
817
+
818
+ </td><td>
819
+
820
+ Record&lt;string, boolean \| number \| string \| undefined \| null&gt;
821
+
822
+ </td><td>
823
+
824
+ _(Optional)_ 其它属性,如希望清除某些属性,则将其的值设置为 `null`
825
+
826
+ </td></tr>
827
+ <tr><td>
828
+
829
+ model3D
830
+
831
+ </td><td>
832
+
833
+ \{ name: string; uuid: string; libraryUuid: string \}
834
+
835
+ </td><td>
836
+
837
+ _(Optional)_ 关联 3D 模型 ADD since v4.1.22
838
+
839
+ </td></tr>
840
+ </tbody></table>
841
+
842
+ ## Returns
843
+
844
+ Promise&lt;boolean&gt;
845
+
846
+ Whether the operation is successful
847
+
848
+ ## Remarks
849
+
850
+ If you want to clear certain properties, set their values to `null`
851
+
852
+ ## Example
853
+
854
+ ```javascript
855
+ // 1. 获取个人库 UUID 并新建修改对象
856
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
857
+ const footprintUuid = await eda.lib_Footprint.create(
858
+ libraryUuid,
859
+ `嘉立创示例_封装修改前_${Date.now()}`,
860
+ [],
861
+ '修改前的描述'
862
+ );
863
+
864
+ // 2. 修改名称和描述(分类保持不变传 [])
865
+ const newName = `嘉立创示例_封装修改后_${Date.now()}`;
866
+ const modified = await eda.lib_Footprint.modify(footprintUuid, libraryUuid, newName, [], '修改后的描述');
867
+
868
+ // 修改类保留现场
869
+
870
+ console.log('footprintUuid:', footprintUuid);
871
+ console.log('modified:', modified);
872
+ console.log('newName:', newName);
873
+ ```
874
+
875
+ ### openineditor
876
+
877
+ # LIB\_Footprint.openInEditor() method
878
+
879
+ > 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.
880
+
881
+ Open in the editor document
882
+
883
+ ## Signature
884
+
885
+ ```typescript
886
+ function openInEditor(
887
+ footprintUuid: string,
888
+ libraryUuid: string,
889
+ splitScreenId?: string,
890
+ ): Promise<string | undefined>;
891
+ ```
892
+
893
+ ## Parameters
894
+
895
+ <table><thead><tr><th>
896
+
897
+ Parameter
898
+
899
+ </th><th>
900
+
901
+ Type
902
+
903
+ </th><th>
904
+
905
+ Description
906
+
907
+ </th></tr></thead>
908
+ <tbody><tr><td>
909
+
910
+ footprintUuid
911
+
912
+ </td><td>
913
+
914
+ string
915
+
916
+ </td><td>
917
+
918
+ Footprint UUID
919
+
920
+ </td></tr>
921
+ <tr><td>
922
+
923
+ libraryUuid
924
+
925
+ </td><td>
926
+
927
+ string
928
+
929
+ </td><td>
930
+
931
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
932
+
933
+ </td></tr>
934
+ <tr><td>
935
+
936
+ splitScreenId
937
+
938
+ </td><td>
939
+
940
+ string
941
+
942
+ </td><td>
943
+
944
+ _(Optional)_ Split screen ID. If not filled in, it opens in the split screen with the last input focus by default. It can be obtained using the APIs in [DMT\_EditorControl](./DMT_EditorControl.md)
945
+
946
+ </td></tr>
947
+ </tbody></table>
948
+
949
+ ## Returns
950
+
951
+ Promise&lt;string \| undefined&gt;
952
+
953
+ Tab ID, corresponding to [IDMT\_EditorTabItem.tabId](../interfaces/IDMT_EditorTabItem.md)<!-- -->. You can use [DMT\_EditorControl.getSplitScreenIdByTabId()](./DMT_EditorControl.md) to get the split screen ID
954
+
955
+ ## Example
956
+
957
+ ```javascript
958
+ // 1. 获取个人库 UUID 并新建封装
959
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
960
+ const footprintUuid = await eda.lib_Footprint.create(
961
+ libraryUuid,
962
+ `嘉立创示例_编辑封装_${Date.now()}`,
963
+ []
964
+ );
965
+
966
+ // 2. 在编辑器中打开该封装,返回标签页 ID(uuid@libraryUuid 格式)
967
+ const tabId = await eda.lib_Footprint.openInEditor(footprintUuid, libraryUuid);
968
+
969
+ // 打开后保留现场(编辑器停留在新封装页供观察;不需要时可传 tabId 给
970
+ // dmt_EditorControl.closeDocument 关闭)
971
+
972
+ console.log('footprintUuid:', footprintUuid);
973
+ console.log('tabId:', tabId);
974
+ ```
975
+
976
+ ### search
977
+
978
+ # LIB\_Footprint.search() method
979
+
980
+ > 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.
981
+
982
+ Search footprint
983
+
984
+ ## Signature
985
+
986
+ ```typescript
987
+ function search(
988
+ key: string,
989
+ libraryUuid?: string,
990
+ classification?: ILIB_ClassificationIndex | Array<string>,
991
+ itemsOfPage?: number,
992
+ page?: number,
993
+ ): Promise<Array<ILIB_FootprintSearchItem>>;
994
+ ```
995
+
996
+ ## Parameters
997
+
998
+ <table><thead><tr><th>
999
+
1000
+ Parameter
1001
+
1002
+ </th><th>
1003
+
1004
+ Type
1005
+
1006
+ </th><th>
1007
+
1008
+ Description
1009
+
1010
+ </th></tr></thead>
1011
+ <tbody><tr><td>
1012
+
1013
+ key
1014
+
1015
+ </td><td>
1016
+
1017
+ string
1018
+
1019
+ </td><td>
1020
+
1021
+ Search keyword
1022
+
1023
+ </td></tr>
1024
+ <tr><td>
1025
+
1026
+ libraryUuid
1027
+
1028
+ </td><td>
1029
+
1030
+ string
1031
+
1032
+ </td><td>
1033
+
1034
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1035
+
1036
+ </td></tr>
1037
+ <tr><td>
1038
+
1039
+ classification
1040
+
1041
+ </td><td>
1042
+
1043
+ [ILIB\_ClassificationIndex](../interfaces/ILIB_ClassificationIndex.md) \| Array&lt;string&gt;
1044
+
1045
+ </td><td>
1046
+
1047
+ _(Optional)_ Classification, defaults to all
1048
+
1049
+ </td></tr>
1050
+ <tr><td>
1051
+
1052
+ itemsOfPage
1053
+
1054
+ </td><td>
1055
+
1056
+ number
1057
+
1058
+ </td><td>
1059
+
1060
+ _(Optional)_ Number of search results per page
1061
+
1062
+ </td></tr>
1063
+ <tr><td>
1064
+
1065
+ page
1066
+
1067
+ </td><td>
1068
+
1069
+ number
1070
+
1071
+ </td><td>
1072
+
1073
+ _(Optional)_ Page count
1074
+
1075
+ </td></tr>
1076
+ </tbody></table>
1077
+
1078
+ ## Returns
1079
+
1080
+ Promise&lt;Array&lt;[ILIB\_FootprintSearchItem](../interfaces/ILIB_FootprintSearchItem.md)<!-- -->&gt;&gt;
1081
+
1082
+ List of searched footprint properties
1083
+
1084
+ ## Example
1085
+
1086
+ ```javascript
1087
+ // 1. 按关键字搜索系统库中的封装,每页 5 条
1088
+ const results = await eda.lib_Footprint.search('0402', undefined, undefined, 5, 1);
1089
+
1090
+ // 2. 输出搜索结果
1091
+ console.log('count:', results.length);
1092
+ results.forEach((item, i) => {
1093
+ console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'libraryUuid:', item.libraryUuid);
1094
+ });
1095
+ ```
1096
+
1097
+ ### searchbyproperties
1098
+
1099
+ # LIB\_Footprint.searchByProperties() method
1100
+
1101
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1102
+
1103
+ Search footprints precisely by properties
1104
+
1105
+ ## Signature
1106
+
1107
+ ```typescript
1108
+ function searchByProperties(
1109
+ properties: ILIB_FootprintPropertiesForSearch,
1110
+ libraryUuid?: string,
1111
+ ): Promise<Array<ILIB_FootprintSearchItem>>;
1112
+ ```
1113
+
1114
+ ## Parameters
1115
+
1116
+ <table><thead><tr><th>
1117
+
1118
+ Parameter
1119
+
1120
+ </th><th>
1121
+
1122
+ Type
1123
+
1124
+ </th><th>
1125
+
1126
+ Description
1127
+
1128
+ </th></tr></thead>
1129
+ <tbody><tr><td>
1130
+
1131
+ properties
1132
+
1133
+ </td><td>
1134
+
1135
+ [ILIB\_FootprintPropertiesForSearch](../interfaces/ILIB_FootprintPropertiesForSearch.md)
1136
+
1137
+ </td><td>
1138
+
1139
+ Property
1140
+
1141
+ </td></tr>
1142
+ <tr><td>
1143
+
1144
+ libraryUuid
1145
+
1146
+ </td><td>
1147
+
1148
+ string
1149
+
1150
+ </td><td>
1151
+
1152
+ _(Optional)_ Library UUID, default is system library, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1153
+
1154
+ </td></tr>
1155
+ </tbody></table>
1156
+
1157
+ ## Returns
1158
+
1159
+ Promise&lt;Array&lt;[ILIB\_FootprintSearchItem](../interfaces/ILIB_FootprintSearchItem.md)<!-- -->&gt;&gt;
1160
+
1161
+ List of searched footprint properties
1162
+
1163
+ ## Remarks
1164
+
1165
+ 该接口暂时不支持工程库的精确搜索
1166
+
1167
+ ## Example
1168
+
1169
+ ```javascript
1170
+ // 1. 按名称精确搜索(官方属性集合目前仅支持 name)
1171
+ // 当前版本该接口不稳定:可能抛错,也可能正常返回 undefined,两种都要兼容
1172
+ let results;
1173
+ try {
1174
+ results = await eda.lib_Footprint.searchByProperties({ name: '0402' });
1175
+ }
1176
+ catch (e) {
1177
+ console.log('当前版本按 name 搜索抛错:', e.message);
1178
+ }
1179
+ if (!Array.isArray(results))
1180
+ results = [];
1181
+
1182
+ // 2. 输出搜索结果
1183
+ console.log('count:', results.length);
1184
+ results.forEach((item, i) => {
1185
+ console.log(`[${i}] name:`, item.name, 'uuid:', item.uuid, 'libraryUuid:', item.libraryUuid);
1186
+ });
1187
+ ```
1188
+
1189
+ ### updatedocumentsource
1190
+
1191
+ # LIB\_Footprint.updateDocumentSource() method
1192
+
1193
+ > 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.
1194
+
1195
+ Update the document source code of the footprint
1196
+
1197
+ ## Signature
1198
+
1199
+ ```typescript
1200
+ function updateDocumentSource(
1201
+ footprintUuid: string,
1202
+ libraryUuid: string,
1203
+ documentSource: string,
1204
+ ): Promise<boolean | undefined>;
1205
+ ```
1206
+
1207
+ ## Parameters
1208
+
1209
+ <table><thead><tr><th>
1210
+
1211
+ Parameter
1212
+
1213
+ </th><th>
1214
+
1215
+ Type
1216
+
1217
+ </th><th>
1218
+
1219
+ Description
1220
+
1221
+ </th></tr></thead>
1222
+ <tbody><tr><td>
1223
+
1224
+ footprintUuid
1225
+
1226
+ </td><td>
1227
+
1228
+ string
1229
+
1230
+ </td><td>
1231
+
1232
+ Footprint UUID
1233
+
1234
+ </td></tr>
1235
+ <tr><td>
1236
+
1237
+ libraryUuid
1238
+
1239
+ </td><td>
1240
+
1241
+ string
1242
+
1243
+ </td><td>
1244
+
1245
+ Library UUID, you can use [LIB\_LibrariesList](./LIB_LibrariesList.md) APIs in
1246
+
1247
+ </td></tr>
1248
+ <tr><td>
1249
+
1250
+ documentSource
1251
+
1252
+ </td><td>
1253
+
1254
+ string
1255
+
1256
+ </td><td>
1257
+
1258
+ Document source code
1259
+
1260
+ </td></tr>
1261
+ </tbody></table>
1262
+
1263
+ ## Returns
1264
+
1265
+ Promise&lt;boolean \| undefined&gt;
1266
+
1267
+ Whether the update is successful
1268
+
1269
+ ## Example
1270
+
1271
+ ```javascript
1272
+ // 1. 获取个人库 UUID 并新建封装
1273
+ const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
1274
+ const footprintUuid = await eda.lib_Footprint.create(
1275
+ libraryUuid,
1276
+ `嘉立创示例_源码封装_${Date.now()}`,
1277
+ []
1278
+ );
1279
+
1280
+ // 2. 在编辑器中打开封装,等待文档加载完成
1281
+ const tabId = await eda.lib_Footprint.openInEditor(footprintUuid, libraryUuid);
1282
+ await new Promise(r => setTimeout(r, 1500));
1283
+
1284
+ // 3. 读取当前打开封装的文档源码
1285
+ const documentSource = await eda.sys_FileManager.getDocumentSource();
1286
+
1287
+ // 4. 把源码写回库中的封装(此处原样写回;实际使用时可先改写 documentSource)
1288
+ const updated = await eda.lib_Footprint.updateDocumentSource(footprintUuid, libraryUuid, documentSource);
1289
+
1290
+ // 5. 关闭编辑器标签页(封装本体保留在库中)
1291
+ await eda.dmt_EditorControl.closeDocument(tabId);
1292
+
1293
+ // 修改类保留现场
1294
+
1295
+ console.log('footprintUuid:', footprintUuid);
1296
+ console.log('sourceLength:', documentSource.length);
1297
+ console.log('updated:', updated);
1298
+ ```