@windypro-rourou/dsh-eda 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. package/README.md +3 -1
  2. package/lib/capabilities.js +3 -2
  3. package/lib/client.js +576 -452
  4. package/lib/index.js +89 -2
  5. package/package.json +10 -1
  6. package/skill/INDEX.md +10 -8
  7. package/skill/README.md +125 -0
  8. package/skill/README.zh-Hans.md +125 -0
  9. package/skill/SKILL.md +746 -746
  10. package/skill/format/index.md +152 -152
  11. package/skill/format/pcb/3d.md +166 -166
  12. package/skill/format/pcb/attr.md +63 -63
  13. package/skill/format/pcb/common.md +306 -306
  14. package/skill/format/pcb/component.md +132 -132
  15. package/skill/format/pcb/dimension.md +58 -58
  16. package/skill/format/pcb/index.md +17 -17
  17. package/skill/format/pcb/obj.md +43 -43
  18. package/skill/format/pcb/pad_via.md +151 -151
  19. package/skill/format/pcb/panel.md +64 -64
  20. package/skill/format/pcb/partition.md +43 -43
  21. package/skill/format/pcb/primitive.md +196 -196
  22. package/skill/format/pcb/rule.md +71 -71
  23. package/skill/format/pcb/shape.md +441 -441
  24. package/skill/format/pcb/text.md +62 -62
  25. package/skill/format/project/blob.md +30 -30
  26. package/skill/format/project/common.md +42 -42
  27. package/skill/format/project/group.md +62 -62
  28. package/skill/format/project/index.md +12 -12
  29. package/skill/format/project/instance.md +32 -32
  30. package/skill/format/project/meta.md +189 -189
  31. package/skill/format/project/variant.md +30 -30
  32. package/skill/format/schematic/attr.md +41 -41
  33. package/skill/format/schematic/common.md +47 -47
  34. package/skill/format/schematic/component.md +91 -91
  35. package/skill/format/schematic/index.md +14 -14
  36. package/skill/format/schematic/obj.md +41 -41
  37. package/skill/format/schematic/pin.md +59 -59
  38. package/skill/format/schematic/shape.md +231 -231
  39. package/skill/format/schematic/structure.md +53 -53
  40. package/skill/format/schematic/table.md +109 -109
  41. package/skill/format/schematic/text.md +47 -47
  42. package/skill/format/schematic/wire.md +132 -132
  43. package/skill/guide/ancillary-projects/easyeda-api-sdk.md +1 -0
  44. package/skill/guide/ancillary-projects/pro-api-types.md +5 -5
  45. package/skill/guide/ancillary-projects.md +10 -10
  46. package/skill/guide/cli.md +1510 -0
  47. package/skill/guide/error-handling.md +38 -38
  48. package/skill/guide/extension-json.md +135 -135
  49. package/skill/guide/extensions-marketplace.md +61 -61
  50. package/skill/guide/how-to-start.md +316 -301
  51. package/skill/guide/i18n.md +57 -57
  52. package/skill/guide/index.md +7 -7
  53. package/skill/guide/inline-frame.md +20 -20
  54. package/skill/guide/invoke-apis.md +81 -81
  55. package/skill/guide/stability.md +37 -37
  56. package/skill/references/_index.md +471 -398
  57. package/skill/references/_quick-reference.md +3103 -3028
  58. package/skill/references/classes/DMT_Board.md +537 -533
  59. package/skill/references/classes/DMT_EditorControl.md +1736 -1736
  60. package/skill/references/classes/DMT_Event.md +356 -356
  61. package/skill/references/classes/DMT_Folder.md +775 -775
  62. package/skill/references/classes/DMT_Panel.md +531 -531
  63. package/skill/references/classes/DMT_Pcb.md +579 -575
  64. package/skill/references/classes/DMT_Project.md +734 -573
  65. package/skill/references/classes/DMT_Schematic.md +1482 -1477
  66. package/skill/references/classes/DMT_SelectControl.md +96 -96
  67. package/skill/references/classes/DMT_Team.md +172 -172
  68. package/skill/references/classes/DMT_Workspace.md +198 -198
  69. package/skill/references/classes/EDA.md +1001 -961
  70. package/skill/references/classes/IPCB_ComplexPolygon.md +299 -299
  71. package/skill/references/classes/IPCB_Polygon.md +175 -175
  72. package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -1901
  73. package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -2993
  74. package/skill/references/classes/IPCB_PrimitiveComponent.md +2624 -2627
  75. package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -410
  76. package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -1419
  77. package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -1325
  78. package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -1461
  79. package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -1639
  80. package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -1700
  81. package/skill/references/classes/IPCB_PrimitivePad.md +3155 -3155
  82. package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -1193
  83. package/skill/references/classes/IPCB_PrimitivePour.md +1858 -1858
  84. package/skill/references/classes/IPCB_PrimitivePoured.md +556 -556
  85. package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -1332
  86. package/skill/references/classes/IPCB_PrimitiveString.md +2315 -2315
  87. package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -1588
  88. package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -1676
  89. package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -2541
  90. package/skill/references/classes/ISCH_PrimitiveBus.md +973 -973
  91. package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -260
  92. package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -1392
  93. package/skill/references/classes/ISCH_PrimitiveComponent.md +2910 -2913
  94. package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -155
  95. package/skill/references/classes/ISCH_PrimitiveObject.md +960 -960
  96. package/skill/references/classes/ISCH_PrimitivePin.md +2402 -2402
  97. package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -1028
  98. package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -1777
  99. package/skill/references/classes/ISCH_PrimitiveText.md +1771 -1771
  100. package/skill/references/classes/ISCH_PrimitiveWire.md +973 -973
  101. package/skill/references/classes/LIB_3DModel.md +782 -780
  102. package/skill/references/classes/LIB_Cbb.md +957 -957
  103. package/skill/references/classes/LIB_Classification.md +969 -965
  104. package/skill/references/classes/LIB_Device.md +1222 -1221
  105. package/skill/references/classes/LIB_Footprint.md +1298 -1153
  106. package/skill/references/classes/LIB_LibrariesList.md +361 -329
  107. package/skill/references/classes/LIB_PanelLibrary.md +855 -855
  108. package/skill/references/classes/LIB_SelectControl.md +89 -89
  109. package/skill/references/classes/LIB_SimulationModel.md +807 -821
  110. package/skill/references/classes/LIB_Symbol.md +1341 -1195
  111. package/skill/references/classes/PCB_Document.md +1770 -1754
  112. package/skill/references/classes/PCB_Drc.md +3379 -3375
  113. package/skill/references/classes/PCB_Event.md +1166 -1081
  114. package/skill/references/classes/PCB_ImageTool.md +363 -0
  115. package/skill/references/classes/PCB_Layer.md +1915 -1911
  116. package/skill/references/classes/PCB_ManufactureData.md +2968 -2968
  117. package/skill/references/classes/PCB_MathPolygon.md +916 -785
  118. package/skill/references/classes/PCB_Net.md +1128 -1128
  119. package/skill/references/classes/PCB_Primitive.md +217 -217
  120. package/skill/references/classes/PCB_PrimitiveArc.md +820 -894
  121. package/skill/references/classes/PCB_PrimitiveAttribute.md +635 -717
  122. package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -1050
  123. package/skill/references/classes/PCB_PrimitiveDimension.md +789 -833
  124. package/skill/references/classes/PCB_PrimitiveFill.md +783 -861
  125. package/skill/references/classes/PCB_PrimitiveImage.md +803 -875
  126. package/skill/references/classes/PCB_PrimitiveLine.md +787 -858
  127. package/skill/references/classes/PCB_PrimitiveObject.md +796 -800
  128. package/skill/references/classes/PCB_PrimitivePad.md +947 -944
  129. package/skill/references/classes/PCB_PrimitivePolyline.md +744 -819
  130. package/skill/references/classes/PCB_PrimitivePour.md +808 -845
  131. package/skill/references/classes/PCB_PrimitivePoured.md +363 -363
  132. package/skill/references/classes/PCB_PrimitiveRegion.md +765 -799
  133. package/skill/references/classes/PCB_PrimitiveString.md +828 -910
  134. package/skill/references/classes/PCB_PrimitiveVia.md +761 -765
  135. package/skill/references/classes/PCB_RayTracerEngine.md +603 -263
  136. package/skill/references/classes/PCB_SelectControl.md +495 -495
  137. package/skill/references/classes/PCB_Tool.md +9 -0
  138. package/skill/references/classes/PNL_Document.md +83 -83
  139. package/skill/references/classes/SCH_Document.md +797 -809
  140. package/skill/references/classes/SCH_Drc.md +246 -242
  141. package/skill/references/classes/SCH_Event.md +583 -583
  142. package/skill/references/classes/SCH_ManufactureData.md +1209 -1205
  143. package/skill/references/classes/SCH_Net.md +200 -200
  144. package/skill/references/classes/SCH_Netlist.md +191 -191
  145. package/skill/references/classes/SCH_Primitive.md +337 -337
  146. package/skill/references/classes/SCH_PrimitiveArc.md +686 -692
  147. package/skill/references/classes/SCH_PrimitiveAttribute.md +579 -590
  148. package/skill/references/classes/SCH_PrimitiveBus.md +618 -624
  149. package/skill/references/classes/SCH_PrimitiveCircle.md +667 -683
  150. package/skill/references/classes/SCH_PrimitiveComponent.md +2256 -2240
  151. package/skill/references/classes/SCH_PrimitiveObject.md +666 -666
  152. package/skill/references/classes/SCH_PrimitivePin.md +737 -754
  153. package/skill/references/classes/SCH_PrimitivePolygon.md +621 -627
  154. package/skill/references/classes/SCH_PrimitiveRectangle.md +715 -731
  155. package/skill/references/classes/SCH_PrimitiveText.md +736 -746
  156. package/skill/references/classes/SCH_PrimitiveWire.md +701 -703
  157. package/skill/references/classes/SCH_SelectControl.md +520 -520
  158. package/skill/references/classes/SCH_SimulationEngine.md +133 -133
  159. package/skill/references/classes/SCH_Utils.md +121 -121
  160. package/skill/references/classes/SYS_ClientUrl.md +173 -173
  161. package/skill/references/classes/SYS_Dialog.md +825 -825
  162. package/skill/references/classes/SYS_Environment.md +640 -502
  163. package/skill/references/classes/SYS_ExternalApi.md +246 -0
  164. package/skill/references/classes/SYS_FileManager.md +1664 -1686
  165. package/skill/references/classes/SYS_FileSystem.md +1366 -1171
  166. package/skill/references/classes/SYS_FontManager.md +224 -224
  167. package/skill/references/classes/SYS_FormatConversion.md +349 -349
  168. package/skill/references/classes/SYS_HeaderMenu.md +480 -479
  169. package/skill/references/classes/SYS_Help.md +141 -0
  170. package/skill/references/classes/SYS_I18n.md +861 -861
  171. package/skill/references/classes/SYS_IFrame.md +541 -535
  172. package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -246
  173. package/skill/references/classes/SYS_Log.md +422 -424
  174. package/skill/references/classes/SYS_Math.md +1565 -1565
  175. package/skill/references/classes/SYS_Message.md +363 -363
  176. package/skill/references/classes/SYS_MessageBox.md +285 -285
  177. package/skill/references/classes/SYS_MessageBus.md +1618 -1618
  178. package/skill/references/classes/SYS_PanelControl.md +696 -696
  179. package/skill/references/classes/SYS_RightClickMenu.md +175 -175
  180. package/skill/references/classes/SYS_Setting.md +134 -85
  181. package/skill/references/classes/SYS_ShortcutKey.md +623 -623
  182. package/skill/references/classes/SYS_Storage.md +484 -484
  183. package/skill/references/classes/SYS_Timer.md +447 -447
  184. package/skill/references/classes/SYS_ToastMessage.md +194 -194
  185. package/skill/references/classes/SYS_Tool.md +317 -241
  186. package/skill/references/classes/SYS_Unit.md +594 -594
  187. package/skill/references/classes/SYS_WebSocket.md +401 -401
  188. package/skill/references/classes/SYS_Window.md +849 -850
  189. package/skill/references/enums/EDMT_EditorDocumentType.md +324 -278
  190. package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +51 -47
  191. package/skill/references/enums/EDMT_EditorTabEventType.md +68 -62
  192. package/skill/references/enums/EDMT_IndicatorMarkerType.md +90 -80
  193. package/skill/references/enums/EDMT_ItemType.md +181 -157
  194. package/skill/references/enums/EDMT_ProjectCollaborationMode.md +51 -47
  195. package/skill/references/enums/EDMT_ProjectFileFormat.md +60 -0
  196. package/skill/references/enums/EDMT_ProjectReadyState.md +82 -0
  197. package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +51 -47
  198. package/skill/references/enums/ELIB_LibraryType.md +129 -113
  199. package/skill/references/enums/ELIB_PreviewType.md +77 -69
  200. package/skill/references/enums/ELIB_SimulationModelType.md +51 -47
  201. package/skill/references/enums/ELIB_SymbolType.md +142 -124
  202. package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +51 -47
  203. package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +51 -47
  204. package/skill/references/enums/EPCB_AutoRoutingOptimization.md +51 -47
  205. package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +51 -47
  206. package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +55 -51
  207. package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +64 -58
  208. package/skill/references/enums/EPCB_LayerColorConfiguration.md +90 -80
  209. package/skill/references/enums/EPCB_LayerId.md +1169 -881
  210. package/skill/references/enums/EPCB_LayerStatus.md +64 -58
  211. package/skill/references/enums/EPCB_LayerType.md +129 -113
  212. package/skill/references/enums/EPCB_MouseEventType.md +64 -58
  213. package/skill/references/enums/EPCB_NetEventType.md +64 -58
  214. package/skill/references/enums/EPCB_PcbPlateType.md +51 -47
  215. package/skill/references/enums/EPCB_PdfOutputMethod.md +64 -58
  216. package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +51 -47
  217. package/skill/references/enums/EPCB_PrimitiveDimensionType.md +64 -58
  218. package/skill/references/enums/EPCB_PrimitiveEventType.md +64 -58
  219. package/skill/references/enums/EPCB_PrimitiveFillMode.md +68 -62
  220. package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +64 -58
  221. package/skill/references/enums/EPCB_PrimitivePadHoleType.md +64 -58
  222. package/skill/references/enums/EPCB_PrimitivePadShapeType.md +90 -80
  223. package/skill/references/enums/EPCB_PrimitivePadType.md +64 -58
  224. package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +64 -58
  225. package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +107 -95
  226. package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +142 -124
  227. package/skill/references/enums/EPCB_PrimitiveType.md +233 -201
  228. package/skill/references/enums/EPCB_PrimitiveViaType.md +64 -58
  229. package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +116 -102
  230. package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +90 -80
  231. package/skill/references/enums/ESCH_ExportDocumentFileType.md +64 -58
  232. package/skill/references/enums/ESCH_MouseEventType.md +51 -47
  233. package/skill/references/enums/ESCH_PrimitiveComponentType.md +142 -124
  234. package/skill/references/enums/ESCH_PrimitiveEventType.md +77 -69
  235. package/skill/references/enums/ESCH_PrimitiveFillStyle.md +129 -113
  236. package/skill/references/enums/ESCH_PrimitiveLineType.md +77 -69
  237. package/skill/references/enums/ESCH_PrimitivePinShape.md +77 -69
  238. package/skill/references/enums/ESCH_PrimitivePinType.md +168 -146
  239. package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +142 -124
  240. package/skill/references/enums/ESCH_PrimitiveType.md +207 -179
  241. package/skill/references/enums/ESCH_SimulationNetlistType.md +38 -36
  242. package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +51 -47
  243. package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +77 -69
  244. package/skill/references/enums/ESYS_BottomPanelTab.md +94 -80
  245. package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +181 -157
  246. package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +55 -51
  247. package/skill/references/enums/ESYS_ImportProjectImportOption.md +64 -58
  248. package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +51 -47
  249. package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +55 -51
  250. package/skill/references/enums/ESYS_JobState.md +95 -0
  251. package/skill/references/enums/ESYS_LeftPanelTab.md +94 -80
  252. package/skill/references/enums/ESYS_LogType.md +77 -102
  253. package/skill/references/enums/ESYS_NetlistType.md +129 -113
  254. package/skill/references/enums/ESYS_PanelPosition.md +69 -0
  255. package/skill/references/enums/ESYS_PanelTab.md +368 -0
  256. package/skill/references/enums/ESYS_RightPanelTab.md +237 -201
  257. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +220 -190
  258. package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +103 -91
  259. package/skill/references/enums/ESYS_StartPageQuickStartItem.md +237 -205
  260. package/skill/references/enums/ESYS_Theme.md +51 -47
  261. package/skill/references/enums/ESYS_ToastMessageType.md +90 -80
  262. package/skill/references/enums/ESYS_Unit.md +116 -102
  263. package/skill/references/enums/ESYS_WindowEventType.md +64 -47
  264. package/skill/references/enums/ESYS_WindowOpenTarget.md +51 -47
  265. package/skill/references/enums/NetportDeviceName.md +146 -146
  266. package/skill/references/enums/SchToolBarDeviceName.md +278 -278
  267. package/skill/references/interfaces/BoardProps.md +169 -169
  268. package/skill/references/interfaces/BorderConfig.md +109 -0
  269. package/skill/references/interfaces/ButtonProps.md +196 -169
  270. package/skill/references/interfaces/CellClickInfo.md +142 -0
  271. package/skill/references/interfaces/CellCoord.md +88 -0
  272. package/skill/references/interfaces/CheckBoxProps.md +223 -196
  273. package/skill/references/interfaces/CheckChangeDetail.md +88 -0
  274. package/skill/references/interfaces/CheckboxEditConfig.md +159 -0
  275. package/skill/references/interfaces/ClipboardCellData.md +142 -0
  276. package/skill/references/interfaces/ClipboardConfig.md +115 -0
  277. package/skill/references/interfaces/ColorPickerProps.md +169 -0
  278. package/skill/references/interfaces/ColumnDef.md +605 -0
  279. package/skill/references/interfaces/ColumnEditTrigger.md +57 -0
  280. package/skill/references/interfaces/ColumnGroupDef.md +192 -0
  281. package/skill/references/interfaces/ColumnResizeConfig.md +142 -0
  282. package/skill/references/interfaces/ComponentPropsMap.md +517 -448
  283. package/skill/references/interfaces/CustomHeaderConfig.md +169 -0
  284. package/skill/references/interfaces/DialogProps.md +385 -385
  285. package/skill/references/interfaces/DragSortConfig.md +115 -0
  286. package/skill/references/interfaces/EditingConfig.md +196 -0
  287. package/skill/references/interfaces/FilteringConfig.md +250 -0
  288. package/skill/references/interfaces/FixedColumnConfig.md +88 -0
  289. package/skill/references/interfaces/FlexItemProps.md +116 -116
  290. package/skill/references/interfaces/FlexProps.md +224 -224
  291. package/skill/references/interfaces/GridItemProps.md +143 -143
  292. package/skill/references/interfaces/GridProps.md +143 -143
  293. package/skill/references/interfaces/IDMT_BoardItem.md +171 -171
  294. package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -171
  295. package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -169
  296. package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -173
  297. package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -169
  298. package/skill/references/interfaces/IDMT_FolderItem.md +225 -225
  299. package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -393
  300. package/skill/references/interfaces/IDMT_PanelItem.md +144 -144
  301. package/skill/references/interfaces/IDMT_PcbItem.md +171 -171
  302. package/skill/references/interfaces/IDMT_ProjectItem.md +143 -143
  303. package/skill/references/interfaces/IDMT_SchematicItem.md +225 -225
  304. package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -198
  305. package/skill/references/interfaces/IDMT_TeamItem.md +144 -144
  306. package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -117
  307. package/skill/references/interfaces/IDesignPortal.md +103 -103
  308. package/skill/references/interfaces/ILIB_3DModelItem.md +198 -198
  309. package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -277
  310. package/skill/references/interfaces/ILIB_CbbItem.md +225 -225
  311. package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -277
  312. package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -150
  313. package/skill/references/interfaces/ILIB_ClassificationNode.md +98 -0
  314. package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -210
  315. package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -304
  316. package/skill/references/interfaces/ILIB_DeviceItem.md +279 -279
  317. package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -250
  318. package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -521
  319. package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -64
  320. package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +93 -99
  321. package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -150
  322. package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +143 -157
  323. package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -63
  324. package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -123
  325. package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -97
  326. package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -98
  327. package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -115
  328. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -169
  329. package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -234
  330. package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +91 -105
  331. package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -96
  332. package/skill/references/interfaces/ILIB_FootprintItem.md +256 -198
  333. package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -61
  334. package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -277
  335. package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -92
  336. package/skill/references/interfaces/ILIB_LibraryItem.md +115 -115
  337. package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -198
  338. package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -277
  339. package/skill/references/interfaces/ILIB_RegisterExtendLibraryProps.md +71 -0
  340. package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -306
  341. package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -304
  342. package/skill/references/interfaces/ILIB_SymbolItem.md +306 -279
  343. package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -61
  344. package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -304
  345. package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -169
  346. package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -220
  347. package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -169
  348. package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -169
  349. package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -115
  350. package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -65
  351. package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -88
  352. package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -115
  353. package/skill/references/interfaces/IPCB_LayerItem.md +277 -277
  354. package/skill/references/interfaces/IPCB_NetClassItem.md +115 -115
  355. package/skill/references/interfaces/IPCB_NetInfo.md +115 -115
  356. package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -88
  357. package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -88
  358. package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -115
  359. package/skill/references/interfaces/IPCB_Primitive.md +218 -218
  360. package/skill/references/interfaces/IPCB_PrimitiveAPI.md +174 -175
  361. package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -151
  362. package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -142
  363. package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -154
  364. package/skill/references/interfaces/IPCB_RayTracerBackgroundConfig.md +223 -0
  365. package/skill/references/interfaces/IPCB_RayTracerLightConfig.md +412 -0
  366. package/skill/references/interfaces/IPCB_RayTracerMaterialConfig.md +547 -0
  367. package/skill/references/interfaces/IPCB_RayTracerPcbMaterialConfig.md +196 -0
  368. package/skill/references/interfaces/IPCB_RayTracerRenderConfigurations.md +200 -0
  369. package/skill/references/interfaces/IPCB_RayTracerRendererConfig.md +196 -0
  370. package/skill/references/interfaces/IPCB_RayTracerSceneElement.md +115 -0
  371. package/skill/references/interfaces/IPCB_RayTracerSceneElementTransform.md +123 -0
  372. package/skill/references/interfaces/IPCB_RayTracerTexture.md +88 -0
  373. package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -88
  374. package/skill/references/interfaces/IRawNet.md +103 -103
  375. package/skill/references/interfaces/IRawPureSchematic.md +80 -80
  376. package/skill/references/interfaces/IRawSchematic.md +103 -103
  377. package/skill/references/interfaces/IRawWire.md +149 -149
  378. package/skill/references/interfaces/ISCH_DrcError.md +142 -142
  379. package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -142
  380. package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -94
  381. package/skill/references/interfaces/ISCH_NetInfo.md +88 -88
  382. package/skill/references/interfaces/ISCH_Primitive.md +218 -219
  383. package/skill/references/interfaces/ISCH_PrimitiveAPI.md +174 -175
  384. package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -142
  385. package/skill/references/interfaces/ISCH_WireInfo.md +169 -169
  386. package/skill/references/interfaces/ISYS_ComparisonResponse.md +115 -0
  387. package/skill/references/interfaces/ISYS_ExtensionExternalApiIndex.md +13 -0
  388. package/skill/references/interfaces/ISYS_ExtensionRegisteredExternalApis.md +13 -0
  389. package/skill/references/interfaces/ISYS_ExternalApiHelp.md +173 -0
  390. package/skill/references/interfaces/ISYS_ExternalApiRegistration.md +146 -0
  391. package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -169
  392. package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +205 -174
  393. package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +178 -147
  394. package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -115
  395. package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -408
  396. package/skill/references/interfaces/ISYS_HelpAudienceEntry.md +92 -0
  397. package/skill/references/interfaces/ISYS_HelpClassSummary.md +205 -0
  398. package/skill/references/interfaces/ISYS_HelpData.md +92 -0
  399. package/skill/references/interfaces/ISYS_HelpMethodDetail.md +310 -0
  400. package/skill/references/interfaces/ISYS_JobHandle.md +65 -0
  401. package/skill/references/interfaces/ISYS_JobLogEntry.md +142 -0
  402. package/skill/references/interfaces/ISYS_JobStatus.md +176 -0
  403. package/skill/references/interfaces/ISYS_LogLine.md +115 -115
  404. package/skill/references/interfaces/ISYS_MathBBox.md +142 -142
  405. package/skill/references/interfaces/ISYS_MathPoint.md +88 -88
  406. package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -92
  407. package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -115
  408. package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +12 -12
  409. package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -174
  410. package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -169
  411. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -62
  412. package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -62
  413. package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -109
  414. package/skill/references/interfaces/IconProps.md +88 -88
  415. package/skill/references/interfaces/ImageProps.md +115 -115
  416. package/skill/references/interfaces/InputEditConfig.md +182 -0
  417. package/skill/references/interfaces/InputProps.md +547 -520
  418. package/skill/references/interfaces/KeyboardConfig.md +61 -0
  419. package/skill/references/interfaces/ListChildren.md +223 -223
  420. package/skill/references/interfaces/ListProps.md +250 -223
  421. package/skill/references/interfaces/ModalProps.md +358 -358
  422. package/skill/references/interfaces/NumberEditConfig.md +234 -0
  423. package/skill/references/interfaces/RadioGroupProps.md +196 -196
  424. package/skill/references/interfaces/RadioItem.md +115 -115
  425. package/skill/references/interfaces/RichTableProps.md +1357 -0
  426. package/skill/references/interfaces/RowMetaConfig.md +142 -0
  427. package/skill/references/interfaces/ScrollerProps.md +169 -169
  428. package/skill/references/interfaces/SelectEditConfig.md +211 -0
  429. package/skill/references/interfaces/SelectListItem.md +142 -142
  430. package/skill/references/interfaces/SelectOption.md +142 -0
  431. package/skill/references/interfaces/SelectProps.md +169 -169
  432. package/skill/references/interfaces/SelectionConfig.md +358 -0
  433. package/skill/references/interfaces/SliderProps.md +142 -0
  434. package/skill/references/interfaces/SlotProps.md +88 -88
  435. package/skill/references/interfaces/SortState.md +88 -0
  436. package/skill/references/interfaces/SortingConfig.md +169 -0
  437. package/skill/references/interfaces/StyleProps.md +439 -385
  438. package/skill/references/interfaces/TextAreaProps.md +196 -196
  439. package/skill/references/interfaces/TextProps.md +169 -169
  440. package/skill/references/interfaces/TextareaEditConfig.md +182 -0
  441. package/skill/references/interfaces/ValidationRule.md +223 -0
  442. package/skill/references/interfaces/VirtualScrollConfig.md +115 -0
  443. package/skill/references/types/Align.md +9 -0
  444. package/skill/references/types/CellContentType.md +9 -0
  445. package/skill/references/types/ColumnDefOrGroup.md +12 -0
  446. package/skill/references/types/ColumnEditConfig.md +13 -0
  447. package/skill/references/types/ColumnType.md +9 -0
  448. package/skill/references/types/DataChangeType.md +9 -0
  449. package/skill/references/types/FilterMatchMode.md +9 -0
  450. package/skill/references/types/RichTableRow.md +12 -0
  451. package/skill/references/types/Serializable.md +10 -0
  452. package/skill/references/types/SerializablePrimitive.md +9 -0
  453. package/skill/references/types/SortOrder.md +9 -0
  454. package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +11 -11
  455. package/skill/references/types/TPCB_LayersInTheSelectable.md +42 -42
  456. package/skill/references/types/TPCB_LayersOfComponent.md +11 -11
  457. package/skill/references/types/TPCB_LayersOfCopper.md +15 -15
  458. package/skill/references/types/TPCB_LayersOfCustom.md +41 -41
  459. package/skill/references/types/TPCB_LayersOfDimension.md +16 -16
  460. package/skill/references/types/TPCB_LayersOfFill.md +28 -28
  461. package/skill/references/types/TPCB_LayersOfImage.md +22 -22
  462. package/skill/references/types/TPCB_LayersOfInner.md +41 -41
  463. package/skill/references/types/TPCB_LayersOfLine.md +25 -25
  464. package/skill/references/types/TPCB_LayersOfObject.md +12 -12
  465. package/skill/references/types/TPCB_LayersOfPad.md +11 -11
  466. package/skill/references/types/TPCB_LayersOfRegion.md +11 -11
  467. package/skill/references/types/TPCB_NumberOfCopperLayers.md +9 -9
  468. package/skill/references/types/TPCB_PolygonSourceArray.md +85 -83
  469. package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +66 -66
  470. package/skill/references/types/TPCB_PrimitivePadHole.md +30 -30
  471. package/skill/references/types/TPCB_PrimitivePadShape.md +61 -61
  472. package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +19 -19
  473. package/skill/references/types/TSYS_ComparisonErrorCode.md +15 -0
  474. package/skill/references/types/TSYS_LanguageKeyValuePairs.md +13 -0
  475. package/skill/references/types/TSYS_MathPolygonGroup.md +15 -15
  476. package/skill/references/types/TSYS_MathPolygonInput.md +20 -20
  477. package/skill/references/types/TSYS_ShortcutKeys.md +96 -96
  478. package/skill/user-guide/using-extension.md +47 -47
  479. package/src/json-gen.test.js +430 -0
  480. package/skill/guide/ancillary-projects/pro-api-sdk.md +0 -1
  481. package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +0 -115
  482. package/skill/references/types/ISYS_LanguageKeyValuePairs.md +0 -13
  483. package/skill/references/types/TSYS_PcbComparisonErrorCode.md +0 -10
@@ -1,1686 +1,1664 @@
1
- # SYS\_FileManager class
2
-
3
- System / file manager class
4
-
5
- ## Signature
6
-
7
- ```typescript
8
- class SYS_FileManager
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
- [extractLibInfo(data)](./SYS_FileManager.md)
29
-
30
- </td><td>
31
-
32
- </td><td>
33
-
34
- Extract the library configuration information from the file
35
-
36
- </td></tr>
37
- <tr><td>
38
-
39
- [extractProjectInfo(data)](./SYS_FileManager.md)
40
-
41
- </td><td>
42
-
43
- </td><td>
44
-
45
- Extract the project configuration information from the file
46
-
47
- </td></tr>
48
- <tr><td>
49
-
50
- [getCbbFileByCbbUuid(cbbUuid, libraryUuid, props)](./SYS_FileManager.md)
51
-
52
- </td><td>
53
-
54
- </td><td>
55
-
56
- **_(BETA)_** Use reuse block UUID get reuse block file
57
-
58
- </td></tr>
59
- <tr><td>
60
-
61
- [getDeviceFileByDeviceUuid(deviceUuid, libraryUuid, fileType)](./SYS_FileManager.md)
62
-
63
- </td><td>
64
-
65
- </td><td>
66
-
67
- Use device UUID get device file
68
-
69
- </td></tr>
70
- <tr><td>
71
-
72
- [getDocumentFile(fileName, password, fileType)](./SYS_FileManager.md)
73
-
74
- </td><td>
75
-
76
- </td><td>
77
-
78
- Get Document file
79
-
80
- </td></tr>
81
- <tr><td>
82
-
83
- [getDocumentFootprintSources()](./SYS_FileManager.md)
84
-
85
- </td><td>
86
-
87
- </td><td>
88
-
89
- **_(BETA)_** Get the document footprint source code
90
-
91
- </td></tr>
92
- <tr><td>
93
-
94
- [getDocumentSource()](./SYS_FileManager.md)
95
-
96
- </td><td>
97
-
98
- </td><td>
99
-
100
- **_(BETA)_** Get Document source code
101
-
102
- </td></tr>
103
- <tr><td>
104
-
105
- [getFootprintFileByFootprintUuid(footprintUuid, libraryUuid, fileType)](./SYS_FileManager.md)
106
-
107
- </td><td>
108
-
109
- </td><td>
110
-
111
- **_(BETA)_** Use footprint UUID get footprint file
112
-
113
- </td></tr>
114
- <tr><td>
115
-
116
- [getPanelLibraryFileByPanelLibraryUuid(panelLibraryUuid, libraryUuid, fileType)](./SYS_FileManager.md)
117
-
118
- </td><td>
119
-
120
- </td><td>
121
-
122
- **_(BETA)_** Use panel library UUID get panel library file
123
-
124
- </td></tr>
125
- <tr><td>
126
-
127
- [getProjectFile(fileName, password, fileType)](./SYS_FileManager.md)
128
-
129
- </td><td>
130
-
131
- </td><td>
132
-
133
- Get Project file
134
-
135
- </td></tr>
136
- <tr><td>
137
-
138
- [getProjectFileByProjectUuid(projectUuid, fileName, password, fileType)](./SYS_FileManager.md)
139
-
140
- </td><td>
141
-
142
- </td><td>
143
-
144
- **_(BETA)_** Use project UUID get project file
145
-
146
- </td></tr>
147
- <tr><td>
148
-
149
- [getSchematicFile(fileName, password, fileType)](./SYS_FileManager.md)
150
-
151
- </td><td>
152
-
153
- </td><td>
154
-
155
- **_(BETA)_** 获取原理图文件
156
-
157
- </td></tr>
158
- <tr><td>
159
-
160
- [getSymbolFileBySymbolUuid(symbolUuid, libraryUuid, fileType)](./SYS_FileManager.md)
161
-
162
- </td><td>
163
-
164
- </td><td>
165
-
166
- **_(BETA)_** Use symbol UUID get symbol file
167
-
168
- </td></tr>
169
- <tr><td>
170
-
171
- [importProjectByProjectFile(projectFile, fileType, props, saveTo, librariesImportSetting)](./SYS_FileManager.md)
172
-
173
- </td><td>
174
-
175
- </td><td>
176
-
177
- **_(BETA)_** Use project file import project
178
-
179
- </td></tr>
180
- <tr><td>
181
-
182
- [importProjectByProjectFile(projectFile, fileType, props, saveTo, librariesImportSetting)](./SYS_FileManager.md)
183
-
184
- </td><td>
185
-
186
- </td><td>
187
-
188
- **_(BETA)_** Use project file import project
189
-
190
- </td></tr>
191
- <tr><td>
192
-
193
- [setDocumentSource(source)](./SYS_FileManager.md)
194
-
195
- </td><td>
196
-
197
- </td><td>
198
-
199
- **_(BETA)_** Modify Document source code
200
-
201
- </td></tr>
202
- </tbody></table>
203
-
204
- ---
205
-
206
- ## 方法详情
207
-
208
- ### extractlibinfo
209
-
210
- # SYS\_FileManager.extractLibInfo() method
211
-
212
- Extract the library configuration information from the file
213
-
214
- ## Signature
215
-
216
- ```typescript
217
- function extractLibInfo(data: File | Array<File>): Promise<any>;
218
- ```
219
-
220
- ## Parameters
221
-
222
- <table><thead><tr><th>
223
-
224
- Parameter
225
-
226
- </th><th>
227
-
228
- Type
229
-
230
- </th><th>
231
-
232
- Description
233
-
234
- </th></tr></thead>
235
- <tbody><tr><td>
236
-
237
- data
238
-
239
- </td><td>
240
-
241
- File \| Array&lt;File&gt;
242
-
243
- </td><td>
244
-
245
- Library file
246
-
247
- </td></tr>
248
- </tbody></table>
249
-
250
- ## Returns
251
-
252
- Promise&lt;any&gt;
253
-
254
- Library configuration information
255
-
256
- ## Example
257
-
258
- ```javascript
259
- // 1. 导出当前工程为文件
260
- const projectFile = await eda.sys_FileManager.getProjectFile();
261
-
262
- // 2. 从工程文件中提取库配置信息
263
- const libInfo = await eda.sys_FileManager.extractLibInfo(projectFile);
264
-
265
- // 3. 输出各类型库的引用数量(字段:devices / symbols / footprints / panelLibs)
266
- console.log('器件数:', libInfo.devices.length);
267
- console.log('符号数:', libInfo.symbols.length);
268
- console.log('封装数:', libInfo.footprints.length);
269
- console.log('面板库数:', libInfo.panelLibs.length);
270
-
271
- // 4. 列出第一个封装的库信息(uuid 可用于后续按 UUID 下载封装文件)
272
- const firstFootprint = libInfo.footprints[0];
273
- console.log('首个封装标题:', firstFootprint?.title);
274
- console.log('首个封装 uuid:', firstFootprint?.uuid);
275
- ```
276
-
277
- ### extractprojectinfo
278
-
279
- # SYS\_FileManager.extractProjectInfo() method
280
-
281
- Extract the project configuration information from the file
282
-
283
- ## Signature
284
-
285
- ```typescript
286
- function extractProjectInfo(data: File): Promise<any>;
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
- data
307
-
308
- </td><td>
309
-
310
- File
311
-
312
- </td><td>
313
-
314
- Project file
315
-
316
- </td></tr>
317
- </tbody></table>
318
-
319
- ## Returns
320
-
321
- Promise&lt;any&gt;
322
-
323
- Project configuration information
324
-
325
- ## Example
326
-
327
- ```javascript
328
- // 1. 导出当前工程为文件
329
- const projectFile = await eda.sys_FileManager.getProjectFile();
330
-
331
- // 2. 从工程文件中提取工程配置信息
332
- const projectInfo = await eda.sys_FileManager.extractProjectInfo(projectFile);
333
-
334
- // 3. 输出工程配置(title 是工程标题,editorVersion 是导出时的编辑器版本)
335
- console.log('工程标题:', projectInfo.title);
336
- console.log('编辑器版本:', projectInfo.editorVersion);
337
- console.log('是否复用模块工程:', projectInfo.cbbProject);
338
-
339
- // 4. 输出标签(工程未设置标签时 tags 为 undefined,兜底为空数组)
340
- console.log('标签:', (projectInfo.tags ?? []).join('、'));
341
- ```
342
-
343
- ### getcbbfilebycbbuuid
344
-
345
- # SYS\_FileManager.getCbbFileByCbbUuid() method
346
-
347
- > 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.
348
-
349
- Use reuse block UUID get reuse block file
350
-
351
- ## Signature
352
-
353
- ```typescript
354
- function getCbbFileByCbbUuid(
355
- cbbUuid: string,
356
- libraryUuid?: string,
357
- props?: {
358
- fileName?: undefined | string;
359
- password?: undefined | string;
360
- fileType?: undefined | 'epro' | 'epro2';
361
- templateSchematicUuid?: undefined | string;
362
- templatePcbUuid?: undefined | string;
363
- },
364
- ): Promise<File | undefined>;
365
- ```
366
-
367
- ## Parameters
368
-
369
- <table><thead><tr><th>
370
-
371
- Parameter
372
-
373
- </th><th>
374
-
375
- Type
376
-
377
- </th><th>
378
-
379
- Description
380
-
381
- </th></tr></thead>
382
- <tbody><tr><td>
383
-
384
- cbbUuid
385
-
386
- </td><td>
387
-
388
- string
389
-
390
- </td><td>
391
-
392
- Reuse block UUID
393
-
394
- </td></tr>
395
- <tr><td>
396
-
397
- libraryUuid
398
-
399
- </td><td>
400
-
401
- string
402
-
403
- </td><td>
404
-
405
- _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
406
-
407
- </td></tr>
408
- <tr><td>
409
-
410
- props
411
-
412
- </td><td>
413
-
414
- { fileName?: undefined \| string; password?: undefined \| string; fileType?: undefined \| 'epro' \| 'epro2'; templateSchematicUuid?: undefined \| string; templatePcbUuid?: undefined \| string }
415
-
416
- </td><td>
417
-
418
- _(Optional)_
419
-
420
- </td></tr>
421
- </tbody></table>
422
-
423
- ## Returns
424
-
425
- Promise&lt;File \| undefined&gt;
426
-
427
- Reuse block file data, `undefined` indicates that the data retrieval failed
428
-
429
- ## Remarks
430
-
431
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
432
-
433
- Note: This API requires the \*\*Team Module &gt; Download Module\*\* permission. Calling it without permission will always `throw Error`
434
-
435
- ## Example
436
-
437
- ```javascript
438
- // 1. 列出系统库中的复用模块,取第一个的 UUID
439
- const cbbList = await eda.lib_Cbb.search('', undefined, undefined, 5);
440
- const cbb = cbbList[0];
441
-
442
- // 2. 按复用模块 UUID 获取文件,props.fileName 指定导出文件名
443
- const cbbFile = await eda.sys_FileManager.getCbbFileByCbbUuid(cbb.uuid, undefined, {
444
- fileName: '嘉立创示例_复用模块',
445
- });
446
-
447
- // 3. 输出复用模块与文件信息(size 单位为字节)
448
- console.log('复用模块名:', cbb.name);
449
- console.log('文件名:', cbbFile.name);
450
- console.log('文件大小:', cbbFile.size);
451
- ```
452
-
453
- ### getdevicefilebydeviceuuid
454
-
455
- # SYS\_FileManager.getDeviceFileByDeviceUuid() method
456
-
457
- Use device UUID get device file
458
-
459
- ## Signature
460
-
461
- ```typescript
462
- function getDeviceFileByDeviceUuid(
463
- deviceUuid: string | Array<string>,
464
- libraryUuid?: string,
465
- fileType?: 'elibz' | 'elibz2',
466
- ): Promise<File | undefined>;
467
- ```
468
-
469
- ## Parameters
470
-
471
- <table><thead><tr><th>
472
-
473
- Parameter
474
-
475
- </th><th>
476
-
477
- Type
478
-
479
- </th><th>
480
-
481
- Description
482
-
483
- </th></tr></thead>
484
- <tbody><tr><td>
485
-
486
- deviceUuid
487
-
488
- </td><td>
489
-
490
- string \| Array&lt;string&gt;
491
-
492
- </td><td>
493
-
494
- Device UUID or device UUID list
495
-
496
- </td></tr>
497
- <tr><td>
498
-
499
- libraryUuid
500
-
501
- </td><td>
502
-
503
- string
504
-
505
- </td><td>
506
-
507
- _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
508
-
509
- </td></tr>
510
- <tr><td>
511
-
512
- fileType
513
-
514
- </td><td>
515
-
516
- 'elibz' \| 'elibz2'
517
-
518
- </td><td>
519
-
520
- _(Optional)_
521
-
522
- </td></tr>
523
- </tbody></table>
524
-
525
- ## Returns
526
-
527
- Promise&lt;File \| undefined&gt;
528
-
529
- Device file data, `undefined` indicates that the data retrieval failed
530
-
531
- ## Remarks
532
-
533
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
534
-
535
- Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
536
-
537
- ## Example
538
-
539
- ```javascript
540
- // 1. 按立创编号精确搜索系统库器件,取第一个的 UUID
541
- const deviceList = await eda.lib_Device.searchByProperties({ supplierId: 'C1523' }, undefined, undefined, undefined, 5, 1);
542
- const device = deviceList[0];
543
-
544
- // 2. 按器件 UUID 获取器件文件
545
- const deviceFile = await eda.sys_FileManager.getDeviceFileByDeviceUuid(device.uuid);
546
-
547
- // 3. 输出器件与文件信息(size 单位为字节)
548
- console.log('器件名:', device.name);
549
- console.log('文件名:', deviceFile.name);
550
- console.log('文件大小:', deviceFile.size);
551
- ```
552
-
553
- ### getdocumentfile
554
-
555
- # SYS\_FileManager.getDocumentFile() method
556
-
557
- Get Document file
558
-
559
- ## Signature
560
-
561
- ```typescript
562
- function getDocumentFile(
563
- fileName?: string,
564
- password?: string,
565
- fileType?: 'epro' | 'epro2',
566
- ): Promise<File | undefined>;
567
- ```
568
-
569
- ## Parameters
570
-
571
- <table><thead><tr><th>
572
-
573
- Parameter
574
-
575
- </th><th>
576
-
577
- Type
578
-
579
- </th><th>
580
-
581
- Description
582
-
583
- </th></tr></thead>
584
- <tbody><tr><td>
585
-
586
- fileName
587
-
588
- </td><td>
589
-
590
- string
591
-
592
- </td><td>
593
-
594
- _(Optional)_ File name
595
-
596
- </td></tr>
597
- <tr><td>
598
-
599
- password
600
-
601
- </td><td>
602
-
603
- string
604
-
605
- </td><td>
606
-
607
- _(Optional)_ Encrypted password
608
-
609
- </td></tr>
610
- <tr><td>
611
-
612
- fileType
613
-
614
- </td><td>
615
-
616
- 'epro' \| 'epro2'
617
-
618
- </td><td>
619
-
620
- _(Optional)_ File format
621
-
622
- </td></tr>
623
- </tbody></table>
624
-
625
- ## Returns
626
-
627
- Promise&lt;File \| undefined&gt;
628
-
629
- Document file data, `undefined` indicates that it is currently not open document or data retrieval failed
630
-
631
- ## Remarks
632
-
633
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
634
-
635
- Note: This API requires the \*\*Engineering Design &gt; File Export\*\* permission. Calling it without permission will always `throw Error`
636
-
637
- ## Example
638
-
639
- ```javascript
640
- // 1. 导出当前文档为文件(文件名自动带上 epro2 扩展名)
641
- const documentFile = await eda.sys_FileManager.getDocumentFile('嘉立创示例_文档导出');
642
-
643
- // 2. 输出文件信息(size 单位为字节)
644
- console.log('文件名:', documentFile.name);
645
- console.log('文件大小:', documentFile.size);
646
- ```
647
-
648
- ### getdocumentfootprintsources
649
-
650
- # SYS\_FileManager.getDocumentFootprintSources() 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
- Get the document footprint source code
655
-
656
- ## Signature
657
-
658
- ```typescript
659
- function getDocumentFootprintSources(): Promise<
660
- Array<{ footprintUuid: string; documentSource: string }>
661
- >;
662
- ```
663
-
664
- ## Returns
665
-
666
- Promise&lt;Array&lt;{ footprintUuid: string; documentSource: string }&gt;&gt;
667
-
668
- Document footprint source code data. An empty array is returned if the data retrieval fails
669
-
670
- ## Example
671
-
672
- ```javascript
673
- // 1. 获取当前文档全部封装源码
674
- const sources = await eda.sys_FileManager.getDocumentFootprintSources();
675
-
676
- // 2. 输出封装数量与每个封装的源码长度
677
- console.log('封装数量:', sources.length);
678
- sources.forEach((item, i) => {
679
- console.log(`[${i}] footprintUuid:`, item.footprintUuid, '源码长度:', item.documentSource.length);
680
- });
681
- ```
682
-
683
- ### getdocumentsource
684
-
685
- # SYS\_FileManager.getDocumentSource() method
686
-
687
- > 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.
688
-
689
- Get Document source code
690
-
691
- ## Signature
692
-
693
- ```typescript
694
- function getDocumentSource(): Promise<string | undefined>;
695
- ```
696
-
697
- ## Returns
698
-
699
- Promise&lt;string \| undefined&gt;
700
-
701
- Document source code data, `undefined` indicates that it is currently not open document or data retrieval failed
702
-
703
- ## Example
704
-
705
- ```javascript
706
- // 1. 读取当前文档源码
707
- const source = await eda.sys_FileManager.getDocumentSource();
708
-
709
- // 2. 输出源码长度与前 60 字符预览(DOCHEAD 开头的 JSON 分段结构)
710
- console.log('源码长度:', source.length);
711
- console.log('源码预览:', source.slice(0, 60));
712
- ```
713
-
714
- ### getfootprintfilebyfootprintuuid
715
-
716
- # SYS\_FileManager.getFootprintFileByFootprintUuid() method
717
-
718
- > 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.
719
-
720
- Use footprint UUID get footprint file
721
-
722
- ## Signature
723
-
724
- ```typescript
725
- function getFootprintFileByFootprintUuid(
726
- footprintUuid: string | Array<string>,
727
- libraryUuid?: string,
728
- fileType?: 'elibz' | 'elibz2',
729
- ): Promise<File | undefined>;
730
- ```
731
-
732
- ## Parameters
733
-
734
- <table><thead><tr><th>
735
-
736
- Parameter
737
-
738
- </th><th>
739
-
740
- Type
741
-
742
- </th><th>
743
-
744
- Description
745
-
746
- </th></tr></thead>
747
- <tbody><tr><td>
748
-
749
- footprintUuid
750
-
751
- </td><td>
752
-
753
- string \| Array&lt;string&gt;
754
-
755
- </td><td>
756
-
757
- Footprint UUID or footprint UUID list
758
-
759
- </td></tr>
760
- <tr><td>
761
-
762
- libraryUuid
763
-
764
- </td><td>
765
-
766
- string
767
-
768
- </td><td>
769
-
770
- _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
771
-
772
- </td></tr>
773
- <tr><td>
774
-
775
- fileType
776
-
777
- </td><td>
778
-
779
- 'elibz' \| 'elibz2'
780
-
781
- </td><td>
782
-
783
- _(Optional)_
784
-
785
- </td></tr>
786
- </tbody></table>
787
-
788
- ## Returns
789
-
790
- Promise&lt;File \| undefined&gt;
791
-
792
- Footprint file data, `undefined` indicates that the data retrieval failed
793
-
794
- ## Remarks
795
-
796
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
797
-
798
- Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
799
-
800
- ## Example
801
-
802
- ```javascript
803
- // 1. 列出系统库封装,取第一个的 UUID
804
- const footprintList = await eda.lib_Footprint.search('', undefined, [], undefined, 5, 1);
805
- const footprint = footprintList[0];
806
-
807
- // 2. 按封装 UUID 获取封装文件
808
- const footprintFile = await eda.sys_FileManager.getFootprintFileByFootprintUuid(footprint.uuid);
809
-
810
- // 3. 输出封装与文件信息(size 单位为字节)
811
- console.log('封装名:', footprint.name);
812
- console.log('文件名:', footprintFile.name);
813
- console.log('文件大小:', footprintFile.size);
814
- ```
815
-
816
- ### getpanellibraryfilebypanellibraryuuid
817
-
818
- # SYS\_FileManager.getPanelLibraryFileByPanelLibraryUuid() method
819
-
820
- > 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.
821
-
822
- Use panel library UUID get panel library file
823
-
824
- ## Signature
825
-
826
- ```typescript
827
- function getPanelLibraryFileByPanelLibraryUuid(
828
- panelLibraryUuid: string | Array<string>,
829
- libraryUuid?: string,
830
- fileType?: 'elibz' | 'elibz2',
831
- ): Promise<File | undefined>;
832
- ```
833
-
834
- ## Parameters
835
-
836
- <table><thead><tr><th>
837
-
838
- Parameter
839
-
840
- </th><th>
841
-
842
- Type
843
-
844
- </th><th>
845
-
846
- Description
847
-
848
- </th></tr></thead>
849
- <tbody><tr><td>
850
-
851
- panelLibraryUuid
852
-
853
- </td><td>
854
-
855
- string \| Array&lt;string&gt;
856
-
857
- </td><td>
858
-
859
- Panel library UUID or panel library UUID list
860
-
861
- </td></tr>
862
- <tr><td>
863
-
864
- libraryUuid
865
-
866
- </td><td>
867
-
868
- string
869
-
870
- </td><td>
871
-
872
- _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
873
-
874
- </td></tr>
875
- <tr><td>
876
-
877
- fileType
878
-
879
- </td><td>
880
-
881
- 'elibz' \| 'elibz2'
882
-
883
- </td><td>
884
-
885
- _(Optional)_
886
-
887
- </td></tr>
888
- </tbody></table>
889
-
890
- ## Returns
891
-
892
- Promise&lt;File \| undefined&gt;
893
-
894
- Panel library file data, `undefined` indicates that the data retrieval failed
895
-
896
- ## Remarks
897
-
898
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
899
-
900
- Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
901
-
902
- ## Example
903
-
904
- ```javascript
905
- // 1. 列出系统库面板库,取第一个的 UUID
906
- const panelList = await eda.lib_PanelLibrary.search('', undefined, undefined, 5);
907
- const panel = panelList[0];
908
-
909
- // 2. 按面板库 UUID 获取面板库文件
910
- const panelFile = await eda.sys_FileManager.getPanelLibraryFileByPanelLibraryUuid(panel.uuid);
911
-
912
- // 3. 输出面板库与文件信息(size 单位为字节)
913
- console.log('面板库名:', panel.name);
914
- console.log('文件名:', panelFile.name);
915
- console.log('文件大小:', panelFile.size);
916
- ```
917
-
918
- ### getprojectfile
919
-
920
- # SYS\_FileManager.getProjectFile() method
921
-
922
- Get Project file
923
-
924
- ## Signature
925
-
926
- ```typescript
927
- function getProjectFile(
928
- fileName?: string,
929
- password?: string,
930
- fileType?: 'epro' | 'epro2',
931
- ): Promise<File | undefined>;
932
- ```
933
-
934
- ## Parameters
935
-
936
- <table><thead><tr><th>
937
-
938
- Parameter
939
-
940
- </th><th>
941
-
942
- Type
943
-
944
- </th><th>
945
-
946
- Description
947
-
948
- </th></tr></thead>
949
- <tbody><tr><td>
950
-
951
- fileName
952
-
953
- </td><td>
954
-
955
- string
956
-
957
- </td><td>
958
-
959
- _(Optional)_ File name
960
-
961
- </td></tr>
962
- <tr><td>
963
-
964
- password
965
-
966
- </td><td>
967
-
968
- string
969
-
970
- </td><td>
971
-
972
- _(Optional)_ Encrypted password
973
-
974
- </td></tr>
975
- <tr><td>
976
-
977
- fileType
978
-
979
- </td><td>
980
-
981
- 'epro' \| 'epro2'
982
-
983
- </td><td>
984
-
985
- _(Optional)_ File format
986
-
987
- </td></tr>
988
- </tbody></table>
989
-
990
- ## Returns
991
-
992
- Promise&lt;File \| undefined&gt;
993
-
994
- Project file data, `undefined` indicates that it is currently not open project or data retrieval failed
995
-
996
- ## Remarks
997
-
998
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
999
-
1000
- Note: This API requires the \*\*Project Management &gt; Download Project\*\* permission. Calling it without permission will always `throw Error`
1001
-
1002
- ## Example
1003
-
1004
- ```javascript
1005
- // 1. 导出当前工程为文件(文件名自动带上 epro2 扩展名)
1006
- const projectFile = await eda.sys_FileManager.getProjectFile('嘉立创示例_工程导出');
1007
-
1008
- // 2. 输出文件信息(size 单位为字节)
1009
- console.log('文件名:', projectFile.name);
1010
- console.log('文件大小:', projectFile.size);
1011
- ```
1012
-
1013
- ### getprojectfilebyprojectuuid
1014
-
1015
- # SYS\_FileManager.getProjectFileByProjectUuid() method
1016
-
1017
- > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1018
-
1019
- Use project UUID get project file
1020
-
1021
- ## Signature
1022
-
1023
- ```typescript
1024
- function getProjectFileByProjectUuid(
1025
- projectUuid: string,
1026
- fileName?: string,
1027
- password?: string,
1028
- fileType?: 'epro' | 'epro2',
1029
- ): Promise<File | undefined>;
1030
- ```
1031
-
1032
- ## Parameters
1033
-
1034
- <table><thead><tr><th>
1035
-
1036
- Parameter
1037
-
1038
- </th><th>
1039
-
1040
- Type
1041
-
1042
- </th><th>
1043
-
1044
- Description
1045
-
1046
- </th></tr></thead>
1047
- <tbody><tr><td>
1048
-
1049
- projectUuid
1050
-
1051
- </td><td>
1052
-
1053
- string
1054
-
1055
- </td><td>
1056
-
1057
- Project UUID
1058
-
1059
- </td></tr>
1060
- <tr><td>
1061
-
1062
- fileName
1063
-
1064
- </td><td>
1065
-
1066
- string
1067
-
1068
- </td><td>
1069
-
1070
- _(Optional)_ File name
1071
-
1072
- </td></tr>
1073
- <tr><td>
1074
-
1075
- password
1076
-
1077
- </td><td>
1078
-
1079
- string
1080
-
1081
- </td><td>
1082
-
1083
- _(Optional)_ Encrypted password
1084
-
1085
- </td></tr>
1086
- <tr><td>
1087
-
1088
- fileType
1089
-
1090
- </td><td>
1091
-
1092
- 'epro' \| 'epro2'
1093
-
1094
- </td><td>
1095
-
1096
- _(Optional)_ File format
1097
-
1098
- </td></tr>
1099
- </tbody></table>
1100
-
1101
- ## Returns
1102
-
1103
- Promise&lt;File \| undefined&gt;
1104
-
1105
- Project file data, `undefined` indicates that it is currently not open project or data retrieval failed
1106
-
1107
- ## Remarks
1108
-
1109
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
1110
-
1111
- Note: This API requires the \*\*Project Management &gt; Download Project\*\* permission. Calling it without permission will always `throw Error`
1112
-
1113
- ## Example
1114
-
1115
- ```javascript
1116
- // 1. 获取当前工程的 UUID
1117
- const projectInfo = await eda.dmt_Project.getCurrentProjectInfo();
1118
-
1119
- // 2. 按工程 UUID 下载工程文件(文件名自动带上 epro2 扩展名)
1120
- const projectFile = await eda.sys_FileManager.getProjectFileByProjectUuid(projectInfo.uuid, '嘉立创示例_按UUID导出');
1121
-
1122
- // 3. 输出文件信息(size 单位为字节)
1123
- console.log('文件名:', projectFile.name);
1124
- console.log('文件大小:', projectFile.size);
1125
- ```
1126
-
1127
- ### getschematicfile
1128
-
1129
- # SYS\_FileManager.getSchematicFile() method
1130
-
1131
- > 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.
1132
-
1133
- 获取原理图文件
1134
-
1135
- ## Signature
1136
-
1137
- ```typescript
1138
- function getSchematicFile(
1139
- fileName?: string,
1140
- password?: string,
1141
- fileType?: 'epro' | 'epro2',
1142
- ): Promise<File | undefined>;
1143
- ```
1144
-
1145
- ## Parameters
1146
-
1147
- <table><thead><tr><th>
1148
-
1149
- Parameter
1150
-
1151
- </th><th>
1152
-
1153
- Type
1154
-
1155
- </th><th>
1156
-
1157
- Description
1158
-
1159
- </th></tr></thead>
1160
- <tbody><tr><td>
1161
-
1162
- fileName
1163
-
1164
- </td><td>
1165
-
1166
- string
1167
-
1168
- </td><td>
1169
-
1170
- _(Optional)_ 文件名
1171
-
1172
- </td></tr>
1173
- <tr><td>
1174
-
1175
- password
1176
-
1177
- </td><td>
1178
-
1179
- string
1180
-
1181
- </td><td>
1182
-
1183
- _(Optional)_ 加密密码
1184
-
1185
- </td></tr>
1186
- <tr><td>
1187
-
1188
- fileType
1189
-
1190
- </td><td>
1191
-
1192
- 'epro' \| 'epro2'
1193
-
1194
- </td><td>
1195
-
1196
- _(Optional)_ 文件格式
1197
-
1198
- </td></tr>
1199
- </tbody></table>
1200
-
1201
- ## Returns
1202
-
1203
- Promise&lt;File \| undefined&gt;
1204
-
1205
- 原理图文件数据,`undefined` 表示当前未打开原理图图页或数据获取失败
1206
-
1207
- ## Remarks
1208
-
1209
- ADD since EDA v3.2.183 可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
1210
-
1211
- 注意:本接口需要启用 \*\*工程设计图 &gt; 文件导出\*\* 权限,没有权限调用将始终 `throw Error`
1212
-
1213
- / EDA v4.1.23
1214
-
1215
- ### getsymbolfilebysymboluuid
1216
-
1217
- # SYS\_FileManager.getSymbolFileBySymbolUuid() method
1218
-
1219
- > 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.
1220
-
1221
- Use symbol UUID get symbol file
1222
-
1223
- ## Signature
1224
-
1225
- ```typescript
1226
- function getSymbolFileBySymbolUuid(
1227
- symbolUuid: string | Array<string>,
1228
- libraryUuid?: string,
1229
- fileType?: 'elibz' | 'elibz2',
1230
- ): Promise<File | undefined>;
1231
- ```
1232
-
1233
- ## Parameters
1234
-
1235
- <table><thead><tr><th>
1236
-
1237
- Parameter
1238
-
1239
- </th><th>
1240
-
1241
- Type
1242
-
1243
- </th><th>
1244
-
1245
- Description
1246
-
1247
- </th></tr></thead>
1248
- <tbody><tr><td>
1249
-
1250
- symbolUuid
1251
-
1252
- </td><td>
1253
-
1254
- string \| Array&lt;string&gt;
1255
-
1256
- </td><td>
1257
-
1258
- Symbol UUID or symbol UUID list
1259
-
1260
- </td></tr>
1261
- <tr><td>
1262
-
1263
- libraryUuid
1264
-
1265
- </td><td>
1266
-
1267
- string
1268
-
1269
- </td><td>
1270
-
1271
- _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
1272
-
1273
- </td></tr>
1274
- <tr><td>
1275
-
1276
- fileType
1277
-
1278
- </td><td>
1279
-
1280
- 'elibz' \| 'elibz2'
1281
-
1282
- </td><td>
1283
-
1284
- _(Optional)_
1285
-
1286
- </td></tr>
1287
- </tbody></table>
1288
-
1289
- ## Returns
1290
-
1291
- Promise&lt;File \| undefined&gt;
1292
-
1293
- Symbol file data, `undefined` indicates that the data retrieval failed
1294
-
1295
- ## Remarks
1296
-
1297
- You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
1298
-
1299
- Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
1300
-
1301
- ## Example
1302
-
1303
- ```javascript
1304
- // 1. 列出系统库符号,取第一个的 UUID
1305
- const symbolList = await eda.lib_Symbol.search('', undefined, [], undefined, 5, 1);
1306
- const symbol = symbolList[0];
1307
-
1308
- // 2. 按符号 UUID 获取符号文件
1309
- const symbolFile = await eda.sys_FileManager.getSymbolFileBySymbolUuid(symbol.uuid);
1310
-
1311
- // 3. 输出符号与文件信息(size 单位为字节)
1312
- console.log('符号名:', symbol.name);
1313
- console.log('文件名:', symbolFile.name);
1314
- console.log('文件大小:', symbolFile.size);
1315
- ```
1316
-
1317
- ### importprojectbyprojectfile
1318
-
1319
- # SYS\_FileManager.importProjectByProjectFile() method
1320
-
1321
- > 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.
1322
-
1323
- Use project file import project
1324
-
1325
- ## Signature
1326
-
1327
- ```typescript
1328
- function importProjectByProjectFile(
1329
- projectFile: File,
1330
- fileType?:
1331
- | 'JLCEDA'
1332
- | 'JLCEDA Pro'
1333
- | 'EasyEDA'
1334
- | 'EasyEDA Pro'
1335
- | 'Allegro'
1336
- | 'OrCAD'
1337
- | 'EAGLE'
1338
- | 'KiCad'
1339
- | 'PADS'
1340
- | 'LTspice',
1341
- props?: {
1342
- importOption?:
1343
- | undefined
1344
- | ESYS_ImportProjectImportOption.IMPORT_DOCUMENT
1345
- | ESYS_ImportProjectImportOption.EXTRACT_LIBRARIES
1346
- | ESYS_ImportProjectImportOption.IMPORT_DOCUMENT_EXTRACT_LIBRARIES;
1347
- schematicObjectStyle?:
1348
- | undefined
1349
- | ESYS_ImportProjectSchematicObjectStyle.USE_SYSTEM_THEME
1350
- | ESYS_ImportProjectSchematicObjectStyle.USE_SOURCE_FILE_STYLE;
1351
- associateFootprint?: undefined | false | true;
1352
- associate3DModel?: undefined | false | true;
1353
- importFootprintNotesLayer?: undefined | false | true;
1354
- },
1355
- saveTo?:
1356
- | {
1357
- operation: 'New Project';
1358
- newProjectOwnerTeamUuid: string;
1359
- newProjectOwnerFolderUuid?: undefined | string;
1360
- newProjectName?: undefined | string;
1361
- newProjectFriendlyName?: undefined | string;
1362
- newProjectDescription?: undefined | string;
1363
- newProjectCollaborationMode?:
1364
- | undefined
1365
- | EDMT_ProjectCollaborationMode.STRICT
1366
- | EDMT_ProjectCollaborationMode.FREE;
1367
- }
1368
- | { operation: 'Existing Project'; existingProjectUuid: string },
1369
- librariesImportSetting?: {
1370
- ownerTeamUuid: string;
1371
- deviceClassification?: undefined | string[];
1372
- symbolClassification?: undefined | string[];
1373
- footprintClassification?: undefined | string[];
1374
- createDeviceForSingleSymbol?: undefined | false | true;
1375
- updateExistingLibrariesWithTheSameName?: undefined | false | true;
1376
- },
1377
- ): Promise<IDMT_BriefProjectItem | undefined>;
1378
- ```
1379
-
1380
- ## Parameters
1381
-
1382
- <table><thead><tr><th>
1383
-
1384
- Parameter
1385
-
1386
- </th><th>
1387
-
1388
- Type
1389
-
1390
- </th><th>
1391
-
1392
- Description
1393
-
1394
- </th></tr></thead>
1395
- <tbody><tr><td>
1396
-
1397
- projectFile
1398
-
1399
- </td><td>
1400
-
1401
- File
1402
-
1403
- </td><td>
1404
-
1405
- Project file
1406
-
1407
- </td></tr>
1408
- <tr><td>
1409
-
1410
- fileType
1411
-
1412
- </td><td>
1413
-
1414
- 'JLCEDA' \| 'JLCEDA Pro' \| 'EasyEDA' \| 'EasyEDA Pro' \| 'Allegro' \| 'OrCAD' \| 'EAGLE' \| 'KiCad' \| 'PADS' \| 'LTspice'
1415
-
1416
- </td><td>
1417
-
1418
- _(Optional)_ File type
1419
-
1420
- </td></tr>
1421
- <tr><td>
1422
-
1423
- props
1424
-
1425
- </td><td>
1426
-
1427
- { importOption?: undefined \| [ESYS\_ImportProjectImportOption.IMPORT\_DOCUMENT](../enums/ESYS_ImportProjectImportOption.md) \| [ESYS\_ImportProjectImportOption.EXTRACT\_LIBRARIES](../enums/ESYS_ImportProjectImportOption.md) \| [ESYS\_ImportProjectImportOption.IMPORT\_DOCUMENT\_EXTRACT\_LIBRARIES](../enums/ESYS_ImportProjectImportOption.md)<!-- -->; schematicObjectStyle?: undefined \| [ESYS\_ImportProjectSchematicObjectStyle.USE\_SYSTEM\_THEME](../enums/ESYS_ImportProjectSchematicObjectStyle.md) \| [ESYS\_ImportProjectSchematicObjectStyle.USE\_SOURCE\_FILE\_STYLE](../enums/ESYS_ImportProjectSchematicObjectStyle.md)<!-- -->; associateFootprint?: undefined \| false \| true; associate3DModel?: undefined \| false \| true; importFootprintNotesLayer?: undefined \| false \| true }
1428
-
1429
- </td><td>
1430
-
1431
- _(Optional)_ Import parameters. Refer to the configuration items in the \*\*Import\*\* window of the EDA front end
1432
-
1433
- </td></tr>
1434
- <tr><td>
1435
-
1436
- saveTo
1437
-
1438
- </td><td>
1439
-
1440
- { operation: 'New Project'; newProjectOwnerTeamUuid: string; newProjectOwnerFolderUuid?: undefined \| string; newProjectName?: undefined \| string; newProjectFriendlyName?: undefined \| string; newProjectDescription?: undefined \| string; newProjectCollaborationMode?: undefined \| [EDMT\_ProjectCollaborationMode.STRICT](../enums/EDMT_ProjectCollaborationMode.md) \| [EDMT\_ProjectCollaborationMode.FREE](../enums/EDMT_ProjectCollaborationMode.md) } \| { operation: 'Existing Project'; existingProjectUuid: string }
1441
-
1442
- </td><td>
1443
-
1444
- _(Optional)_ Save To project parameter
1445
-
1446
- </td></tr>
1447
- <tr><td>
1448
-
1449
- librariesImportSetting
1450
-
1451
- </td><td>
1452
-
1453
- \{ ownerTeamUuid: string; deviceClassification?: undefined \| string\[\]; symbolClassification?: undefined \| string\[\]; footprintClassification?: undefined \| string\[\]; createDeviceForSingleSymbol?: undefined \| false \| true; updateExistingLibrariesWithTheSameName?: undefined \| false \| true \}
1454
-
1455
- </td><td>
1456
-
1457
- _(Optional)_
1458
-
1459
- </td></tr>
1460
- </tbody></table>
1461
-
1462
- ## Returns
1463
-
1464
- Promise&lt;[IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md) \| undefined&gt;
1465
-
1466
- Brief project properties of the imported project
1467
-
1468
- ## Remarks
1469
-
1470
- Extracting library-related configurations is not supported yet. If the library needs to be extracted, it will be extracted according to the default configuration
1471
-
1472
- ### importprojectbyprojectfile_1
1473
-
1474
- # SYS\_FileManager.importProjectByProjectFile() method
1475
-
1476
- > 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.
1477
-
1478
- Use project file import project
1479
-
1480
- ## Signature
1481
-
1482
- ```typescript
1483
- function importProjectByProjectFile(
1484
- projectFile: File,
1485
- fileType?: 'Altium Designer' | 'Protel',
1486
- props?: {
1487
- importOption?:
1488
- | undefined
1489
- | ESYS_ImportProjectImportOption.IMPORT_DOCUMENT
1490
- | ESYS_ImportProjectImportOption.EXTRACT_LIBRARIES
1491
- | ESYS_ImportProjectImportOption.IMPORT_DOCUMENT_EXTRACT_LIBRARIES;
1492
- viaSolderMaskExpansion?:
1493
- | undefined
1494
- | ESYS_ImportProjectViaSolderMaskExpansion.ALL_COVER_OIL
1495
- | ESYS_ImportProjectViaSolderMaskExpansion.FOLLOW_ORIGINAL_SETTING;
1496
- boardOutlineSource?:
1497
- | undefined
1498
- | ESYS_ImportProjectBoardOutlineSource.FROM_KEEPOUT_LAYER
1499
- | ESYS_ImportProjectBoardOutlineSource.FROM_MECHANICAL_LAYER_1;
1500
- schematicObjectStyle?:
1501
- | undefined
1502
- | ESYS_ImportProjectSchematicObjectStyle.USE_SYSTEM_THEME
1503
- | ESYS_ImportProjectSchematicObjectStyle.USE_SOURCE_FILE_STYLE;
1504
- associateFootprint?: undefined | false | true;
1505
- associate3DModel?: undefined | false | true;
1506
- importFootprintNotesLayer?: undefined | false | true;
1507
- },
1508
- saveTo?:
1509
- | {
1510
- operation: 'New Project';
1511
- newProjectOwnerTeamUuid: string;
1512
- newProjectOwnerFolderUuid?: undefined | string;
1513
- newProjectName?: undefined | string;
1514
- newProjectFriendlyName?: undefined | string;
1515
- newProjectDescription?: undefined | string;
1516
- newProjectCollaborationMode?:
1517
- | undefined
1518
- | EDMT_ProjectCollaborationMode.STRICT
1519
- | EDMT_ProjectCollaborationMode.FREE;
1520
- }
1521
- | { operation: 'Existing Project'; existingProjectUuid: string },
1522
- librariesImportSetting?: {
1523
- ownerTeamUuid: string;
1524
- deviceClassification?: undefined | string[];
1525
- symbolClassification?: undefined | string[];
1526
- footprintClassification?: undefined | string[];
1527
- createDeviceForSingleSymbol?: undefined | false | true;
1528
- updateExistingLibrariesWithTheSameName?: undefined | false | true;
1529
- },
1530
- ): Promise<IDMT_BriefProjectItem | undefined>;
1531
- ```
1532
-
1533
- ## Parameters
1534
-
1535
- <table><thead><tr><th>
1536
-
1537
- Parameter
1538
-
1539
- </th><th>
1540
-
1541
- Type
1542
-
1543
- </th><th>
1544
-
1545
- Description
1546
-
1547
- </th></tr></thead>
1548
- <tbody><tr><td>
1549
-
1550
- projectFile
1551
-
1552
- </td><td>
1553
-
1554
- File
1555
-
1556
- </td><td>
1557
-
1558
- Project file
1559
-
1560
- </td></tr>
1561
- <tr><td>
1562
-
1563
- fileType
1564
-
1565
- </td><td>
1566
-
1567
- 'Altium Designer' \| 'Protel'
1568
-
1569
- </td><td>
1570
-
1571
- _(Optional)_ File type
1572
-
1573
- </td></tr>
1574
- <tr><td>
1575
-
1576
- props
1577
-
1578
- </td><td>
1579
-
1580
- { importOption?: undefined \| [ESYS\_ImportProjectImportOption.IMPORT\_DOCUMENT](../enums/ESYS_ImportProjectImportOption.md) \| [ESYS\_ImportProjectImportOption.EXTRACT\_LIBRARIES](../enums/ESYS_ImportProjectImportOption.md) \| [ESYS\_ImportProjectImportOption.IMPORT\_DOCUMENT\_EXTRACT\_LIBRARIES](../enums/ESYS_ImportProjectImportOption.md)<!-- -->; viaSolderMaskExpansion?: undefined \| [ESYS\_ImportProjectViaSolderMaskExpansion.ALL\_COVER\_OIL](../enums/ESYS_ImportProjectViaSolderMaskExpansion.md) \| [ESYS\_ImportProjectViaSolderMaskExpansion.FOLLOW\_ORIGINAL\_SETTING](../enums/ESYS_ImportProjectViaSolderMaskExpansion.md)<!-- -->; boardOutlineSource?: undefined \| [ESYS\_ImportProjectBoardOutlineSource.FROM\_KEEPOUT\_LAYER](../enums/ESYS_ImportProjectBoardOutlineSource.md) \| [ESYS\_ImportProjectBoardOutlineSource.FROM\_MECHANICAL\_LAYER\_1](../enums/ESYS_ImportProjectBoardOutlineSource.md)<!-- -->; schematicObjectStyle?: undefined \| [ESYS\_ImportProjectSchematicObjectStyle.USE\_SYSTEM\_THEME](../enums/ESYS_ImportProjectSchematicObjectStyle.md) \| [ESYS\_ImportProjectSchematicObjectStyle.USE\_SOURCE\_FILE\_STYLE](../enums/ESYS_ImportProjectSchematicObjectStyle.md)<!-- -->; associateFootprint?: undefined \| false \| true; associate3DModel?: undefined \| false \| true; importFootprintNotesLayer?: undefined \| false \| true }
1581
-
1582
- </td><td>
1583
-
1584
- _(Optional)_ Import parameters. Refer to the configuration items in the \*\*Import\*\* window of the EDA front end
1585
-
1586
- </td></tr>
1587
- <tr><td>
1588
-
1589
- saveTo
1590
-
1591
- </td><td>
1592
-
1593
- { operation: 'New Project'; newProjectOwnerTeamUuid: string; newProjectOwnerFolderUuid?: undefined \| string; newProjectName?: undefined \| string; newProjectFriendlyName?: undefined \| string; newProjectDescription?: undefined \| string; newProjectCollaborationMode?: undefined \| [EDMT\_ProjectCollaborationMode.STRICT](../enums/EDMT_ProjectCollaborationMode.md) \| [EDMT\_ProjectCollaborationMode.FREE](../enums/EDMT_ProjectCollaborationMode.md) } \| { operation: 'Existing Project'; existingProjectUuid: string }
1594
-
1595
- </td><td>
1596
-
1597
- _(Optional)_ Save To project parameter
1598
-
1599
- </td></tr>
1600
- <tr><td>
1601
-
1602
- librariesImportSetting
1603
-
1604
- </td><td>
1605
-
1606
- \{ ownerTeamUuid: string; deviceClassification?: undefined \| string\[\]; symbolClassification?: undefined \| string\[\]; footprintClassification?: undefined \| string\[\]; createDeviceForSingleSymbol?: undefined \| false \| true; updateExistingLibrariesWithTheSameName?: undefined \| false \| true \}
1607
-
1608
- </td><td>
1609
-
1610
- _(Optional)_
1611
-
1612
- </td></tr>
1613
- </tbody></table>
1614
-
1615
- ## Returns
1616
-
1617
- Promise&lt;[IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md) \| undefined&gt;
1618
-
1619
- Brief project properties of the imported project
1620
-
1621
- ## Remarks
1622
-
1623
- Extracting library-related configurations is not supported yet. If the library needs to be extracted, it will be extracted according to the default configuration
1624
-
1625
- ### setdocumentsource
1626
-
1627
- # SYS\_FileManager.setDocumentSource() method
1628
-
1629
- > 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.
1630
-
1631
- Modify Document source code
1632
-
1633
- ## Signature
1634
-
1635
- ```typescript
1636
- function setDocumentSource(source: string): Promise<boolean>;
1637
- ```
1638
-
1639
- ## Parameters
1640
-
1641
- <table><thead><tr><th>
1642
-
1643
- Parameter
1644
-
1645
- </th><th>
1646
-
1647
- Type
1648
-
1649
- </th><th>
1650
-
1651
- Description
1652
-
1653
- </th></tr></thead>
1654
- <tbody><tr><td>
1655
-
1656
- source
1657
-
1658
- </td><td>
1659
-
1660
- string
1661
-
1662
- </td><td>
1663
-
1664
- Document source code
1665
-
1666
- </td></tr>
1667
- </tbody></table>
1668
-
1669
- ## Returns
1670
-
1671
- Promise&lt;boolean&gt;
1672
-
1673
- Whether the modification was successful. If the input document source code format is incorrect, `false` is returned
1674
-
1675
- ## Example
1676
-
1677
- ```javascript
1678
- // 1. 读取当前文档源码
1679
- const source = await eda.sys_FileManager.getDocumentSource();
1680
-
1681
- // 2. 把源码原样写回文档(源码格式合法,返回 true 表示修改成功)
1682
- const modified = await eda.sys_FileManager.setDocumentSource(source);
1683
-
1684
- // 3. 输出修改结果
1685
- console.log('修改结果:', modified);
1686
- ```
1
+ # SYS\_FileManager class
2
+
3
+ System / file manager class
4
+
5
+ ## Signature
6
+
7
+ ```typescript
8
+ class SYS_FileManager
9
+ ```
10
+
11
+ ## Remarks
12
+
13
+ ## Methods
14
+
15
+ <table><thead><tr><th>
16
+
17
+ Method
18
+
19
+ </th><th>
20
+
21
+ Modifiers
22
+
23
+ </th><th>
24
+
25
+ Description
26
+
27
+ </th></tr></thead>
28
+ <tbody><tr><td>
29
+
30
+ [extractLibInfo(data)](./SYS_FileManager.md)
31
+
32
+ </td><td>
33
+
34
+ </td><td>
35
+
36
+ Extract the library configuration information from the file
37
+
38
+ </td></tr>
39
+ <tr><td>
40
+
41
+ [extractProjectInfo(data)](./SYS_FileManager.md)
42
+
43
+ </td><td>
44
+
45
+ </td><td>
46
+
47
+ Extract the project configuration information from the file
48
+
49
+ </td></tr>
50
+ <tr><td>
51
+
52
+ [getCbbFileByCbbUuid(cbbUuid, libraryUuid, props)](./SYS_FileManager.md)
53
+
54
+ </td><td>
55
+
56
+ </td><td>
57
+
58
+ **_(BETA)_** Use reuse block UUID get reuse block file
59
+
60
+ </td></tr>
61
+ <tr><td>
62
+
63
+ [getDeviceFileByDeviceUuid(deviceUuid, libraryUuid, fileType)](./SYS_FileManager.md)
64
+
65
+ </td><td>
66
+
67
+ </td><td>
68
+
69
+ Use device UUID get device file
70
+
71
+ </td></tr>
72
+ <tr><td>
73
+
74
+ [getDocumentFile(fileName, password, fileType)](./SYS_FileManager.md)
75
+
76
+ </td><td>
77
+
78
+ </td><td>
79
+
80
+ Get Document file
81
+
82
+ </td></tr>
83
+ <tr><td>
84
+
85
+ [getDocumentFootprintSources()](./SYS_FileManager.md)
86
+
87
+ </td><td>
88
+
89
+ </td><td>
90
+
91
+ **_(BETA)_** Get the document footprint source code
92
+
93
+ </td></tr>
94
+ <tr><td>
95
+
96
+ [getDocumentSource()](./SYS_FileManager.md)
97
+
98
+ </td><td>
99
+
100
+ </td><td>
101
+
102
+ **_(BETA)_** Get Document source code
103
+
104
+ </td></tr>
105
+ <tr><td>
106
+
107
+ [getFootprintFileByFootprintUuid(footprintUuid, libraryUuid, fileType)](./SYS_FileManager.md)
108
+
109
+ </td><td>
110
+
111
+ </td><td>
112
+
113
+ **_(BETA)_** Use footprint UUID get footprint file
114
+
115
+ </td></tr>
116
+ <tr><td>
117
+
118
+ [getPanelLibraryFileByPanelLibraryUuid(panelLibraryUuid, libraryUuid, fileType)](./SYS_FileManager.md)
119
+
120
+ </td><td>
121
+
122
+ </td><td>
123
+
124
+ **_(BETA)_** Use panel library UUID get panel library file
125
+
126
+ </td></tr>
127
+ <tr><td>
128
+
129
+ [getProjectFile(fileName, password, fileType)](./SYS_FileManager.md)
130
+
131
+ </td><td>
132
+
133
+ </td><td>
134
+
135
+ Get Project file
136
+
137
+ </td></tr>
138
+ <tr><td>
139
+
140
+ [getProjectFileByProjectUuid(projectUuid, fileName, password, fileType)](./SYS_FileManager.md)
141
+
142
+ </td><td>
143
+
144
+ </td><td>
145
+
146
+ **_(BETA)_** Use project UUID get project file
147
+
148
+ </td></tr>
149
+ <tr><td>
150
+
151
+ [getSchematicFile(fileName, password, fileType)](./SYS_FileManager.md)
152
+
153
+ </td><td>
154
+
155
+ </td><td>
156
+
157
+ **_(BETA)_** 获取原理图文件
158
+
159
+ </td></tr>
160
+ <tr><td>
161
+
162
+ [getSymbolFileBySymbolUuid(symbolUuid, libraryUuid, fileType)](./SYS_FileManager.md)
163
+
164
+ </td><td>
165
+
166
+ </td><td>
167
+
168
+ **_(BETA)_** Use symbol UUID get symbol file
169
+
170
+ </td></tr>
171
+ <tr><td>
172
+
173
+ [importProjectByProjectFile(projectFile, fileType, props, saveTo, librariesImportSetting)](./SYS_FileManager.md)
174
+
175
+ </td><td>
176
+
177
+ </td><td>
178
+
179
+ **_(BETA)_** Use project file import project
180
+
181
+ </td></tr>
182
+ <tr><td>
183
+
184
+ [importProjectByProjectFile(projectFile, fileType, props, saveTo, librariesImportSetting)](./SYS_FileManager.md)
185
+
186
+ </td><td>
187
+
188
+ </td><td>
189
+
190
+ **_(BETA)_** Use project file import project
191
+
192
+ </td></tr>
193
+ <tr><td>
194
+
195
+ [setDocumentSource(source)](./SYS_FileManager.md)
196
+
197
+ </td><td>
198
+
199
+ </td><td>
200
+
201
+ **_(BETA)_** Modify Document source code
202
+
203
+ </td></tr>
204
+ </tbody></table>
205
+
206
+ ---
207
+
208
+ ## 方法详情
209
+
210
+ ### extractlibinfo
211
+
212
+ # SYS\_FileManager.extractLibInfo() method
213
+
214
+ Extract the library configuration information from the file
215
+
216
+ ## Signature
217
+
218
+ ```typescript
219
+ function extractLibInfo(data: File | Array<File>): Promise<any>;
220
+ ```
221
+
222
+ ## Parameters
223
+
224
+ <table><thead><tr><th>
225
+
226
+ Parameter
227
+
228
+ </th><th>
229
+
230
+ Type
231
+
232
+ </th><th>
233
+
234
+ Description
235
+
236
+ </th></tr></thead>
237
+ <tbody><tr><td>
238
+
239
+ data
240
+
241
+ </td><td>
242
+
243
+ File \| Array&lt;File&gt;
244
+
245
+ </td><td>
246
+
247
+ Library file
248
+
249
+ </td></tr>
250
+ </tbody></table>
251
+
252
+ ## Returns
253
+
254
+ Promise&lt;any&gt;
255
+
256
+ Library configuration information
257
+
258
+ ## Example
259
+
260
+ ```javascript
261
+ // 1. 导出当前工程为文件
262
+ const projectFile = await eda.sys_FileManager.getProjectFile();
263
+
264
+ // 2. 从工程文件中提取库配置信息
265
+ const libInfo = await eda.sys_FileManager.extractLibInfo(projectFile);
266
+
267
+ // 3. 输出各类型库的引用数量(字段:devices / symbols / footprints / panelLibs)
268
+ console.log('器件数:', libInfo.devices.length);
269
+ console.log('符号数:', libInfo.symbols.length);
270
+ console.log('封装数:', libInfo.footprints.length);
271
+ console.log('面板库数:', libInfo.panelLibs.length);
272
+
273
+ // 4. 列出第一个封装的库信息(uuid 可用于后续按 UUID 下载封装文件)
274
+ const firstFootprint = libInfo.footprints[0];
275
+ console.log('首个封装标题:', firstFootprint?.title);
276
+ console.log('首个封装 uuid:', firstFootprint?.uuid);
277
+ ```
278
+
279
+ ### extractprojectinfo
280
+
281
+ # SYS\_FileManager.extractProjectInfo() method
282
+
283
+ Extract the project configuration information from the file
284
+
285
+ ## Signature
286
+
287
+ ```typescript
288
+ function extractProjectInfo(data: File): Promise<any>;
289
+ ```
290
+
291
+ ## Parameters
292
+
293
+ <table><thead><tr><th>
294
+
295
+ Parameter
296
+
297
+ </th><th>
298
+
299
+ Type
300
+
301
+ </th><th>
302
+
303
+ Description
304
+
305
+ </th></tr></thead>
306
+ <tbody><tr><td>
307
+
308
+ data
309
+
310
+ </td><td>
311
+
312
+ File
313
+
314
+ </td><td>
315
+
316
+ Project file
317
+
318
+ </td></tr>
319
+ </tbody></table>
320
+
321
+ ## Returns
322
+
323
+ Promise&lt;any&gt;
324
+
325
+ Project configuration information
326
+
327
+ ## Example
328
+
329
+ ```javascript
330
+ // 1. 导出当前工程为文件
331
+ const projectFile = await eda.sys_FileManager.getProjectFile();
332
+
333
+ // 2. 从工程文件中提取工程配置信息
334
+ const projectInfo = await eda.sys_FileManager.extractProjectInfo(projectFile);
335
+
336
+ // 3. 输出工程配置(title 是工程标题,editorVersion 是导出时的编辑器版本)
337
+ console.log('工程标题:', projectInfo.title);
338
+ console.log('编辑器版本:', projectInfo.editorVersion);
339
+ console.log('是否复用模块工程:', projectInfo.cbbProject);
340
+
341
+ // 4. 输出标签(工程未设置标签时 tags 为 undefined,兜底为空数组)
342
+ console.log('标签:', (projectInfo.tags ?? []).join('、'));
343
+ ```
344
+
345
+ ### getcbbfilebycbbuuid
346
+
347
+ # SYS\_FileManager.getCbbFileByCbbUuid() method
348
+
349
+ > 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.
350
+
351
+ Use reuse block UUID get reuse block file
352
+
353
+ ## Signature
354
+
355
+ ```typescript
356
+ function getCbbFileByCbbUuid(
357
+ cbbUuid: string,
358
+ libraryUuid?: string,
359
+ props?: {
360
+ fileName?: string;
361
+ password?: string;
362
+ fileType?: 'epro' | 'epro2';
363
+ templateSchematicUuid?: string;
364
+ templatePcbUuid?: string;
365
+ },
366
+ ): Promise<File | undefined>;
367
+ ```
368
+
369
+ ## Parameters
370
+
371
+ <table><thead><tr><th>
372
+
373
+ Parameter
374
+
375
+ </th><th>
376
+
377
+ Type
378
+
379
+ </th><th>
380
+
381
+ Description
382
+
383
+ </th></tr></thead>
384
+ <tbody><tr><td>
385
+
386
+ cbbUuid
387
+
388
+ </td><td>
389
+
390
+ string
391
+
392
+ </td><td>
393
+
394
+ Reuse block UUID
395
+
396
+ </td></tr>
397
+ <tr><td>
398
+
399
+ libraryUuid
400
+
401
+ </td><td>
402
+
403
+ string
404
+
405
+ </td><td>
406
+
407
+ _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
408
+
409
+ </td></tr>
410
+ <tr><td>
411
+
412
+ props
413
+
414
+ </td><td>
415
+
416
+ { fileName?: string; password?: string; fileType?: 'epro' \| 'epro2'; templateSchematicUuid?: string; templatePcbUuid?: string }
417
+
418
+ </td><td>
419
+
420
+ _(Optional)_
421
+
422
+ </td></tr>
423
+ </tbody></table>
424
+
425
+ ## Returns
426
+
427
+ Promise&lt;File \| undefined&gt;
428
+
429
+ Reuse block file data, `undefined` indicates that the data retrieval failed
430
+
431
+ ## Remarks
432
+
433
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
434
+
435
+ Note: This API requires the \*\*Team Module &gt; Download Module\*\* permission. Calling it without permission will always `throw Error`
436
+
437
+ ## Example
438
+
439
+ ```javascript
440
+ // 1. 列出系统库中的复用模块,取第一个的 UUID
441
+ const cbbList = await eda.lib_Cbb.search('', undefined, undefined, 5);
442
+ const cbb = cbbList[0];
443
+
444
+ // 2. 按复用模块 UUID 获取文件,props.fileName 指定导出文件名
445
+ const cbbFile = await eda.sys_FileManager.getCbbFileByCbbUuid(cbb.uuid, undefined, {
446
+ fileName: '嘉立创示例_复用模块',
447
+ });
448
+
449
+ // 3. 输出复用模块与文件信息(size 单位为字节)
450
+ console.log('复用模块名:', cbb.name);
451
+ console.log('文件名:', cbbFile.name);
452
+ console.log('文件大小:', cbbFile.size);
453
+ ```
454
+
455
+ ### getdevicefilebydeviceuuid
456
+
457
+ # SYS\_FileManager.getDeviceFileByDeviceUuid() method
458
+
459
+ Use device UUID get device file
460
+
461
+ ## Signature
462
+
463
+ ```typescript
464
+ function getDeviceFileByDeviceUuid(
465
+ deviceUuid: string | Array<string>,
466
+ libraryUuid?: string,
467
+ fileType?: 'elibz' | 'elibz2',
468
+ ): Promise<File | undefined>;
469
+ ```
470
+
471
+ ## Parameters
472
+
473
+ <table><thead><tr><th>
474
+
475
+ Parameter
476
+
477
+ </th><th>
478
+
479
+ Type
480
+
481
+ </th><th>
482
+
483
+ Description
484
+
485
+ </th></tr></thead>
486
+ <tbody><tr><td>
487
+
488
+ deviceUuid
489
+
490
+ </td><td>
491
+
492
+ string \| Array&lt;string&gt;
493
+
494
+ </td><td>
495
+
496
+ Device UUID or device UUID list
497
+
498
+ </td></tr>
499
+ <tr><td>
500
+
501
+ libraryUuid
502
+
503
+ </td><td>
504
+
505
+ string
506
+
507
+ </td><td>
508
+
509
+ _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
510
+
511
+ </td></tr>
512
+ <tr><td>
513
+
514
+ fileType
515
+
516
+ </td><td>
517
+
518
+ 'elibz' \| 'elibz2'
519
+
520
+ </td><td>
521
+
522
+ _(Optional)_
523
+
524
+ </td></tr>
525
+ </tbody></table>
526
+
527
+ ## Returns
528
+
529
+ Promise&lt;File \| undefined&gt;
530
+
531
+ Device file data, `undefined` indicates that the data retrieval failed
532
+
533
+ ## Remarks
534
+
535
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
536
+
537
+ Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
538
+
539
+ ## Example
540
+
541
+ ```javascript
542
+ // 1. 按立创编号精确搜索系统库器件,取第一个的 UUID
543
+ const deviceList = await eda.lib_Device.searchByProperties({ supplierId: 'C1523' }, undefined, undefined, undefined, 5, 1);
544
+ const device = deviceList[0];
545
+
546
+ // 2. 按器件 UUID 获取器件文件
547
+ const deviceFile = await eda.sys_FileManager.getDeviceFileByDeviceUuid(device.uuid);
548
+
549
+ // 3. 输出器件与文件信息(size 单位为字节)
550
+ console.log('器件名:', device.name);
551
+ console.log('文件名:', deviceFile.name);
552
+ console.log('文件大小:', deviceFile.size);
553
+ ```
554
+
555
+ ### getdocumentfile
556
+
557
+ # SYS\_FileManager.getDocumentFile() method
558
+
559
+ Get Document file
560
+
561
+ ## Signature
562
+
563
+ ```typescript
564
+ function getDocumentFile(
565
+ fileName?: string,
566
+ password?: string,
567
+ fileType?: 'epro' | 'epro2',
568
+ ): Promise<File | undefined>;
569
+ ```
570
+
571
+ ## Parameters
572
+
573
+ <table><thead><tr><th>
574
+
575
+ Parameter
576
+
577
+ </th><th>
578
+
579
+ Type
580
+
581
+ </th><th>
582
+
583
+ Description
584
+
585
+ </th></tr></thead>
586
+ <tbody><tr><td>
587
+
588
+ fileName
589
+
590
+ </td><td>
591
+
592
+ string
593
+
594
+ </td><td>
595
+
596
+ _(Optional)_ File name
597
+
598
+ </td></tr>
599
+ <tr><td>
600
+
601
+ password
602
+
603
+ </td><td>
604
+
605
+ string
606
+
607
+ </td><td>
608
+
609
+ _(Optional)_ Encrypted password
610
+
611
+ </td></tr>
612
+ <tr><td>
613
+
614
+ fileType
615
+
616
+ </td><td>
617
+
618
+ 'epro' \| 'epro2'
619
+
620
+ </td><td>
621
+
622
+ _(Optional)_ File format
623
+
624
+ </td></tr>
625
+ </tbody></table>
626
+
627
+ ## Returns
628
+
629
+ Promise&lt;File \| undefined&gt;
630
+
631
+ Document file data, `undefined` indicates that it is currently not open document or data retrieval failed
632
+
633
+ ## Remarks
634
+
635
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
636
+
637
+ Note: This API requires the \*\*Engineering Design &gt; File Export\*\* permission. Calling it without permission will always `throw Error`
638
+
639
+ ## Example
640
+
641
+ ```javascript
642
+ // 1. 导出当前文档为文件(文件名自动带上 epro2 扩展名)
643
+ const documentFile = await eda.sys_FileManager.getDocumentFile('嘉立创示例_文档导出');
644
+
645
+ // 2. 输出文件信息(size 单位为字节)
646
+ console.log('文件名:', documentFile.name);
647
+ console.log('文件大小:', documentFile.size);
648
+ ```
649
+
650
+ ### getdocumentfootprintsources
651
+
652
+ # SYS\_FileManager.getDocumentFootprintSources() method
653
+
654
+ > 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.
655
+
656
+ Get the document footprint source code
657
+
658
+ ## Signature
659
+
660
+ ```typescript
661
+ function getDocumentFootprintSources(): Promise<
662
+ Array<{ footprintUuid: string; documentSource: string }>
663
+ >;
664
+ ```
665
+
666
+ ## Returns
667
+
668
+ Promise&lt;Array&lt;{ footprintUuid: string; documentSource: string }&gt;&gt;
669
+
670
+ Document footprint source code data. An empty array is returned if the data retrieval fails
671
+
672
+ ## Example
673
+
674
+ ```javascript
675
+ // 1. 获取当前文档全部封装源码
676
+ const sources = await eda.sys_FileManager.getDocumentFootprintSources();
677
+
678
+ // 2. 输出封装数量与每个封装的源码长度
679
+ console.log('封装数量:', sources.length);
680
+ sources.forEach((item, i) => {
681
+ console.log(`[${i}] footprintUuid:`, item.footprintUuid, '源码长度:', item.documentSource.length);
682
+ });
683
+ ```
684
+
685
+ ### getdocumentsource
686
+
687
+ # SYS\_FileManager.getDocumentSource() method
688
+
689
+ > 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.
690
+
691
+ Get Document source code
692
+
693
+ ## Signature
694
+
695
+ ```typescript
696
+ function getDocumentSource(): Promise<string | undefined>;
697
+ ```
698
+
699
+ ## Returns
700
+
701
+ Promise&lt;string \| undefined&gt;
702
+
703
+ Document source code data, `undefined` indicates that it is currently not open document or data retrieval failed
704
+
705
+ ## Example
706
+
707
+ ```javascript
708
+ // 1. 读取当前文档源码
709
+ const source = await eda.sys_FileManager.getDocumentSource();
710
+
711
+ // 2. 输出源码长度与前 60 字符预览(DOCHEAD 开头的 JSON 分段结构)
712
+ console.log('源码长度:', source.length);
713
+ console.log('源码预览:', source.slice(0, 60));
714
+ ```
715
+
716
+ ### getfootprintfilebyfootprintuuid
717
+
718
+ # SYS\_FileManager.getFootprintFileByFootprintUuid() method
719
+
720
+ > 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.
721
+
722
+ Use footprint UUID get footprint file
723
+
724
+ ## Signature
725
+
726
+ ```typescript
727
+ function getFootprintFileByFootprintUuid(
728
+ footprintUuid: string | Array<string>,
729
+ libraryUuid?: string,
730
+ fileType?: 'elibz' | 'elibz2',
731
+ ): Promise<File | undefined>;
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 \| Array&lt;string&gt;
756
+
757
+ </td><td>
758
+
759
+ Footprint UUID or footprint UUID list
760
+
761
+ </td></tr>
762
+ <tr><td>
763
+
764
+ libraryUuid
765
+
766
+ </td><td>
767
+
768
+ string
769
+
770
+ </td><td>
771
+
772
+ _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
773
+
774
+ </td></tr>
775
+ <tr><td>
776
+
777
+ fileType
778
+
779
+ </td><td>
780
+
781
+ 'elibz' \| 'elibz2'
782
+
783
+ </td><td>
784
+
785
+ _(Optional)_
786
+
787
+ </td></tr>
788
+ </tbody></table>
789
+
790
+ ## Returns
791
+
792
+ Promise&lt;File \| undefined&gt;
793
+
794
+ Footprint file data, `undefined` indicates that the data retrieval failed
795
+
796
+ ## Remarks
797
+
798
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
799
+
800
+ Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
801
+
802
+ ## Example
803
+
804
+ ```javascript
805
+ // 1. 列出系统库封装,取第一个的 UUID
806
+ const footprintList = await eda.lib_Footprint.search('', undefined, [], undefined, 5, 1);
807
+ const footprint = footprintList[0];
808
+
809
+ // 2. 按封装 UUID 获取封装文件
810
+ const footprintFile = await eda.sys_FileManager.getFootprintFileByFootprintUuid(footprint.uuid);
811
+
812
+ // 3. 输出封装与文件信息(size 单位为字节)
813
+ console.log('封装名:', footprint.name);
814
+ console.log('文件名:', footprintFile.name);
815
+ console.log('文件大小:', footprintFile.size);
816
+ ```
817
+
818
+ ### getpanellibraryfilebypanellibraryuuid
819
+
820
+ # SYS\_FileManager.getPanelLibraryFileByPanelLibraryUuid() method
821
+
822
+ > 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.
823
+
824
+ Use panel library UUID get panel library file
825
+
826
+ ## Signature
827
+
828
+ ```typescript
829
+ function getPanelLibraryFileByPanelLibraryUuid(
830
+ panelLibraryUuid: string | Array<string>,
831
+ libraryUuid?: string,
832
+ fileType?: 'elibz' | 'elibz2',
833
+ ): Promise<File | undefined>;
834
+ ```
835
+
836
+ ## Parameters
837
+
838
+ <table><thead><tr><th>
839
+
840
+ Parameter
841
+
842
+ </th><th>
843
+
844
+ Type
845
+
846
+ </th><th>
847
+
848
+ Description
849
+
850
+ </th></tr></thead>
851
+ <tbody><tr><td>
852
+
853
+ panelLibraryUuid
854
+
855
+ </td><td>
856
+
857
+ string \| Array&lt;string&gt;
858
+
859
+ </td><td>
860
+
861
+ Panel library UUID or panel library UUID list
862
+
863
+ </td></tr>
864
+ <tr><td>
865
+
866
+ libraryUuid
867
+
868
+ </td><td>
869
+
870
+ string
871
+
872
+ </td><td>
873
+
874
+ _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
875
+
876
+ </td></tr>
877
+ <tr><td>
878
+
879
+ fileType
880
+
881
+ </td><td>
882
+
883
+ 'elibz' \| 'elibz2'
884
+
885
+ </td><td>
886
+
887
+ _(Optional)_
888
+
889
+ </td></tr>
890
+ </tbody></table>
891
+
892
+ ## Returns
893
+
894
+ Promise&lt;File \| undefined&gt;
895
+
896
+ Panel library file data, `undefined` indicates that the data retrieval failed
897
+
898
+ ## Remarks
899
+
900
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
901
+
902
+ Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
903
+
904
+ ## Example
905
+
906
+ ```javascript
907
+ // 1. 列出系统库面板库,取第一个的 UUID
908
+ const panelList = await eda.lib_PanelLibrary.search('', undefined, undefined, 5);
909
+ const panel = panelList[0];
910
+
911
+ // 2. 按面板库 UUID 获取面板库文件
912
+ const panelFile = await eda.sys_FileManager.getPanelLibraryFileByPanelLibraryUuid(panel.uuid);
913
+
914
+ // 3. 输出面板库与文件信息(size 单位为字节)
915
+ console.log('面板库名:', panel.name);
916
+ console.log('文件名:', panelFile.name);
917
+ console.log('文件大小:', panelFile.size);
918
+ ```
919
+
920
+ ### getprojectfile
921
+
922
+ # SYS\_FileManager.getProjectFile() method
923
+
924
+ Get Project file
925
+
926
+ ## Signature
927
+
928
+ ```typescript
929
+ function getProjectFile(
930
+ fileName?: string,
931
+ password?: string,
932
+ fileType?: 'epro' | 'epro2',
933
+ ): Promise<File | undefined>;
934
+ ```
935
+
936
+ ## Parameters
937
+
938
+ <table><thead><tr><th>
939
+
940
+ Parameter
941
+
942
+ </th><th>
943
+
944
+ Type
945
+
946
+ </th><th>
947
+
948
+ Description
949
+
950
+ </th></tr></thead>
951
+ <tbody><tr><td>
952
+
953
+ fileName
954
+
955
+ </td><td>
956
+
957
+ string
958
+
959
+ </td><td>
960
+
961
+ _(Optional)_ File name
962
+
963
+ </td></tr>
964
+ <tr><td>
965
+
966
+ password
967
+
968
+ </td><td>
969
+
970
+ string
971
+
972
+ </td><td>
973
+
974
+ _(Optional)_ Encrypted password
975
+
976
+ </td></tr>
977
+ <tr><td>
978
+
979
+ fileType
980
+
981
+ </td><td>
982
+
983
+ 'epro' \| 'epro2'
984
+
985
+ </td><td>
986
+
987
+ _(Optional)_ File format
988
+
989
+ </td></tr>
990
+ </tbody></table>
991
+
992
+ ## Returns
993
+
994
+ Promise&lt;File \| undefined&gt;
995
+
996
+ Project file data, `undefined` indicates that it is currently not open project or data retrieval failed
997
+
998
+ ## Remarks
999
+
1000
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
1001
+
1002
+ Note: This API requires the \*\*Project Management &gt; Download Project\*\* permission. Calling it without permission will always `throw Error`
1003
+
1004
+ ## Example
1005
+
1006
+ ```javascript
1007
+ // 1. 导出当前工程为文件(文件名自动带上 epro2 扩展名)
1008
+ const projectFile = await eda.sys_FileManager.getProjectFile('嘉立创示例_工程导出');
1009
+
1010
+ // 2. 输出文件信息(size 单位为字节)
1011
+ console.log('文件名:', projectFile.name);
1012
+ console.log('文件大小:', projectFile.size);
1013
+ ```
1014
+
1015
+ ### getprojectfilebyprojectuuid
1016
+
1017
+ # SYS\_FileManager.getProjectFileByProjectUuid() method
1018
+
1019
+ > 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.
1020
+
1021
+ Use project UUID get project file
1022
+
1023
+ ## Signature
1024
+
1025
+ ```typescript
1026
+ function getProjectFileByProjectUuid(
1027
+ projectUuid: string,
1028
+ fileName?: string,
1029
+ password?: string,
1030
+ fileType?: 'epro' | 'epro2',
1031
+ ): Promise<File | undefined>;
1032
+ ```
1033
+
1034
+ ## Parameters
1035
+
1036
+ <table><thead><tr><th>
1037
+
1038
+ Parameter
1039
+
1040
+ </th><th>
1041
+
1042
+ Type
1043
+
1044
+ </th><th>
1045
+
1046
+ Description
1047
+
1048
+ </th></tr></thead>
1049
+ <tbody><tr><td>
1050
+
1051
+ projectUuid
1052
+
1053
+ </td><td>
1054
+
1055
+ string
1056
+
1057
+ </td><td>
1058
+
1059
+ Project UUID
1060
+
1061
+ </td></tr>
1062
+ <tr><td>
1063
+
1064
+ fileName
1065
+
1066
+ </td><td>
1067
+
1068
+ string
1069
+
1070
+ </td><td>
1071
+
1072
+ _(Optional)_ File name
1073
+
1074
+ </td></tr>
1075
+ <tr><td>
1076
+
1077
+ password
1078
+
1079
+ </td><td>
1080
+
1081
+ string
1082
+
1083
+ </td><td>
1084
+
1085
+ _(Optional)_ Encrypted password
1086
+
1087
+ </td></tr>
1088
+ <tr><td>
1089
+
1090
+ fileType
1091
+
1092
+ </td><td>
1093
+
1094
+ 'epro' \| 'epro2'
1095
+
1096
+ </td><td>
1097
+
1098
+ _(Optional)_ File format
1099
+
1100
+ </td></tr>
1101
+ </tbody></table>
1102
+
1103
+ ## Returns
1104
+
1105
+ Promise&lt;File \| undefined&gt;
1106
+
1107
+ Project file data, `undefined` indicates that it is currently not open project or data retrieval failed
1108
+
1109
+ ## Remarks
1110
+
1111
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
1112
+
1113
+ Note: This API requires the \*\*Project Management &gt; Download Project\*\* permission. Calling it without permission will always `throw Error`
1114
+
1115
+ ## Example
1116
+
1117
+ ```javascript
1118
+ // 1. 获取当前工程的 UUID
1119
+ const projectInfo = await eda.dmt_Project.getCurrentProjectInfo();
1120
+
1121
+ // 2. 按工程 UUID 下载工程文件(文件名自动带上 epro2 扩展名)
1122
+ const projectFile = await eda.sys_FileManager.getProjectFileByProjectUuid(projectInfo.uuid, '嘉立创示例_按UUID导出');
1123
+
1124
+ // 3. 输出文件信息(size 单位为字节)
1125
+ console.log('文件名:', projectFile.name);
1126
+ console.log('文件大小:', projectFile.size);
1127
+ ```
1128
+
1129
+ ### getschematicfile
1130
+
1131
+ # SYS\_FileManager.getSchematicFile() method
1132
+
1133
+ > 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.
1134
+
1135
+ 获取原理图文件
1136
+
1137
+ ## Signature
1138
+
1139
+ ```typescript
1140
+ function getSchematicFile(
1141
+ fileName?: string,
1142
+ password?: string,
1143
+ fileType?: 'epro' | 'epro2',
1144
+ ): Promise<File | undefined>;
1145
+ ```
1146
+
1147
+ ## Parameters
1148
+
1149
+ <table><thead><tr><th>
1150
+
1151
+ Parameter
1152
+
1153
+ </th><th>
1154
+
1155
+ Type
1156
+
1157
+ </th><th>
1158
+
1159
+ Description
1160
+
1161
+ </th></tr></thead>
1162
+ <tbody><tr><td>
1163
+
1164
+ fileName
1165
+
1166
+ </td><td>
1167
+
1168
+ string
1169
+
1170
+ </td><td>
1171
+
1172
+ _(Optional)_ 文件名
1173
+
1174
+ </td></tr>
1175
+ <tr><td>
1176
+
1177
+ password
1178
+
1179
+ </td><td>
1180
+
1181
+ string
1182
+
1183
+ </td><td>
1184
+
1185
+ _(Optional)_ 加密密码
1186
+
1187
+ </td></tr>
1188
+ <tr><td>
1189
+
1190
+ fileType
1191
+
1192
+ </td><td>
1193
+
1194
+ 'epro' \| 'epro2'
1195
+
1196
+ </td><td>
1197
+
1198
+ _(Optional)_ 文件格式
1199
+
1200
+ </td></tr>
1201
+ </tbody></table>
1202
+
1203
+ ## Returns
1204
+
1205
+ Promise&lt;File \| undefined&gt;
1206
+
1207
+ 原理图文件数据,`undefined` 表示当前未打开原理图图页或数据获取失败
1208
+
1209
+ ## Remarks
1210
+
1211
+ ADD since EDA v3.2.183 可以使用 [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) 接口将文件导出到本地文件系统
1212
+
1213
+ 注意:本接口需要启用 \*\*工程设计图 &gt; 文件导出\*\* 权限,没有权限调用将始终 `throw Error`
1214
+
1215
+ / EDA v4.1.23
1216
+
1217
+ ### getsymbolfilebysymboluuid
1218
+
1219
+ # SYS\_FileManager.getSymbolFileBySymbolUuid() method
1220
+
1221
+ > 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.
1222
+
1223
+ Use symbol UUID get symbol file
1224
+
1225
+ ## Signature
1226
+
1227
+ ```typescript
1228
+ function getSymbolFileBySymbolUuid(
1229
+ symbolUuid: string | Array<string>,
1230
+ libraryUuid?: string,
1231
+ fileType?: 'elibz' | 'elibz2',
1232
+ ): Promise<File | undefined>;
1233
+ ```
1234
+
1235
+ ## Parameters
1236
+
1237
+ <table><thead><tr><th>
1238
+
1239
+ Parameter
1240
+
1241
+ </th><th>
1242
+
1243
+ Type
1244
+
1245
+ </th><th>
1246
+
1247
+ Description
1248
+
1249
+ </th></tr></thead>
1250
+ <tbody><tr><td>
1251
+
1252
+ symbolUuid
1253
+
1254
+ </td><td>
1255
+
1256
+ string \| Array&lt;string&gt;
1257
+
1258
+ </td><td>
1259
+
1260
+ Symbol UUID or symbol UUID list
1261
+
1262
+ </td></tr>
1263
+ <tr><td>
1264
+
1265
+ libraryUuid
1266
+
1267
+ </td><td>
1268
+
1269
+ string
1270
+
1271
+ </td><td>
1272
+
1273
+ _(Optional)_ Library UUID. It can be obtained using the APIs in [LIB\_LibrariesList](./LIB_LibrariesList.md)<!-- -->. If not passed in, it is the system library
1274
+
1275
+ </td></tr>
1276
+ <tr><td>
1277
+
1278
+ fileType
1279
+
1280
+ </td><td>
1281
+
1282
+ 'elibz' \| 'elibz2'
1283
+
1284
+ </td><td>
1285
+
1286
+ _(Optional)_
1287
+
1288
+ </td></tr>
1289
+ </tbody></table>
1290
+
1291
+ ## Returns
1292
+
1293
+ Promise&lt;File \| undefined&gt;
1294
+
1295
+ Symbol file data, `undefined` indicates that the data retrieval failed
1296
+
1297
+ ## Remarks
1298
+
1299
+ You can use [SYS\_FileSystem.saveFile()](./SYS_FileSystem.md) API export the file to the local file system
1300
+
1301
+ Note: This API requires the \*\*Team Library &gt; Download Library\*\* permission. Calling it without permission will always `throw Error`
1302
+
1303
+ ## Example
1304
+
1305
+ ```javascript
1306
+ // 1. 列出系统库符号,取第一个的 UUID
1307
+ const symbolList = await eda.lib_Symbol.search('', undefined, [], undefined, 5, 1);
1308
+ const symbol = symbolList[0];
1309
+
1310
+ // 2. 按符号 UUID 获取符号文件
1311
+ const symbolFile = await eda.sys_FileManager.getSymbolFileBySymbolUuid(symbol.uuid);
1312
+
1313
+ // 3. 输出符号与文件信息(size 单位为字节)
1314
+ console.log('符号名:', symbol.name);
1315
+ console.log('文件名:', symbolFile.name);
1316
+ console.log('文件大小:', symbolFile.size);
1317
+ ```
1318
+
1319
+ ### importprojectbyprojectfile
1320
+
1321
+ # SYS\_FileManager.importProjectByProjectFile() method
1322
+
1323
+ > 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.
1324
+
1325
+ Use project file import project
1326
+
1327
+ ## Signature
1328
+
1329
+ ```typescript
1330
+ function importProjectByProjectFile(
1331
+ projectFile: File,
1332
+ fileType?:
1333
+ | 'JLCEDA'
1334
+ | 'JLCEDA Pro'
1335
+ | 'EasyEDA'
1336
+ | 'EasyEDA Pro'
1337
+ | 'Allegro'
1338
+ | 'OrCAD'
1339
+ | 'EAGLE'
1340
+ | 'KiCad'
1341
+ | 'PADS'
1342
+ | 'LTspice',
1343
+ props?: {
1344
+ importOption?: ESYS_ImportProjectImportOption;
1345
+ schematicObjectStyle?: ESYS_ImportProjectSchematicObjectStyle;
1346
+ associateFootprint?: boolean;
1347
+ associate3DModel?: boolean;
1348
+ importFootprintNotesLayer?: boolean;
1349
+ },
1350
+ saveTo?:
1351
+ | {
1352
+ operation: 'New Project';
1353
+ newProjectOwnerTeamUuid: IDMT_TeamItem['uuid'];
1354
+ newProjectOwnerFolderUuid?: IDMT_FolderItem['uuid'];
1355
+ newProjectName?: string;
1356
+ newProjectFriendlyName?: string;
1357
+ newProjectDescription?: string;
1358
+ newProjectCollaborationMode?: EDMT_ProjectCollaborationMode;
1359
+ }
1360
+ | { operation: 'Existing Project'; existingProjectUuid: IDMT_BriefProjectItem['uuid'] }
1361
+ | { operation: 'Offline Client Local Path'; folderPath: string },
1362
+ librariesImportSetting?: {
1363
+ ownerTeamUuid: IDMT_TeamItem['uuid'];
1364
+ deviceClassification?: Array<string>;
1365
+ symbolClassification?: Array<string>;
1366
+ footprintClassification?: Array<string>;
1367
+ createDeviceForSingleSymbol?: boolean;
1368
+ updateExistingLibrariesWithTheSameName?: boolean;
1369
+ },
1370
+ ): Promise<IDMT_BriefProjectItem | undefined>;
1371
+ ```
1372
+
1373
+ ## Parameters
1374
+
1375
+ <table><thead><tr><th>
1376
+
1377
+ Parameter
1378
+
1379
+ </th><th>
1380
+
1381
+ Type
1382
+
1383
+ </th><th>
1384
+
1385
+ Description
1386
+
1387
+ </th></tr></thead>
1388
+ <tbody><tr><td>
1389
+
1390
+ projectFile
1391
+
1392
+ </td><td>
1393
+
1394
+ File
1395
+
1396
+ </td><td>
1397
+
1398
+ Project file
1399
+
1400
+ </td></tr>
1401
+ <tr><td>
1402
+
1403
+ fileType
1404
+
1405
+ </td><td>
1406
+
1407
+ 'JLCEDA' \| 'JLCEDA Pro' \| 'EasyEDA' \| 'EasyEDA Pro' \| 'Allegro' \| 'OrCAD' \| 'EAGLE' \| 'KiCad' \| 'PADS' \| 'LTspice'
1408
+
1409
+ </td><td>
1410
+
1411
+ _(Optional)_ File type
1412
+
1413
+ </td></tr>
1414
+ <tr><td>
1415
+
1416
+ props
1417
+
1418
+ </td><td>
1419
+
1420
+ { importOption?: [ESYS\_ImportProjectImportOption](../enums/ESYS_ImportProjectImportOption.md)<!-- -->; schematicObjectStyle?: [ESYS\_ImportProjectSchematicObjectStyle](../enums/ESYS_ImportProjectSchematicObjectStyle.md)<!-- -->; associateFootprint?: boolean; associate3DModel?: boolean; importFootprintNotesLayer?: boolean }
1421
+
1422
+ </td><td>
1423
+
1424
+ _(Optional)_ Import parameters. Refer to the configuration items in the \*\*Import\*\* window of the EDA front end
1425
+
1426
+ </td></tr>
1427
+ <tr><td>
1428
+
1429
+ saveTo
1430
+
1431
+ </td><td>
1432
+
1433
+ { operation: 'New Project'; newProjectOwnerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; newProjectOwnerFolderUuid?: [IDMT\_FolderItem](../interfaces/IDMT_FolderItem.md)<!-- -->\['uuid'\]; newProjectName?: string; newProjectFriendlyName?: string; newProjectDescription?: string; newProjectCollaborationMode?: [EDMT\_ProjectCollaborationMode](../enums/EDMT_ProjectCollaborationMode.md) } \| { operation: 'Existing Project'; existingProjectUuid: [IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md)<!-- -->\['uuid'\] } \| { operation: 'Offline Client Local Path'; folderPath: string }
1434
+
1435
+ </td><td>
1436
+
1437
+ _(Optional)_ Save To project parameter
1438
+
1439
+ </td></tr>
1440
+ <tr><td>
1441
+
1442
+ librariesImportSetting
1443
+
1444
+ </td><td>
1445
+
1446
+ { ownerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; deviceClassification?: Array&lt;string&gt;; symbolClassification?: Array&lt;string&gt;; footprintClassification?: Array&lt;string&gt;; createDeviceForSingleSymbol?: boolean; updateExistingLibrariesWithTheSameName?: boolean }
1447
+
1448
+ </td><td>
1449
+
1450
+ _(Optional)_ 库导入配置
1451
+
1452
+ </td></tr>
1453
+ </tbody></table>
1454
+
1455
+ ## Returns
1456
+
1457
+ Promise&lt;[IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md) \| undefined&gt;
1458
+
1459
+ Brief project properties of the imported project
1460
+
1461
+ ## Remarks
1462
+
1463
+ Extracting library-related configurations is not supported yet. If the library needs to be extracted, it will be extracted according to the default configuration
1464
+
1465
+ ### importprojectbyprojectfile_1
1466
+
1467
+ # SYS\_FileManager.importProjectByProjectFile() method
1468
+
1469
+ > 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.
1470
+
1471
+ Use project file import project
1472
+
1473
+ ## Signature
1474
+
1475
+ ```typescript
1476
+ function importProjectByProjectFile(
1477
+ projectFile: File,
1478
+ fileType?: 'Altium Designer' | 'Protel',
1479
+ props?: {
1480
+ importOption?: ESYS_ImportProjectImportOption;
1481
+ viaSolderMaskExpansion?: ESYS_ImportProjectViaSolderMaskExpansion;
1482
+ boardOutlineSource?: ESYS_ImportProjectBoardOutlineSource;
1483
+ schematicObjectStyle?: ESYS_ImportProjectSchematicObjectStyle;
1484
+ associateFootprint?: boolean;
1485
+ associate3DModel?: boolean;
1486
+ importFootprintNotesLayer?: boolean;
1487
+ },
1488
+ saveTo?:
1489
+ | {
1490
+ operation: 'New Project';
1491
+ newProjectOwnerTeamUuid: IDMT_TeamItem['uuid'];
1492
+ newProjectOwnerFolderUuid?: IDMT_FolderItem['uuid'];
1493
+ newProjectName?: string;
1494
+ newProjectFriendlyName?: string;
1495
+ newProjectDescription?: string;
1496
+ newProjectCollaborationMode?: EDMT_ProjectCollaborationMode;
1497
+ }
1498
+ | { operation: 'Existing Project'; existingProjectUuid: IDMT_BriefProjectItem['uuid'] }
1499
+ | { operation: 'Offline Client Local Path'; folderPath: string },
1500
+ librariesImportSetting?: {
1501
+ ownerTeamUuid: IDMT_TeamItem['uuid'];
1502
+ deviceClassification?: Array<string>;
1503
+ symbolClassification?: Array<string>;
1504
+ footprintClassification?: Array<string>;
1505
+ createDeviceForSingleSymbol?: boolean;
1506
+ updateExistingLibrariesWithTheSameName?: boolean;
1507
+ },
1508
+ ): Promise<IDMT_BriefProjectItem | undefined>;
1509
+ ```
1510
+
1511
+ ## Parameters
1512
+
1513
+ <table><thead><tr><th>
1514
+
1515
+ Parameter
1516
+
1517
+ </th><th>
1518
+
1519
+ Type
1520
+
1521
+ </th><th>
1522
+
1523
+ Description
1524
+
1525
+ </th></tr></thead>
1526
+ <tbody><tr><td>
1527
+
1528
+ projectFile
1529
+
1530
+ </td><td>
1531
+
1532
+ File
1533
+
1534
+ </td><td>
1535
+
1536
+ Project file
1537
+
1538
+ </td></tr>
1539
+ <tr><td>
1540
+
1541
+ fileType
1542
+
1543
+ </td><td>
1544
+
1545
+ 'Altium Designer' \| 'Protel'
1546
+
1547
+ </td><td>
1548
+
1549
+ _(Optional)_ File type
1550
+
1551
+ </td></tr>
1552
+ <tr><td>
1553
+
1554
+ props
1555
+
1556
+ </td><td>
1557
+
1558
+ { importOption?: [ESYS\_ImportProjectImportOption](../enums/ESYS_ImportProjectImportOption.md)<!-- -->; viaSolderMaskExpansion?: [ESYS\_ImportProjectViaSolderMaskExpansion](../enums/ESYS_ImportProjectViaSolderMaskExpansion.md)<!-- -->; boardOutlineSource?: [ESYS\_ImportProjectBoardOutlineSource](../enums/ESYS_ImportProjectBoardOutlineSource.md)<!-- -->; schematicObjectStyle?: [ESYS\_ImportProjectSchematicObjectStyle](../enums/ESYS_ImportProjectSchematicObjectStyle.md)<!-- -->; associateFootprint?: boolean; associate3DModel?: boolean; importFootprintNotesLayer?: boolean }
1559
+
1560
+ </td><td>
1561
+
1562
+ _(Optional)_ Import parameters. Refer to the configuration items in the \*\*Import\*\* window of the EDA front end
1563
+
1564
+ </td></tr>
1565
+ <tr><td>
1566
+
1567
+ saveTo
1568
+
1569
+ </td><td>
1570
+
1571
+ { operation: 'New Project'; newProjectOwnerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; newProjectOwnerFolderUuid?: [IDMT\_FolderItem](../interfaces/IDMT_FolderItem.md)<!-- -->\['uuid'\]; newProjectName?: string; newProjectFriendlyName?: string; newProjectDescription?: string; newProjectCollaborationMode?: [EDMT\_ProjectCollaborationMode](../enums/EDMT_ProjectCollaborationMode.md) } \| { operation: 'Existing Project'; existingProjectUuid: [IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md)<!-- -->\['uuid'\] } \| { operation: 'Offline Client Local Path'; folderPath: string }
1572
+
1573
+ </td><td>
1574
+
1575
+ _(Optional)_ Save To project parameter
1576
+
1577
+ </td></tr>
1578
+ <tr><td>
1579
+
1580
+ librariesImportSetting
1581
+
1582
+ </td><td>
1583
+
1584
+ { ownerTeamUuid: [IDMT\_TeamItem](../interfaces/IDMT_TeamItem.md)<!-- -->\['uuid'\]; deviceClassification?: Array&lt;string&gt;; symbolClassification?: Array&lt;string&gt;; footprintClassification?: Array&lt;string&gt;; createDeviceForSingleSymbol?: boolean; updateExistingLibrariesWithTheSameName?: boolean }
1585
+
1586
+ </td><td>
1587
+
1588
+ _(Optional)_ 库导入配置
1589
+
1590
+ </td></tr>
1591
+ </tbody></table>
1592
+
1593
+ ## Returns
1594
+
1595
+ Promise&lt;[IDMT\_BriefProjectItem](../interfaces/IDMT_BriefProjectItem.md) \| undefined&gt;
1596
+
1597
+ Brief project properties of the imported project
1598
+
1599
+ ## Remarks
1600
+
1601
+ Extracting library-related configurations is not supported yet. If the library needs to be extracted, it will be extracted according to the default configuration
1602
+
1603
+ ### setdocumentsource
1604
+
1605
+ # SYS\_FileManager.setDocumentSource() method
1606
+
1607
+ > 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.
1608
+
1609
+ Modify Document source code
1610
+
1611
+ ## Signature
1612
+
1613
+ ```typescript
1614
+ function setDocumentSource(source: string): Promise<boolean>;
1615
+ ```
1616
+
1617
+ ## Parameters
1618
+
1619
+ <table><thead><tr><th>
1620
+
1621
+ Parameter
1622
+
1623
+ </th><th>
1624
+
1625
+ Type
1626
+
1627
+ </th><th>
1628
+
1629
+ Description
1630
+
1631
+ </th></tr></thead>
1632
+ <tbody><tr><td>
1633
+
1634
+ source
1635
+
1636
+ </td><td>
1637
+
1638
+ string
1639
+
1640
+ </td><td>
1641
+
1642
+ Document source code
1643
+
1644
+ </td></tr>
1645
+ </tbody></table>
1646
+
1647
+ ## Returns
1648
+
1649
+ Promise&lt;boolean&gt;
1650
+
1651
+ Whether the modification was successful. If the input document source code format is incorrect, `false` is returned
1652
+
1653
+ ## Example
1654
+
1655
+ ```javascript
1656
+ // 1. 读取当前文档源码
1657
+ const source = await eda.sys_FileManager.getDocumentSource();
1658
+
1659
+ // 2. 把源码原样写回文档(源码格式合法,返回 true 表示修改成功)
1660
+ const modified = await eda.sys_FileManager.setDocumentSource(source);
1661
+
1662
+ // 3. 输出修改结果
1663
+ console.log('修改结果:', modified);
1664
+ ```