@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.
- package/README.md +3 -1
- package/lib/capabilities.js +3 -2
- package/lib/client.js +576 -452
- package/lib/index.js +89 -2
- package/package.json +10 -1
- package/skill/INDEX.md +10 -8
- package/skill/README.md +125 -0
- package/skill/README.zh-Hans.md +125 -0
- package/skill/SKILL.md +746 -746
- package/skill/format/index.md +152 -152
- package/skill/format/pcb/3d.md +166 -166
- package/skill/format/pcb/attr.md +63 -63
- package/skill/format/pcb/common.md +306 -306
- package/skill/format/pcb/component.md +132 -132
- package/skill/format/pcb/dimension.md +58 -58
- package/skill/format/pcb/index.md +17 -17
- package/skill/format/pcb/obj.md +43 -43
- package/skill/format/pcb/pad_via.md +151 -151
- package/skill/format/pcb/panel.md +64 -64
- package/skill/format/pcb/partition.md +43 -43
- package/skill/format/pcb/primitive.md +196 -196
- package/skill/format/pcb/rule.md +71 -71
- package/skill/format/pcb/shape.md +441 -441
- package/skill/format/pcb/text.md +62 -62
- package/skill/format/project/blob.md +30 -30
- package/skill/format/project/common.md +42 -42
- package/skill/format/project/group.md +62 -62
- package/skill/format/project/index.md +12 -12
- package/skill/format/project/instance.md +32 -32
- package/skill/format/project/meta.md +189 -189
- package/skill/format/project/variant.md +30 -30
- package/skill/format/schematic/attr.md +41 -41
- package/skill/format/schematic/common.md +47 -47
- package/skill/format/schematic/component.md +91 -91
- package/skill/format/schematic/index.md +14 -14
- package/skill/format/schematic/obj.md +41 -41
- package/skill/format/schematic/pin.md +59 -59
- package/skill/format/schematic/shape.md +231 -231
- package/skill/format/schematic/structure.md +53 -53
- package/skill/format/schematic/table.md +109 -109
- package/skill/format/schematic/text.md +47 -47
- package/skill/format/schematic/wire.md +132 -132
- package/skill/guide/ancillary-projects/easyeda-api-sdk.md +1 -0
- package/skill/guide/ancillary-projects/pro-api-types.md +5 -5
- package/skill/guide/ancillary-projects.md +10 -10
- package/skill/guide/cli.md +1510 -0
- package/skill/guide/error-handling.md +38 -38
- package/skill/guide/extension-json.md +135 -135
- package/skill/guide/extensions-marketplace.md +61 -61
- package/skill/guide/how-to-start.md +316 -301
- package/skill/guide/i18n.md +57 -57
- package/skill/guide/index.md +7 -7
- package/skill/guide/inline-frame.md +20 -20
- package/skill/guide/invoke-apis.md +81 -81
- package/skill/guide/stability.md +37 -37
- package/skill/references/_index.md +471 -398
- package/skill/references/_quick-reference.md +3103 -3028
- package/skill/references/classes/DMT_Board.md +537 -533
- package/skill/references/classes/DMT_EditorControl.md +1736 -1736
- package/skill/references/classes/DMT_Event.md +356 -356
- package/skill/references/classes/DMT_Folder.md +775 -775
- package/skill/references/classes/DMT_Panel.md +531 -531
- package/skill/references/classes/DMT_Pcb.md +579 -575
- package/skill/references/classes/DMT_Project.md +734 -573
- package/skill/references/classes/DMT_Schematic.md +1482 -1477
- package/skill/references/classes/DMT_SelectControl.md +96 -96
- package/skill/references/classes/DMT_Team.md +172 -172
- package/skill/references/classes/DMT_Workspace.md +198 -198
- package/skill/references/classes/EDA.md +1001 -961
- package/skill/references/classes/IPCB_ComplexPolygon.md +299 -299
- package/skill/references/classes/IPCB_Polygon.md +175 -175
- package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -1901
- package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -2993
- package/skill/references/classes/IPCB_PrimitiveComponent.md +2624 -2627
- package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -410
- package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -1419
- package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -1325
- package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -1461
- package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -1639
- package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -1700
- package/skill/references/classes/IPCB_PrimitivePad.md +3155 -3155
- package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -1193
- package/skill/references/classes/IPCB_PrimitivePour.md +1858 -1858
- package/skill/references/classes/IPCB_PrimitivePoured.md +556 -556
- package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -1332
- package/skill/references/classes/IPCB_PrimitiveString.md +2315 -2315
- package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -1588
- package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -1676
- package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -2541
- package/skill/references/classes/ISCH_PrimitiveBus.md +973 -973
- package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -260
- package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -1392
- package/skill/references/classes/ISCH_PrimitiveComponent.md +2910 -2913
- package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -155
- package/skill/references/classes/ISCH_PrimitiveObject.md +960 -960
- package/skill/references/classes/ISCH_PrimitivePin.md +2402 -2402
- package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -1028
- package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -1777
- package/skill/references/classes/ISCH_PrimitiveText.md +1771 -1771
- package/skill/references/classes/ISCH_PrimitiveWire.md +973 -973
- package/skill/references/classes/LIB_3DModel.md +782 -780
- package/skill/references/classes/LIB_Cbb.md +957 -957
- package/skill/references/classes/LIB_Classification.md +969 -965
- package/skill/references/classes/LIB_Device.md +1222 -1221
- package/skill/references/classes/LIB_Footprint.md +1298 -1153
- package/skill/references/classes/LIB_LibrariesList.md +361 -329
- package/skill/references/classes/LIB_PanelLibrary.md +855 -855
- package/skill/references/classes/LIB_SelectControl.md +89 -89
- package/skill/references/classes/LIB_SimulationModel.md +807 -821
- package/skill/references/classes/LIB_Symbol.md +1341 -1195
- package/skill/references/classes/PCB_Document.md +1770 -1754
- package/skill/references/classes/PCB_Drc.md +3379 -3375
- package/skill/references/classes/PCB_Event.md +1166 -1081
- package/skill/references/classes/PCB_ImageTool.md +363 -0
- package/skill/references/classes/PCB_Layer.md +1915 -1911
- package/skill/references/classes/PCB_ManufactureData.md +2968 -2968
- package/skill/references/classes/PCB_MathPolygon.md +916 -785
- package/skill/references/classes/PCB_Net.md +1128 -1128
- package/skill/references/classes/PCB_Primitive.md +217 -217
- package/skill/references/classes/PCB_PrimitiveArc.md +820 -894
- package/skill/references/classes/PCB_PrimitiveAttribute.md +635 -717
- package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -1050
- package/skill/references/classes/PCB_PrimitiveDimension.md +789 -833
- package/skill/references/classes/PCB_PrimitiveFill.md +783 -861
- package/skill/references/classes/PCB_PrimitiveImage.md +803 -875
- package/skill/references/classes/PCB_PrimitiveLine.md +787 -858
- package/skill/references/classes/PCB_PrimitiveObject.md +796 -800
- package/skill/references/classes/PCB_PrimitivePad.md +947 -944
- package/skill/references/classes/PCB_PrimitivePolyline.md +744 -819
- package/skill/references/classes/PCB_PrimitivePour.md +808 -845
- package/skill/references/classes/PCB_PrimitivePoured.md +363 -363
- package/skill/references/classes/PCB_PrimitiveRegion.md +765 -799
- package/skill/references/classes/PCB_PrimitiveString.md +828 -910
- package/skill/references/classes/PCB_PrimitiveVia.md +761 -765
- package/skill/references/classes/PCB_RayTracerEngine.md +603 -263
- package/skill/references/classes/PCB_SelectControl.md +495 -495
- package/skill/references/classes/PCB_Tool.md +9 -0
- package/skill/references/classes/PNL_Document.md +83 -83
- package/skill/references/classes/SCH_Document.md +797 -809
- package/skill/references/classes/SCH_Drc.md +246 -242
- package/skill/references/classes/SCH_Event.md +583 -583
- package/skill/references/classes/SCH_ManufactureData.md +1209 -1205
- package/skill/references/classes/SCH_Net.md +200 -200
- package/skill/references/classes/SCH_Netlist.md +191 -191
- package/skill/references/classes/SCH_Primitive.md +337 -337
- package/skill/references/classes/SCH_PrimitiveArc.md +686 -692
- package/skill/references/classes/SCH_PrimitiveAttribute.md +579 -590
- package/skill/references/classes/SCH_PrimitiveBus.md +618 -624
- package/skill/references/classes/SCH_PrimitiveCircle.md +667 -683
- package/skill/references/classes/SCH_PrimitiveComponent.md +2256 -2240
- package/skill/references/classes/SCH_PrimitiveObject.md +666 -666
- package/skill/references/classes/SCH_PrimitivePin.md +737 -754
- package/skill/references/classes/SCH_PrimitivePolygon.md +621 -627
- package/skill/references/classes/SCH_PrimitiveRectangle.md +715 -731
- package/skill/references/classes/SCH_PrimitiveText.md +736 -746
- package/skill/references/classes/SCH_PrimitiveWire.md +701 -703
- package/skill/references/classes/SCH_SelectControl.md +520 -520
- package/skill/references/classes/SCH_SimulationEngine.md +133 -133
- package/skill/references/classes/SCH_Utils.md +121 -121
- package/skill/references/classes/SYS_ClientUrl.md +173 -173
- package/skill/references/classes/SYS_Dialog.md +825 -825
- package/skill/references/classes/SYS_Environment.md +640 -502
- package/skill/references/classes/SYS_ExternalApi.md +246 -0
- package/skill/references/classes/SYS_FileManager.md +1664 -1686
- package/skill/references/classes/SYS_FileSystem.md +1366 -1171
- package/skill/references/classes/SYS_FontManager.md +224 -224
- package/skill/references/classes/SYS_FormatConversion.md +349 -349
- package/skill/references/classes/SYS_HeaderMenu.md +480 -479
- package/skill/references/classes/SYS_Help.md +141 -0
- package/skill/references/classes/SYS_I18n.md +861 -861
- package/skill/references/classes/SYS_IFrame.md +541 -535
- package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -246
- package/skill/references/classes/SYS_Log.md +422 -424
- package/skill/references/classes/SYS_Math.md +1565 -1565
- package/skill/references/classes/SYS_Message.md +363 -363
- package/skill/references/classes/SYS_MessageBox.md +285 -285
- package/skill/references/classes/SYS_MessageBus.md +1618 -1618
- package/skill/references/classes/SYS_PanelControl.md +696 -696
- package/skill/references/classes/SYS_RightClickMenu.md +175 -175
- package/skill/references/classes/SYS_Setting.md +134 -85
- package/skill/references/classes/SYS_ShortcutKey.md +623 -623
- package/skill/references/classes/SYS_Storage.md +484 -484
- package/skill/references/classes/SYS_Timer.md +447 -447
- package/skill/references/classes/SYS_ToastMessage.md +194 -194
- package/skill/references/classes/SYS_Tool.md +317 -241
- package/skill/references/classes/SYS_Unit.md +594 -594
- package/skill/references/classes/SYS_WebSocket.md +401 -401
- package/skill/references/classes/SYS_Window.md +849 -850
- package/skill/references/enums/EDMT_EditorDocumentType.md +324 -278
- package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +51 -47
- package/skill/references/enums/EDMT_EditorTabEventType.md +68 -62
- package/skill/references/enums/EDMT_IndicatorMarkerType.md +90 -80
- package/skill/references/enums/EDMT_ItemType.md +181 -157
- package/skill/references/enums/EDMT_ProjectCollaborationMode.md +51 -47
- package/skill/references/enums/EDMT_ProjectFileFormat.md +60 -0
- package/skill/references/enums/EDMT_ProjectReadyState.md +82 -0
- package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +51 -47
- package/skill/references/enums/ELIB_LibraryType.md +129 -113
- package/skill/references/enums/ELIB_PreviewType.md +77 -69
- package/skill/references/enums/ELIB_SimulationModelType.md +51 -47
- package/skill/references/enums/ELIB_SymbolType.md +142 -124
- package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +51 -47
- package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +51 -47
- package/skill/references/enums/EPCB_AutoRoutingOptimization.md +51 -47
- package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +51 -47
- package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +55 -51
- package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +64 -58
- package/skill/references/enums/EPCB_LayerColorConfiguration.md +90 -80
- package/skill/references/enums/EPCB_LayerId.md +1169 -881
- package/skill/references/enums/EPCB_LayerStatus.md +64 -58
- package/skill/references/enums/EPCB_LayerType.md +129 -113
- package/skill/references/enums/EPCB_MouseEventType.md +64 -58
- package/skill/references/enums/EPCB_NetEventType.md +64 -58
- package/skill/references/enums/EPCB_PcbPlateType.md +51 -47
- package/skill/references/enums/EPCB_PdfOutputMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +51 -47
- package/skill/references/enums/EPCB_PrimitiveDimensionType.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveEventType.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveFillMode.md +68 -62
- package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePadHoleType.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePadShapeType.md +90 -80
- package/skill/references/enums/EPCB_PrimitivePadType.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +107 -95
- package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +142 -124
- package/skill/references/enums/EPCB_PrimitiveType.md +233 -201
- package/skill/references/enums/EPCB_PrimitiveViaType.md +64 -58
- package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +116 -102
- package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +90 -80
- package/skill/references/enums/ESCH_ExportDocumentFileType.md +64 -58
- package/skill/references/enums/ESCH_MouseEventType.md +51 -47
- package/skill/references/enums/ESCH_PrimitiveComponentType.md +142 -124
- package/skill/references/enums/ESCH_PrimitiveEventType.md +77 -69
- package/skill/references/enums/ESCH_PrimitiveFillStyle.md +129 -113
- package/skill/references/enums/ESCH_PrimitiveLineType.md +77 -69
- package/skill/references/enums/ESCH_PrimitivePinShape.md +77 -69
- package/skill/references/enums/ESCH_PrimitivePinType.md +168 -146
- package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +142 -124
- package/skill/references/enums/ESCH_PrimitiveType.md +207 -179
- package/skill/references/enums/ESCH_SimulationNetlistType.md +38 -36
- package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +51 -47
- package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +77 -69
- package/skill/references/enums/ESYS_BottomPanelTab.md +94 -80
- package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +181 -157
- package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +55 -51
- package/skill/references/enums/ESYS_ImportProjectImportOption.md +64 -58
- package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +51 -47
- package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +55 -51
- package/skill/references/enums/ESYS_JobState.md +95 -0
- package/skill/references/enums/ESYS_LeftPanelTab.md +94 -80
- package/skill/references/enums/ESYS_LogType.md +77 -102
- package/skill/references/enums/ESYS_NetlistType.md +129 -113
- package/skill/references/enums/ESYS_PanelPosition.md +69 -0
- package/skill/references/enums/ESYS_PanelTab.md +368 -0
- package/skill/references/enums/ESYS_RightPanelTab.md +237 -201
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +220 -190
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +103 -91
- package/skill/references/enums/ESYS_StartPageQuickStartItem.md +237 -205
- package/skill/references/enums/ESYS_Theme.md +51 -47
- package/skill/references/enums/ESYS_ToastMessageType.md +90 -80
- package/skill/references/enums/ESYS_Unit.md +116 -102
- package/skill/references/enums/ESYS_WindowEventType.md +64 -47
- package/skill/references/enums/ESYS_WindowOpenTarget.md +51 -47
- package/skill/references/enums/NetportDeviceName.md +146 -146
- package/skill/references/enums/SchToolBarDeviceName.md +278 -278
- package/skill/references/interfaces/BoardProps.md +169 -169
- package/skill/references/interfaces/BorderConfig.md +109 -0
- package/skill/references/interfaces/ButtonProps.md +196 -169
- package/skill/references/interfaces/CellClickInfo.md +142 -0
- package/skill/references/interfaces/CellCoord.md +88 -0
- package/skill/references/interfaces/CheckBoxProps.md +223 -196
- package/skill/references/interfaces/CheckChangeDetail.md +88 -0
- package/skill/references/interfaces/CheckboxEditConfig.md +159 -0
- package/skill/references/interfaces/ClipboardCellData.md +142 -0
- package/skill/references/interfaces/ClipboardConfig.md +115 -0
- package/skill/references/interfaces/ColorPickerProps.md +169 -0
- package/skill/references/interfaces/ColumnDef.md +605 -0
- package/skill/references/interfaces/ColumnEditTrigger.md +57 -0
- package/skill/references/interfaces/ColumnGroupDef.md +192 -0
- package/skill/references/interfaces/ColumnResizeConfig.md +142 -0
- package/skill/references/interfaces/ComponentPropsMap.md +517 -448
- package/skill/references/interfaces/CustomHeaderConfig.md +169 -0
- package/skill/references/interfaces/DialogProps.md +385 -385
- package/skill/references/interfaces/DragSortConfig.md +115 -0
- package/skill/references/interfaces/EditingConfig.md +196 -0
- package/skill/references/interfaces/FilteringConfig.md +250 -0
- package/skill/references/interfaces/FixedColumnConfig.md +88 -0
- package/skill/references/interfaces/FlexItemProps.md +116 -116
- package/skill/references/interfaces/FlexProps.md +224 -224
- package/skill/references/interfaces/GridItemProps.md +143 -143
- package/skill/references/interfaces/GridProps.md +143 -143
- package/skill/references/interfaces/IDMT_BoardItem.md +171 -171
- package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -171
- package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -169
- package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -173
- package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -169
- package/skill/references/interfaces/IDMT_FolderItem.md +225 -225
- package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -393
- package/skill/references/interfaces/IDMT_PanelItem.md +144 -144
- package/skill/references/interfaces/IDMT_PcbItem.md +171 -171
- package/skill/references/interfaces/IDMT_ProjectItem.md +143 -143
- package/skill/references/interfaces/IDMT_SchematicItem.md +225 -225
- package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -198
- package/skill/references/interfaces/IDMT_TeamItem.md +144 -144
- package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -117
- package/skill/references/interfaces/IDesignPortal.md +103 -103
- package/skill/references/interfaces/ILIB_3DModelItem.md +198 -198
- package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_CbbItem.md +225 -225
- package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -150
- package/skill/references/interfaces/ILIB_ClassificationNode.md +98 -0
- package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -210
- package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -304
- package/skill/references/interfaces/ILIB_DeviceItem.md +279 -279
- package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -250
- package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -521
- package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -64
- package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +93 -99
- package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -150
- package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +143 -157
- package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -63
- package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -123
- package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -97
- package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -98
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -115
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -169
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -234
- package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +91 -105
- package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -96
- package/skill/references/interfaces/ILIB_FootprintItem.md +256 -198
- package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -61
- package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -92
- package/skill/references/interfaces/ILIB_LibraryItem.md +115 -115
- package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -198
- package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_RegisterExtendLibraryProps.md +71 -0
- package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -306
- package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -304
- package/skill/references/interfaces/ILIB_SymbolItem.md +306 -279
- package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -61
- package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -304
- package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -169
- package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -220
- package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -169
- package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -169
- package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -115
- package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -65
- package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -88
- package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -115
- package/skill/references/interfaces/IPCB_LayerItem.md +277 -277
- package/skill/references/interfaces/IPCB_NetClassItem.md +115 -115
- package/skill/references/interfaces/IPCB_NetInfo.md +115 -115
- package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -88
- package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -88
- package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -115
- package/skill/references/interfaces/IPCB_Primitive.md +218 -218
- package/skill/references/interfaces/IPCB_PrimitiveAPI.md +174 -175
- package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -151
- package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -142
- package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -154
- package/skill/references/interfaces/IPCB_RayTracerBackgroundConfig.md +223 -0
- package/skill/references/interfaces/IPCB_RayTracerLightConfig.md +412 -0
- package/skill/references/interfaces/IPCB_RayTracerMaterialConfig.md +547 -0
- package/skill/references/interfaces/IPCB_RayTracerPcbMaterialConfig.md +196 -0
- package/skill/references/interfaces/IPCB_RayTracerRenderConfigurations.md +200 -0
- package/skill/references/interfaces/IPCB_RayTracerRendererConfig.md +196 -0
- package/skill/references/interfaces/IPCB_RayTracerSceneElement.md +115 -0
- package/skill/references/interfaces/IPCB_RayTracerSceneElementTransform.md +123 -0
- package/skill/references/interfaces/IPCB_RayTracerTexture.md +88 -0
- package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -88
- package/skill/references/interfaces/IRawNet.md +103 -103
- package/skill/references/interfaces/IRawPureSchematic.md +80 -80
- package/skill/references/interfaces/IRawSchematic.md +103 -103
- package/skill/references/interfaces/IRawWire.md +149 -149
- package/skill/references/interfaces/ISCH_DrcError.md +142 -142
- package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -142
- package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -94
- package/skill/references/interfaces/ISCH_NetInfo.md +88 -88
- package/skill/references/interfaces/ISCH_Primitive.md +218 -219
- package/skill/references/interfaces/ISCH_PrimitiveAPI.md +174 -175
- package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -142
- package/skill/references/interfaces/ISCH_WireInfo.md +169 -169
- package/skill/references/interfaces/ISYS_ComparisonResponse.md +115 -0
- package/skill/references/interfaces/ISYS_ExtensionExternalApiIndex.md +13 -0
- package/skill/references/interfaces/ISYS_ExtensionRegisteredExternalApis.md +13 -0
- package/skill/references/interfaces/ISYS_ExternalApiHelp.md +173 -0
- package/skill/references/interfaces/ISYS_ExternalApiRegistration.md +146 -0
- package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -169
- package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +205 -174
- package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +178 -147
- package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -115
- package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -408
- package/skill/references/interfaces/ISYS_HelpAudienceEntry.md +92 -0
- package/skill/references/interfaces/ISYS_HelpClassSummary.md +205 -0
- package/skill/references/interfaces/ISYS_HelpData.md +92 -0
- package/skill/references/interfaces/ISYS_HelpMethodDetail.md +310 -0
- package/skill/references/interfaces/ISYS_JobHandle.md +65 -0
- package/skill/references/interfaces/ISYS_JobLogEntry.md +142 -0
- package/skill/references/interfaces/ISYS_JobStatus.md +176 -0
- package/skill/references/interfaces/ISYS_LogLine.md +115 -115
- package/skill/references/interfaces/ISYS_MathBBox.md +142 -142
- package/skill/references/interfaces/ISYS_MathPoint.md +88 -88
- package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -92
- package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -115
- package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +12 -12
- package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -174
- package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -169
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -62
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -62
- package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -109
- package/skill/references/interfaces/IconProps.md +88 -88
- package/skill/references/interfaces/ImageProps.md +115 -115
- package/skill/references/interfaces/InputEditConfig.md +182 -0
- package/skill/references/interfaces/InputProps.md +547 -520
- package/skill/references/interfaces/KeyboardConfig.md +61 -0
- package/skill/references/interfaces/ListChildren.md +223 -223
- package/skill/references/interfaces/ListProps.md +250 -223
- package/skill/references/interfaces/ModalProps.md +358 -358
- package/skill/references/interfaces/NumberEditConfig.md +234 -0
- package/skill/references/interfaces/RadioGroupProps.md +196 -196
- package/skill/references/interfaces/RadioItem.md +115 -115
- package/skill/references/interfaces/RichTableProps.md +1357 -0
- package/skill/references/interfaces/RowMetaConfig.md +142 -0
- package/skill/references/interfaces/ScrollerProps.md +169 -169
- package/skill/references/interfaces/SelectEditConfig.md +211 -0
- package/skill/references/interfaces/SelectListItem.md +142 -142
- package/skill/references/interfaces/SelectOption.md +142 -0
- package/skill/references/interfaces/SelectProps.md +169 -169
- package/skill/references/interfaces/SelectionConfig.md +358 -0
- package/skill/references/interfaces/SliderProps.md +142 -0
- package/skill/references/interfaces/SlotProps.md +88 -88
- package/skill/references/interfaces/SortState.md +88 -0
- package/skill/references/interfaces/SortingConfig.md +169 -0
- package/skill/references/interfaces/StyleProps.md +439 -385
- package/skill/references/interfaces/TextAreaProps.md +196 -196
- package/skill/references/interfaces/TextProps.md +169 -169
- package/skill/references/interfaces/TextareaEditConfig.md +182 -0
- package/skill/references/interfaces/ValidationRule.md +223 -0
- package/skill/references/interfaces/VirtualScrollConfig.md +115 -0
- package/skill/references/types/Align.md +9 -0
- package/skill/references/types/CellContentType.md +9 -0
- package/skill/references/types/ColumnDefOrGroup.md +12 -0
- package/skill/references/types/ColumnEditConfig.md +13 -0
- package/skill/references/types/ColumnType.md +9 -0
- package/skill/references/types/DataChangeType.md +9 -0
- package/skill/references/types/FilterMatchMode.md +9 -0
- package/skill/references/types/RichTableRow.md +12 -0
- package/skill/references/types/Serializable.md +10 -0
- package/skill/references/types/SerializablePrimitive.md +9 -0
- package/skill/references/types/SortOrder.md +9 -0
- package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +11 -11
- package/skill/references/types/TPCB_LayersInTheSelectable.md +42 -42
- package/skill/references/types/TPCB_LayersOfComponent.md +11 -11
- package/skill/references/types/TPCB_LayersOfCopper.md +15 -15
- package/skill/references/types/TPCB_LayersOfCustom.md +41 -41
- package/skill/references/types/TPCB_LayersOfDimension.md +16 -16
- package/skill/references/types/TPCB_LayersOfFill.md +28 -28
- package/skill/references/types/TPCB_LayersOfImage.md +22 -22
- package/skill/references/types/TPCB_LayersOfInner.md +41 -41
- package/skill/references/types/TPCB_LayersOfLine.md +25 -25
- package/skill/references/types/TPCB_LayersOfObject.md +12 -12
- package/skill/references/types/TPCB_LayersOfPad.md +11 -11
- package/skill/references/types/TPCB_LayersOfRegion.md +11 -11
- package/skill/references/types/TPCB_NumberOfCopperLayers.md +9 -9
- package/skill/references/types/TPCB_PolygonSourceArray.md +85 -83
- package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +66 -66
- package/skill/references/types/TPCB_PrimitivePadHole.md +30 -30
- package/skill/references/types/TPCB_PrimitivePadShape.md +61 -61
- package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +19 -19
- package/skill/references/types/TSYS_ComparisonErrorCode.md +15 -0
- package/skill/references/types/TSYS_LanguageKeyValuePairs.md +13 -0
- package/skill/references/types/TSYS_MathPolygonGroup.md +15 -15
- package/skill/references/types/TSYS_MathPolygonInput.md +20 -20
- package/skill/references/types/TSYS_ShortcutKeys.md +96 -96
- package/skill/user-guide/using-extension.md +47 -47
- package/src/json-gen.test.js +430 -0
- package/skill/guide/ancillary-projects/pro-api-sdk.md +0 -1
- package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +0 -115
- package/skill/references/types/ISYS_LanguageKeyValuePairs.md +0 -13
- 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<string \| undefined>
|
|
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<string \| undefined>
|
|
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<string \| undefined>
|
|
454
|
-
|
|
455
|
-
Schematic UUID, if it is `undefined` creation fails
|
|
456
|
-
|
|
457
|
-
##
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
//
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
</th><th>
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
</th
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
</td><td>
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
</td
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
//
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
//
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
</th><th>
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
</th
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
</td><td>
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
</td
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
##
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
//
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
//
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
</th><th>
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
</th
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
</td><td>
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
</td
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
//
|
|
679
|
-
const
|
|
680
|
-
await new Promise(r => setTimeout(r, 1500));
|
|
681
|
-
|
|
682
|
-
//
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
//
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
//
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
await
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
##
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
##
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
await eda.
|
|
919
|
-
await new Promise(r => setTimeout(r,
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
console.log('
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
</th><th>
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
</th
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
</td><td>
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
</td
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
//
|
|
995
|
-
const
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
```
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
</th><th>
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
</th
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
</td><td>
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
</td
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
console.log('
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
</th><th>
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
</th
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
</td><td>
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
</td
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
</td><td>
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
</td
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
##
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
//
|
|
1161
|
-
const
|
|
1162
|
-
await
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
</th><th>
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
</th
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
</td><td>
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
</td
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
</td><td>
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
</td
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1259
|
-
const
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
</
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
console.log('
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
console.log('
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
```
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
<
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
</
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
</td
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
</
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
//
|
|
1464
|
-
const
|
|
1465
|
-
const
|
|
1466
|
-
console.log('
|
|
1467
|
-
|
|
1468
|
-
//
|
|
1469
|
-
|
|
1470
|
-
const
|
|
1471
|
-
console.log('
|
|
1472
|
-
|
|
1473
|
-
//
|
|
1474
|
-
await new Promise(r => setTimeout(r,
|
|
1475
|
-
const
|
|
1476
|
-
console.log('
|
|
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<string \| undefined>
|
|
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<string \| undefined>
|
|
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<string \| undefined>
|
|
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<string \| undefined>
|
|
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<boolean>
|
|
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<boolean>
|
|
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<Array<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->>>
|
|
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<Array<[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md)<!-- -->>>
|
|
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<Array<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->>>
|
|
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<[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined>
|
|
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<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined>
|
|
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<[IDMT\_SchematicItem](../interfaces/IDMT_SchematicItem.md) \| undefined>
|
|
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<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md) \| undefined>
|
|
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<boolean>
|
|
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<boolean>
|
|
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<string, { showTitle?: boolean; showValue?: boolean; value?: any }>
|
|
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<boolean>
|
|
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<[IDMT\_SchematicPageItem](../interfaces/IDMT_SchematicPageItem.md)<!-- -->>
|
|
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<boolean>
|
|
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
|
+
```
|