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