@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,1477 +1,1482 @@
1
- # DMT\_Schematic class
2
-
3
- Document tree / Schematic management class
4
-
5
- ## Signature
6
-
7
- ```typescript
8
- class DMT_Schematic
9
- ```
10
-
11
- ## Remarks
12
-
13
- Operations related to schematic management in the currently open project
14
-
15
- ## Methods
16
-
17
- <table><thead><tr><th>
18
-
19
- Method
20
-
21
- </th><th>
22
-
23
- Modifiers
24
-
25
- </th><th>
26
-
27
- Description
28
-
29
- </th></tr></thead>
30
- <tbody><tr><td>
31
-
32
- [copySchematic(schematicUuid, boardName)](./DMT_Schematic.md)
33
-
34
- </td><td>
35
-
36
- </td><td>
37
-
38
- **_(BETA)_** Copy Schematic
39
-
40
- </td></tr>
41
- <tr><td>
42
-
43
- [copySchematicPage(schematicPageUuid, schematicUuid)](./DMT_Schematic.md)
44
-
45
- </td><td>
46
-
47
- </td><td>
48
-
49
- **_(BETA)_** Copy Schematic sheet
50
-
51
- </td></tr>
52
- <tr><td>
53
-
54
- [createSchematic(boardName)](./DMT_Schematic.md)
55
-
56
- </td><td>
57
-
58
- </td><td>
59
-
60
- **_(BETA)_** Create Schematic
61
-
62
- </td></tr>
63
- <tr><td>
64
-
65
- [createSchematicPage(schematicUuid)](./DMT_Schematic.md)
66
-
67
- </td><td>
68
-
69
- </td><td>
70
-
71
- **_(BETA)_** Create Schematic sheet
72
-
73
- </td></tr>
74
- <tr><td>
75
-
76
- [deleteSchematic(schematicUuid)](./DMT_Schematic.md)
77
-
78
- </td><td>
79
-
80
- </td><td>
81
-
82
- **_(BETA)_** Delete Schematic
83
-
84
- </td></tr>
85
- <tr><td>
86
-
87
- [deleteSchematicPage(schematicPageUuid)](./DMT_Schematic.md)
88
-
89
- </td><td>
90
-
91
- </td><td>
92
-
93
- **_(BETA)_** Delete Schematic sheet
94
-
95
- </td></tr>
96
- <tr><td>
97
-
98
- [getAllSchematicPagesInfo()](./DMT_Schematic.md)
99
-
100
- </td><td>
101
-
102
- </td><td>
103
-
104
- **_(BETA)_** Get all in the project schematic sheet detailed properties of
105
-
106
- </td></tr>
107
- <tr><td>
108
-
109
- [getAllSchematicsInfo()](./DMT_Schematic.md)
110
-
111
- </td><td>
112
-
113
- </td><td>
114
-
115
- **_(BETA)_** Get all in the project schematic detailed properties of
116
-
117
- </td></tr>
118
- <tr><td>
119
-
120
- [getCurrentSchematicAllSchematicPagesInfo()](./DMT_Schematic.md)
121
-
122
- </td><td>
123
-
124
- </td><td>
125
-
126
- **_(BETA)_** Get the detailed properties of all schematic sheets in the current schematic
127
-
128
- </td></tr>
129
- <tr><td>
130
-
131
- [getCurrentSchematicInfo()](./DMT_Schematic.md)
132
-
133
- </td><td>
134
-
135
- </td><td>
136
-
137
- **_(BETA)_** Get detailed properties of Current schematic
138
-
139
- </td></tr>
140
- <tr><td>
141
-
142
- [getCurrentSchematicPageInfo()](./DMT_Schematic.md)
143
-
144
- </td><td>
145
-
146
- </td><td>
147
-
148
- **_(BETA)_** Get detailed properties of Current schematic sheet
149
-
150
- </td></tr>
151
- <tr><td>
152
-
153
- [getSchematicInfo(schematicUuid)](./DMT_Schematic.md)
154
-
155
- </td><td>
156
-
157
- </td><td>
158
-
159
- **_(BETA)_** Get detailed properties of Schematic
160
-
161
- </td></tr>
162
- <tr><td>
163
-
164
- [getSchematicPageInfo(schematicPageUuid)](./DMT_Schematic.md)
165
-
166
- </td><td>
167
-
168
- </td><td>
169
-
170
- **_(BETA)_** Get detailed properties of Schematic sheet
171
-
172
- </td></tr>
173
- <tr><td>
174
-
175
- [modifySchematicName(schematicUuid, schematicName)](./DMT_Schematic.md)
176
-
177
- </td><td>
178
-
179
- </td><td>
180
-
181
- **_(BETA)_** Modify Schematic name
182
-
183
- </td></tr>
184
- <tr><td>
185
-
186
- [modifySchematicPageName(schematicPageUuid, schematicPageName)](./DMT_Schematic.md)
187
-
188
- </td><td>
189
-
190
- </td><td>
191
-
192
- **_(BETA)_** Modify Schematic sheet name
193
-
194
- </td></tr>
195
- <tr><td>
196
-
197
- [modifySchematicPageTitleBlock(showTitleBlock, titleBlockData)](./DMT_Schematic.md)
198
-
199
- </td><td>
200
-
201
- </td><td>
202
-
203
- **_(BETA)_** Modify the title block of a schematic sheet
204
-
205
- </td></tr>
206
- <tr><td>
207
-
208
- [reorderSchematicPages(schematicUuid, schematicPageItemsArray)](./DMT_Schematic.md)
209
-
210
- </td><td>
211
-
212
- </td><td>
213
-
214
- **_(BETA)_** Reorder schematic sheets
215
-
216
- </td></tr>
217
- </tbody></table>
218
-
219
- ---
220
-
221
- ## 方法详情
222
-
223
- ### copyschematic
224
-
225
- # DMT\_Schematic.copySchematic() method
226
-
227
- > 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.
228
-
229
- Copy Schematic
230
-
231
- ## Signature
232
-
233
- ```typescript
234
- function copySchematic(schematicUuid: string, boardName?: string): Promise<string | undefined>;
235
- ```
236
-
237
- ## Parameters
238
-
239
- <table><thead><tr><th>
240
-
241
- Parameter
242
-
243
- </th><th>
244
-
245
- Type
246
-
247
- </th><th>
248
-
249
- Description
250
-
251
- </th></tr></thead>
252
- <tbody><tr><td>
253
-
254
- schematicUuid
255
-
256
- </td><td>
257
-
258
- string
259
-
260
- </td><td>
261
-
262
- Source schematic UUID
263
-
264
- </td></tr>
265
- <tr><td>
266
-
267
- boardName
268
-
269
- </td><td>
270
-
271
- string
272
-
273
- </td><td>
274
-
275
- _(Optional)_ Name of the board the new schematic belongs to. If not specified, it is a free schematic
276
-
277
- </td></tr>
278
- </tbody></table>
279
-
280
- ## Returns
281
-
282
- Promise&lt;string \| undefined&gt;
283
-
284
- New schematic UUID. If it is `undefined`<!-- -->, the copy failed
285
-
286
- ## Remarks
287
-
288
- If the schematic is already associated with a reuse block (a reuse block symbol with the same name exists in the project library), copying the schematic will also create a new reuse block symbol
289
-
290
- ## Example
291
-
292
- ```javascript
293
- // 1. 创建专用源原理图(自带图页 p1),等 1.5s 同步
294
- const sourceUuid = await eda.dmt_Schematic.createSchematic();
295
- await new Promise(r => setTimeout(r, 1500));
296
-
297
- // 2. 复制源原理图,返回副本 UUID
298
- const copiedUuid = await eda.dmt_Schematic.copySchematic(sourceUuid);
299
- await new Promise(r => setTimeout(r, 1500));
300
-
301
- // 3. 回读副本,确认名称与图页被完整复制
302
- const copyInfo = await eda.dmt_Schematic.getSchematicInfo(copiedUuid);
303
- console.log('copiedUuid:', copiedUuid);
304
- console.log('copyName:', copyInfo?.name);
305
- console.log('copyPages:', (copyInfo?.page || []).map(p => p.name).join(', '));
306
-
307
- // 4. 清理本例创建的两个原理图(先删副本再删源),保持工程整洁
308
- await new Promise(r => setTimeout(r, 1000));
309
- const deletedCopy = await eda.dmt_Schematic.deleteSchematic(copiedUuid);
310
- console.log('deleted:', deletedCopy);
311
- await new Promise(r => setTimeout(r, 1000));
312
- const deletedSource = await eda.dmt_Schematic.deleteSchematic(sourceUuid);
313
- console.log('deleted:', deletedSource);
314
- ```
315
-
316
- ### copyschematicpage
317
-
318
- # DMT\_Schematic.copySchematicPage() method
319
-
320
- > 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.
321
-
322
- Copy Schematic sheet
323
-
324
- ## Signature
325
-
326
- ```typescript
327
- function copySchematicPage(
328
- schematicPageUuid: string,
329
- schematicUuid?: string,
330
- ): Promise<string | undefined>;
331
- ```
332
-
333
- ## Parameters
334
-
335
- <table><thead><tr><th>
336
-
337
- Parameter
338
-
339
- </th><th>
340
-
341
- Type
342
-
343
- </th><th>
344
-
345
- Description
346
-
347
- </th></tr></thead>
348
- <tbody><tr><td>
349
-
350
- schematicPageUuid
351
-
352
- </td><td>
353
-
354
- string
355
-
356
- </td><td>
357
-
358
- Source schematic sheet UUID
359
-
360
- </td></tr>
361
- <tr><td>
362
-
363
- schematicUuid
364
-
365
- </td><td>
366
-
367
- string
368
-
369
- </td><td>
370
-
371
- _(Optional)_ Target schematic UUID. If not specified, it is the current schematic
372
-
373
- </td></tr>
374
- </tbody></table>
375
-
376
- ## Returns
377
-
378
- Promise&lt;string \| undefined&gt;
379
-
380
- New schematic sheet UUID. If it is `undefined`<!-- -->, the copy failed
381
-
382
- ## Example
383
-
384
- ```javascript
385
- // 1. 创建专用测试原理图(自带图页 p1 作为复制源),等 1.5s 同步
386
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
387
- await new Promise(r => setTimeout(r, 1500));
388
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
389
- const sourcePageUuid = info.page[0].uuid;
390
-
391
- // 2. 复制该图页,目标显式指定为同一原理图,返回新图页 UUID
392
- const copiedUuid = await eda.dmt_Schematic.copySchematicPage(sourcePageUuid, schematicUuid);
393
- await new Promise(r => setTimeout(r, 1500));
394
-
395
- // 3. 回读副本图页,确认名称与归属
396
- const copyPage = await eda.dmt_Schematic.getSchematicPageInfo(copiedUuid);
397
- console.log('copiedUuid:', copiedUuid);
398
- console.log('copyPageName:', copyPage?.name);
399
- console.log('belongsToSchematic:', copyPage?.parentSchematicUuid === schematicUuid);
400
-
401
- // 4. 清理本例创建的原理图(副本图页随之删除)
402
- await new Promise(r => setTimeout(r, 1000));
403
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
404
- console.log('deleted:', deleted);
405
- ```
406
-
407
- ### createschematic
408
-
409
- # DMT\_Schematic.createSchematic() method
410
-
411
- > 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.
412
-
413
- Create Schematic
414
-
415
- ## Signature
416
-
417
- ```typescript
418
- function createSchematic(boardName?: string): Promise<string | undefined>;
419
- ```
420
-
421
- ## Parameters
422
-
423
- <table><thead><tr><th>
424
-
425
- Parameter
426
-
427
- </th><th>
428
-
429
- Type
430
-
431
- </th><th>
432
-
433
- Description
434
-
435
- </th></tr></thead>
436
- <tbody><tr><td>
437
-
438
- boardName
439
-
440
- </td><td>
441
-
442
- string
443
-
444
- </td><td>
445
-
446
- _(Optional)_ Name of the board it belongs to. If not specified, it is a free schematic
447
-
448
- </td></tr>
449
- </tbody></table>
450
-
451
- ## Returns
452
-
453
- Promise&lt;string \| undefined&gt;
454
-
455
- Schematic UUID, if it is `undefined` creation fails
456
-
457
- ## Example
458
-
459
- ```javascript
460
- // 1. 创建原理图(不指定 boardName,得到游离原理图),返回新原理图 UUID
461
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
462
- console.log('schematicUuid:', schematicUuid);
463
-
464
- // 2. 等 1.5s 让原理图在工作区落地,回读确认(自带图页 p1)
465
- await new Promise(r => setTimeout(r, 1500));
466
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
467
- console.log('name:', info?.name);
468
- console.log('pages:', (info?.page || []).map(p => p.name).join(', '));
469
- console.log('parentBoardName:', info?.parentBoardName);
470
-
471
- // 3. 删除本例创建的原理图,保持工程整洁
472
- await new Promise(r => setTimeout(r, 1000));
473
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
474
- console.log('deleted:', deleted);
475
- ```
476
-
477
- ### createschematicpage
478
-
479
- # DMT\_Schematic.createSchematicPage() method
480
-
481
- > 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.
482
-
483
- Create Schematic sheet
484
-
485
- ## Signature
486
-
487
- ```typescript
488
- function createSchematicPage(schematicUuid: string): Promise<string | undefined>;
489
- ```
490
-
491
- ## Parameters
492
-
493
- <table><thead><tr><th>
494
-
495
- Parameter
496
-
497
- </th><th>
498
-
499
- Type
500
-
501
- </th><th>
502
-
503
- Description
504
-
505
- </th></tr></thead>
506
- <tbody><tr><td>
507
-
508
- schematicUuid
509
-
510
- </td><td>
511
-
512
- string
513
-
514
- </td><td>
515
-
516
- UUID of the schematic it belongs to
517
-
518
- </td></tr>
519
- </tbody></table>
520
-
521
- ## Returns
522
-
523
- Promise&lt;string \| undefined&gt;
524
-
525
- Schematic sheet UUID, if it is `undefined` creation fails
526
-
527
- ## Example
528
-
529
- ```javascript
530
- // 1. 创建专用测试原理图(自带图页 p1),等 1.5s 同步
531
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
532
- await new Promise(r => setTimeout(r, 1500));
533
-
534
- // 2. 在该原理图下创建新图页,返回图页 UUID
535
- const pageUuid = await eda.dmt_Schematic.createSchematicPage(schematicUuid);
536
- console.log('pageUuid:', pageUuid);
537
-
538
- // 3. 等 1.5s 同步,回读图页属性,确认归属
539
- await new Promise(r => setTimeout(r, 1500));
540
- const pageInfo = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
541
- console.log('pageName:', pageInfo?.name);
542
- console.log('belongsToSchematic:', pageInfo?.parentSchematicUuid === schematicUuid);
543
-
544
- // 4. 清理本例创建的原理图(图页随原理图一起删除)
545
- await new Promise(r => setTimeout(r, 1000));
546
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
547
- console.log('deleted:', deleted);
548
- ```
549
-
550
- ### deleteschematic
551
-
552
- # DMT\_Schematic.deleteSchematic() method
553
-
554
- > 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.
555
-
556
- Delete Schematic
557
-
558
- ## Signature
559
-
560
- ```typescript
561
- function deleteSchematic(schematicUuid: string): Promise<boolean>;
562
- ```
563
-
564
- ## Parameters
565
-
566
- <table><thead><tr><th>
567
-
568
- Parameter
569
-
570
- </th><th>
571
-
572
- Type
573
-
574
- </th><th>
575
-
576
- Description
577
-
578
- </th></tr></thead>
579
- <tbody><tr><td>
580
-
581
- schematicUuid
582
-
583
- </td><td>
584
-
585
- string
586
-
587
- </td><td>
588
-
589
- Schematic UUID
590
-
591
- </td></tr>
592
- </tbody></table>
593
-
594
- ## Returns
595
-
596
- Promise&lt;boolean&gt;
597
-
598
- Whether the operation is successful
599
-
600
- ## Remarks
601
-
602
- If the schematic is already associated with a reuse block (a reuse block symbol with the same name exists in the project library), deleting the schematic will also delete the associated PCB and reuse block symbol. If the reuse block symbol cannot be deleted, it will be skipped
603
-
604
- ## Example
605
-
606
- ```javascript
607
- // 1. 创建专用测试原理图(避免误删工程里的现有原理图),等 1.5s 同步
608
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
609
- await new Promise(r => setTimeout(r, 1500));
610
-
611
- // 2. 删除该原理图
612
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
613
- console.log('deleted:', deleted);
614
-
615
- // 3. 回读确认已删除(返回 undefined 说明原理图已不存在)
616
- await new Promise(r => setTimeout(r, 1500));
617
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
618
- console.log('info after delete:', info === undefined ? '已不存在' : info.name);
619
- ```
620
-
621
- ### deleteschematicpage
622
-
623
- # DMT\_Schematic.deleteSchematicPage() method
624
-
625
- > 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.
626
-
627
- Delete Schematic sheet
628
-
629
- ## Signature
630
-
631
- ```typescript
632
- function deleteSchematicPage(schematicPageUuid: string): Promise<boolean>;
633
- ```
634
-
635
- ## Parameters
636
-
637
- <table><thead><tr><th>
638
-
639
- Parameter
640
-
641
- </th><th>
642
-
643
- Type
644
-
645
- </th><th>
646
-
647
- Description
648
-
649
- </th></tr></thead>
650
- <tbody><tr><td>
651
-
652
- schematicPageUuid
653
-
654
- </td><td>
655
-
656
- string
657
-
658
- </td><td>
659
-
660
- Schematic sheet UUID
661
-
662
- </td></tr>
663
- </tbody></table>
664
-
665
- ## Returns
666
-
667
- Promise&lt;boolean&gt;
668
-
669
- Whether the operation is successful
670
-
671
- ## Example
672
-
673
- ```javascript
674
- // 1. 创建专用测试原理图(自带图页 p1),等 1.5s 同步
675
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
676
- await new Promise(r => setTimeout(r, 1500));
677
-
678
- // 2. 再追加一个测试图页 p2 作为删除目标
679
- const pageUuid = await eda.dmt_Schematic.createSchematicPage(schematicUuid);
680
- await new Promise(r => setTimeout(r, 1500));
681
-
682
- // 3. 删除测试图页 p2(只删这一页,原理图保留)
683
- const deleted = await eda.dmt_Schematic.deleteSchematicPage(pageUuid);
684
- console.log('deleted:', deleted);
685
-
686
- // 4. 回读确认:图页已不存在,原理图回到只剩 p1
687
- await new Promise(r => setTimeout(r, 1500));
688
- const pageInfo = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
689
- console.log('page after delete:', pageInfo === undefined ? '已不存在' : pageInfo.name);
690
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
691
- console.log('remaining pages:', (info?.page || []).map(p => p.name).join(', '));
692
-
693
- // 5. 清理测试原理图
694
- await new Promise(r => setTimeout(r, 1000));
695
- const deletedSch = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
696
- console.log('deleted:', deletedSch);
697
- ```
698
-
699
- ### getallschematicpagesinfo
700
-
701
- # DMT\_Schematic.getAllSchematicPagesInfo() method
702
-
703
- > 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.
704
-
705
- Get all in the project schematic sheet detailed properties of
706
-
707
- ## Signature
708
-
709
- ```typescript
710
- function getAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;
711
- ```
712
-
713
- ## Returns
714
-
715
- Promise&lt;Array&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->&gt;&gt;
716
-
717
- Array of detailed properties of all schematic sheets
718
-
719
- ## Example
720
-
721
- ```javascript
722
- // 1. 创建测试原理图并追加一页(共 2 页),保证列表里有新近创建的页
723
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
724
- await new Promise(r => setTimeout(r, 1500));
725
- await eda.dmt_Schematic.createSchematicPage(schematicUuid);
726
- await new Promise(r => setTimeout(r, 1500));
727
-
728
- // 2. 获取工程内所有图页的详细属性
729
- const pages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
730
-
731
- // 3. 输出每页名称、UUID 与所属原理图,确认测试页在列
732
- pages.slice(0, 10).forEach((p, i) => {
733
- console.log(`page[${i}]:`, p.name, p.uuid, 'parent:', p.parentSchematicUuid);
734
- });
735
- console.log('total:', pages.length);
736
- console.log('testPagesIncluded:', pages.filter(p => p.parentSchematicUuid === schematicUuid).length === 2);
737
-
738
- // 4. 清理测试原理图
739
- await new Promise(r => setTimeout(r, 1000));
740
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
741
- console.log('deleted:', deleted);
742
- ```
743
-
744
- ### getallschematicsinfo
745
-
746
- # DMT\_Schematic.getAllSchematicsInfo() method
747
-
748
- > 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.
749
-
750
- Get all in the project schematic detailed properties of
751
-
752
- ## Signature
753
-
754
- ```typescript
755
- function getAllSchematicsInfo(): Promise<Array<IDMT_SchematicItem>>;
756
- ```
757
-
758
- ## Returns
759
-
760
- Promise&lt;Array&lt;[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md)<!-- -->&gt;&gt;
761
-
762
- Array of detailed properties of all schematics
763
-
764
- ## Example
765
-
766
- ```javascript
767
- // 1. 创建一个测试原理图并等 1.5s 同步,保证列表里有新近创建的对象
768
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
769
- await new Promise(r => setTimeout(r, 1500));
770
-
771
- // 2. 获取所有原理图的详细属性
772
- const schematics = await eda.dmt_Schematic.getAllSchematicsInfo();
773
-
774
- // 3. 输出每个原理图的名称、UUID 与图页数,确认测试原理图在列
775
- schematics.slice(0, 10).forEach((s, i) => {
776
- console.log(`schematic[${i}]:`, s.name, s.uuid, 'pages:', (s.page || []).length, 'board:', s.parentBoardName ?? '游离');
777
- });
778
- console.log('total:', schematics.length);
779
- console.log('testSchematicIncluded:', schematics.some(s => s.uuid === schematicUuid));
780
-
781
- // 4. 清理测试原理图
782
- await new Promise(r => setTimeout(r, 1000));
783
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
784
- console.log('deleted:', deleted);
785
- ```
786
-
787
- ### getcurrentschematicallschematicpagesinfo
788
-
789
- # DMT\_Schematic.getCurrentSchematicAllSchematicPagesInfo() method
790
-
791
- > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
792
-
793
- Get the detailed properties of all schematic sheets in the current schematic
794
-
795
- ## Signature
796
-
797
- ```typescript
798
- function getCurrentSchematicAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;
799
- ```
800
-
801
- ## Returns
802
-
803
- Promise&lt;Array&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->&gt;&gt;
804
-
805
- Array of detailed properties of all schematic sheets
806
-
807
- ## Example
808
-
809
- ```javascript
810
- // 1. 创建专用测试原理图(自带图页 p1)并追加一页
811
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
812
- await new Promise(r => setTimeout(r, 1500));
813
- await eda.dmt_Schematic.createSchematicPage(schematicUuid);
814
- await new Promise(r => setTimeout(r, 1500));
815
-
816
- // 2. 打开测试原理图的自带图页 p1,把焦点切到该原理图上
817
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
818
- await eda.dmt_EditorControl.openDocument(info.page[0].uuid);
819
- await new Promise(r => setTimeout(r, 1000));
820
-
821
- // 3. 获取当前原理图内所有图页的详细属性
822
- const pages = await eda.dmt_Schematic.getCurrentSchematicAllSchematicPagesInfo();
823
-
824
- // 4. 输出每页名称与 UUID,确认全部归属当前原理图
825
- pages.forEach((p, i) => {
826
- console.log(`page[${i}]:`, p.name, p.uuid);
827
- });
828
- console.log('total:', pages.length);
829
- console.log('allBelongToCurrent:', pages.every(p => p.parentSchematicUuid === schematicUuid));
830
-
831
- // 5. 清理测试原理图(处于打开状态也可以直接删除)
832
- await new Promise(r => setTimeout(r, 1000));
833
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
834
- console.log('deleted:', deleted);
835
- ```
836
-
837
- ### getcurrentschematicinfo
838
-
839
- # DMT\_Schematic.getCurrentSchematicInfo() method
840
-
841
- > 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.
842
-
843
- Get detailed properties of Current schematic
844
-
845
- ## Signature
846
-
847
- ```typescript
848
- function getCurrentSchematicInfo(): Promise<IDMT_SchematicItem | undefined>;
849
- ```
850
-
851
- ## Returns
852
-
853
- Promise&lt;[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined&gt;
854
-
855
- Schematic detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
856
-
857
- ## Remarks
858
-
859
- It will get the detailed properties of the schematic associated with the currently open schematic sheet that has the last input focus
860
-
861
- ## Example
862
-
863
- ```javascript
864
- // 1. 创建专用测试原理图(自带图页 p1),打开该页让焦点落到测试原理图上
865
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
866
- await new Promise(r => setTimeout(r, 1500));
867
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
868
- await eda.dmt_EditorControl.openDocument(info.page[0].uuid);
869
- await new Promise(r => setTimeout(r, 1000));
870
-
871
- // 2. 获取当前焦点原理图的详细属性
872
- const current = await eda.dmt_Schematic.getCurrentSchematicInfo();
873
-
874
- // 3. 输出原理图的名称、UUID 与图页,确认正是测试原理图
875
- console.log('name:', current?.name);
876
- console.log('schematicUuid:', current?.uuid);
877
- console.log('pages:', (current?.page || []).map(p => p.name).join(', '));
878
- console.log('isFocusedSchematic:', current?.uuid === schematicUuid);
879
-
880
- // 4. 清理测试原理图(处于打开状态也可以直接删除)
881
- await new Promise(r => setTimeout(r, 1000));
882
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
883
- console.log('deleted:', deleted);
884
- ```
885
-
886
- ### getcurrentschematicpageinfo
887
-
888
- # DMT\_Schematic.getCurrentSchematicPageInfo() method
889
-
890
- > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
891
-
892
- Get detailed properties of Current schematic sheet
893
-
894
- ## Signature
895
-
896
- ```typescript
897
- function getCurrentSchematicPageInfo(): Promise<IDMT_SchematicPageItem | undefined>;
898
- ```
899
-
900
- ## Returns
901
-
902
- Promise&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined&gt;
903
-
904
- Schematic sheet detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
905
-
906
- ## Remarks
907
-
908
- It will get the detailed properties of the currently open schematic sheet that has the last input focus
909
-
910
- ## Example
911
-
912
- ```javascript
913
- // 1. 创建专用测试原理图(自带图页 p1)并打开该页,让焦点落到测试页上
914
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
915
- await new Promise(r => setTimeout(r, 1500));
916
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
917
- const pageUuid = info.page[0].uuid;
918
- await eda.dmt_EditorControl.openDocument(pageUuid);
919
- await new Promise(r => setTimeout(r, 1000));
920
-
921
- // 2. 获取当前焦点图页的详细属性
922
- const currentPage = await eda.dmt_Schematic.getCurrentSchematicPageInfo();
923
-
924
- // 3. 输出图页名称、UUID、所属原理图与明细表开关,确认正是测试页
925
- console.log('name:', currentPage?.name);
926
- console.log('pageUuid:', currentPage?.uuid);
927
- console.log('parentSchematicUuid:', currentPage?.parentSchematicUuid);
928
- console.log('showTitleBlock:', currentPage?.showTitleBlock);
929
- console.log('isFocusedPage:', currentPage?.uuid === pageUuid);
930
-
931
- // 4. 清理测试原理图(处于打开状态也可以直接删除)
932
- await new Promise(r => setTimeout(r, 1000));
933
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
934
- console.log('deleted:', deleted);
935
- ```
936
-
937
- ### getschematicinfo
938
-
939
- # DMT\_Schematic.getSchematicInfo() method
940
-
941
- > 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.
942
-
943
- Get detailed properties of Schematic
944
-
945
- ## Signature
946
-
947
- ```typescript
948
- function getSchematicInfo(schematicUuid: string): Promise<IDMT_SchematicItem | undefined>;
949
- ```
950
-
951
- ## Parameters
952
-
953
- <table><thead><tr><th>
954
-
955
- Parameter
956
-
957
- </th><th>
958
-
959
- Type
960
-
961
- </th><th>
962
-
963
- Description
964
-
965
- </th></tr></thead>
966
- <tbody><tr><td>
967
-
968
- schematicUuid
969
-
970
- </td><td>
971
-
972
- string
973
-
974
- </td><td>
975
-
976
- Schematic UUID
977
-
978
- </td></tr>
979
- </tbody></table>
980
-
981
- ## Returns
982
-
983
- Promise&lt;[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined&gt;
984
-
985
- Schematic detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
986
-
987
- ## Example
988
-
989
- ```javascript
990
- // 1. 创建测试原理图并等 1.5s 同步
991
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
992
- await new Promise(r => setTimeout(r, 1500));
993
-
994
- // 2. 按 UUID 查询原理图详细属性
995
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
996
-
997
- // 3. 输出属性
998
- console.log('name:', info?.name);
999
- console.log('itemType:', info?.itemType);
1000
- console.log('parentProjectUuid:', info?.parentProjectUuid);
1001
- console.log('pages:', (info?.page || []).map(p => p.name).join(', '));
1002
-
1003
- // 4. 清理测试原理图
1004
- await new Promise(r => setTimeout(r, 1000));
1005
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1006
- console.log('deleted:', deleted);
1007
- ```
1008
-
1009
- ### getschematicpageinfo
1010
-
1011
- # DMT\_Schematic.getSchematicPageInfo() method
1012
-
1013
- > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1014
-
1015
- Get detailed properties of Schematic sheet
1016
-
1017
- ## Signature
1018
-
1019
- ```typescript
1020
- function getSchematicPageInfo(
1021
- schematicPageUuid: string,
1022
- ): Promise<IDMT_SchematicPageItem | undefined>;
1023
- ```
1024
-
1025
- ## Parameters
1026
-
1027
- <table><thead><tr><th>
1028
-
1029
- Parameter
1030
-
1031
- </th><th>
1032
-
1033
- Type
1034
-
1035
- </th><th>
1036
-
1037
- Description
1038
-
1039
- </th></tr></thead>
1040
- <tbody><tr><td>
1041
-
1042
- schematicPageUuid
1043
-
1044
- </td><td>
1045
-
1046
- string
1047
-
1048
- </td><td>
1049
-
1050
- Schematic sheet UUID
1051
-
1052
- </td></tr>
1053
- </tbody></table>
1054
-
1055
- ## Returns
1056
-
1057
- Promise&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined&gt;
1058
-
1059
- Schematic sheet detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
1060
-
1061
- ## Example
1062
-
1063
- ```javascript
1064
- // 1. 创建测试原理图(自带图页 p1)并等 1.5s 同步
1065
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
1066
- await new Promise(r => setTimeout(r, 1500));
1067
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1068
- const pageUuid = info.page[0].uuid;
1069
-
1070
- // 2. 按 UUID 查询图页详细属性
1071
- const pageInfo = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
1072
-
1073
- // 3. 输出属性
1074
- console.log('name:', pageInfo?.name);
1075
- console.log('itemType:', pageInfo?.itemType);
1076
- console.log('parentSchematicUuid:', pageInfo?.parentSchematicUuid);
1077
- console.log('showTitleBlock:', pageInfo?.showTitleBlock);
1078
- console.log('titleBlockFields:', Object.keys(pageInfo?.titleBlockData || {}).length);
1079
-
1080
- // 4. 清理测试原理图
1081
- await new Promise(r => setTimeout(r, 1000));
1082
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1083
- console.log('deleted:', deleted);
1084
- ```
1085
-
1086
- ### modifyschematicname
1087
-
1088
- # DMT\_Schematic.modifySchematicName() method
1089
-
1090
- > 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.
1091
-
1092
- Modify Schematic name
1093
-
1094
- ## Signature
1095
-
1096
- ```typescript
1097
- function modifySchematicName(schematicUuid: string, schematicName: string): Promise<boolean>;
1098
- ```
1099
-
1100
- ## Parameters
1101
-
1102
- <table><thead><tr><th>
1103
-
1104
- Parameter
1105
-
1106
- </th><th>
1107
-
1108
- Type
1109
-
1110
- </th><th>
1111
-
1112
- Description
1113
-
1114
- </th></tr></thead>
1115
- <tbody><tr><td>
1116
-
1117
- schematicUuid
1118
-
1119
- </td><td>
1120
-
1121
- string
1122
-
1123
- </td><td>
1124
-
1125
- Schematic UUID
1126
-
1127
- </td></tr>
1128
- <tr><td>
1129
-
1130
- schematicName
1131
-
1132
- </td><td>
1133
-
1134
- string
1135
-
1136
- </td><td>
1137
-
1138
- Schematic name
1139
-
1140
- </td></tr>
1141
- </tbody></table>
1142
-
1143
- ## Returns
1144
-
1145
- Promise&lt;boolean&gt;
1146
-
1147
- Whether Modify Successful
1148
-
1149
- ## Remarks
1150
-
1151
- If the schematic is already associated with a reuse block (a reuse block symbol with the same name exists in the project library), modifying the name will also modify the reuse block symbol name and the associated PCB name
1152
-
1153
- ## Example
1154
-
1155
- ```javascript
1156
- // 1. 创建专用测试原理图(自带图页 p1)并等 1.5s 同步
1157
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
1158
- await new Promise(r => setTimeout(r, 1500));
1159
-
1160
- // 2. 打开自带图页 p1(改名只对已打开的原理图生效)
1161
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1162
- await eda.dmt_EditorControl.openDocument(info.page[0].uuid);
1163
- await new Promise(r => setTimeout(r, 1000));
1164
-
1165
- // 3. 修改原理图名称(只对本例创建的测试原理图改名)
1166
- const newName = '嘉立创示例_原理图新名称';
1167
- const renamed = await eda.dmt_Schematic.modifySchematicName(schematicUuid, newName);
1168
- console.log('renamed:', renamed);
1169
-
1170
- // 4. 等 1.5s 让改名同步,回读验证(英文名可能被归一化为小写,按不区分大小写比较)
1171
- await new Promise(r => setTimeout(r, 1500));
1172
- const after = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1173
- console.log('renamedTo:', after?.name);
1174
- console.log('renameVerified:', (after?.name ?? '').toLowerCase() === newName.toLowerCase());
1175
-
1176
- // 5. 清理测试原理图,保持工程整洁
1177
- await new Promise(r => setTimeout(r, 1000));
1178
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1179
- console.log('deleted:', deleted);
1180
- ```
1181
-
1182
- ### modifyschematicpagename
1183
-
1184
- # DMT\_Schematic.modifySchematicPageName() method
1185
-
1186
- > 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.
1187
-
1188
- Modify Schematic sheet name
1189
-
1190
- ## Signature
1191
-
1192
- ```typescript
1193
- function modifySchematicPageName(
1194
- schematicPageUuid: string,
1195
- schematicPageName: string,
1196
- ): Promise<boolean>;
1197
- ```
1198
-
1199
- ## Parameters
1200
-
1201
- <table><thead><tr><th>
1202
-
1203
- Parameter
1204
-
1205
- </th><th>
1206
-
1207
- Type
1208
-
1209
- </th><th>
1210
-
1211
- Description
1212
-
1213
- </th></tr></thead>
1214
- <tbody><tr><td>
1215
-
1216
- schematicPageUuid
1217
-
1218
- </td><td>
1219
-
1220
- string
1221
-
1222
- </td><td>
1223
-
1224
- Schematic sheet UUID
1225
-
1226
- </td></tr>
1227
- <tr><td>
1228
-
1229
- schematicPageName
1230
-
1231
- </td><td>
1232
-
1233
- string
1234
-
1235
- </td><td>
1236
-
1237
- Schematic sheet name
1238
-
1239
- </td></tr>
1240
- </tbody></table>
1241
-
1242
- ## Returns
1243
-
1244
- Promise&lt;boolean&gt;
1245
-
1246
- Whether Modify Successful
1247
-
1248
- ## Example
1249
-
1250
- ```javascript
1251
- // 1. 创建专用测试原理图(自带图页 p1 作为改名目标)并等 1.5s 同步
1252
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
1253
- await new Promise(r => setTimeout(r, 1500));
1254
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1255
- const pageUuid = info.page[0].uuid;
1256
-
1257
- // 2. 修改图页名称(只对本例创建的测试图页改名)
1258
- const newName = '嘉立创示例_电源页';
1259
- const renamed = await eda.dmt_Schematic.modifySchematicPageName(pageUuid, newName);
1260
- console.log('renamed:', renamed);
1261
-
1262
- // 3. 等 1.5s 让改名同步,回读验证(英文名可能被归一化为小写,按不区分大小写比较)
1263
- await new Promise(r => setTimeout(r, 1500));
1264
- const after = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
1265
- console.log('renamedTo:', after?.name);
1266
- console.log('renameVerified:', (after?.name ?? '').toLowerCase() === newName.toLowerCase());
1267
-
1268
- // 4. 清理测试原理图,保持工程整洁
1269
- await new Promise(r => setTimeout(r, 1000));
1270
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1271
- console.log('deleted:', deleted);
1272
- ```
1273
-
1274
- ### modifyschematicpagetitleblock
1275
-
1276
- # DMT\_Schematic.modifySchematicPageTitleBlock() method
1277
-
1278
- > 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.
1279
-
1280
- Modify the title block of a schematic sheet
1281
-
1282
- ## Signature
1283
-
1284
- ```typescript
1285
- function modifySchematicPageTitleBlock(
1286
- showTitleBlock?: boolean,
1287
- titleBlockData?: Record<
1288
- string,
1289
- { showTitle?: undefined | false | true; showValue?: undefined | false | true; value?: any }
1290
- >,
1291
- ): Promise<boolean>;
1292
- ```
1293
-
1294
- ## Parameters
1295
-
1296
- <table><thead><tr><th>
1297
-
1298
- Parameter
1299
-
1300
- </th><th>
1301
-
1302
- Type
1303
-
1304
- </th><th>
1305
-
1306
- Description
1307
-
1308
- </th></tr></thead>
1309
- <tbody><tr><td>
1310
-
1311
- showTitleBlock
1312
-
1313
- </td><td>
1314
-
1315
- boolean
1316
-
1317
- </td><td>
1318
-
1319
- _(Optional)_ Whether to show the title block. If undefined, the current state will be kept
1320
-
1321
- </td></tr>
1322
- <tr><td>
1323
-
1324
- titleBlockData
1325
-
1326
- </td><td>
1327
-
1328
- Record&lt;string, { showTitle?: undefined \| false \| true; showValue?: undefined \| false \| true; value?: any }&gt;
1329
-
1330
- </td><td>
1331
-
1332
- _(Optional)_ The title block items to be modified and their modified values
1333
-
1334
- </td></tr>
1335
- </tbody></table>
1336
-
1337
- ## Returns
1338
-
1339
- Promise&lt;boolean&gt;
1340
-
1341
- Whether the modification was successful. If `showTitleBlock` and `titleBlockData` are not passed in, `false` will be returned. Note that if unrecognized title block items exist but the program does not report an error, `true` will be returned because the unrecognized items are ignored
1342
-
1343
- ## Remarks
1344
-
1345
- `titleBlockData` only needs to pass in any title block items to be modified as `key`<!-- -->, along with the values to modify them to. Any unrecognized title block items will be ignored, and any unpassed items and values will remain in their default state
1346
-
1347
- ## Example
1348
-
1349
- ```javascript
1350
- // 1. 创建专用测试原理图并打开自带图页 p1,让焦点落到目标页上
1351
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
1352
- await new Promise(r => setTimeout(r, 1500));
1353
- const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1354
- const pageUuid = info.page[0].uuid;
1355
- await eda.dmt_EditorControl.openDocument(pageUuid);
1356
- await new Promise(r => setTimeout(r, 1000));
1357
-
1358
- // 2. 修改明细表:显示明细表,并把"公司"改为示例值(三个字段缺一不可)
1359
- const modified = await eda.dmt_Schematic.modifySchematicPageTitleBlock(true, {
1360
- Company: { showTitle: true, showValue: true, value: '嘉立创示例科技' },
1361
- });
1362
- console.log('modified:', modified);
1363
-
1364
- // 3. 等 1.5s 同步,回读验证明细项已更新
1365
- await new Promise(r => setTimeout(r, 1500));
1366
- const after = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
1367
- console.log('showTitleBlock:', after?.showTitleBlock);
1368
- console.log('company:', after?.titleBlockData?.Company?.value);
1369
- console.log('modifyVerified:', after?.titleBlockData?.Company?.value === '嘉立创示例科技');
1370
-
1371
- // 4. 清理测试原理图,保持工程整洁
1372
- await new Promise(r => setTimeout(r, 1000));
1373
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1374
- console.log('deleted:', deleted);
1375
- ```
1376
-
1377
- ### reorderschematicpages
1378
-
1379
- # DMT\_Schematic.reorderSchematicPages() method
1380
-
1381
- > 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.
1382
-
1383
- Reorder schematic sheets
1384
-
1385
- ## Signature
1386
-
1387
- ```typescript
1388
- function reorderSchematicPages(
1389
- schematicUuid: string,
1390
- schematicPageItemsArray: Array<IDMT_SchematicPageItem>,
1391
- ): Promise<boolean>;
1392
- ```
1393
-
1394
- ## Parameters
1395
-
1396
- <table><thead><tr><th>
1397
-
1398
- Parameter
1399
-
1400
- </th><th>
1401
-
1402
- Type
1403
-
1404
- </th><th>
1405
-
1406
- Description
1407
-
1408
- </th></tr></thead>
1409
- <tbody><tr><td>
1410
-
1411
- schematicUuid
1412
-
1413
- </td><td>
1414
-
1415
- string
1416
-
1417
- </td><td>
1418
-
1419
- The UUID of the schematic associated with the sheets being sorted
1420
-
1421
- </td></tr>
1422
- <tr><td>
1423
-
1424
- schematicPageItemsArray
1425
-
1426
- </td><td>
1427
-
1428
- Array&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->&gt;
1429
-
1430
- </td><td>
1431
-
1432
- Array of all schematic sheet properties
1433
-
1434
- </td></tr>
1435
- </tbody></table>
1436
-
1437
- ## Returns
1438
-
1439
- Promise&lt;boolean&gt;
1440
-
1441
- Sorting whether the operation is successful
1442
-
1443
- ## Remarks
1444
-
1445
- Here, the array of source schematic sheet properties needs to be obtained through [DMT\_Schematic.getAllSchematicPagesInfo()](./DMT_Schematic.md) or other upstream methods. After sorting the array, pass it in
1446
-
1447
- ## Example
1448
-
1449
- ```javascript
1450
- // 1. 创建专用测试原理图(自带图页 p1)并再追加两页,凑出可排序的页序列
1451
- const schematicUuid = await eda.dmt_Schematic.createSchematic();
1452
- await new Promise(r => setTimeout(r, 1500));
1453
- await eda.dmt_Schematic.createSchematicPage(schematicUuid);
1454
- await new Promise(r => setTimeout(r, 1500));
1455
- await eda.dmt_Schematic.createSchematicPage(schematicUuid);
1456
- await new Promise(r => setTimeout(r, 1500));
1457
-
1458
- // 2. 从上游接口取得该原理图的全部图页,输出当前顺序
1459
- const allPages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
1460
- const myPages = allPages.filter(p => p.parentSchematicUuid === schematicUuid);
1461
- console.log('orderBefore:', myPages.map(p => p.name).join(' -> '));
1462
-
1463
- // 3. 反转页序列后传入,执行重排
1464
- const reversed = [...myPages].reverse();
1465
- const reorderOk = await eda.dmt_Schematic.reorderSchematicPages(schematicUuid, reversed);
1466
- console.log('reorderOk:', reorderOk);
1467
-
1468
- // 4. 等 1.5s 同步,回读当前页顺序
1469
- await new Promise(r => setTimeout(r, 1500));
1470
- const after = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1471
- console.log('orderAfter:', (after?.page || []).map(p => p.name).join(' -> '));
1472
-
1473
- // 5. 清理测试原理图,保持工程整洁
1474
- await new Promise(r => setTimeout(r, 1000));
1475
- const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1476
- console.log('deleted:', deleted);
1477
- ```
1
+ # DMT\_Schematic class
2
+
3
+ Document tree / Schematic management class
4
+
5
+ ## Signature
6
+
7
+ ```typescript
8
+ class DMT_Schematic
9
+ ```
10
+
11
+ ## Remarks
12
+
13
+ Operations related to schematic management in the currently open project
14
+
15
+ ## Methods
16
+
17
+ <table><thead><tr><th>
18
+
19
+ Method
20
+
21
+ </th><th>
22
+
23
+ Modifiers
24
+
25
+ </th><th>
26
+
27
+ Description
28
+
29
+ </th></tr></thead>
30
+ <tbody><tr><td>
31
+
32
+ [copySchematic(schematicUuid, boardName)](./DMT_Schematic.md)
33
+
34
+ </td><td>
35
+
36
+ </td><td>
37
+
38
+ **_(BETA)_** Copy Schematic
39
+
40
+ </td></tr>
41
+ <tr><td>
42
+
43
+ [copySchematicPage(schematicPageUuid, schematicUuid)](./DMT_Schematic.md)
44
+
45
+ </td><td>
46
+
47
+ </td><td>
48
+
49
+ **_(BETA)_** Copy Schematic sheet
50
+
51
+ </td></tr>
52
+ <tr><td>
53
+
54
+ [createSchematic(boardName)](./DMT_Schematic.md)
55
+
56
+ </td><td>
57
+
58
+ </td><td>
59
+
60
+ **_(BETA)_** Create Schematic
61
+
62
+ </td></tr>
63
+ <tr><td>
64
+
65
+ [createSchematicPage(schematicUuid)](./DMT_Schematic.md)
66
+
67
+ </td><td>
68
+
69
+ </td><td>
70
+
71
+ **_(BETA)_** Create Schematic sheet
72
+
73
+ </td></tr>
74
+ <tr><td>
75
+
76
+ [deleteSchematic(schematicUuid)](./DMT_Schematic.md)
77
+
78
+ </td><td>
79
+
80
+ </td><td>
81
+
82
+ **_(BETA)_** Delete Schematic
83
+
84
+ </td></tr>
85
+ <tr><td>
86
+
87
+ [deleteSchematicPage(schematicPageUuid)](./DMT_Schematic.md)
88
+
89
+ </td><td>
90
+
91
+ </td><td>
92
+
93
+ **_(BETA)_** Delete Schematic sheet
94
+
95
+ </td></tr>
96
+ <tr><td>
97
+
98
+ [getAllSchematicPagesInfo()](./DMT_Schematic.md)
99
+
100
+ </td><td>
101
+
102
+ </td><td>
103
+
104
+ **_(BETA)_** Get all in the project schematic sheet detailed properties of
105
+
106
+ </td></tr>
107
+ <tr><td>
108
+
109
+ [getAllSchematicsInfo()](./DMT_Schematic.md)
110
+
111
+ </td><td>
112
+
113
+ </td><td>
114
+
115
+ **_(BETA)_** Get all in the project schematic detailed properties of
116
+
117
+ </td></tr>
118
+ <tr><td>
119
+
120
+ [getCurrentSchematicAllSchematicPagesInfo()](./DMT_Schematic.md)
121
+
122
+ </td><td>
123
+
124
+ </td><td>
125
+
126
+ **_(BETA)_** Get the detailed properties of all schematic sheets in the current schematic
127
+
128
+ </td></tr>
129
+ <tr><td>
130
+
131
+ [getCurrentSchematicInfo()](./DMT_Schematic.md)
132
+
133
+ </td><td>
134
+
135
+ </td><td>
136
+
137
+ **_(BETA)_** Get detailed properties of Current schematic
138
+
139
+ </td></tr>
140
+ <tr><td>
141
+
142
+ [getCurrentSchematicPageInfo()](./DMT_Schematic.md)
143
+
144
+ </td><td>
145
+
146
+ </td><td>
147
+
148
+ **_(BETA)_** Get detailed properties of Current schematic sheet
149
+
150
+ </td></tr>
151
+ <tr><td>
152
+
153
+ [getSchematicInfo(schematicUuid)](./DMT_Schematic.md)
154
+
155
+ </td><td>
156
+
157
+ </td><td>
158
+
159
+ **_(BETA)_** Get detailed properties of Schematic
160
+
161
+ </td></tr>
162
+ <tr><td>
163
+
164
+ [getSchematicPageInfo(schematicPageUuid)](./DMT_Schematic.md)
165
+
166
+ </td><td>
167
+
168
+ </td><td>
169
+
170
+ **_(BETA)_** Get detailed properties of Schematic sheet
171
+
172
+ </td></tr>
173
+ <tr><td>
174
+
175
+ [modifySchematicName(schematicUuid, schematicName)](./DMT_Schematic.md)
176
+
177
+ </td><td>
178
+
179
+ </td><td>
180
+
181
+ **_(BETA)_** Modify Schematic name
182
+
183
+ </td></tr>
184
+ <tr><td>
185
+
186
+ [modifySchematicPageName(schematicPageUuid, schematicPageName)](./DMT_Schematic.md)
187
+
188
+ </td><td>
189
+
190
+ </td><td>
191
+
192
+ **_(BETA)_** Modify Schematic sheet name
193
+
194
+ </td></tr>
195
+ <tr><td>
196
+
197
+ [modifySchematicPageTitleBlock(showTitleBlock, titleBlockData)](./DMT_Schematic.md)
198
+
199
+ </td><td>
200
+
201
+ </td><td>
202
+
203
+ **_(BETA)_** Modify the title block of a schematic sheet
204
+
205
+ </td></tr>
206
+ <tr><td>
207
+
208
+ [reorderSchematicPages(schematicUuid, schematicPageItemsArray)](./DMT_Schematic.md)
209
+
210
+ </td><td>
211
+
212
+ </td><td>
213
+
214
+ **_(BETA)_** Reorder schematic sheets
215
+
216
+ </td></tr>
217
+ </tbody></table>
218
+
219
+ ---
220
+
221
+ ## 方法详情
222
+
223
+ ### copyschematic
224
+
225
+ # DMT\_Schematic.copySchematic() method
226
+
227
+ > 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.
228
+
229
+ Copy Schematic
230
+
231
+ ## Signature
232
+
233
+ ```typescript
234
+ function copySchematic(schematicUuid: string, boardName?: string): Promise<string | undefined>;
235
+ ```
236
+
237
+ ## Parameters
238
+
239
+ <table><thead><tr><th>
240
+
241
+ Parameter
242
+
243
+ </th><th>
244
+
245
+ Type
246
+
247
+ </th><th>
248
+
249
+ Description
250
+
251
+ </th></tr></thead>
252
+ <tbody><tr><td>
253
+
254
+ schematicUuid
255
+
256
+ </td><td>
257
+
258
+ string
259
+
260
+ </td><td>
261
+
262
+ Source schematic UUID
263
+
264
+ </td></tr>
265
+ <tr><td>
266
+
267
+ boardName
268
+
269
+ </td><td>
270
+
271
+ string
272
+
273
+ </td><td>
274
+
275
+ _(Optional)_ Name of the board the new schematic belongs to. If not specified, it is a free schematic
276
+
277
+ </td></tr>
278
+ </tbody></table>
279
+
280
+ ## Returns
281
+
282
+ Promise&lt;string \| undefined&gt;
283
+
284
+ New schematic UUID. If it is `undefined`<!-- -->, the copy failed
285
+
286
+ ## Remarks
287
+
288
+ If the schematic is already associated with a reuse block (a reuse block symbol with the same name exists in the project library), copying the schematic will also create a new reuse block symbol
289
+
290
+ ## Example
291
+
292
+ ```javascript
293
+ // 1. 创建专用源原理图(自带图页 p1),等 1.5s 同步
294
+ const sourceUuid = await eda.dmt_Schematic.createSchematic();
295
+ await new Promise(r => setTimeout(r, 1500));
296
+
297
+ // 2. 复制源原理图,返回副本 UUID
298
+ const copiedUuid = await eda.dmt_Schematic.copySchematic(sourceUuid);
299
+ await new Promise(r => setTimeout(r, 1500));
300
+
301
+ // 3. 回读副本,确认名称与图页被完整复制
302
+ const copyInfo = await eda.dmt_Schematic.getSchematicInfo(copiedUuid);
303
+ console.log('copiedUuid:', copiedUuid);
304
+ console.log('copyName:', copyInfo?.name);
305
+ console.log('copyPages:', (copyInfo?.page || []).map(p => p.name).join(', '));
306
+
307
+ // 4. 清理本例创建的两个原理图(先删副本再删源),保持工程整洁
308
+ await new Promise(r => setTimeout(r, 1000));
309
+ const deletedCopy = await eda.dmt_Schematic.deleteSchematic(copiedUuid);
310
+ console.log('deleted:', deletedCopy);
311
+ await new Promise(r => setTimeout(r, 1000));
312
+ const deletedSource = await eda.dmt_Schematic.deleteSchematic(sourceUuid);
313
+ console.log('deleted:', deletedSource);
314
+ ```
315
+
316
+ ### copyschematicpage
317
+
318
+ # DMT\_Schematic.copySchematicPage() method
319
+
320
+ > 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.
321
+
322
+ Copy Schematic sheet
323
+
324
+ ## Signature
325
+
326
+ ```typescript
327
+ function copySchematicPage(
328
+ schematicPageUuid: string,
329
+ schematicUuid?: string,
330
+ ): Promise<string | undefined>;
331
+ ```
332
+
333
+ ## Parameters
334
+
335
+ <table><thead><tr><th>
336
+
337
+ Parameter
338
+
339
+ </th><th>
340
+
341
+ Type
342
+
343
+ </th><th>
344
+
345
+ Description
346
+
347
+ </th></tr></thead>
348
+ <tbody><tr><td>
349
+
350
+ schematicPageUuid
351
+
352
+ </td><td>
353
+
354
+ string
355
+
356
+ </td><td>
357
+
358
+ Source schematic sheet UUID
359
+
360
+ </td></tr>
361
+ <tr><td>
362
+
363
+ schematicUuid
364
+
365
+ </td><td>
366
+
367
+ string
368
+
369
+ </td><td>
370
+
371
+ _(Optional)_ Target schematic UUID. If not specified, it is the current schematic
372
+
373
+ </td></tr>
374
+ </tbody></table>
375
+
376
+ ## Returns
377
+
378
+ Promise&lt;string \| undefined&gt;
379
+
380
+ New schematic sheet UUID. If it is `undefined`<!-- -->, the copy failed
381
+
382
+ ## Example
383
+
384
+ ```javascript
385
+ // 1. 创建专用测试原理图(自带图页 p1 作为复制源),等 1.5s 同步
386
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
387
+ await new Promise(r => setTimeout(r, 1500));
388
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
389
+ const sourcePageUuid = info.page[0].uuid;
390
+
391
+ // 2. 复制该图页,目标显式指定为同一原理图,返回新图页 UUID
392
+ const copiedUuid = await eda.dmt_Schematic.copySchematicPage(sourcePageUuid, schematicUuid);
393
+ await new Promise(r => setTimeout(r, 1500));
394
+
395
+ // 3. 回读副本图页,确认名称与归属
396
+ const copyPage = await eda.dmt_Schematic.getSchematicPageInfo(copiedUuid);
397
+ console.log('copiedUuid:', copiedUuid);
398
+ console.log('copyPageName:', copyPage?.name);
399
+ console.log('belongsToSchematic:', copyPage?.parentSchematicUuid === schematicUuid);
400
+
401
+ // 4. 清理本例创建的原理图(副本图页随之删除)
402
+ await new Promise(r => setTimeout(r, 1000));
403
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
404
+ console.log('deleted:', deleted);
405
+ ```
406
+
407
+ ### createschematic
408
+
409
+ # DMT\_Schematic.createSchematic() method
410
+
411
+ > 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.
412
+
413
+ Create Schematic
414
+
415
+ ## Signature
416
+
417
+ ```typescript
418
+ function createSchematic(boardName?: string): Promise<string | undefined>;
419
+ ```
420
+
421
+ ## Parameters
422
+
423
+ <table><thead><tr><th>
424
+
425
+ Parameter
426
+
427
+ </th><th>
428
+
429
+ Type
430
+
431
+ </th><th>
432
+
433
+ Description
434
+
435
+ </th></tr></thead>
436
+ <tbody><tr><td>
437
+
438
+ boardName
439
+
440
+ </td><td>
441
+
442
+ string
443
+
444
+ </td><td>
445
+
446
+ _(Optional)_ Name of the board it belongs to. If not specified, it is a free schematic
447
+
448
+ </td></tr>
449
+ </tbody></table>
450
+
451
+ ## Returns
452
+
453
+ Promise&lt;string \| undefined&gt;
454
+
455
+ Schematic UUID, if it is `undefined` creation fails
456
+
457
+ ## Remarks
458
+
459
+ 不传 `boardName` 时 \*\*会自动创建一块 Board\*\*(此后直接调用 `createBoard()` 会得到 2 块板), 如需游离原理图请显式管理 Board 归属
460
+
461
+ ## Example
462
+
463
+ ```javascript
464
+ // 1. 创建原理图(不指定 boardName,得到游离原理图),返回新原理图 UUID
465
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
466
+ console.log('schematicUuid:', schematicUuid);
467
+
468
+ // 2. 等 1.5s 让原理图在工作区落地,回读确认(自带图页 p1)
469
+ await new Promise(r => setTimeout(r, 1500));
470
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
471
+ console.log('name:', info?.name);
472
+ console.log('pages:', (info?.page || []).map(p => p.name).join(', '));
473
+ console.log('parentBoardName:', info?.parentBoardName);
474
+
475
+ // 3. 删除本例创建的原理图,保持工程整洁
476
+ await new Promise(r => setTimeout(r, 1000));
477
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
478
+ console.log('deleted:', deleted);
479
+ ```
480
+
481
+ ### createschematicpage
482
+
483
+ # DMT\_Schematic.createSchematicPage() method
484
+
485
+ > 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.
486
+
487
+ Create Schematic sheet
488
+
489
+ ## Signature
490
+
491
+ ```typescript
492
+ function createSchematicPage(schematicUuid: string): Promise<string | undefined>;
493
+ ```
494
+
495
+ ## Parameters
496
+
497
+ <table><thead><tr><th>
498
+
499
+ Parameter
500
+
501
+ </th><th>
502
+
503
+ Type
504
+
505
+ </th><th>
506
+
507
+ Description
508
+
509
+ </th></tr></thead>
510
+ <tbody><tr><td>
511
+
512
+ schematicUuid
513
+
514
+ </td><td>
515
+
516
+ string
517
+
518
+ </td><td>
519
+
520
+ UUID of the schematic it belongs to
521
+
522
+ </td></tr>
523
+ </tbody></table>
524
+
525
+ ## Returns
526
+
527
+ Promise&lt;string \| undefined&gt;
528
+
529
+ Schematic sheet UUID, if it is `undefined` creation fails
530
+
531
+ ## Example
532
+
533
+ ```javascript
534
+ // 1. 创建专用测试原理图(自带图页 p1),等 1.5s 同步
535
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
536
+ await new Promise(r => setTimeout(r, 1500));
537
+
538
+ // 2. 在该原理图下创建新图页,返回图页 UUID
539
+ const pageUuid = await eda.dmt_Schematic.createSchematicPage(schematicUuid);
540
+ console.log('pageUuid:', pageUuid);
541
+
542
+ // 3. 等 1.5s 同步,回读图页属性,确认归属
543
+ await new Promise(r => setTimeout(r, 1500));
544
+ const pageInfo = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
545
+ console.log('pageName:', pageInfo?.name);
546
+ console.log('belongsToSchematic:', pageInfo?.parentSchematicUuid === schematicUuid);
547
+
548
+ // 4. 清理本例创建的原理图(图页随原理图一起删除)
549
+ await new Promise(r => setTimeout(r, 1000));
550
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
551
+ console.log('deleted:', deleted);
552
+ ```
553
+
554
+ ### deleteschematic
555
+
556
+ # DMT\_Schematic.deleteSchematic() method
557
+
558
+ > 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.
559
+
560
+ Delete Schematic
561
+
562
+ ## Signature
563
+
564
+ ```typescript
565
+ function deleteSchematic(schematicUuid: string): Promise<boolean>;
566
+ ```
567
+
568
+ ## Parameters
569
+
570
+ <table><thead><tr><th>
571
+
572
+ Parameter
573
+
574
+ </th><th>
575
+
576
+ Type
577
+
578
+ </th><th>
579
+
580
+ Description
581
+
582
+ </th></tr></thead>
583
+ <tbody><tr><td>
584
+
585
+ schematicUuid
586
+
587
+ </td><td>
588
+
589
+ string
590
+
591
+ </td><td>
592
+
593
+ Schematic UUID
594
+
595
+ </td></tr>
596
+ </tbody></table>
597
+
598
+ ## Returns
599
+
600
+ Promise&lt;boolean&gt;
601
+
602
+ Whether the operation is successful
603
+
604
+ ## Remarks
605
+
606
+ If the schematic is already associated with a reuse block (a reuse block symbol with the same name exists in the project library), deleting the schematic will also delete the associated PCB and reuse block symbol. If the reuse block symbol cannot be deleted, it will be skipped
607
+
608
+ ## Example
609
+
610
+ ```javascript
611
+ // 1. 创建专用测试原理图(避免误删工程里的现有原理图),等 1.5s 同步
612
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
613
+ await new Promise(r => setTimeout(r, 1500));
614
+
615
+ // 2. 删除该原理图
616
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
617
+ console.log('deleted:', deleted);
618
+
619
+ // 3. 回读确认已删除(返回 undefined 说明原理图已不存在)
620
+ await new Promise(r => setTimeout(r, 1500));
621
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
622
+ console.log('info after delete:', info === undefined ? '已不存在' : info.name);
623
+ ```
624
+
625
+ ### deleteschematicpage
626
+
627
+ # DMT\_Schematic.deleteSchematicPage() method
628
+
629
+ > 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.
630
+
631
+ Delete Schematic sheet
632
+
633
+ ## Signature
634
+
635
+ ```typescript
636
+ function deleteSchematicPage(schematicPageUuid: string): Promise<boolean>;
637
+ ```
638
+
639
+ ## Parameters
640
+
641
+ <table><thead><tr><th>
642
+
643
+ Parameter
644
+
645
+ </th><th>
646
+
647
+ Type
648
+
649
+ </th><th>
650
+
651
+ Description
652
+
653
+ </th></tr></thead>
654
+ <tbody><tr><td>
655
+
656
+ schematicPageUuid
657
+
658
+ </td><td>
659
+
660
+ string
661
+
662
+ </td><td>
663
+
664
+ Schematic sheet UUID
665
+
666
+ </td></tr>
667
+ </tbody></table>
668
+
669
+ ## Returns
670
+
671
+ Promise&lt;boolean&gt;
672
+
673
+ Whether the operation is successful
674
+
675
+ ## Example
676
+
677
+ ```javascript
678
+ // 1. 创建专用测试原理图(自带图页 p1),等 1.5s 同步
679
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
680
+ await new Promise(r => setTimeout(r, 1500));
681
+
682
+ // 2. 再追加一个测试图页 p2 作为删除目标
683
+ const pageUuid = await eda.dmt_Schematic.createSchematicPage(schematicUuid);
684
+ await new Promise(r => setTimeout(r, 1500));
685
+
686
+ // 3. 删除测试图页 p2(只删这一页,原理图保留)
687
+ const deleted = await eda.dmt_Schematic.deleteSchematicPage(pageUuid);
688
+ console.log('deleted:', deleted);
689
+
690
+ // 4. 回读确认:图页已不存在,原理图回到只剩 p1
691
+ await new Promise(r => setTimeout(r, 1500));
692
+ const pageInfo = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
693
+ console.log('page after delete:', pageInfo === undefined ? '已不存在' : pageInfo.name);
694
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
695
+ console.log('remaining pages:', (info?.page || []).map(p => p.name).join(', '));
696
+
697
+ // 5. 清理测试原理图
698
+ await new Promise(r => setTimeout(r, 1000));
699
+ const deletedSch = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
700
+ console.log('deleted:', deletedSch);
701
+ ```
702
+
703
+ ### getallschematicpagesinfo
704
+
705
+ # DMT\_Schematic.getAllSchematicPagesInfo() method
706
+
707
+ > 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.
708
+
709
+ Get all in the project schematic sheet detailed properties of
710
+
711
+ ## Signature
712
+
713
+ ```typescript
714
+ function getAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;
715
+ ```
716
+
717
+ ## Returns
718
+
719
+ Promise&lt;Array&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->&gt;&gt;
720
+
721
+ Array of detailed properties of all schematic sheets
722
+
723
+ ## Example
724
+
725
+ ```javascript
726
+ // 1. 创建测试原理图并追加一页(共 2 页),保证列表里有新近创建的页
727
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
728
+ await new Promise(r => setTimeout(r, 1500));
729
+ await eda.dmt_Schematic.createSchematicPage(schematicUuid);
730
+ await new Promise(r => setTimeout(r, 1500));
731
+
732
+ // 2. 获取工程内所有图页的详细属性
733
+ const pages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
734
+
735
+ // 3. 输出每页名称、UUID 与所属原理图,确认测试页在列
736
+ pages.slice(0, 10).forEach((p, i) => {
737
+ console.log(`page[${i}]:`, p.name, p.uuid, 'parent:', p.parentSchematicUuid);
738
+ });
739
+ console.log('total:', pages.length);
740
+ console.log('testPagesIncluded:', pages.filter(p => p.parentSchematicUuid === schematicUuid).length === 2);
741
+
742
+ // 4. 清理测试原理图
743
+ await new Promise(r => setTimeout(r, 1000));
744
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
745
+ console.log('deleted:', deleted);
746
+ ```
747
+
748
+ ### getallschematicsinfo
749
+
750
+ # DMT\_Schematic.getAllSchematicsInfo() method
751
+
752
+ > 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.
753
+
754
+ Get all in the project schematic detailed properties of
755
+
756
+ ## Signature
757
+
758
+ ```typescript
759
+ function getAllSchematicsInfo(): Promise<Array<IDMT_SchematicItem>>;
760
+ ```
761
+
762
+ ## Returns
763
+
764
+ Promise&lt;Array&lt;[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md)<!-- -->&gt;&gt;
765
+
766
+ Array of detailed properties of all schematics
767
+
768
+ ## Example
769
+
770
+ ```javascript
771
+ // 1. 创建一个测试原理图并等 1.5s 同步,保证列表里有新近创建的对象
772
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
773
+ await new Promise(r => setTimeout(r, 1500));
774
+
775
+ // 2. 获取所有原理图的详细属性
776
+ const schematics = await eda.dmt_Schematic.getAllSchematicsInfo();
777
+
778
+ // 3. 输出每个原理图的名称、UUID 与图页数,确认测试原理图在列
779
+ schematics.slice(0, 10).forEach((s, i) => {
780
+ console.log(`schematic[${i}]:`, s.name, s.uuid, 'pages:', (s.page || []).length, 'board:', s.parentBoardName ?? '游离');
781
+ });
782
+ console.log('total:', schematics.length);
783
+ console.log('testSchematicIncluded:', schematics.some(s => s.uuid === schematicUuid));
784
+
785
+ // 4. 清理测试原理图
786
+ await new Promise(r => setTimeout(r, 1000));
787
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
788
+ console.log('deleted:', deleted);
789
+ ```
790
+
791
+ ### getcurrentschematicallschematicpagesinfo
792
+
793
+ # DMT\_Schematic.getCurrentSchematicAllSchematicPagesInfo() method
794
+
795
+ > 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.
796
+
797
+ Get the detailed properties of all schematic sheets in the current schematic
798
+
799
+ ## Signature
800
+
801
+ ```typescript
802
+ function getCurrentSchematicAllSchematicPagesInfo(): Promise<Array<IDMT_SchematicPageItem>>;
803
+ ```
804
+
805
+ ## Returns
806
+
807
+ Promise&lt;Array&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->&gt;&gt;
808
+
809
+ Array of detailed properties of all schematic sheets
810
+
811
+ ## Example
812
+
813
+ ```javascript
814
+ // 1. 创建专用测试原理图(自带图页 p1)并追加一页
815
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
816
+ await new Promise(r => setTimeout(r, 1500));
817
+ await eda.dmt_Schematic.createSchematicPage(schematicUuid);
818
+ await new Promise(r => setTimeout(r, 1500));
819
+
820
+ // 2. 打开测试原理图的自带图页 p1,把焦点切到该原理图上
821
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
822
+ await eda.dmt_EditorControl.openDocument(info.page[0].uuid);
823
+ await new Promise(r => setTimeout(r, 1000));
824
+
825
+ // 3. 获取当前原理图内所有图页的详细属性
826
+ const pages = await eda.dmt_Schematic.getCurrentSchematicAllSchematicPagesInfo();
827
+
828
+ // 4. 输出每页名称与 UUID,确认全部归属当前原理图
829
+ pages.forEach((p, i) => {
830
+ console.log(`page[${i}]:`, p.name, p.uuid);
831
+ });
832
+ console.log('total:', pages.length);
833
+ console.log('allBelongToCurrent:', pages.every(p => p.parentSchematicUuid === schematicUuid));
834
+
835
+ // 5. 清理测试原理图(处于打开状态也可以直接删除)
836
+ await new Promise(r => setTimeout(r, 1000));
837
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
838
+ console.log('deleted:', deleted);
839
+ ```
840
+
841
+ ### getcurrentschematicinfo
842
+
843
+ # DMT\_Schematic.getCurrentSchematicInfo() method
844
+
845
+ > 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.
846
+
847
+ Get detailed properties of Current schematic
848
+
849
+ ## Signature
850
+
851
+ ```typescript
852
+ function getCurrentSchematicInfo(): Promise<IDMT_SchematicItem | undefined>;
853
+ ```
854
+
855
+ ## Returns
856
+
857
+ Promise&lt;[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined&gt;
858
+
859
+ Schematic detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
860
+
861
+ ## Remarks
862
+
863
+ It will get the detailed properties of the schematic associated with the currently open schematic sheet that has the last input focus
864
+
865
+ ## Example
866
+
867
+ ```javascript
868
+ // 1. 创建专用测试原理图(自带图页 p1),打开该页让焦点落到测试原理图上
869
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
870
+ await new Promise(r => setTimeout(r, 1500));
871
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
872
+ await eda.dmt_EditorControl.openDocument(info.page[0].uuid);
873
+ await new Promise(r => setTimeout(r, 1000));
874
+
875
+ // 2. 获取当前焦点原理图的详细属性
876
+ const current = await eda.dmt_Schematic.getCurrentSchematicInfo();
877
+
878
+ // 3. 输出原理图的名称、UUID 与图页,确认正是测试原理图
879
+ console.log('name:', current?.name);
880
+ console.log('schematicUuid:', current?.uuid);
881
+ console.log('pages:', (current?.page || []).map(p => p.name).join(', '));
882
+ console.log('isFocusedSchematic:', current?.uuid === schematicUuid);
883
+
884
+ // 4. 清理测试原理图(处于打开状态也可以直接删除)
885
+ await new Promise(r => setTimeout(r, 1000));
886
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
887
+ console.log('deleted:', deleted);
888
+ ```
889
+
890
+ ### getcurrentschematicpageinfo
891
+
892
+ # DMT\_Schematic.getCurrentSchematicPageInfo() method
893
+
894
+ > 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.
895
+
896
+ Get detailed properties of Current schematic sheet
897
+
898
+ ## Signature
899
+
900
+ ```typescript
901
+ function getCurrentSchematicPageInfo(): Promise<IDMT_SchematicPageItem | undefined>;
902
+ ```
903
+
904
+ ## Returns
905
+
906
+ Promise&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined&gt;
907
+
908
+ Schematic sheet detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
909
+
910
+ ## Remarks
911
+
912
+ It will get the detailed properties of the currently open schematic sheet that has the last input focus
913
+
914
+ ## Example
915
+
916
+ ```javascript
917
+ // 1. 创建专用测试原理图(自带图页 p1)并打开该页,让焦点落到测试页上
918
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
919
+ await new Promise(r => setTimeout(r, 1500));
920
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
921
+ const pageUuid = info.page[0].uuid;
922
+ await eda.dmt_EditorControl.openDocument(pageUuid);
923
+ await new Promise(r => setTimeout(r, 1000));
924
+
925
+ // 2. 获取当前焦点图页的详细属性
926
+ const currentPage = await eda.dmt_Schematic.getCurrentSchematicPageInfo();
927
+
928
+ // 3. 输出图页名称、UUID、所属原理图与明细表开关,确认正是测试页
929
+ console.log('name:', currentPage?.name);
930
+ console.log('pageUuid:', currentPage?.uuid);
931
+ console.log('parentSchematicUuid:', currentPage?.parentSchematicUuid);
932
+ console.log('showTitleBlock:', currentPage?.showTitleBlock);
933
+ console.log('isFocusedPage:', currentPage?.uuid === pageUuid);
934
+
935
+ // 4. 清理测试原理图(处于打开状态也可以直接删除)
936
+ await new Promise(r => setTimeout(r, 1000));
937
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
938
+ console.log('deleted:', deleted);
939
+ ```
940
+
941
+ ### getschematicinfo
942
+
943
+ # DMT\_Schematic.getSchematicInfo() method
944
+
945
+ > 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.
946
+
947
+ Get detailed properties of Schematic
948
+
949
+ ## Signature
950
+
951
+ ```typescript
952
+ function getSchematicInfo(schematicUuid: string): Promise<IDMT_SchematicItem | undefined>;
953
+ ```
954
+
955
+ ## Parameters
956
+
957
+ <table><thead><tr><th>
958
+
959
+ Parameter
960
+
961
+ </th><th>
962
+
963
+ Type
964
+
965
+ </th><th>
966
+
967
+ Description
968
+
969
+ </th></tr></thead>
970
+ <tbody><tr><td>
971
+
972
+ schematicUuid
973
+
974
+ </td><td>
975
+
976
+ string
977
+
978
+ </td><td>
979
+
980
+ Schematic UUID
981
+
982
+ </td></tr>
983
+ </tbody></table>
984
+
985
+ ## Returns
986
+
987
+ Promise&lt;[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined&gt;
988
+
989
+ Schematic detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
990
+
991
+ ## Example
992
+
993
+ ```javascript
994
+ // 1. 创建测试原理图并等 1.5s 同步
995
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
996
+ await new Promise(r => setTimeout(r, 1500));
997
+
998
+ // 2. 按 UUID 查询原理图详细属性
999
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1000
+
1001
+ // 3. 输出属性
1002
+ console.log('name:', info?.name);
1003
+ console.log('itemType:', info?.itemType);
1004
+ console.log('parentProjectUuid:', info?.parentProjectUuid);
1005
+ console.log('pages:', (info?.page || []).map(p => p.name).join(', '));
1006
+
1007
+ // 4. 清理测试原理图
1008
+ await new Promise(r => setTimeout(r, 1000));
1009
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1010
+ console.log('deleted:', deleted);
1011
+ ```
1012
+
1013
+ ### getschematicpageinfo
1014
+
1015
+ # DMT\_Schematic.getSchematicPageInfo() 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
+ Get detailed properties of Schematic sheet
1020
+
1021
+ ## Signature
1022
+
1023
+ ```typescript
1024
+ function getSchematicPageInfo(
1025
+ schematicPageUuid: string,
1026
+ ): Promise<IDMT_SchematicPageItem | undefined>;
1027
+ ```
1028
+
1029
+ ## Parameters
1030
+
1031
+ <table><thead><tr><th>
1032
+
1033
+ Parameter
1034
+
1035
+ </th><th>
1036
+
1037
+ Type
1038
+
1039
+ </th><th>
1040
+
1041
+ Description
1042
+
1043
+ </th></tr></thead>
1044
+ <tbody><tr><td>
1045
+
1046
+ schematicPageUuid
1047
+
1048
+ </td><td>
1049
+
1050
+ string
1051
+
1052
+ </td><td>
1053
+
1054
+ Schematic sheet UUID
1055
+
1056
+ </td></tr>
1057
+ </tbody></table>
1058
+
1059
+ ## Returns
1060
+
1061
+ Promise&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined&gt;
1062
+
1063
+ Schematic sheet detailed properties of; if it is `undefined`<!-- -->, the retrieval failed
1064
+
1065
+ ## Example
1066
+
1067
+ ```javascript
1068
+ // 1. 创建测试原理图(自带图页 p1)并等 1.5s 同步
1069
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
1070
+ await new Promise(r => setTimeout(r, 1500));
1071
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1072
+ const pageUuid = info.page[0].uuid;
1073
+
1074
+ // 2. 按 UUID 查询图页详细属性
1075
+ const pageInfo = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
1076
+
1077
+ // 3. 输出属性
1078
+ console.log('name:', pageInfo?.name);
1079
+ console.log('itemType:', pageInfo?.itemType);
1080
+ console.log('parentSchematicUuid:', pageInfo?.parentSchematicUuid);
1081
+ console.log('showTitleBlock:', pageInfo?.showTitleBlock);
1082
+ console.log('titleBlockFields:', Object.keys(pageInfo?.titleBlockData || {}).length);
1083
+
1084
+ // 4. 清理测试原理图
1085
+ await new Promise(r => setTimeout(r, 1000));
1086
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1087
+ console.log('deleted:', deleted);
1088
+ ```
1089
+
1090
+ ### modifyschematicname
1091
+
1092
+ # DMT\_Schematic.modifySchematicName() method
1093
+
1094
+ > 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.
1095
+
1096
+ Modify Schematic name
1097
+
1098
+ ## Signature
1099
+
1100
+ ```typescript
1101
+ function modifySchematicName(schematicUuid: string, schematicName: string): Promise<boolean>;
1102
+ ```
1103
+
1104
+ ## Parameters
1105
+
1106
+ <table><thead><tr><th>
1107
+
1108
+ Parameter
1109
+
1110
+ </th><th>
1111
+
1112
+ Type
1113
+
1114
+ </th><th>
1115
+
1116
+ Description
1117
+
1118
+ </th></tr></thead>
1119
+ <tbody><tr><td>
1120
+
1121
+ schematicUuid
1122
+
1123
+ </td><td>
1124
+
1125
+ string
1126
+
1127
+ </td><td>
1128
+
1129
+ Schematic UUID
1130
+
1131
+ </td></tr>
1132
+ <tr><td>
1133
+
1134
+ schematicName
1135
+
1136
+ </td><td>
1137
+
1138
+ string
1139
+
1140
+ </td><td>
1141
+
1142
+ Schematic name
1143
+
1144
+ </td></tr>
1145
+ </tbody></table>
1146
+
1147
+ ## Returns
1148
+
1149
+ Promise&lt;boolean&gt;
1150
+
1151
+ Whether Modify Successful
1152
+
1153
+ ## Remarks
1154
+
1155
+ If the schematic is already associated with a reuse block (a reuse block symbol with the same name exists in the project library), modifying the name will also modify the reuse block symbol name and the associated PCB name
1156
+
1157
+ ## Example
1158
+
1159
+ ```javascript
1160
+ // 1. 创建专用测试原理图(自带图页 p1)并等 1.5s 同步
1161
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
1162
+ await new Promise(r => setTimeout(r, 1500));
1163
+
1164
+ // 2. 打开自带图页 p1(改名只对已打开的原理图生效)
1165
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1166
+ await eda.dmt_EditorControl.openDocument(info.page[0].uuid);
1167
+ await new Promise(r => setTimeout(r, 1000));
1168
+
1169
+ // 3. 修改原理图名称(只对本例创建的测试原理图改名)
1170
+ const newName = '嘉立创示例_原理图新名称';
1171
+ const renamed = await eda.dmt_Schematic.modifySchematicName(schematicUuid, newName);
1172
+ console.log('renamed:', renamed);
1173
+
1174
+ // 4. 等 1.5s 让改名同步,回读验证(英文名可能被归一化为小写,按不区分大小写比较)
1175
+ await new Promise(r => setTimeout(r, 1500));
1176
+ const after = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1177
+ console.log('renamedTo:', after?.name);
1178
+ console.log('renameVerified:', (after?.name ?? '').toLowerCase() === newName.toLowerCase());
1179
+
1180
+ // 5. 清理测试原理图,保持工程整洁
1181
+ await new Promise(r => setTimeout(r, 1000));
1182
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1183
+ console.log('deleted:', deleted);
1184
+ ```
1185
+
1186
+ ### modifyschematicpagename
1187
+
1188
+ # DMT\_Schematic.modifySchematicPageName() method
1189
+
1190
+ > 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.
1191
+
1192
+ Modify Schematic sheet name
1193
+
1194
+ ## Signature
1195
+
1196
+ ```typescript
1197
+ function modifySchematicPageName(
1198
+ schematicPageUuid: string,
1199
+ schematicPageName: string,
1200
+ ): Promise<boolean>;
1201
+ ```
1202
+
1203
+ ## Parameters
1204
+
1205
+ <table><thead><tr><th>
1206
+
1207
+ Parameter
1208
+
1209
+ </th><th>
1210
+
1211
+ Type
1212
+
1213
+ </th><th>
1214
+
1215
+ Description
1216
+
1217
+ </th></tr></thead>
1218
+ <tbody><tr><td>
1219
+
1220
+ schematicPageUuid
1221
+
1222
+ </td><td>
1223
+
1224
+ string
1225
+
1226
+ </td><td>
1227
+
1228
+ Schematic sheet UUID
1229
+
1230
+ </td></tr>
1231
+ <tr><td>
1232
+
1233
+ schematicPageName
1234
+
1235
+ </td><td>
1236
+
1237
+ string
1238
+
1239
+ </td><td>
1240
+
1241
+ Schematic sheet name
1242
+
1243
+ </td></tr>
1244
+ </tbody></table>
1245
+
1246
+ ## Returns
1247
+
1248
+ Promise&lt;boolean&gt;
1249
+
1250
+ Whether Modify Successful
1251
+
1252
+ ## Example
1253
+
1254
+ ```javascript
1255
+ // 1. 创建专用测试原理图(自带图页 p1 作为改名目标)并等 1.5s 同步
1256
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
1257
+ await new Promise(r => setTimeout(r, 1500));
1258
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1259
+ const pageUuid = info.page[0].uuid;
1260
+
1261
+ // 2. 修改图页名称(只对本例创建的测试图页改名)
1262
+ const newName = '嘉立创示例_电源页';
1263
+ const renamed = await eda.dmt_Schematic.modifySchematicPageName(pageUuid, newName);
1264
+ console.log('renamed:', renamed);
1265
+
1266
+ // 3. 等 1.5s 让改名同步,回读验证(英文名可能被归一化为小写,按不区分大小写比较)
1267
+ await new Promise(r => setTimeout(r, 1500));
1268
+ const after = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
1269
+ console.log('renamedTo:', after?.name);
1270
+ console.log('renameVerified:', (after?.name ?? '').toLowerCase() === newName.toLowerCase());
1271
+
1272
+ // 4. 清理测试原理图,保持工程整洁
1273
+ await new Promise(r => setTimeout(r, 1000));
1274
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1275
+ console.log('deleted:', deleted);
1276
+ ```
1277
+
1278
+ ### modifyschematicpagetitleblock
1279
+
1280
+ # DMT\_Schematic.modifySchematicPageTitleBlock() method
1281
+
1282
+ > 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.
1283
+
1284
+ Modify the title block of a schematic sheet
1285
+
1286
+ ## Signature
1287
+
1288
+ ```typescript
1289
+ function modifySchematicPageTitleBlock(
1290
+ showTitleBlock?: boolean,
1291
+ titleBlockData?: Record<string, { showTitle?: boolean; showValue?: boolean; value?: any }>,
1292
+ ): Promise<boolean>;
1293
+ ```
1294
+
1295
+ ## Parameters
1296
+
1297
+ <table><thead><tr><th>
1298
+
1299
+ Parameter
1300
+
1301
+ </th><th>
1302
+
1303
+ Type
1304
+
1305
+ </th><th>
1306
+
1307
+ Description
1308
+
1309
+ </th></tr></thead>
1310
+ <tbody><tr><td>
1311
+
1312
+ showTitleBlock
1313
+
1314
+ </td><td>
1315
+
1316
+ boolean
1317
+
1318
+ </td><td>
1319
+
1320
+ _(Optional)_ Whether to show the title block. If undefined, the current state will be kept
1321
+
1322
+ </td></tr>
1323
+ <tr><td>
1324
+
1325
+ titleBlockData
1326
+
1327
+ </td><td>
1328
+
1329
+ Record&lt;string, { showTitle?: boolean; showValue?: boolean; value?: any }&gt;
1330
+
1331
+ </td><td>
1332
+
1333
+ _(Optional)_ The title block items to be modified and their modified values
1334
+
1335
+ </td></tr>
1336
+ </tbody></table>
1337
+
1338
+ ## Returns
1339
+
1340
+ Promise&lt;boolean&gt;
1341
+
1342
+ Whether the modification was successful. If `showTitleBlock` and `titleBlockData` are not passed in, `false` will be returned. Note that if unrecognized title block items exist but the program does not report an error, `true` will be returned because the unrecognized items are ignored
1343
+
1344
+ ## Remarks
1345
+
1346
+ `titleBlockData` only needs to pass in any title block items to be modified as `key`<!-- -->, along with the values to modify them to. Any unrecognized title block items will be ignored, and any unpassed items and values will remain in their default state
1347
+
1348
+ 注意事项:
1349
+
1350
+ - 图页尺寸是 \*\*硬约束\*\*(如 A4 = 1170×825,单位 10mil),明细项 `Size` 非法会抛 `TypeError`<!-- -->; - `titleBlockData` 的合法 key 含 `Size` / `Company` 等,明细项的 `showTitle` / `showValue` / `value` \*\*三个字段缺一不可\*\*
1351
+
1352
+ ## Example
1353
+
1354
+ ```javascript
1355
+ // 1. 创建专用测试原理图并打开自带图页 p1,让焦点落到目标页上
1356
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
1357
+ await new Promise(r => setTimeout(r, 1500));
1358
+ const info = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1359
+ const pageUuid = info.page[0].uuid;
1360
+ await eda.dmt_EditorControl.openDocument(pageUuid);
1361
+ await new Promise(r => setTimeout(r, 1000));
1362
+
1363
+ // 2. 修改明细表:显示明细表,并把"公司"改为示例值(三个字段缺一不可)
1364
+ const modified = await eda.dmt_Schematic.modifySchematicPageTitleBlock(true, {
1365
+ Company: { showTitle: true, showValue: true, value: '嘉立创示例科技' },
1366
+ });
1367
+ console.log('modified:', modified);
1368
+
1369
+ // 3. 等 1.5s 同步,回读验证明细项已更新
1370
+ await new Promise(r => setTimeout(r, 1500));
1371
+ const after = await eda.dmt_Schematic.getSchematicPageInfo(pageUuid);
1372
+ console.log('showTitleBlock:', after?.showTitleBlock);
1373
+ console.log('company:', after?.titleBlockData?.Company?.value);
1374
+ console.log('modifyVerified:', after?.titleBlockData?.Company?.value === '嘉立创示例科技');
1375
+
1376
+ // 4. 清理测试原理图,保持工程整洁
1377
+ await new Promise(r => setTimeout(r, 1000));
1378
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1379
+ console.log('deleted:', deleted);
1380
+ ```
1381
+
1382
+ ### reorderschematicpages
1383
+
1384
+ # DMT\_Schematic.reorderSchematicPages() method
1385
+
1386
+ > 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.
1387
+
1388
+ Reorder schematic sheets
1389
+
1390
+ ## Signature
1391
+
1392
+ ```typescript
1393
+ function reorderSchematicPages(
1394
+ schematicUuid: string,
1395
+ schematicPageItemsArray: Array<IDMT_SchematicPageItem>,
1396
+ ): Promise<boolean>;
1397
+ ```
1398
+
1399
+ ## Parameters
1400
+
1401
+ <table><thead><tr><th>
1402
+
1403
+ Parameter
1404
+
1405
+ </th><th>
1406
+
1407
+ Type
1408
+
1409
+ </th><th>
1410
+
1411
+ Description
1412
+
1413
+ </th></tr></thead>
1414
+ <tbody><tr><td>
1415
+
1416
+ schematicUuid
1417
+
1418
+ </td><td>
1419
+
1420
+ string
1421
+
1422
+ </td><td>
1423
+
1424
+ The UUID of the schematic associated with the sheets being sorted
1425
+
1426
+ </td></tr>
1427
+ <tr><td>
1428
+
1429
+ schematicPageItemsArray
1430
+
1431
+ </td><td>
1432
+
1433
+ Array&lt;[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->&gt;
1434
+
1435
+ </td><td>
1436
+
1437
+ Array of all schematic sheet properties
1438
+
1439
+ </td></tr>
1440
+ </tbody></table>
1441
+
1442
+ ## Returns
1443
+
1444
+ Promise&lt;boolean&gt;
1445
+
1446
+ Sorting whether the operation is successful
1447
+
1448
+ ## Remarks
1449
+
1450
+ Here, the array of source schematic sheet properties needs to be obtained through [DMT\_Schematic.getAllSchematicPagesInfo()](./DMT_Schematic.md) or other upstream methods. After sorting the array, pass it in
1451
+
1452
+ ## Example
1453
+
1454
+ ```javascript
1455
+ // 1. 创建专用测试原理图(自带图页 p1)并再追加两页,凑出可排序的页序列
1456
+ const schematicUuid = await eda.dmt_Schematic.createSchematic();
1457
+ await new Promise(r => setTimeout(r, 1500));
1458
+ await eda.dmt_Schematic.createSchematicPage(schematicUuid);
1459
+ await new Promise(r => setTimeout(r, 1500));
1460
+ await eda.dmt_Schematic.createSchematicPage(schematicUuid);
1461
+ await new Promise(r => setTimeout(r, 1500));
1462
+
1463
+ // 2. 从上游接口取得该原理图的全部图页,输出当前顺序
1464
+ const allPages = await eda.dmt_Schematic.getAllSchematicPagesInfo();
1465
+ const myPages = allPages.filter(p => p.parentSchematicUuid === schematicUuid);
1466
+ console.log('orderBefore:', myPages.map(p => p.name).join(' -> '));
1467
+
1468
+ // 3. 反转页序列后传入,执行重排
1469
+ const reversed = [...myPages].reverse();
1470
+ const reorderOk = await eda.dmt_Schematic.reorderSchematicPages(schematicUuid, reversed);
1471
+ console.log('reorderOk:', reorderOk);
1472
+
1473
+ // 4. 等 1.5s 同步,回读当前页顺序
1474
+ await new Promise(r => setTimeout(r, 1500));
1475
+ const after = await eda.dmt_Schematic.getSchematicInfo(schematicUuid);
1476
+ console.log('orderAfter:', (after?.page || []).map(p => p.name).join(' -> '));
1477
+
1478
+ // 5. 清理测试原理图,保持工程整洁
1479
+ await new Promise(r => setTimeout(r, 1000));
1480
+ const deleted = await eda.dmt_Schematic.deleteSchematic(schematicUuid);
1481
+ console.log('deleted:', deleted);
1482
+ ```