@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,2240 @@
|
|
|
1
|
+
# SCH\_PrimitiveComponent class
|
|
2
|
+
|
|
3
|
+
Schematic & symbol / device primitive class
|
|
4
|
+
|
|
5
|
+
## Signature
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
class SCH_PrimitiveComponent implements ISCH_PrimitiveAPI
|
|
9
|
+
```
|
|
10
|
+
**Implements:** [ISCH\_PrimitiveAPI](../interfaces/ISCH_PrimitiveAPI.md)
|
|
11
|
+
|
|
12
|
+
## Remarks
|
|
13
|
+
|
|
14
|
+
## Methods
|
|
15
|
+
|
|
16
|
+
<table><thead><tr><th>
|
|
17
|
+
|
|
18
|
+
Method
|
|
19
|
+
|
|
20
|
+
</th><th>
|
|
21
|
+
|
|
22
|
+
Modifiers
|
|
23
|
+
|
|
24
|
+
</th><th>
|
|
25
|
+
|
|
26
|
+
Description
|
|
27
|
+
|
|
28
|
+
</th></tr></thead>
|
|
29
|
+
<tbody><tr><td>
|
|
30
|
+
|
|
31
|
+
[create(component, x, y, subPartName, rotation, mirror, addIntoBom, addIntoPcb)](./SCH_PrimitiveComponent.md)
|
|
32
|
+
|
|
33
|
+
</td><td>
|
|
34
|
+
|
|
35
|
+
</td><td>
|
|
36
|
+
|
|
37
|
+
**_(BETA)_** Create Device
|
|
38
|
+
|
|
39
|
+
</td></tr>
|
|
40
|
+
<tr><td>
|
|
41
|
+
|
|
42
|
+
[createCbbSymbol(cbbSymbol, x, y, rotation, mirror)](./SCH_PrimitiveComponent.md)
|
|
43
|
+
|
|
44
|
+
</td><td>
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
**_(BETA)_** Create Reuse block symbol
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
<tr><td>
|
|
52
|
+
|
|
53
|
+
[createNetFlag(identification, net, x, y, rotation, mirror)](./SCH_PrimitiveComponent.md)
|
|
54
|
+
|
|
55
|
+
</td><td>
|
|
56
|
+
|
|
57
|
+
</td><td>
|
|
58
|
+
|
|
59
|
+
**_(BETA)_** Create Net flag
|
|
60
|
+
|
|
61
|
+
</td></tr>
|
|
62
|
+
<tr><td>
|
|
63
|
+
|
|
64
|
+
[createNetPort(direction, net, x, y, rotation, mirror)](./SCH_PrimitiveComponent.md)
|
|
65
|
+
|
|
66
|
+
</td><td>
|
|
67
|
+
|
|
68
|
+
</td><td>
|
|
69
|
+
|
|
70
|
+
**_(BETA)_** Create Net port
|
|
71
|
+
|
|
72
|
+
</td></tr>
|
|
73
|
+
<tr><td>
|
|
74
|
+
|
|
75
|
+
[createShortCircuitFlag(x, y, rotation, mirror)](./SCH_PrimitiveComponent.md)
|
|
76
|
+
|
|
77
|
+
</td><td>
|
|
78
|
+
|
|
79
|
+
</td><td>
|
|
80
|
+
|
|
81
|
+
**_(BETA)_** Create a short circuit flag
|
|
82
|
+
|
|
83
|
+
</td></tr>
|
|
84
|
+
<tr><td>
|
|
85
|
+
|
|
86
|
+
[delete(primitiveIds)](./SCH_PrimitiveComponent.md)
|
|
87
|
+
|
|
88
|
+
</td><td>
|
|
89
|
+
|
|
90
|
+
</td><td>
|
|
91
|
+
|
|
92
|
+
**_(BETA)_** Delete Device
|
|
93
|
+
|
|
94
|
+
</td></tr>
|
|
95
|
+
<tr><td>
|
|
96
|
+
|
|
97
|
+
[get(primitiveIds)](./SCH_PrimitiveComponent.md)
|
|
98
|
+
|
|
99
|
+
</td><td>
|
|
100
|
+
|
|
101
|
+
</td><td>
|
|
102
|
+
|
|
103
|
+
**_(BETA)_** Get Device
|
|
104
|
+
|
|
105
|
+
</td></tr>
|
|
106
|
+
<tr><td>
|
|
107
|
+
|
|
108
|
+
[get(primitiveIds)](./SCH_PrimitiveComponent.md)
|
|
109
|
+
|
|
110
|
+
</td><td>
|
|
111
|
+
|
|
112
|
+
</td><td>
|
|
113
|
+
|
|
114
|
+
**_(BETA)_** Get Device
|
|
115
|
+
|
|
116
|
+
</td></tr>
|
|
117
|
+
<tr><td>
|
|
118
|
+
|
|
119
|
+
[getAll(componentType, allSchematicPages)](./SCH_PrimitiveComponent.md)
|
|
120
|
+
|
|
121
|
+
</td><td>
|
|
122
|
+
|
|
123
|
+
</td><td>
|
|
124
|
+
|
|
125
|
+
**_(BETA)_** Get all Device
|
|
126
|
+
|
|
127
|
+
</td></tr>
|
|
128
|
+
<tr><td>
|
|
129
|
+
|
|
130
|
+
[getAllPinsByPrimitiveId(primitiveId)](./SCH_PrimitiveComponent.md)
|
|
131
|
+
|
|
132
|
+
</td><td>
|
|
133
|
+
|
|
134
|
+
</td><td>
|
|
135
|
+
|
|
136
|
+
**_(BETA)_** Get all pins associated with the device
|
|
137
|
+
|
|
138
|
+
</td></tr>
|
|
139
|
+
<tr><td>
|
|
140
|
+
|
|
141
|
+
[getAllPrimitiveId(componentType, allSchematicPages)](./SCH_PrimitiveComponent.md)
|
|
142
|
+
|
|
143
|
+
</td><td>
|
|
144
|
+
|
|
145
|
+
</td><td>
|
|
146
|
+
|
|
147
|
+
**_(BETA)_** Get all Device primitive IDs
|
|
148
|
+
|
|
149
|
+
</td></tr>
|
|
150
|
+
<tr><td>
|
|
151
|
+
|
|
152
|
+
[getAllPropertyNames()](./SCH_PrimitiveComponent.md)
|
|
153
|
+
|
|
154
|
+
</td><td>
|
|
155
|
+
|
|
156
|
+
</td><td>
|
|
157
|
+
|
|
158
|
+
**_(BETA)_** Get The set of all property names of all devices
|
|
159
|
+
|
|
160
|
+
</td></tr>
|
|
161
|
+
<tr><td>
|
|
162
|
+
|
|
163
|
+
[modify(primitiveId, property)](./SCH_PrimitiveComponent.md)
|
|
164
|
+
|
|
165
|
+
</td><td>
|
|
166
|
+
|
|
167
|
+
</td><td>
|
|
168
|
+
|
|
169
|
+
**_(BETA)_** Modify Device
|
|
170
|
+
|
|
171
|
+
</td></tr>
|
|
172
|
+
<tr><td>
|
|
173
|
+
|
|
174
|
+
[placeCbbSchematicPage(cbbSchematicPage, x, y, props)](./SCH_PrimitiveComponent.md)
|
|
175
|
+
|
|
176
|
+
</td><td>
|
|
177
|
+
|
|
178
|
+
</td><td>
|
|
179
|
+
|
|
180
|
+
**_(BETA)_** Place reuse block schematic sheet
|
|
181
|
+
|
|
182
|
+
</td></tr>
|
|
183
|
+
<tr><td>
|
|
184
|
+
|
|
185
|
+
[placeComponentWithMouse(component, subPartName)](./SCH_PrimitiveComponent.md)
|
|
186
|
+
|
|
187
|
+
</td><td>
|
|
188
|
+
|
|
189
|
+
</td><td>
|
|
190
|
+
|
|
191
|
+
**_(BETA)_** Place with the mouse device
|
|
192
|
+
|
|
193
|
+
</td></tr>
|
|
194
|
+
<tr><td>
|
|
195
|
+
|
|
196
|
+
[placeSymbolWithMouse(symbol, subPartName, properties)](./SCH_PrimitiveComponent.md)
|
|
197
|
+
|
|
198
|
+
</td><td>
|
|
199
|
+
|
|
200
|
+
</td><td>
|
|
201
|
+
|
|
202
|
+
**_(BETA)_** Place with the mouse symbol
|
|
203
|
+
|
|
204
|
+
</td></tr>
|
|
205
|
+
<tr><td>
|
|
206
|
+
|
|
207
|
+
[setNetFlagComponentUuid\_AnalogGround(component)](./SCH_PrimitiveComponent.md)
|
|
208
|
+
|
|
209
|
+
</td><td>
|
|
210
|
+
|
|
211
|
+
</td><td>
|
|
212
|
+
|
|
213
|
+
**_(BETA)_** Set the device UUID associated with the AnalogGround net flag in the extension API
|
|
214
|
+
|
|
215
|
+
</td></tr>
|
|
216
|
+
<tr><td>
|
|
217
|
+
|
|
218
|
+
[setNetFlagComponentUuid\_Ground(component)](./SCH_PrimitiveComponent.md)
|
|
219
|
+
|
|
220
|
+
</td><td>
|
|
221
|
+
|
|
222
|
+
</td><td>
|
|
223
|
+
|
|
224
|
+
**_(BETA)_** Set the device UUID associated with the Ground net flag in the extension API
|
|
225
|
+
|
|
226
|
+
</td></tr>
|
|
227
|
+
<tr><td>
|
|
228
|
+
|
|
229
|
+
[setNetFlagComponentUuid\_Power(component)](./SCH_PrimitiveComponent.md)
|
|
230
|
+
|
|
231
|
+
</td><td>
|
|
232
|
+
|
|
233
|
+
</td><td>
|
|
234
|
+
|
|
235
|
+
**_(BETA)_** Set the device UUID associated with the Power net flag in the extension API
|
|
236
|
+
|
|
237
|
+
</td></tr>
|
|
238
|
+
<tr><td>
|
|
239
|
+
|
|
240
|
+
[setNetFlagComponentUuid\_ProtectGround(component)](./SCH_PrimitiveComponent.md)
|
|
241
|
+
|
|
242
|
+
</td><td>
|
|
243
|
+
|
|
244
|
+
</td><td>
|
|
245
|
+
|
|
246
|
+
**_(BETA)_** Set the device UUID associated with the ProtectGround net flag in the extension API
|
|
247
|
+
|
|
248
|
+
</td></tr>
|
|
249
|
+
<tr><td>
|
|
250
|
+
|
|
251
|
+
[setNetPortComponentUuid\_BI(component)](./SCH_PrimitiveComponent.md)
|
|
252
|
+
|
|
253
|
+
</td><td>
|
|
254
|
+
|
|
255
|
+
</td><td>
|
|
256
|
+
|
|
257
|
+
**_(BETA)_** Set the device UUID associated with the BI net port in the extension API
|
|
258
|
+
|
|
259
|
+
</td></tr>
|
|
260
|
+
<tr><td>
|
|
261
|
+
|
|
262
|
+
[setNetPortComponentUuid\_IN(component)](./SCH_PrimitiveComponent.md)
|
|
263
|
+
|
|
264
|
+
</td><td>
|
|
265
|
+
|
|
266
|
+
</td><td>
|
|
267
|
+
|
|
268
|
+
**_(BETA)_** Set the device UUID associated with the IN net port in the extension API
|
|
269
|
+
|
|
270
|
+
</td></tr>
|
|
271
|
+
<tr><td>
|
|
272
|
+
|
|
273
|
+
[setNetPortComponentUuid\_OUT(component)](./SCH_PrimitiveComponent.md)
|
|
274
|
+
|
|
275
|
+
</td><td>
|
|
276
|
+
|
|
277
|
+
</td><td>
|
|
278
|
+
|
|
279
|
+
**_(BETA)_** Set the device UUID associated with the OUT net port in the extension API
|
|
280
|
+
|
|
281
|
+
</td></tr>
|
|
282
|
+
</tbody></table>
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## 方法详情
|
|
287
|
+
|
|
288
|
+
### create
|
|
289
|
+
|
|
290
|
+
# SCH\_PrimitiveComponent.create() method
|
|
291
|
+
|
|
292
|
+
> 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.
|
|
293
|
+
|
|
294
|
+
Create Device
|
|
295
|
+
|
|
296
|
+
## Signature
|
|
297
|
+
|
|
298
|
+
```typescript
|
|
299
|
+
function create(
|
|
300
|
+
component:
|
|
301
|
+
| { libraryType?: undefined | ELIB_LibraryType.DEVICE; libraryUuid: string; uuid: string }
|
|
302
|
+
| ILIB_DeviceItem
|
|
303
|
+
| ILIB_DeviceSearchItem
|
|
304
|
+
| { libraryType: ELIB_LibraryType.SYMBOL; libraryUuid: string; uuid: string }
|
|
305
|
+
| ILIB_SymbolItem
|
|
306
|
+
| ILIB_SymbolSearchItem,
|
|
307
|
+
x: number,
|
|
308
|
+
y: number,
|
|
309
|
+
subPartName?: string,
|
|
310
|
+
rotation?: number,
|
|
311
|
+
mirror?: boolean,
|
|
312
|
+
addIntoBom?: boolean,
|
|
313
|
+
addIntoPcb?: boolean,
|
|
314
|
+
): Promise<ISCH_PrimitiveComponent | undefined>;
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Parameters
|
|
318
|
+
|
|
319
|
+
<table><thead><tr><th>
|
|
320
|
+
|
|
321
|
+
Parameter
|
|
322
|
+
|
|
323
|
+
</th><th>
|
|
324
|
+
|
|
325
|
+
Type
|
|
326
|
+
|
|
327
|
+
</th><th>
|
|
328
|
+
|
|
329
|
+
Description
|
|
330
|
+
|
|
331
|
+
</th></tr></thead>
|
|
332
|
+
<tbody><tr><td>
|
|
333
|
+
|
|
334
|
+
component
|
|
335
|
+
|
|
336
|
+
</td><td>
|
|
337
|
+
|
|
338
|
+
{ libraryType?: undefined \| [ELIB\_LibraryType.DEVICE](../enums/ELIB_LibraryType.md)<!-- -->; libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md) \| { libraryType: [ELIB\_LibraryType.SYMBOL](../enums/ELIB_LibraryType.md)<!-- -->; libraryUuid: string; uuid: string } \| [ILIB\_SymbolItem](../interfaces/ILIB_SymbolItem.md) \| [ILIB\_SymbolSearchItem](../interfaces/ILIB_SymbolSearchItem.md)
|
|
339
|
+
|
|
340
|
+
</td><td>
|
|
341
|
+
|
|
342
|
+
Associate library device
|
|
343
|
+
|
|
344
|
+
</td></tr>
|
|
345
|
+
<tr><td>
|
|
346
|
+
|
|
347
|
+
x
|
|
348
|
+
|
|
349
|
+
</td><td>
|
|
350
|
+
|
|
351
|
+
number
|
|
352
|
+
|
|
353
|
+
</td><td>
|
|
354
|
+
|
|
355
|
+
X coordinate
|
|
356
|
+
|
|
357
|
+
</td></tr>
|
|
358
|
+
<tr><td>
|
|
359
|
+
|
|
360
|
+
y
|
|
361
|
+
|
|
362
|
+
</td><td>
|
|
363
|
+
|
|
364
|
+
number
|
|
365
|
+
|
|
366
|
+
</td><td>
|
|
367
|
+
|
|
368
|
+
Y coordinate
|
|
369
|
+
|
|
370
|
+
</td></tr>
|
|
371
|
+
<tr><td>
|
|
372
|
+
|
|
373
|
+
subPartName
|
|
374
|
+
|
|
375
|
+
</td><td>
|
|
376
|
+
|
|
377
|
+
string
|
|
378
|
+
|
|
379
|
+
</td><td>
|
|
380
|
+
|
|
381
|
+
_(Optional)_ Sub-part name
|
|
382
|
+
|
|
383
|
+
</td></tr>
|
|
384
|
+
<tr><td>
|
|
385
|
+
|
|
386
|
+
rotation
|
|
387
|
+
|
|
388
|
+
</td><td>
|
|
389
|
+
|
|
390
|
+
number
|
|
391
|
+
|
|
392
|
+
</td><td>
|
|
393
|
+
|
|
394
|
+
_(Optional)_ Rotation angle
|
|
395
|
+
|
|
396
|
+
</td></tr>
|
|
397
|
+
<tr><td>
|
|
398
|
+
|
|
399
|
+
mirror
|
|
400
|
+
|
|
401
|
+
</td><td>
|
|
402
|
+
|
|
403
|
+
boolean
|
|
404
|
+
|
|
405
|
+
</td><td>
|
|
406
|
+
|
|
407
|
+
_(Optional)_ Whether it is mirrored
|
|
408
|
+
|
|
409
|
+
</td></tr>
|
|
410
|
+
<tr><td>
|
|
411
|
+
|
|
412
|
+
addIntoBom
|
|
413
|
+
|
|
414
|
+
</td><td>
|
|
415
|
+
|
|
416
|
+
boolean
|
|
417
|
+
|
|
418
|
+
</td><td>
|
|
419
|
+
|
|
420
|
+
_(Optional)_ Whether Add to BOM
|
|
421
|
+
|
|
422
|
+
</td></tr>
|
|
423
|
+
<tr><td>
|
|
424
|
+
|
|
425
|
+
addIntoPcb
|
|
426
|
+
|
|
427
|
+
</td><td>
|
|
428
|
+
|
|
429
|
+
boolean
|
|
430
|
+
|
|
431
|
+
</td><td>
|
|
432
|
+
|
|
433
|
+
_(Optional)_ Whether Transfer to PCB
|
|
434
|
+
|
|
435
|
+
</td></tr>
|
|
436
|
+
</tbody></table>
|
|
437
|
+
|
|
438
|
+
## Returns
|
|
439
|
+
|
|
440
|
+
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md) \| undefined>
|
|
441
|
+
|
|
442
|
+
Device primitive object
|
|
443
|
+
|
|
444
|
+
## Example
|
|
445
|
+
|
|
446
|
+
```javascript
|
|
447
|
+
// 1. 从系统库搜索器件,随机坐标避免与画布已有器件重合(SCH 坐标单位 10mil)
|
|
448
|
+
const devices = await eda.lib_Device.search('');
|
|
449
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
450
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
451
|
+
|
|
452
|
+
// 2. 创建器件:搜索结果直接作为关联库器件传入,加入 BOM 并转到 PCB
|
|
453
|
+
const comp = await eda.sch_PrimitiveComponent.create(
|
|
454
|
+
devices[0], // 关联库器件
|
|
455
|
+
x, // 坐标 X
|
|
456
|
+
y, // 坐标 Y
|
|
457
|
+
undefined, // 子部件名称(多子部件器件才需要指定)
|
|
458
|
+
0, // 旋转角度
|
|
459
|
+
false, // 是否镜像
|
|
460
|
+
true, // 是否加入 BOM
|
|
461
|
+
true // 是否转到 PCB
|
|
462
|
+
);
|
|
463
|
+
|
|
464
|
+
// 3. 创建类保留现场,供在画布上观察摆放结果
|
|
465
|
+
console.log('primitiveId:', comp.getState_PrimitiveId());
|
|
466
|
+
console.log('designator:', comp.getState_Designator());
|
|
467
|
+
console.log('position:', comp.getState_X(), ',', comp.getState_Y());
|
|
468
|
+
console.log('addIntoBom:', comp.getState_AddIntoBom());
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
### createcbbsymbol
|
|
472
|
+
|
|
473
|
+
# SCH\_PrimitiveComponent.createCbbSymbol() method
|
|
474
|
+
|
|
475
|
+
> 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.
|
|
476
|
+
|
|
477
|
+
Create Reuse block symbol
|
|
478
|
+
|
|
479
|
+
## Signature
|
|
480
|
+
|
|
481
|
+
```typescript
|
|
482
|
+
function createCbbSymbol(
|
|
483
|
+
cbbSymbol: { libraryUuid: string; cbbUuid: string; uuid?: undefined | string },
|
|
484
|
+
x: number,
|
|
485
|
+
y: number,
|
|
486
|
+
rotation?: number,
|
|
487
|
+
mirror?: boolean,
|
|
488
|
+
): Promise<ISCH_PrimitiveCbbSymbolComponent | undefined>;
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
## Parameters
|
|
492
|
+
|
|
493
|
+
<table><thead><tr><th>
|
|
494
|
+
|
|
495
|
+
Parameter
|
|
496
|
+
|
|
497
|
+
</th><th>
|
|
498
|
+
|
|
499
|
+
Type
|
|
500
|
+
|
|
501
|
+
</th><th>
|
|
502
|
+
|
|
503
|
+
Description
|
|
504
|
+
|
|
505
|
+
</th></tr></thead>
|
|
506
|
+
<tbody><tr><td>
|
|
507
|
+
|
|
508
|
+
cbbSymbol
|
|
509
|
+
|
|
510
|
+
</td><td>
|
|
511
|
+
|
|
512
|
+
\{ libraryUuid: string; cbbUuid: string; uuid?: undefined \| string \}
|
|
513
|
+
|
|
514
|
+
</td><td>
|
|
515
|
+
|
|
516
|
+
Associated library reuse block symbol. `libraryUuid` is the UUID of the library where the CBB project is located, `cbbUuid` is the UUID of the CBB project, and `uuid` is the UUID of the symbol in the CBB project
|
|
517
|
+
|
|
518
|
+
</td></tr>
|
|
519
|
+
<tr><td>
|
|
520
|
+
|
|
521
|
+
x
|
|
522
|
+
|
|
523
|
+
</td><td>
|
|
524
|
+
|
|
525
|
+
number
|
|
526
|
+
|
|
527
|
+
</td><td>
|
|
528
|
+
|
|
529
|
+
X coordinate
|
|
530
|
+
|
|
531
|
+
</td></tr>
|
|
532
|
+
<tr><td>
|
|
533
|
+
|
|
534
|
+
y
|
|
535
|
+
|
|
536
|
+
</td><td>
|
|
537
|
+
|
|
538
|
+
number
|
|
539
|
+
|
|
540
|
+
</td><td>
|
|
541
|
+
|
|
542
|
+
Y coordinate
|
|
543
|
+
|
|
544
|
+
</td></tr>
|
|
545
|
+
<tr><td>
|
|
546
|
+
|
|
547
|
+
rotation
|
|
548
|
+
|
|
549
|
+
</td><td>
|
|
550
|
+
|
|
551
|
+
number
|
|
552
|
+
|
|
553
|
+
</td><td>
|
|
554
|
+
|
|
555
|
+
_(Optional)_ Rotation angle
|
|
556
|
+
|
|
557
|
+
</td></tr>
|
|
558
|
+
<tr><td>
|
|
559
|
+
|
|
560
|
+
mirror
|
|
561
|
+
|
|
562
|
+
</td><td>
|
|
563
|
+
|
|
564
|
+
boolean
|
|
565
|
+
|
|
566
|
+
</td><td>
|
|
567
|
+
|
|
568
|
+
_(Optional)_ Whether it is mirrored
|
|
569
|
+
|
|
570
|
+
</td></tr>
|
|
571
|
+
</tbody></table>
|
|
572
|
+
|
|
573
|
+
## Returns
|
|
574
|
+
|
|
575
|
+
Promise<[ISCH\_PrimitiveCbbSymbolComponent](./ISCH_PrimitiveCbbSymbolComponent.md) \| undefined>
|
|
576
|
+
|
|
577
|
+
Reuse block symbol primitive object
|
|
578
|
+
|
|
579
|
+
## Example
|
|
580
|
+
|
|
581
|
+
```javascript
|
|
582
|
+
// 1. 从系统库搜索可用的复用模块
|
|
583
|
+
const cbbList = await eda.lib_Cbb.search('');
|
|
584
|
+
const cbb = cbbList[0];
|
|
585
|
+
|
|
586
|
+
// 2. 随机坐标避免与画布已有图元重合(SCH 坐标单位 10mil)
|
|
587
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
588
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
589
|
+
|
|
590
|
+
// 3. 创建复用模块符号(cbbUuid 传模块工程 UUID,符号 uuid 可省略由模块默认提供)
|
|
591
|
+
const symbol = await eda.sch_PrimitiveComponent.createCbbSymbol(
|
|
592
|
+
{
|
|
593
|
+
libraryUuid: cbb.libraryUuid, // CBB 工程所在库的 UUID
|
|
594
|
+
cbbUuid: cbb.uuid // CBB 工程的 UUID
|
|
595
|
+
},
|
|
596
|
+
x, // 坐标 X
|
|
597
|
+
y, // 坐标 Y
|
|
598
|
+
0, // 旋转角度
|
|
599
|
+
false // 是否镜像
|
|
600
|
+
);
|
|
601
|
+
|
|
602
|
+
// 4. 创建类保留现场,供在画布上观察模块符号
|
|
603
|
+
console.log('primitiveId:', symbol.getState_PrimitiveId());
|
|
604
|
+
console.log('primitiveType:', symbol.getState_PrimitiveType());
|
|
605
|
+
console.log('position:', symbol.getState_X(), ',', symbol.getState_Y());
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### createnetflag
|
|
609
|
+
|
|
610
|
+
# SCH\_PrimitiveComponent.createNetFlag() method
|
|
611
|
+
|
|
612
|
+
> 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.
|
|
613
|
+
|
|
614
|
+
Create Net flag
|
|
615
|
+
|
|
616
|
+
## Signature
|
|
617
|
+
|
|
618
|
+
```typescript
|
|
619
|
+
function createNetFlag(
|
|
620
|
+
identification: 'Power' | 'Ground' | 'AnalogGround' | 'ProtectGround',
|
|
621
|
+
net: string,
|
|
622
|
+
x: number,
|
|
623
|
+
y: number,
|
|
624
|
+
rotation?: number,
|
|
625
|
+
mirror?: boolean,
|
|
626
|
+
): Promise<ISCH_PrimitiveComponent | undefined>;
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
## Parameters
|
|
630
|
+
|
|
631
|
+
<table><thead><tr><th>
|
|
632
|
+
|
|
633
|
+
Parameter
|
|
634
|
+
|
|
635
|
+
</th><th>
|
|
636
|
+
|
|
637
|
+
Type
|
|
638
|
+
|
|
639
|
+
</th><th>
|
|
640
|
+
|
|
641
|
+
Description
|
|
642
|
+
|
|
643
|
+
</th></tr></thead>
|
|
644
|
+
<tbody><tr><td>
|
|
645
|
+
|
|
646
|
+
identification
|
|
647
|
+
|
|
648
|
+
</td><td>
|
|
649
|
+
|
|
650
|
+
'Power' \| 'Ground' \| 'AnalogGround' \| 'ProtectGround'
|
|
651
|
+
|
|
652
|
+
</td><td>
|
|
653
|
+
|
|
654
|
+
Identification type
|
|
655
|
+
|
|
656
|
+
</td></tr>
|
|
657
|
+
<tr><td>
|
|
658
|
+
|
|
659
|
+
net
|
|
660
|
+
|
|
661
|
+
</td><td>
|
|
662
|
+
|
|
663
|
+
string
|
|
664
|
+
|
|
665
|
+
</td><td>
|
|
666
|
+
|
|
667
|
+
Net name
|
|
668
|
+
|
|
669
|
+
</td></tr>
|
|
670
|
+
<tr><td>
|
|
671
|
+
|
|
672
|
+
x
|
|
673
|
+
|
|
674
|
+
</td><td>
|
|
675
|
+
|
|
676
|
+
number
|
|
677
|
+
|
|
678
|
+
</td><td>
|
|
679
|
+
|
|
680
|
+
X coordinate
|
|
681
|
+
|
|
682
|
+
</td></tr>
|
|
683
|
+
<tr><td>
|
|
684
|
+
|
|
685
|
+
y
|
|
686
|
+
|
|
687
|
+
</td><td>
|
|
688
|
+
|
|
689
|
+
number
|
|
690
|
+
|
|
691
|
+
</td><td>
|
|
692
|
+
|
|
693
|
+
Y coordinate
|
|
694
|
+
|
|
695
|
+
</td></tr>
|
|
696
|
+
<tr><td>
|
|
697
|
+
|
|
698
|
+
rotation
|
|
699
|
+
|
|
700
|
+
</td><td>
|
|
701
|
+
|
|
702
|
+
number
|
|
703
|
+
|
|
704
|
+
</td><td>
|
|
705
|
+
|
|
706
|
+
_(Optional)_ Rotation angle
|
|
707
|
+
|
|
708
|
+
</td></tr>
|
|
709
|
+
<tr><td>
|
|
710
|
+
|
|
711
|
+
mirror
|
|
712
|
+
|
|
713
|
+
</td><td>
|
|
714
|
+
|
|
715
|
+
boolean
|
|
716
|
+
|
|
717
|
+
</td><td>
|
|
718
|
+
|
|
719
|
+
_(Optional)_ Whether it is mirrored
|
|
720
|
+
|
|
721
|
+
</td></tr>
|
|
722
|
+
</tbody></table>
|
|
723
|
+
|
|
724
|
+
## Returns
|
|
725
|
+
|
|
726
|
+
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md) \| undefined>
|
|
727
|
+
|
|
728
|
+
Device primitive object
|
|
729
|
+
|
|
730
|
+
## Example
|
|
731
|
+
|
|
732
|
+
```javascript
|
|
733
|
+
// 1. 随机坐标避免与画布已有图元重合(SCH 坐标单位 10mil)
|
|
734
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
735
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
736
|
+
|
|
737
|
+
// 2. 创建 Power 类型的网络标识,网络名为 VCC
|
|
738
|
+
const flag = await eda.sch_PrimitiveComponent.createNetFlag(
|
|
739
|
+
'Power', // 标识类型:'Power' / 'Ground' / 'AnalogGround' / 'ProtectGround'
|
|
740
|
+
'嘉立创示例_VCC', // 网络名称
|
|
741
|
+
x, // 坐标 X
|
|
742
|
+
y, // 坐标 Y
|
|
743
|
+
0, // 旋转角度
|
|
744
|
+
false // 是否镜像
|
|
745
|
+
);
|
|
746
|
+
|
|
747
|
+
// 3. 创建类保留现场,供在画布上观察标识样式
|
|
748
|
+
console.log('primitiveId:', flag.getState_PrimitiveId());
|
|
749
|
+
console.log('net:', flag.getState_Net());
|
|
750
|
+
console.log('componentType:', flag.getState_ComponentType());
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
### createnetport
|
|
754
|
+
|
|
755
|
+
# SCH\_PrimitiveComponent.createNetPort() method
|
|
756
|
+
|
|
757
|
+
> 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.
|
|
758
|
+
|
|
759
|
+
Create Net port
|
|
760
|
+
|
|
761
|
+
## Signature
|
|
762
|
+
|
|
763
|
+
```typescript
|
|
764
|
+
function createNetPort(
|
|
765
|
+
direction: 'IN' | 'OUT' | 'BI',
|
|
766
|
+
net: string,
|
|
767
|
+
x: number,
|
|
768
|
+
y: number,
|
|
769
|
+
rotation?: number,
|
|
770
|
+
mirror?: boolean,
|
|
771
|
+
): Promise<ISCH_PrimitiveComponent | undefined>;
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
## Parameters
|
|
775
|
+
|
|
776
|
+
<table><thead><tr><th>
|
|
777
|
+
|
|
778
|
+
Parameter
|
|
779
|
+
|
|
780
|
+
</th><th>
|
|
781
|
+
|
|
782
|
+
Type
|
|
783
|
+
|
|
784
|
+
</th><th>
|
|
785
|
+
|
|
786
|
+
Description
|
|
787
|
+
|
|
788
|
+
</th></tr></thead>
|
|
789
|
+
<tbody><tr><td>
|
|
790
|
+
|
|
791
|
+
direction
|
|
792
|
+
|
|
793
|
+
</td><td>
|
|
794
|
+
|
|
795
|
+
'IN' \| 'OUT' \| 'BI'
|
|
796
|
+
|
|
797
|
+
</td><td>
|
|
798
|
+
|
|
799
|
+
Port direction
|
|
800
|
+
|
|
801
|
+
</td></tr>
|
|
802
|
+
<tr><td>
|
|
803
|
+
|
|
804
|
+
net
|
|
805
|
+
|
|
806
|
+
</td><td>
|
|
807
|
+
|
|
808
|
+
string
|
|
809
|
+
|
|
810
|
+
</td><td>
|
|
811
|
+
|
|
812
|
+
Net name
|
|
813
|
+
|
|
814
|
+
</td></tr>
|
|
815
|
+
<tr><td>
|
|
816
|
+
|
|
817
|
+
x
|
|
818
|
+
|
|
819
|
+
</td><td>
|
|
820
|
+
|
|
821
|
+
number
|
|
822
|
+
|
|
823
|
+
</td><td>
|
|
824
|
+
|
|
825
|
+
X coordinate
|
|
826
|
+
|
|
827
|
+
</td></tr>
|
|
828
|
+
<tr><td>
|
|
829
|
+
|
|
830
|
+
y
|
|
831
|
+
|
|
832
|
+
</td><td>
|
|
833
|
+
|
|
834
|
+
number
|
|
835
|
+
|
|
836
|
+
</td><td>
|
|
837
|
+
|
|
838
|
+
Y coordinate
|
|
839
|
+
|
|
840
|
+
</td></tr>
|
|
841
|
+
<tr><td>
|
|
842
|
+
|
|
843
|
+
rotation
|
|
844
|
+
|
|
845
|
+
</td><td>
|
|
846
|
+
|
|
847
|
+
number
|
|
848
|
+
|
|
849
|
+
</td><td>
|
|
850
|
+
|
|
851
|
+
_(Optional)_ Rotation angle
|
|
852
|
+
|
|
853
|
+
</td></tr>
|
|
854
|
+
<tr><td>
|
|
855
|
+
|
|
856
|
+
mirror
|
|
857
|
+
|
|
858
|
+
</td><td>
|
|
859
|
+
|
|
860
|
+
boolean
|
|
861
|
+
|
|
862
|
+
</td><td>
|
|
863
|
+
|
|
864
|
+
_(Optional)_ Whether it is mirrored
|
|
865
|
+
|
|
866
|
+
</td></tr>
|
|
867
|
+
</tbody></table>
|
|
868
|
+
|
|
869
|
+
## Returns
|
|
870
|
+
|
|
871
|
+
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md) \| undefined>
|
|
872
|
+
|
|
873
|
+
Device primitive object
|
|
874
|
+
|
|
875
|
+
## Example
|
|
876
|
+
|
|
877
|
+
```javascript
|
|
878
|
+
// 1. 随机坐标避免与画布已有图元重合(SCH 坐标单位 10mil)
|
|
879
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
880
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
881
|
+
|
|
882
|
+
// 2. 创建输入方向的端口,网络名为 SIG_IN
|
|
883
|
+
const port = await eda.sch_PrimitiveComponent.createNetPort(
|
|
884
|
+
'IN', // 端口方向:'IN' / 'OUT' / 'BI'
|
|
885
|
+
'嘉立创示例_SIG', // 网络名称
|
|
886
|
+
x, // 坐标 X
|
|
887
|
+
y, // 坐标 Y
|
|
888
|
+
0, // 旋转角度
|
|
889
|
+
false // 是否镜像
|
|
890
|
+
);
|
|
891
|
+
|
|
892
|
+
// 3. 创建类保留现场,供在画布上观察端口样式
|
|
893
|
+
console.log('primitiveId:', port.getState_PrimitiveId());
|
|
894
|
+
console.log('net:', port.getState_Net());
|
|
895
|
+
console.log('componentType:', port.getState_ComponentType());
|
|
896
|
+
```
|
|
897
|
+
|
|
898
|
+
### createshortcircuitflag
|
|
899
|
+
|
|
900
|
+
# SCH\_PrimitiveComponent.createShortCircuitFlag() method
|
|
901
|
+
|
|
902
|
+
> 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.
|
|
903
|
+
|
|
904
|
+
Create a short circuit flag
|
|
905
|
+
|
|
906
|
+
## Signature
|
|
907
|
+
|
|
908
|
+
```typescript
|
|
909
|
+
function createShortCircuitFlag(
|
|
910
|
+
x: number,
|
|
911
|
+
y: number,
|
|
912
|
+
rotation?: number,
|
|
913
|
+
mirror?: boolean,
|
|
914
|
+
): Promise<ISCH_PrimitiveComponent | undefined>;
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
## Parameters
|
|
918
|
+
|
|
919
|
+
<table><thead><tr><th>
|
|
920
|
+
|
|
921
|
+
Parameter
|
|
922
|
+
|
|
923
|
+
</th><th>
|
|
924
|
+
|
|
925
|
+
Type
|
|
926
|
+
|
|
927
|
+
</th><th>
|
|
928
|
+
|
|
929
|
+
Description
|
|
930
|
+
|
|
931
|
+
</th></tr></thead>
|
|
932
|
+
<tbody><tr><td>
|
|
933
|
+
|
|
934
|
+
x
|
|
935
|
+
|
|
936
|
+
</td><td>
|
|
937
|
+
|
|
938
|
+
number
|
|
939
|
+
|
|
940
|
+
</td><td>
|
|
941
|
+
|
|
942
|
+
X coordinate
|
|
943
|
+
|
|
944
|
+
</td></tr>
|
|
945
|
+
<tr><td>
|
|
946
|
+
|
|
947
|
+
y
|
|
948
|
+
|
|
949
|
+
</td><td>
|
|
950
|
+
|
|
951
|
+
number
|
|
952
|
+
|
|
953
|
+
</td><td>
|
|
954
|
+
|
|
955
|
+
Y coordinate
|
|
956
|
+
|
|
957
|
+
</td></tr>
|
|
958
|
+
<tr><td>
|
|
959
|
+
|
|
960
|
+
rotation
|
|
961
|
+
|
|
962
|
+
</td><td>
|
|
963
|
+
|
|
964
|
+
number
|
|
965
|
+
|
|
966
|
+
</td><td>
|
|
967
|
+
|
|
968
|
+
_(Optional)_ Rotation angle
|
|
969
|
+
|
|
970
|
+
</td></tr>
|
|
971
|
+
<tr><td>
|
|
972
|
+
|
|
973
|
+
mirror
|
|
974
|
+
|
|
975
|
+
</td><td>
|
|
976
|
+
|
|
977
|
+
boolean
|
|
978
|
+
|
|
979
|
+
</td><td>
|
|
980
|
+
|
|
981
|
+
_(Optional)_ Whether it is mirrored
|
|
982
|
+
|
|
983
|
+
</td></tr>
|
|
984
|
+
</tbody></table>
|
|
985
|
+
|
|
986
|
+
## Returns
|
|
987
|
+
|
|
988
|
+
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md) \| undefined>
|
|
989
|
+
|
|
990
|
+
Device primitive object
|
|
991
|
+
|
|
992
|
+
## Example
|
|
993
|
+
|
|
994
|
+
```javascript
|
|
995
|
+
// 1. 随机坐标避免与画布已有图元重合(SCH 坐标单位 10mil)
|
|
996
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
997
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
998
|
+
|
|
999
|
+
// 2. 创建短接标识(无网络名参数,仅位置与姿态)
|
|
1000
|
+
const flag = await eda.sch_PrimitiveComponent.createShortCircuitFlag(
|
|
1001
|
+
x, // 坐标 X
|
|
1002
|
+
y, // 坐标 Y
|
|
1003
|
+
0, // 旋转角度
|
|
1004
|
+
false // 是否镜像
|
|
1005
|
+
);
|
|
1006
|
+
|
|
1007
|
+
// 3. 创建类保留现场,供在画布上观察标识样式
|
|
1008
|
+
console.log('primitiveId:', flag.getState_PrimitiveId());
|
|
1009
|
+
console.log('componentType:', flag.getState_ComponentType());
|
|
1010
|
+
console.log('position:', flag.getState_X(), ',', flag.getState_Y());
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
### delete
|
|
1014
|
+
|
|
1015
|
+
# SCH\_PrimitiveComponent.delete() 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
|
+
Delete Device
|
|
1020
|
+
|
|
1021
|
+
## Signature
|
|
1022
|
+
|
|
1023
|
+
```typescript
|
|
1024
|
+
function delete(primitiveIds: string | ISCH_PrimitiveComponent | Array<string> | Array<ISCH_PrimitiveComponent>): Promise<boolean>;
|
|
1025
|
+
```
|
|
1026
|
+
|
|
1027
|
+
## Parameters
|
|
1028
|
+
|
|
1029
|
+
<table><thead><tr><th>
|
|
1030
|
+
|
|
1031
|
+
Parameter
|
|
1032
|
+
|
|
1033
|
+
</th><th>
|
|
1034
|
+
|
|
1035
|
+
Type
|
|
1036
|
+
|
|
1037
|
+
</th><th>
|
|
1038
|
+
|
|
1039
|
+
Description
|
|
1040
|
+
|
|
1041
|
+
</th></tr></thead>
|
|
1042
|
+
<tbody><tr><td>
|
|
1043
|
+
|
|
1044
|
+
primitiveIds
|
|
1045
|
+
|
|
1046
|
+
</td><td>
|
|
1047
|
+
|
|
1048
|
+
string \| [ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md) \| Array<string> \| Array<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)<!-- -->>
|
|
1049
|
+
|
|
1050
|
+
</td><td>
|
|
1051
|
+
|
|
1052
|
+
Device primitive ID or Device primitive object
|
|
1053
|
+
|
|
1054
|
+
</td></tr>
|
|
1055
|
+
</tbody></table>
|
|
1056
|
+
|
|
1057
|
+
## Returns
|
|
1058
|
+
|
|
1059
|
+
Promise<boolean>
|
|
1060
|
+
|
|
1061
|
+
Delete Whether the operation is successful
|
|
1062
|
+
|
|
1063
|
+
## Example
|
|
1064
|
+
|
|
1065
|
+
```javascript
|
|
1066
|
+
// 1. 创建两个待删除的测试器件(随机坐标避免重合,SCH 坐标单位 10mil)
|
|
1067
|
+
const devices = await eda.lib_Device.search('');
|
|
1068
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
1069
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
1070
|
+
const comp1 = await eda.sch_PrimitiveComponent.create(devices[0], x, y);
|
|
1071
|
+
const comp2 = await eda.sch_PrimitiveComponent.create(devices[0], x + 400, y);
|
|
1072
|
+
|
|
1073
|
+
// 2. 记录删除前的器件数量
|
|
1074
|
+
const beforeCount = (await eda.sch_PrimitiveComponent.getAll()).length;
|
|
1075
|
+
|
|
1076
|
+
// 3. 分别以 ID 字符串和图元对象两种形式删除两个器件
|
|
1077
|
+
const deleted1 = await eda.sch_PrimitiveComponent.delete(comp1.getState_PrimitiveId());
|
|
1078
|
+
const deleted2 = await eda.sch_PrimitiveComponent.delete(comp2);
|
|
1079
|
+
|
|
1080
|
+
// 4. 删除类保留现场(图元已删除,不恢复)
|
|
1081
|
+
const afterCount = (await eda.sch_PrimitiveComponent.getAll()).length;
|
|
1082
|
+
|
|
1083
|
+
console.log('deleted by id:', deleted1);
|
|
1084
|
+
console.log('deleted by object:', deleted2);
|
|
1085
|
+
console.log('beforeCount:', beforeCount, '→ afterCount:', afterCount);
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1088
|
+
### get
|
|
1089
|
+
|
|
1090
|
+
# SCH\_PrimitiveComponent.get() method
|
|
1091
|
+
|
|
1092
|
+
> 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.
|
|
1093
|
+
|
|
1094
|
+
Get Device
|
|
1095
|
+
|
|
1096
|
+
## Signature
|
|
1097
|
+
|
|
1098
|
+
```typescript
|
|
1099
|
+
function get(primitiveIds: string): Promise<ISCH_PrimitiveComponent | undefined>;
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
## Parameters
|
|
1103
|
+
|
|
1104
|
+
<table><thead><tr><th>
|
|
1105
|
+
|
|
1106
|
+
Parameter
|
|
1107
|
+
|
|
1108
|
+
</th><th>
|
|
1109
|
+
|
|
1110
|
+
Type
|
|
1111
|
+
|
|
1112
|
+
</th><th>
|
|
1113
|
+
|
|
1114
|
+
Description
|
|
1115
|
+
|
|
1116
|
+
</th></tr></thead>
|
|
1117
|
+
<tbody><tr><td>
|
|
1118
|
+
|
|
1119
|
+
primitiveIds
|
|
1120
|
+
|
|
1121
|
+
</td><td>
|
|
1122
|
+
|
|
1123
|
+
string
|
|
1124
|
+
|
|
1125
|
+
</td><td>
|
|
1126
|
+
|
|
1127
|
+
Device primitive ID, which can be a string or an array of strings. If it is an array, an array is also returned
|
|
1128
|
+
|
|
1129
|
+
</td></tr>
|
|
1130
|
+
</tbody></table>
|
|
1131
|
+
|
|
1132
|
+
## Returns
|
|
1133
|
+
|
|
1134
|
+
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md) \| undefined>
|
|
1135
|
+
|
|
1136
|
+
Device primitive object, `undefined` indicates that the retrieval failed
|
|
1137
|
+
|
|
1138
|
+
## Example
|
|
1139
|
+
|
|
1140
|
+
```javascript
|
|
1141
|
+
// 1. 创建两个测试器件(随机坐标避免重合,SCH 坐标单位 10mil)
|
|
1142
|
+
const devices = await eda.lib_Device.search('');
|
|
1143
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
1144
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
1145
|
+
const comp1 = await eda.sch_PrimitiveComponent.create(devices[0], x, y);
|
|
1146
|
+
const comp2 = await eda.sch_PrimitiveComponent.create(devices[0], x + 400, y);
|
|
1147
|
+
|
|
1148
|
+
// 2. 传单个 ID 字符串,返回单个器件对象
|
|
1149
|
+
const single = await eda.sch_PrimitiveComponent.get(comp1.getState_PrimitiveId());
|
|
1150
|
+
|
|
1151
|
+
// 3. 传 ID 数组,返回器件对象数组(任一 ID 未匹配不影响其它图元的返回)
|
|
1152
|
+
const arr = await eda.sch_PrimitiveComponent.get([
|
|
1153
|
+
comp1.getState_PrimitiveId(),
|
|
1154
|
+
comp2.getState_PrimitiveId()
|
|
1155
|
+
]);
|
|
1156
|
+
|
|
1157
|
+
// 4. 清理测试图元(查询类需要清理)
|
|
1158
|
+
await eda.sch_PrimitiveComponent.delete([comp1.getState_PrimitiveId(), comp2.getState_PrimitiveId()]);
|
|
1159
|
+
|
|
1160
|
+
console.log('single designator:', single.getState_Designator());
|
|
1161
|
+
console.log('array length:', arr.length);
|
|
1162
|
+
console.log('comp2 designator:', arr[1].getState_Designator());
|
|
1163
|
+
```
|
|
1164
|
+
|
|
1165
|
+
### get_1
|
|
1166
|
+
|
|
1167
|
+
# SCH\_PrimitiveComponent.get() method
|
|
1168
|
+
|
|
1169
|
+
> 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.
|
|
1170
|
+
|
|
1171
|
+
Get Device
|
|
1172
|
+
|
|
1173
|
+
## Signature
|
|
1174
|
+
|
|
1175
|
+
```typescript
|
|
1176
|
+
function get(primitiveIds: Array<string>): Promise<Array<ISCH_PrimitiveComponent>>;
|
|
1177
|
+
```
|
|
1178
|
+
|
|
1179
|
+
## Parameters
|
|
1180
|
+
|
|
1181
|
+
<table><thead><tr><th>
|
|
1182
|
+
|
|
1183
|
+
Parameter
|
|
1184
|
+
|
|
1185
|
+
</th><th>
|
|
1186
|
+
|
|
1187
|
+
Type
|
|
1188
|
+
|
|
1189
|
+
</th><th>
|
|
1190
|
+
|
|
1191
|
+
Description
|
|
1192
|
+
|
|
1193
|
+
</th></tr></thead>
|
|
1194
|
+
<tbody><tr><td>
|
|
1195
|
+
|
|
1196
|
+
primitiveIds
|
|
1197
|
+
|
|
1198
|
+
</td><td>
|
|
1199
|
+
|
|
1200
|
+
Array<string>
|
|
1201
|
+
|
|
1202
|
+
</td><td>
|
|
1203
|
+
|
|
1204
|
+
Device primitive ID, which can be a string or an array of strings. If it is an array, an array is also returned
|
|
1205
|
+
|
|
1206
|
+
</td></tr>
|
|
1207
|
+
</tbody></table>
|
|
1208
|
+
|
|
1209
|
+
## Returns
|
|
1210
|
+
|
|
1211
|
+
Promise<Array<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)<!-- -->>>
|
|
1212
|
+
|
|
1213
|
+
Device primitive object; an empty array indicates that the retrieval failed
|
|
1214
|
+
|
|
1215
|
+
## Remarks
|
|
1216
|
+
|
|
1217
|
+
If multiple primitive IDs are passed in, a primitive ID that is not matched will not affect the return of other primitives; that is, fewer primitive objects than the number of primitive IDs passed in may be returned.
|
|
1218
|
+
|
|
1219
|
+
### getall
|
|
1220
|
+
|
|
1221
|
+
# SCH\_PrimitiveComponent.getAll() method
|
|
1222
|
+
|
|
1223
|
+
> 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.
|
|
1224
|
+
|
|
1225
|
+
Get all Device
|
|
1226
|
+
|
|
1227
|
+
## Signature
|
|
1228
|
+
|
|
1229
|
+
```typescript
|
|
1230
|
+
function getAll(
|
|
1231
|
+
componentType?: ESCH_PrimitiveComponentType,
|
|
1232
|
+
allSchematicPages?: boolean,
|
|
1233
|
+
): Promise<Array<ISCH_PrimitiveComponent>>;
|
|
1234
|
+
```
|
|
1235
|
+
|
|
1236
|
+
## Parameters
|
|
1237
|
+
|
|
1238
|
+
<table><thead><tr><th>
|
|
1239
|
+
|
|
1240
|
+
Parameter
|
|
1241
|
+
|
|
1242
|
+
</th><th>
|
|
1243
|
+
|
|
1244
|
+
Type
|
|
1245
|
+
|
|
1246
|
+
</th><th>
|
|
1247
|
+
|
|
1248
|
+
Description
|
|
1249
|
+
|
|
1250
|
+
</th></tr></thead>
|
|
1251
|
+
<tbody><tr><td>
|
|
1252
|
+
|
|
1253
|
+
componentType
|
|
1254
|
+
|
|
1255
|
+
</td><td>
|
|
1256
|
+
|
|
1257
|
+
[ESCH\_PrimitiveComponentType](../enums/ESCH_PrimitiveComponentType.md)
|
|
1258
|
+
|
|
1259
|
+
</td><td>
|
|
1260
|
+
|
|
1261
|
+
_(Optional)_ Device type
|
|
1262
|
+
|
|
1263
|
+
</td></tr>
|
|
1264
|
+
<tr><td>
|
|
1265
|
+
|
|
1266
|
+
allSchematicPages
|
|
1267
|
+
|
|
1268
|
+
</td><td>
|
|
1269
|
+
|
|
1270
|
+
boolean
|
|
1271
|
+
|
|
1272
|
+
</td><td>
|
|
1273
|
+
|
|
1274
|
+
_(Optional)_ Whether to get the devices of all schematic sheets
|
|
1275
|
+
|
|
1276
|
+
</td></tr>
|
|
1277
|
+
</tbody></table>
|
|
1278
|
+
|
|
1279
|
+
## Returns
|
|
1280
|
+
|
|
1281
|
+
Promise<Array<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)<!-- -->>>
|
|
1282
|
+
|
|
1283
|
+
Array of Device primitive objects
|
|
1284
|
+
|
|
1285
|
+
## Example
|
|
1286
|
+
|
|
1287
|
+
```javascript
|
|
1288
|
+
// 1. 创建一个普通元件和一个网络标识作为查找目标(随机坐标避免重合)
|
|
1289
|
+
const devices = await eda.lib_Device.search('');
|
|
1290
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
1291
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
1292
|
+
const comp = await eda.sch_PrimitiveComponent.create(devices[0], x, y);
|
|
1293
|
+
const flag = await eda.sch_PrimitiveComponent.createNetFlag('Power', '嘉立创示例_VCC', x + 600, y);
|
|
1294
|
+
const compId = comp.getState_PrimitiveId();
|
|
1295
|
+
|
|
1296
|
+
// 2. 不传参数,取当前图页全部器件
|
|
1297
|
+
const all = await eda.sch_PrimitiveComponent.getAll();
|
|
1298
|
+
|
|
1299
|
+
// 3. 传入类型 'netflag' 只取网络标识(ESCH_PrimitiveComponentType 值)
|
|
1300
|
+
const flags = await eda.sch_PrimitiveComponent.getAll('netflag');
|
|
1301
|
+
|
|
1302
|
+
// 4. 清理测试图元(查询类需要清理)
|
|
1303
|
+
await eda.sch_PrimitiveComponent.delete([compId, flag.getState_PrimitiveId()]);
|
|
1304
|
+
|
|
1305
|
+
console.log('total components:', all.length);
|
|
1306
|
+
console.log('marker comp found:', all.some(c => c.getState_PrimitiveId() === compId));
|
|
1307
|
+
console.log('netflag count:', flags.length);
|
|
1308
|
+
```
|
|
1309
|
+
|
|
1310
|
+
### getallpinsbyprimitiveid
|
|
1311
|
+
|
|
1312
|
+
# SCH\_PrimitiveComponent.getAllPinsByPrimitiveId() method
|
|
1313
|
+
|
|
1314
|
+
> 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.
|
|
1315
|
+
|
|
1316
|
+
Get all pins associated with the device
|
|
1317
|
+
|
|
1318
|
+
## Signature
|
|
1319
|
+
|
|
1320
|
+
```typescript
|
|
1321
|
+
function getAllPinsByPrimitiveId(
|
|
1322
|
+
primitiveId: string,
|
|
1323
|
+
): Promise<Array<ISCH_PrimitiveComponentPin> | undefined>;
|
|
1324
|
+
```
|
|
1325
|
+
|
|
1326
|
+
## Parameters
|
|
1327
|
+
|
|
1328
|
+
<table><thead><tr><th>
|
|
1329
|
+
|
|
1330
|
+
Parameter
|
|
1331
|
+
|
|
1332
|
+
</th><th>
|
|
1333
|
+
|
|
1334
|
+
Type
|
|
1335
|
+
|
|
1336
|
+
</th><th>
|
|
1337
|
+
|
|
1338
|
+
Description
|
|
1339
|
+
|
|
1340
|
+
</th></tr></thead>
|
|
1341
|
+
<tbody><tr><td>
|
|
1342
|
+
|
|
1343
|
+
primitiveId
|
|
1344
|
+
|
|
1345
|
+
</td><td>
|
|
1346
|
+
|
|
1347
|
+
string
|
|
1348
|
+
|
|
1349
|
+
</td><td>
|
|
1350
|
+
|
|
1351
|
+
Device primitive ID
|
|
1352
|
+
|
|
1353
|
+
</td></tr>
|
|
1354
|
+
</tbody></table>
|
|
1355
|
+
|
|
1356
|
+
## Returns
|
|
1357
|
+
|
|
1358
|
+
Promise<Array<[ISCH\_PrimitiveComponentPin](./ISCH_PrimitiveComponentPin.md)<!-- -->> \| undefined>
|
|
1359
|
+
|
|
1360
|
+
Device pin primitive array
|
|
1361
|
+
|
|
1362
|
+
## Example
|
|
1363
|
+
|
|
1364
|
+
```javascript
|
|
1365
|
+
// 1. 创建一个带引脚的测试器件(随机坐标避免重合,SCH 坐标单位 10mil)
|
|
1366
|
+
const devices = await eda.lib_Device.search('');
|
|
1367
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
1368
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
1369
|
+
const comp = await eda.sch_PrimitiveComponent.create(devices[0], x, y);
|
|
1370
|
+
const compId = comp.getState_PrimitiveId();
|
|
1371
|
+
|
|
1372
|
+
// 2. 按图元 ID 取出该器件的全部引脚(返回纯数据对象,字段直接可读)
|
|
1373
|
+
const pins = await eda.sch_PrimitiveComponent.getAllPinsByPrimitiveId(compId);
|
|
1374
|
+
|
|
1375
|
+
// 3. 清理测试图元(查询类需要清理)
|
|
1376
|
+
await eda.sch_PrimitiveComponent.delete([compId]);
|
|
1377
|
+
|
|
1378
|
+
console.log('pin count:', pins.length);
|
|
1379
|
+
console.log('first pin number:', pins[0].pinNumber);
|
|
1380
|
+
console.log('first pin type:', pins[0].pinType);
|
|
1381
|
+
```
|
|
1382
|
+
|
|
1383
|
+
### getallprimitiveid
|
|
1384
|
+
|
|
1385
|
+
# SCH\_PrimitiveComponent.getAllPrimitiveId() method
|
|
1386
|
+
|
|
1387
|
+
> 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.
|
|
1388
|
+
|
|
1389
|
+
Get all Device primitive IDs
|
|
1390
|
+
|
|
1391
|
+
## Signature
|
|
1392
|
+
|
|
1393
|
+
```typescript
|
|
1394
|
+
function getAllPrimitiveId(
|
|
1395
|
+
componentType?: ESCH_PrimitiveComponentType,
|
|
1396
|
+
allSchematicPages?: boolean,
|
|
1397
|
+
): Promise<Array<string>>;
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1400
|
+
## Parameters
|
|
1401
|
+
|
|
1402
|
+
<table><thead><tr><th>
|
|
1403
|
+
|
|
1404
|
+
Parameter
|
|
1405
|
+
|
|
1406
|
+
</th><th>
|
|
1407
|
+
|
|
1408
|
+
Type
|
|
1409
|
+
|
|
1410
|
+
</th><th>
|
|
1411
|
+
|
|
1412
|
+
Description
|
|
1413
|
+
|
|
1414
|
+
</th></tr></thead>
|
|
1415
|
+
<tbody><tr><td>
|
|
1416
|
+
|
|
1417
|
+
componentType
|
|
1418
|
+
|
|
1419
|
+
</td><td>
|
|
1420
|
+
|
|
1421
|
+
[ESCH\_PrimitiveComponentType](../enums/ESCH_PrimitiveComponentType.md)
|
|
1422
|
+
|
|
1423
|
+
</td><td>
|
|
1424
|
+
|
|
1425
|
+
_(Optional)_ Device type
|
|
1426
|
+
|
|
1427
|
+
</td></tr>
|
|
1428
|
+
<tr><td>
|
|
1429
|
+
|
|
1430
|
+
allSchematicPages
|
|
1431
|
+
|
|
1432
|
+
</td><td>
|
|
1433
|
+
|
|
1434
|
+
boolean
|
|
1435
|
+
|
|
1436
|
+
</td><td>
|
|
1437
|
+
|
|
1438
|
+
_(Optional)_ Whether to get the devices of all schematic sheets
|
|
1439
|
+
|
|
1440
|
+
</td></tr>
|
|
1441
|
+
</tbody></table>
|
|
1442
|
+
|
|
1443
|
+
## Returns
|
|
1444
|
+
|
|
1445
|
+
Promise<Array<string>>
|
|
1446
|
+
|
|
1447
|
+
Array of Device primitive IDs
|
|
1448
|
+
|
|
1449
|
+
## Example
|
|
1450
|
+
|
|
1451
|
+
```javascript
|
|
1452
|
+
// 1. 创建一个网络标识作为查找目标(随机坐标避免重合,SCH 坐标单位 10mil)
|
|
1453
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
1454
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
1455
|
+
const flag = await eda.sch_PrimitiveComponent.createNetFlag('Power', '嘉立创示例_VCC', x, y);
|
|
1456
|
+
const flagId = flag.getState_PrimitiveId();
|
|
1457
|
+
|
|
1458
|
+
// 2. 不传参数,取当前图页全部器件的图元 ID
|
|
1459
|
+
const allIds = await eda.sch_PrimitiveComponent.getAllPrimitiveId();
|
|
1460
|
+
|
|
1461
|
+
// 3. 传入类型 'netflag' 只取网络标识的图元 ID
|
|
1462
|
+
const flagIds = await eda.sch_PrimitiveComponent.getAllPrimitiveId('netflag');
|
|
1463
|
+
|
|
1464
|
+
// 4. 清理测试图元(查询类需要清理)
|
|
1465
|
+
await eda.sch_PrimitiveComponent.delete([flagId]);
|
|
1466
|
+
|
|
1467
|
+
console.log('total ids:', allIds.length);
|
|
1468
|
+
console.log('netflag ids:', flagIds.length);
|
|
1469
|
+
console.log('marker flag found:', flagIds.includes(flagId));
|
|
1470
|
+
```
|
|
1471
|
+
|
|
1472
|
+
### getallpropertynames
|
|
1473
|
+
|
|
1474
|
+
# SCH\_PrimitiveComponent.getAllPropertyNames() 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
|
+
Get The set of all property names of all devices
|
|
1479
|
+
|
|
1480
|
+
## Signature
|
|
1481
|
+
|
|
1482
|
+
```typescript
|
|
1483
|
+
function getAllPropertyNames(): Promise<Array<string>>;
|
|
1484
|
+
```
|
|
1485
|
+
|
|
1486
|
+
## Returns
|
|
1487
|
+
|
|
1488
|
+
Promise<Array<string>>
|
|
1489
|
+
|
|
1490
|
+
The set of all property names of all devices
|
|
1491
|
+
|
|
1492
|
+
## Example
|
|
1493
|
+
|
|
1494
|
+
```javascript
|
|
1495
|
+
// 1. 创建一个测试器件,保证画布上有带属性的器件(随机坐标避免重合)
|
|
1496
|
+
const devices = await eda.lib_Device.search('');
|
|
1497
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
1498
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
1499
|
+
const comp = await eda.sch_PrimitiveComponent.create(devices[0], x, y);
|
|
1500
|
+
|
|
1501
|
+
// 2. 取所有器件出现过的属性名称集合
|
|
1502
|
+
const names = await eda.sch_PrimitiveComponent.getAllPropertyNames();
|
|
1503
|
+
|
|
1504
|
+
// 3. 清理测试图元(查询类需要清理)
|
|
1505
|
+
await eda.sch_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1506
|
+
|
|
1507
|
+
console.log('property name count:', names.length);
|
|
1508
|
+
console.log('names:', names.join(', '));
|
|
1509
|
+
```
|
|
1510
|
+
|
|
1511
|
+
### modify
|
|
1512
|
+
|
|
1513
|
+
# SCH\_PrimitiveComponent.modify() method
|
|
1514
|
+
|
|
1515
|
+
> 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.
|
|
1516
|
+
|
|
1517
|
+
Modify Device
|
|
1518
|
+
|
|
1519
|
+
## Signature
|
|
1520
|
+
|
|
1521
|
+
```typescript
|
|
1522
|
+
function modify(
|
|
1523
|
+
primitiveId: string | ISCH_PrimitiveComponent,
|
|
1524
|
+
property: {
|
|
1525
|
+
x?: undefined | number;
|
|
1526
|
+
y?: undefined | number;
|
|
1527
|
+
rotation?: undefined | number;
|
|
1528
|
+
mirror?: undefined | false | true;
|
|
1529
|
+
addIntoBom?: undefined | false | true;
|
|
1530
|
+
addIntoPcb?: undefined | false | true;
|
|
1531
|
+
designator?: undefined | null | string;
|
|
1532
|
+
name?: undefined | null | string;
|
|
1533
|
+
uniqueId?: undefined | null | string;
|
|
1534
|
+
manufacturer?: undefined | null | string;
|
|
1535
|
+
manufacturerId?: undefined | null | string;
|
|
1536
|
+
supplier?: undefined | null | string;
|
|
1537
|
+
supplierId?: undefined | null | string;
|
|
1538
|
+
otherProperty?: undefined | Record<string, string | number | false | true>;
|
|
1539
|
+
},
|
|
1540
|
+
): Promise<ISCH_PrimitiveComponent | undefined>;
|
|
1541
|
+
```
|
|
1542
|
+
|
|
1543
|
+
## Parameters
|
|
1544
|
+
|
|
1545
|
+
<table><thead><tr><th>
|
|
1546
|
+
|
|
1547
|
+
Parameter
|
|
1548
|
+
|
|
1549
|
+
</th><th>
|
|
1550
|
+
|
|
1551
|
+
Type
|
|
1552
|
+
|
|
1553
|
+
</th><th>
|
|
1554
|
+
|
|
1555
|
+
Description
|
|
1556
|
+
|
|
1557
|
+
</th></tr></thead>
|
|
1558
|
+
<tbody><tr><td>
|
|
1559
|
+
|
|
1560
|
+
primitiveId
|
|
1561
|
+
|
|
1562
|
+
</td><td>
|
|
1563
|
+
|
|
1564
|
+
string \| [ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md)
|
|
1565
|
+
|
|
1566
|
+
</td><td>
|
|
1567
|
+
|
|
1568
|
+
Primitive ID
|
|
1569
|
+
|
|
1570
|
+
</td></tr>
|
|
1571
|
+
<tr><td>
|
|
1572
|
+
|
|
1573
|
+
property
|
|
1574
|
+
|
|
1575
|
+
</td><td>
|
|
1576
|
+
|
|
1577
|
+
{ x?: undefined \| number; y?: undefined \| number; rotation?: undefined \| number; mirror?: undefined \| false \| true; addIntoBom?: undefined \| false \| true; addIntoPcb?: undefined \| false \| true; designator?: undefined \| null \| string; name?: undefined \| null \| string; uniqueId?: undefined \| null \| string; manufacturer?: undefined \| null \| string; manufacturerId?: undefined \| null \| string; supplier?: undefined \| null \| string; supplierId?: undefined \| null \| string; otherProperty?: undefined \| Record<string, string \| number \| false \| true> }
|
|
1578
|
+
|
|
1579
|
+
</td><td>
|
|
1580
|
+
|
|
1581
|
+
</td></tr>
|
|
1582
|
+
</tbody></table>
|
|
1583
|
+
|
|
1584
|
+
## Returns
|
|
1585
|
+
|
|
1586
|
+
Promise<[ISCH\_PrimitiveComponent](./ISCH_PrimitiveComponent.md) \| undefined>
|
|
1587
|
+
|
|
1588
|
+
Device primitive object
|
|
1589
|
+
|
|
1590
|
+
## Remarks
|
|
1591
|
+
|
|
1592
|
+
This method can only be used for modification when the device type is [COMPONENT](../enums/ESCH_PrimitiveComponentType.md)
|
|
1593
|
+
|
|
1594
|
+
## Example
|
|
1595
|
+
|
|
1596
|
+
```javascript
|
|
1597
|
+
// 1. 创建待修改的测试器件(随机坐标避免与画布已有器件重合)
|
|
1598
|
+
const devices = await eda.lib_Device.search('');
|
|
1599
|
+
const x = 2000 + Math.floor(Math.random() * 8000);
|
|
1600
|
+
const y = 2000 + Math.floor(Math.random() * 8000);
|
|
1601
|
+
const comp = await eda.sch_PrimitiveComponent.create(devices[0], x, y);
|
|
1602
|
+
const compId = comp.getState_PrimitiveId();
|
|
1603
|
+
|
|
1604
|
+
// 2. 读取修改前的位号、旋转与 X 坐标
|
|
1605
|
+
const beforeDesignator = comp.getState_Designator();
|
|
1606
|
+
const beforeRotation = comp.getState_Rotation();
|
|
1607
|
+
const beforeX = comp.getState_X();
|
|
1608
|
+
|
|
1609
|
+
// 3. 批量修改:右移 400(约 101.6mm)、旋转 90 度、位号改为 U100
|
|
1610
|
+
await eda.sch_PrimitiveComponent.modify(compId, {
|
|
1611
|
+
x: x + 400,
|
|
1612
|
+
rotation: 90,
|
|
1613
|
+
designator: '嘉立创示例_U100'
|
|
1614
|
+
});
|
|
1615
|
+
|
|
1616
|
+
// 4. modify 返回后需要重新 get() 才能读到画布上的最新值
|
|
1617
|
+
const refreshed = await eda.sch_PrimitiveComponent.get(compId);
|
|
1618
|
+
|
|
1619
|
+
// 5. 修改类保留现场,供观察修改结果
|
|
1620
|
+
console.log('primitiveId:', compId);
|
|
1621
|
+
console.log('designator:', beforeDesignator, '→', refreshed.getState_Designator());
|
|
1622
|
+
console.log('rotation:', beforeRotation, '→', refreshed.getState_Rotation());
|
|
1623
|
+
console.log('x:', beforeX, '→', refreshed.getState_X());
|
|
1624
|
+
```
|
|
1625
|
+
|
|
1626
|
+
### placecbbschematicpage
|
|
1627
|
+
|
|
1628
|
+
# SCH\_PrimitiveComponent.placeCbbSchematicPage() method
|
|
1629
|
+
|
|
1630
|
+
> 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.
|
|
1631
|
+
|
|
1632
|
+
Place reuse block schematic sheet
|
|
1633
|
+
|
|
1634
|
+
## Signature
|
|
1635
|
+
|
|
1636
|
+
```typescript
|
|
1637
|
+
function placeCbbSchematicPage(
|
|
1638
|
+
cbbSchematicPage: { libraryUuid: string; cbbUuid: string; uuid: string },
|
|
1639
|
+
x: number,
|
|
1640
|
+
y: number,
|
|
1641
|
+
props?: { reimportWhenNameRepeated?: undefined | false | true },
|
|
1642
|
+
): Promise<boolean>;
|
|
1643
|
+
```
|
|
1644
|
+
|
|
1645
|
+
## Parameters
|
|
1646
|
+
|
|
1647
|
+
<table><thead><tr><th>
|
|
1648
|
+
|
|
1649
|
+
Parameter
|
|
1650
|
+
|
|
1651
|
+
</th><th>
|
|
1652
|
+
|
|
1653
|
+
Type
|
|
1654
|
+
|
|
1655
|
+
</th><th>
|
|
1656
|
+
|
|
1657
|
+
Description
|
|
1658
|
+
|
|
1659
|
+
</th></tr></thead>
|
|
1660
|
+
<tbody><tr><td>
|
|
1661
|
+
|
|
1662
|
+
cbbSchematicPage
|
|
1663
|
+
|
|
1664
|
+
</td><td>
|
|
1665
|
+
|
|
1666
|
+
\{ libraryUuid: string; cbbUuid: string; uuid: string \}
|
|
1667
|
+
|
|
1668
|
+
</td><td>
|
|
1669
|
+
|
|
1670
|
+
Reuse block schematic sheet. `libraryUuid` is the UUID of the library where the CBB project is located, `cbbUuid` is the UUID of the CBB project, and `uuid` is the UUID of the schematic sheet in the CBB project
|
|
1671
|
+
|
|
1672
|
+
</td></tr>
|
|
1673
|
+
<tr><td>
|
|
1674
|
+
|
|
1675
|
+
x
|
|
1676
|
+
|
|
1677
|
+
</td><td>
|
|
1678
|
+
|
|
1679
|
+
number
|
|
1680
|
+
|
|
1681
|
+
</td><td>
|
|
1682
|
+
|
|
1683
|
+
X coordinate
|
|
1684
|
+
|
|
1685
|
+
</td></tr>
|
|
1686
|
+
<tr><td>
|
|
1687
|
+
|
|
1688
|
+
y
|
|
1689
|
+
|
|
1690
|
+
</td><td>
|
|
1691
|
+
|
|
1692
|
+
number
|
|
1693
|
+
|
|
1694
|
+
</td><td>
|
|
1695
|
+
|
|
1696
|
+
Y coordinate
|
|
1697
|
+
|
|
1698
|
+
</td></tr>
|
|
1699
|
+
<tr><td>
|
|
1700
|
+
|
|
1701
|
+
props
|
|
1702
|
+
|
|
1703
|
+
</td><td>
|
|
1704
|
+
|
|
1705
|
+
\{ reimportWhenNameRepeated?: undefined \| false \| true \}
|
|
1706
|
+
|
|
1707
|
+
</td><td>
|
|
1708
|
+
|
|
1709
|
+
_(Optional)_ Placement parameters: `reimportWhenNameRepeated` - whether to re-import when a module with the same name exists, default `true`<!-- -->. ADD since EDA v4.2
|
|
1710
|
+
|
|
1711
|
+
</td></tr>
|
|
1712
|
+
</tbody></table>
|
|
1713
|
+
|
|
1714
|
+
## Returns
|
|
1715
|
+
|
|
1716
|
+
Promise<boolean>
|
|
1717
|
+
|
|
1718
|
+
Place whether the operation is successful
|
|
1719
|
+
|
|
1720
|
+
### placecomponentwithmouse
|
|
1721
|
+
|
|
1722
|
+
# SCH\_PrimitiveComponent.placeComponentWithMouse() method
|
|
1723
|
+
|
|
1724
|
+
> 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.
|
|
1725
|
+
|
|
1726
|
+
Place with the mouse device
|
|
1727
|
+
|
|
1728
|
+
## Signature
|
|
1729
|
+
|
|
1730
|
+
```typescript
|
|
1731
|
+
function placeComponentWithMouse(
|
|
1732
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
1733
|
+
subPartName?: string,
|
|
1734
|
+
): Promise<boolean>;
|
|
1735
|
+
```
|
|
1736
|
+
|
|
1737
|
+
## Parameters
|
|
1738
|
+
|
|
1739
|
+
<table><thead><tr><th>
|
|
1740
|
+
|
|
1741
|
+
Parameter
|
|
1742
|
+
|
|
1743
|
+
</th><th>
|
|
1744
|
+
|
|
1745
|
+
Type
|
|
1746
|
+
|
|
1747
|
+
</th><th>
|
|
1748
|
+
|
|
1749
|
+
Description
|
|
1750
|
+
|
|
1751
|
+
</th></tr></thead>
|
|
1752
|
+
<tbody><tr><td>
|
|
1753
|
+
|
|
1754
|
+
component
|
|
1755
|
+
|
|
1756
|
+
</td><td>
|
|
1757
|
+
|
|
1758
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
1759
|
+
|
|
1760
|
+
</td><td>
|
|
1761
|
+
|
|
1762
|
+
Associate library device
|
|
1763
|
+
|
|
1764
|
+
</td></tr>
|
|
1765
|
+
<tr><td>
|
|
1766
|
+
|
|
1767
|
+
subPartName
|
|
1768
|
+
|
|
1769
|
+
</td><td>
|
|
1770
|
+
|
|
1771
|
+
string
|
|
1772
|
+
|
|
1773
|
+
</td><td>
|
|
1774
|
+
|
|
1775
|
+
_(Optional)_ Sub-part name
|
|
1776
|
+
|
|
1777
|
+
</td></tr>
|
|
1778
|
+
</tbody></table>
|
|
1779
|
+
|
|
1780
|
+
## Returns
|
|
1781
|
+
|
|
1782
|
+
Promise<boolean>
|
|
1783
|
+
|
|
1784
|
+
Whether the device was found
|
|
1785
|
+
|
|
1786
|
+
## Remarks
|
|
1787
|
+
|
|
1788
|
+
This API simulates clicking the placement button on the front end. The specified device will be bound to the current mouse and placed on the canvas when the user clicks subsequently
|
|
1789
|
+
|
|
1790
|
+
The return timing of this API does not wait for the user's placement operation. Once the device is bound to the mouse, this API will immediately return `true`
|
|
1791
|
+
|
|
1792
|
+
### placesymbolwithmouse
|
|
1793
|
+
|
|
1794
|
+
# SCH\_PrimitiveComponent.placeSymbolWithMouse() method
|
|
1795
|
+
|
|
1796
|
+
> 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.
|
|
1797
|
+
|
|
1798
|
+
Place with the mouse symbol
|
|
1799
|
+
|
|
1800
|
+
## Signature
|
|
1801
|
+
|
|
1802
|
+
```typescript
|
|
1803
|
+
function placeSymbolWithMouse(
|
|
1804
|
+
symbol: { libraryUuid: string; uuid: string } | ILIB_SymbolItem | ILIB_SymbolSearchItem,
|
|
1805
|
+
subPartName?: string,
|
|
1806
|
+
properties?: Record<string, boolean | number | string | undefined>,
|
|
1807
|
+
): Promise<boolean>;
|
|
1808
|
+
```
|
|
1809
|
+
|
|
1810
|
+
## Parameters
|
|
1811
|
+
|
|
1812
|
+
<table><thead><tr><th>
|
|
1813
|
+
|
|
1814
|
+
Parameter
|
|
1815
|
+
|
|
1816
|
+
</th><th>
|
|
1817
|
+
|
|
1818
|
+
Type
|
|
1819
|
+
|
|
1820
|
+
</th><th>
|
|
1821
|
+
|
|
1822
|
+
Description
|
|
1823
|
+
|
|
1824
|
+
</th></tr></thead>
|
|
1825
|
+
<tbody><tr><td>
|
|
1826
|
+
|
|
1827
|
+
symbol
|
|
1828
|
+
|
|
1829
|
+
</td><td>
|
|
1830
|
+
|
|
1831
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_SymbolItem](../interfaces/ILIB_SymbolItem.md) \| [ILIB\_SymbolSearchItem](../interfaces/ILIB_SymbolSearchItem.md)
|
|
1832
|
+
|
|
1833
|
+
</td><td>
|
|
1834
|
+
|
|
1835
|
+
Associate library symbol
|
|
1836
|
+
|
|
1837
|
+
</td></tr>
|
|
1838
|
+
<tr><td>
|
|
1839
|
+
|
|
1840
|
+
subPartName
|
|
1841
|
+
|
|
1842
|
+
</td><td>
|
|
1843
|
+
|
|
1844
|
+
string
|
|
1845
|
+
|
|
1846
|
+
</td><td>
|
|
1847
|
+
|
|
1848
|
+
_(Optional)_ Sub-part name
|
|
1849
|
+
|
|
1850
|
+
</td></tr>
|
|
1851
|
+
<tr><td>
|
|
1852
|
+
|
|
1853
|
+
properties
|
|
1854
|
+
|
|
1855
|
+
</td><td>
|
|
1856
|
+
|
|
1857
|
+
Record<string, boolean \| number \| string \| undefined>
|
|
1858
|
+
|
|
1859
|
+
</td><td>
|
|
1860
|
+
|
|
1861
|
+
_(Optional)_ Device property
|
|
1862
|
+
|
|
1863
|
+
</td></tr>
|
|
1864
|
+
</tbody></table>
|
|
1865
|
+
|
|
1866
|
+
## Returns
|
|
1867
|
+
|
|
1868
|
+
Promise<boolean>
|
|
1869
|
+
|
|
1870
|
+
Whether the symbol was found
|
|
1871
|
+
|
|
1872
|
+
## Remarks
|
|
1873
|
+
|
|
1874
|
+
This API simulates clicking the placement button on the front end. The specified symbol will be bound to the current mouse and placed on the canvas when the user clicks subsequently
|
|
1875
|
+
|
|
1876
|
+
The return timing of this API does not wait for the user's placement operation. Once the symbol is bound to the mouse, this API will immediately return `true` ADD since API v0.2.26
|
|
1877
|
+
|
|
1878
|
+
### setnetflagcomponentuuid_analogground
|
|
1879
|
+
|
|
1880
|
+
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_AnalogGround() method
|
|
1881
|
+
|
|
1882
|
+
> 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.
|
|
1883
|
+
|
|
1884
|
+
Set the device UUID associated with the AnalogGround net flag in the extension API
|
|
1885
|
+
|
|
1886
|
+
## Signature
|
|
1887
|
+
|
|
1888
|
+
```typescript
|
|
1889
|
+
function setNetFlagComponentUuid_AnalogGround(
|
|
1890
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
1891
|
+
): Promise<boolean>;
|
|
1892
|
+
```
|
|
1893
|
+
|
|
1894
|
+
## Parameters
|
|
1895
|
+
|
|
1896
|
+
<table><thead><tr><th>
|
|
1897
|
+
|
|
1898
|
+
Parameter
|
|
1899
|
+
|
|
1900
|
+
</th><th>
|
|
1901
|
+
|
|
1902
|
+
Type
|
|
1903
|
+
|
|
1904
|
+
</th><th>
|
|
1905
|
+
|
|
1906
|
+
Description
|
|
1907
|
+
|
|
1908
|
+
</th></tr></thead>
|
|
1909
|
+
<tbody><tr><td>
|
|
1910
|
+
|
|
1911
|
+
component
|
|
1912
|
+
|
|
1913
|
+
</td><td>
|
|
1914
|
+
|
|
1915
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
1916
|
+
|
|
1917
|
+
</td><td>
|
|
1918
|
+
|
|
1919
|
+
Associate library device
|
|
1920
|
+
|
|
1921
|
+
</td></tr>
|
|
1922
|
+
</tbody></table>
|
|
1923
|
+
|
|
1924
|
+
## Returns
|
|
1925
|
+
|
|
1926
|
+
Promise<boolean>
|
|
1927
|
+
|
|
1928
|
+
Whether the operation is successful
|
|
1929
|
+
|
|
1930
|
+
### setnetflagcomponentuuid_ground
|
|
1931
|
+
|
|
1932
|
+
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_Ground() method
|
|
1933
|
+
|
|
1934
|
+
> 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.
|
|
1935
|
+
|
|
1936
|
+
Set the device UUID associated with the Ground net flag in the extension API
|
|
1937
|
+
|
|
1938
|
+
## Signature
|
|
1939
|
+
|
|
1940
|
+
```typescript
|
|
1941
|
+
function setNetFlagComponentUuid_Ground(
|
|
1942
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
1943
|
+
): Promise<boolean>;
|
|
1944
|
+
```
|
|
1945
|
+
|
|
1946
|
+
## Parameters
|
|
1947
|
+
|
|
1948
|
+
<table><thead><tr><th>
|
|
1949
|
+
|
|
1950
|
+
Parameter
|
|
1951
|
+
|
|
1952
|
+
</th><th>
|
|
1953
|
+
|
|
1954
|
+
Type
|
|
1955
|
+
|
|
1956
|
+
</th><th>
|
|
1957
|
+
|
|
1958
|
+
Description
|
|
1959
|
+
|
|
1960
|
+
</th></tr></thead>
|
|
1961
|
+
<tbody><tr><td>
|
|
1962
|
+
|
|
1963
|
+
component
|
|
1964
|
+
|
|
1965
|
+
</td><td>
|
|
1966
|
+
|
|
1967
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
1968
|
+
|
|
1969
|
+
</td><td>
|
|
1970
|
+
|
|
1971
|
+
Associate library device
|
|
1972
|
+
|
|
1973
|
+
</td></tr>
|
|
1974
|
+
</tbody></table>
|
|
1975
|
+
|
|
1976
|
+
## Returns
|
|
1977
|
+
|
|
1978
|
+
Promise<boolean>
|
|
1979
|
+
|
|
1980
|
+
Whether the operation is successful
|
|
1981
|
+
|
|
1982
|
+
### setnetflagcomponentuuid_power
|
|
1983
|
+
|
|
1984
|
+
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_Power() method
|
|
1985
|
+
|
|
1986
|
+
> 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.
|
|
1987
|
+
|
|
1988
|
+
Set the device UUID associated with the Power net flag in the extension API
|
|
1989
|
+
|
|
1990
|
+
## Signature
|
|
1991
|
+
|
|
1992
|
+
```typescript
|
|
1993
|
+
function setNetFlagComponentUuid_Power(
|
|
1994
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
1995
|
+
): Promise<boolean>;
|
|
1996
|
+
```
|
|
1997
|
+
|
|
1998
|
+
## Parameters
|
|
1999
|
+
|
|
2000
|
+
<table><thead><tr><th>
|
|
2001
|
+
|
|
2002
|
+
Parameter
|
|
2003
|
+
|
|
2004
|
+
</th><th>
|
|
2005
|
+
|
|
2006
|
+
Type
|
|
2007
|
+
|
|
2008
|
+
</th><th>
|
|
2009
|
+
|
|
2010
|
+
Description
|
|
2011
|
+
|
|
2012
|
+
</th></tr></thead>
|
|
2013
|
+
<tbody><tr><td>
|
|
2014
|
+
|
|
2015
|
+
component
|
|
2016
|
+
|
|
2017
|
+
</td><td>
|
|
2018
|
+
|
|
2019
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
2020
|
+
|
|
2021
|
+
</td><td>
|
|
2022
|
+
|
|
2023
|
+
Associate library device
|
|
2024
|
+
|
|
2025
|
+
</td></tr>
|
|
2026
|
+
</tbody></table>
|
|
2027
|
+
|
|
2028
|
+
## Returns
|
|
2029
|
+
|
|
2030
|
+
Promise<boolean>
|
|
2031
|
+
|
|
2032
|
+
Whether the operation is successful
|
|
2033
|
+
|
|
2034
|
+
### setnetflagcomponentuuid_protectground
|
|
2035
|
+
|
|
2036
|
+
# SCH\_PrimitiveComponent.setNetFlagComponentUuid\_ProtectGround() method
|
|
2037
|
+
|
|
2038
|
+
> 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.
|
|
2039
|
+
|
|
2040
|
+
Set the device UUID associated with the ProtectGround net flag in the extension API
|
|
2041
|
+
|
|
2042
|
+
## Signature
|
|
2043
|
+
|
|
2044
|
+
```typescript
|
|
2045
|
+
function setNetFlagComponentUuid_ProtectGround(
|
|
2046
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
2047
|
+
): Promise<boolean>;
|
|
2048
|
+
```
|
|
2049
|
+
|
|
2050
|
+
## Parameters
|
|
2051
|
+
|
|
2052
|
+
<table><thead><tr><th>
|
|
2053
|
+
|
|
2054
|
+
Parameter
|
|
2055
|
+
|
|
2056
|
+
</th><th>
|
|
2057
|
+
|
|
2058
|
+
Type
|
|
2059
|
+
|
|
2060
|
+
</th><th>
|
|
2061
|
+
|
|
2062
|
+
Description
|
|
2063
|
+
|
|
2064
|
+
</th></tr></thead>
|
|
2065
|
+
<tbody><tr><td>
|
|
2066
|
+
|
|
2067
|
+
component
|
|
2068
|
+
|
|
2069
|
+
</td><td>
|
|
2070
|
+
|
|
2071
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
2072
|
+
|
|
2073
|
+
</td><td>
|
|
2074
|
+
|
|
2075
|
+
Associate library device
|
|
2076
|
+
|
|
2077
|
+
</td></tr>
|
|
2078
|
+
</tbody></table>
|
|
2079
|
+
|
|
2080
|
+
## Returns
|
|
2081
|
+
|
|
2082
|
+
Promise<boolean>
|
|
2083
|
+
|
|
2084
|
+
Whether the operation is successful
|
|
2085
|
+
|
|
2086
|
+
### setnetportcomponentuuid_bi
|
|
2087
|
+
|
|
2088
|
+
# SCH\_PrimitiveComponent.setNetPortComponentUuid\_BI() method
|
|
2089
|
+
|
|
2090
|
+
> 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.
|
|
2091
|
+
|
|
2092
|
+
Set the device UUID associated with the BI net port in the extension API
|
|
2093
|
+
|
|
2094
|
+
## Signature
|
|
2095
|
+
|
|
2096
|
+
```typescript
|
|
2097
|
+
function setNetPortComponentUuid_BI(
|
|
2098
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
2099
|
+
): Promise<boolean>;
|
|
2100
|
+
```
|
|
2101
|
+
|
|
2102
|
+
## Parameters
|
|
2103
|
+
|
|
2104
|
+
<table><thead><tr><th>
|
|
2105
|
+
|
|
2106
|
+
Parameter
|
|
2107
|
+
|
|
2108
|
+
</th><th>
|
|
2109
|
+
|
|
2110
|
+
Type
|
|
2111
|
+
|
|
2112
|
+
</th><th>
|
|
2113
|
+
|
|
2114
|
+
Description
|
|
2115
|
+
|
|
2116
|
+
</th></tr></thead>
|
|
2117
|
+
<tbody><tr><td>
|
|
2118
|
+
|
|
2119
|
+
component
|
|
2120
|
+
|
|
2121
|
+
</td><td>
|
|
2122
|
+
|
|
2123
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
2124
|
+
|
|
2125
|
+
</td><td>
|
|
2126
|
+
|
|
2127
|
+
Associate library device
|
|
2128
|
+
|
|
2129
|
+
</td></tr>
|
|
2130
|
+
</tbody></table>
|
|
2131
|
+
|
|
2132
|
+
## Returns
|
|
2133
|
+
|
|
2134
|
+
Promise<boolean>
|
|
2135
|
+
|
|
2136
|
+
Whether the operation is successful
|
|
2137
|
+
|
|
2138
|
+
### setnetportcomponentuuid_in
|
|
2139
|
+
|
|
2140
|
+
# SCH\_PrimitiveComponent.setNetPortComponentUuid\_IN() method
|
|
2141
|
+
|
|
2142
|
+
> 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.
|
|
2143
|
+
|
|
2144
|
+
Set the device UUID associated with the IN net port in the extension API
|
|
2145
|
+
|
|
2146
|
+
## Signature
|
|
2147
|
+
|
|
2148
|
+
```typescript
|
|
2149
|
+
function setNetPortComponentUuid_IN(
|
|
2150
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
2151
|
+
): Promise<boolean>;
|
|
2152
|
+
```
|
|
2153
|
+
|
|
2154
|
+
## Parameters
|
|
2155
|
+
|
|
2156
|
+
<table><thead><tr><th>
|
|
2157
|
+
|
|
2158
|
+
Parameter
|
|
2159
|
+
|
|
2160
|
+
</th><th>
|
|
2161
|
+
|
|
2162
|
+
Type
|
|
2163
|
+
|
|
2164
|
+
</th><th>
|
|
2165
|
+
|
|
2166
|
+
Description
|
|
2167
|
+
|
|
2168
|
+
</th></tr></thead>
|
|
2169
|
+
<tbody><tr><td>
|
|
2170
|
+
|
|
2171
|
+
component
|
|
2172
|
+
|
|
2173
|
+
</td><td>
|
|
2174
|
+
|
|
2175
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
2176
|
+
|
|
2177
|
+
</td><td>
|
|
2178
|
+
|
|
2179
|
+
Associate library device
|
|
2180
|
+
|
|
2181
|
+
</td></tr>
|
|
2182
|
+
</tbody></table>
|
|
2183
|
+
|
|
2184
|
+
## Returns
|
|
2185
|
+
|
|
2186
|
+
Promise<boolean>
|
|
2187
|
+
|
|
2188
|
+
Whether the operation is successful
|
|
2189
|
+
|
|
2190
|
+
### setnetportcomponentuuid_out
|
|
2191
|
+
|
|
2192
|
+
# SCH\_PrimitiveComponent.setNetPortComponentUuid\_OUT() method
|
|
2193
|
+
|
|
2194
|
+
> 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.
|
|
2195
|
+
|
|
2196
|
+
Set the device UUID associated with the OUT net port in the extension API
|
|
2197
|
+
|
|
2198
|
+
## Signature
|
|
2199
|
+
|
|
2200
|
+
```typescript
|
|
2201
|
+
function setNetPortComponentUuid_OUT(
|
|
2202
|
+
component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem,
|
|
2203
|
+
): Promise<boolean>;
|
|
2204
|
+
```
|
|
2205
|
+
|
|
2206
|
+
## Parameters
|
|
2207
|
+
|
|
2208
|
+
<table><thead><tr><th>
|
|
2209
|
+
|
|
2210
|
+
Parameter
|
|
2211
|
+
|
|
2212
|
+
</th><th>
|
|
2213
|
+
|
|
2214
|
+
Type
|
|
2215
|
+
|
|
2216
|
+
</th><th>
|
|
2217
|
+
|
|
2218
|
+
Description
|
|
2219
|
+
|
|
2220
|
+
</th></tr></thead>
|
|
2221
|
+
<tbody><tr><td>
|
|
2222
|
+
|
|
2223
|
+
component
|
|
2224
|
+
|
|
2225
|
+
</td><td>
|
|
2226
|
+
|
|
2227
|
+
{ libraryUuid: string; uuid: string } \| [ILIB\_DeviceItem](../interfaces/ILIB_DeviceItem.md) \| [ILIB\_DeviceSearchItem](../interfaces/ILIB_DeviceSearchItem.md)
|
|
2228
|
+
|
|
2229
|
+
</td><td>
|
|
2230
|
+
|
|
2231
|
+
Associate library device
|
|
2232
|
+
|
|
2233
|
+
</td></tr>
|
|
2234
|
+
</tbody></table>
|
|
2235
|
+
|
|
2236
|
+
## Returns
|
|
2237
|
+
|
|
2238
|
+
Promise<boolean>
|
|
2239
|
+
|
|
2240
|
+
Whether the operation is successful
|