@windypro-rourou/dsh-eda 0.1.4 → 0.1.6
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 +1 -1
- package/lib/backend.js +49 -0
- package/lib/capabilities.js +6 -2
- package/lib/client.js +33 -0
- package/lib/index.js +197 -3
- package/package.json +10 -1
- package/skill/INDEX.md +10 -8
- package/skill/README.md +125 -0
- package/skill/README.zh-Hans.md +125 -0
- package/skill/SKILL.md +746 -746
- package/skill/format/index.md +152 -152
- package/skill/format/pcb/3d.md +166 -166
- package/skill/format/pcb/attr.md +63 -63
- package/skill/format/pcb/common.md +306 -306
- package/skill/format/pcb/component.md +132 -132
- package/skill/format/pcb/dimension.md +58 -58
- package/skill/format/pcb/index.md +17 -17
- package/skill/format/pcb/obj.md +43 -43
- package/skill/format/pcb/pad_via.md +151 -151
- package/skill/format/pcb/panel.md +64 -64
- package/skill/format/pcb/partition.md +43 -43
- package/skill/format/pcb/primitive.md +196 -196
- package/skill/format/pcb/rule.md +71 -71
- package/skill/format/pcb/shape.md +441 -441
- package/skill/format/pcb/text.md +62 -62
- package/skill/format/project/blob.md +30 -30
- package/skill/format/project/common.md +42 -42
- package/skill/format/project/group.md +62 -62
- package/skill/format/project/index.md +12 -12
- package/skill/format/project/instance.md +32 -32
- package/skill/format/project/meta.md +189 -189
- package/skill/format/project/variant.md +30 -30
- package/skill/format/schematic/attr.md +41 -41
- package/skill/format/schematic/common.md +47 -47
- package/skill/format/schematic/component.md +91 -91
- package/skill/format/schematic/index.md +14 -14
- package/skill/format/schematic/obj.md +41 -41
- package/skill/format/schematic/pin.md +59 -59
- package/skill/format/schematic/shape.md +231 -231
- package/skill/format/schematic/structure.md +53 -53
- package/skill/format/schematic/table.md +109 -109
- package/skill/format/schematic/text.md +47 -47
- package/skill/format/schematic/wire.md +132 -132
- package/skill/guide/ancillary-projects/easyeda-api-sdk.md +1 -0
- package/skill/guide/ancillary-projects/pro-api-types.md +5 -5
- package/skill/guide/ancillary-projects.md +10 -10
- package/skill/guide/cli.md +1510 -0
- package/skill/guide/error-handling.md +38 -38
- package/skill/guide/extension-json.md +135 -135
- package/skill/guide/extensions-marketplace.md +61 -61
- package/skill/guide/how-to-start.md +316 -301
- package/skill/guide/i18n.md +57 -57
- package/skill/guide/index.md +7 -7
- package/skill/guide/inline-frame.md +20 -20
- package/skill/guide/invoke-apis.md +81 -81
- package/skill/guide/stability.md +37 -37
- package/skill/references/_index.md +471 -398
- package/skill/references/_quick-reference.md +3103 -3028
- package/skill/references/classes/DMT_Board.md +537 -533
- package/skill/references/classes/DMT_EditorControl.md +1736 -1736
- package/skill/references/classes/DMT_Event.md +356 -356
- package/skill/references/classes/DMT_Folder.md +775 -775
- package/skill/references/classes/DMT_Panel.md +531 -531
- package/skill/references/classes/DMT_Pcb.md +579 -575
- package/skill/references/classes/DMT_Project.md +734 -573
- package/skill/references/classes/DMT_Schematic.md +1482 -1477
- package/skill/references/classes/DMT_SelectControl.md +96 -96
- package/skill/references/classes/DMT_Team.md +172 -172
- package/skill/references/classes/DMT_Workspace.md +198 -198
- package/skill/references/classes/EDA.md +1001 -961
- package/skill/references/classes/IPCB_ComplexPolygon.md +299 -299
- package/skill/references/classes/IPCB_Polygon.md +175 -175
- package/skill/references/classes/IPCB_PrimitiveArc.md +1901 -1901
- package/skill/references/classes/IPCB_PrimitiveAttribute.md +2993 -2993
- package/skill/references/classes/IPCB_PrimitiveComponent.md +2624 -2627
- package/skill/references/classes/IPCB_PrimitiveComponentPad.md +410 -410
- package/skill/references/classes/IPCB_PrimitiveDimension.md +1419 -1419
- package/skill/references/classes/IPCB_PrimitiveFill.md +1325 -1325
- package/skill/references/classes/IPCB_PrimitiveImage.md +1461 -1461
- package/skill/references/classes/IPCB_PrimitiveLine.md +1639 -1639
- package/skill/references/classes/IPCB_PrimitiveObject.md +1700 -1700
- package/skill/references/classes/IPCB_PrimitivePad.md +3155 -3155
- package/skill/references/classes/IPCB_PrimitivePolyline.md +1193 -1193
- package/skill/references/classes/IPCB_PrimitivePour.md +1858 -1858
- package/skill/references/classes/IPCB_PrimitivePoured.md +556 -556
- package/skill/references/classes/IPCB_PrimitiveRegion.md +1332 -1332
- package/skill/references/classes/IPCB_PrimitiveString.md +2315 -2315
- package/skill/references/classes/IPCB_PrimitiveVia.md +1588 -1588
- package/skill/references/classes/ISCH_PrimitiveArc.md +1676 -1676
- package/skill/references/classes/ISCH_PrimitiveAttribute.md +2541 -2541
- package/skill/references/classes/ISCH_PrimitiveBus.md +973 -973
- package/skill/references/classes/ISCH_PrimitiveCbbSymbolComponent.md +260 -260
- package/skill/references/classes/ISCH_PrimitiveCircle.md +1392 -1392
- package/skill/references/classes/ISCH_PrimitiveComponent.md +2910 -2913
- package/skill/references/classes/ISCH_PrimitiveComponentPin.md +155 -155
- package/skill/references/classes/ISCH_PrimitiveObject.md +960 -960
- package/skill/references/classes/ISCH_PrimitivePin.md +2402 -2402
- package/skill/references/classes/ISCH_PrimitivePolygon.md +1028 -1028
- package/skill/references/classes/ISCH_PrimitiveRectangle.md +1777 -1777
- package/skill/references/classes/ISCH_PrimitiveText.md +1771 -1771
- package/skill/references/classes/ISCH_PrimitiveWire.md +973 -973
- package/skill/references/classes/LIB_3DModel.md +782 -780
- package/skill/references/classes/LIB_Cbb.md +957 -957
- package/skill/references/classes/LIB_Classification.md +969 -965
- package/skill/references/classes/LIB_Device.md +1222 -1221
- package/skill/references/classes/LIB_Footprint.md +1298 -1153
- package/skill/references/classes/LIB_LibrariesList.md +361 -329
- package/skill/references/classes/LIB_PanelLibrary.md +855 -855
- package/skill/references/classes/LIB_SelectControl.md +89 -89
- package/skill/references/classes/LIB_SimulationModel.md +807 -821
- package/skill/references/classes/LIB_Symbol.md +1341 -1195
- package/skill/references/classes/PCB_Document.md +1770 -1754
- package/skill/references/classes/PCB_Drc.md +3379 -3375
- package/skill/references/classes/PCB_Event.md +1166 -1081
- package/skill/references/classes/PCB_ImageTool.md +363 -0
- package/skill/references/classes/PCB_Layer.md +1915 -1911
- package/skill/references/classes/PCB_ManufactureData.md +2968 -2968
- package/skill/references/classes/PCB_MathPolygon.md +916 -785
- package/skill/references/classes/PCB_Net.md +1128 -1128
- package/skill/references/classes/PCB_Primitive.md +217 -217
- package/skill/references/classes/PCB_PrimitiveArc.md +820 -894
- package/skill/references/classes/PCB_PrimitiveAttribute.md +635 -717
- package/skill/references/classes/PCB_PrimitiveComponent.md +1050 -1050
- package/skill/references/classes/PCB_PrimitiveDimension.md +789 -833
- package/skill/references/classes/PCB_PrimitiveFill.md +783 -861
- package/skill/references/classes/PCB_PrimitiveImage.md +803 -875
- package/skill/references/classes/PCB_PrimitiveLine.md +787 -858
- package/skill/references/classes/PCB_PrimitiveObject.md +796 -800
- package/skill/references/classes/PCB_PrimitivePad.md +947 -944
- package/skill/references/classes/PCB_PrimitivePolyline.md +744 -819
- package/skill/references/classes/PCB_PrimitivePour.md +808 -845
- package/skill/references/classes/PCB_PrimitivePoured.md +363 -363
- package/skill/references/classes/PCB_PrimitiveRegion.md +765 -799
- package/skill/references/classes/PCB_PrimitiveString.md +828 -910
- package/skill/references/classes/PCB_PrimitiveVia.md +761 -765
- package/skill/references/classes/PCB_RayTracerEngine.md +603 -263
- package/skill/references/classes/PCB_SelectControl.md +495 -495
- package/skill/references/classes/PCB_Tool.md +9 -0
- package/skill/references/classes/PNL_Document.md +83 -83
- package/skill/references/classes/SCH_Document.md +797 -809
- package/skill/references/classes/SCH_Drc.md +246 -242
- package/skill/references/classes/SCH_Event.md +583 -583
- package/skill/references/classes/SCH_ManufactureData.md +1209 -1205
- package/skill/references/classes/SCH_Net.md +200 -200
- package/skill/references/classes/SCH_Netlist.md +191 -191
- package/skill/references/classes/SCH_Primitive.md +337 -337
- package/skill/references/classes/SCH_PrimitiveArc.md +686 -692
- package/skill/references/classes/SCH_PrimitiveAttribute.md +579 -590
- package/skill/references/classes/SCH_PrimitiveBus.md +618 -624
- package/skill/references/classes/SCH_PrimitiveCircle.md +667 -683
- package/skill/references/classes/SCH_PrimitiveComponent.md +2256 -2240
- package/skill/references/classes/SCH_PrimitiveObject.md +666 -666
- package/skill/references/classes/SCH_PrimitivePin.md +737 -754
- package/skill/references/classes/SCH_PrimitivePolygon.md +621 -627
- package/skill/references/classes/SCH_PrimitiveRectangle.md +715 -731
- package/skill/references/classes/SCH_PrimitiveText.md +736 -746
- package/skill/references/classes/SCH_PrimitiveWire.md +701 -703
- package/skill/references/classes/SCH_SelectControl.md +520 -520
- package/skill/references/classes/SCH_SimulationEngine.md +133 -133
- package/skill/references/classes/SCH_Utils.md +121 -121
- package/skill/references/classes/SYS_ClientUrl.md +173 -173
- package/skill/references/classes/SYS_Dialog.md +825 -825
- package/skill/references/classes/SYS_Environment.md +640 -502
- package/skill/references/classes/SYS_ExternalApi.md +246 -0
- package/skill/references/classes/SYS_FileManager.md +1664 -1686
- package/skill/references/classes/SYS_FileSystem.md +1366 -1171
- package/skill/references/classes/SYS_FontManager.md +224 -224
- package/skill/references/classes/SYS_FormatConversion.md +349 -349
- package/skill/references/classes/SYS_HeaderMenu.md +480 -479
- package/skill/references/classes/SYS_Help.md +141 -0
- package/skill/references/classes/SYS_I18n.md +861 -861
- package/skill/references/classes/SYS_IFrame.md +541 -535
- package/skill/references/classes/SYS_LoadingAndProgressBar.md +246 -246
- package/skill/references/classes/SYS_Log.md +422 -424
- package/skill/references/classes/SYS_Math.md +1565 -1565
- package/skill/references/classes/SYS_Message.md +363 -363
- package/skill/references/classes/SYS_MessageBox.md +285 -285
- package/skill/references/classes/SYS_MessageBus.md +1618 -1618
- package/skill/references/classes/SYS_PanelControl.md +696 -696
- package/skill/references/classes/SYS_RightClickMenu.md +175 -175
- package/skill/references/classes/SYS_Setting.md +134 -85
- package/skill/references/classes/SYS_ShortcutKey.md +623 -623
- package/skill/references/classes/SYS_Storage.md +484 -484
- package/skill/references/classes/SYS_Timer.md +447 -447
- package/skill/references/classes/SYS_ToastMessage.md +194 -194
- package/skill/references/classes/SYS_Tool.md +317 -241
- package/skill/references/classes/SYS_Unit.md +594 -594
- package/skill/references/classes/SYS_WebSocket.md +401 -401
- package/skill/references/classes/SYS_Window.md +849 -850
- package/skill/references/enums/EDMT_EditorDocumentType.md +324 -278
- package/skill/references/enums/EDMT_EditorSplitScreenDirection.md +51 -47
- package/skill/references/enums/EDMT_EditorTabEventType.md +68 -62
- package/skill/references/enums/EDMT_IndicatorMarkerType.md +90 -80
- package/skill/references/enums/EDMT_ItemType.md +181 -157
- package/skill/references/enums/EDMT_ProjectCollaborationMode.md +51 -47
- package/skill/references/enums/EDMT_ProjectFileFormat.md +60 -0
- package/skill/references/enums/EDMT_ProjectReadyState.md +82 -0
- package/skill/references/enums/ELIB_DeviceJlcLibraryCategory.md +51 -47
- package/skill/references/enums/ELIB_LibraryType.md +129 -113
- package/skill/references/enums/ELIB_PreviewType.md +77 -69
- package/skill/references/enums/ELIB_SimulationModelType.md +51 -47
- package/skill/references/enums/ELIB_SymbolType.md +142 -124
- package/skill/references/enums/EPCB_AutoRoutingCornerStyle.md +51 -47
- package/skill/references/enums/EPCB_AutoRoutingExistingPrimitiveMode.md +51 -47
- package/skill/references/enums/EPCB_AutoRoutingOptimization.md +51 -47
- package/skill/references/enums/EPCB_DocumentCanvasUpdateCalculationActiveStatus.md +51 -47
- package/skill/references/enums/EPCB_DocumentRatlineCalculatingActiveStatus.md +55 -51
- package/skill/references/enums/EPCB_InactiveLayerDisplayMode.md +64 -58
- package/skill/references/enums/EPCB_LayerColorConfiguration.md +90 -80
- package/skill/references/enums/EPCB_LayerId.md +1169 -881
- package/skill/references/enums/EPCB_LayerStatus.md +64 -58
- package/skill/references/enums/EPCB_LayerType.md +129 -113
- package/skill/references/enums/EPCB_MouseEventType.md +64 -58
- package/skill/references/enums/EPCB_NetEventType.md +64 -58
- package/skill/references/enums/EPCB_PcbPlateType.md +51 -47
- package/skill/references/enums/EPCB_PdfOutputMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveArcInteractiveMode.md +51 -47
- package/skill/references/enums/EPCB_PrimitiveDimensionType.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveEventType.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveFillMode.md +68 -62
- package/skill/references/enums/EPCB_PrimitivePadHeatWeldingConnectionMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePadHoleType.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePadShapeType.md +90 -80
- package/skill/references/enums/EPCB_PrimitivePadType.md +64 -58
- package/skill/references/enums/EPCB_PrimitivePourFillMethod.md +64 -58
- package/skill/references/enums/EPCB_PrimitiveRegionRuleType.md +107 -95
- package/skill/references/enums/EPCB_PrimitiveStringAlignMode.md +142 -124
- package/skill/references/enums/EPCB_PrimitiveType.md +233 -201
- package/skill/references/enums/EPCB_PrimitiveViaType.md +64 -58
- package/skill/references/enums/ESCH_DynamicSimulationEnginePullEventType.md +116 -102
- package/skill/references/enums/ESCH_DynamicSimulationEnginePushEventType.md +90 -80
- package/skill/references/enums/ESCH_ExportDocumentFileType.md +64 -58
- package/skill/references/enums/ESCH_MouseEventType.md +51 -47
- package/skill/references/enums/ESCH_PrimitiveComponentType.md +142 -124
- package/skill/references/enums/ESCH_PrimitiveEventType.md +77 -69
- package/skill/references/enums/ESCH_PrimitiveFillStyle.md +129 -113
- package/skill/references/enums/ESCH_PrimitiveLineType.md +77 -69
- package/skill/references/enums/ESCH_PrimitivePinShape.md +77 -69
- package/skill/references/enums/ESCH_PrimitivePinType.md +168 -146
- package/skill/references/enums/ESCH_PrimitiveTextAlignMode.md +142 -124
- package/skill/references/enums/ESCH_PrimitiveType.md +207 -179
- package/skill/references/enums/ESCH_SimulationNetlistType.md +38 -36
- package/skill/references/enums/ESCH_SpiceSimulationEnginePullEventType.md +51 -47
- package/skill/references/enums/ESCH_SpiceSimulationEnginePushEventType.md +77 -69
- package/skill/references/enums/ESYS_BottomPanelTab.md +94 -80
- package/skill/references/enums/ESYS_HeaderMenuEnvironment.md +181 -157
- package/skill/references/enums/ESYS_ImportProjectBoardOutlineSource.md +55 -51
- package/skill/references/enums/ESYS_ImportProjectImportOption.md +64 -58
- package/skill/references/enums/ESYS_ImportProjectSchematicObjectStyle.md +51 -47
- package/skill/references/enums/ESYS_ImportProjectViaSolderMaskExpansion.md +55 -51
- package/skill/references/enums/ESYS_JobState.md +95 -0
- package/skill/references/enums/ESYS_LeftPanelTab.md +94 -80
- package/skill/references/enums/ESYS_LogType.md +77 -102
- package/skill/references/enums/ESYS_NetlistType.md +129 -113
- package/skill/references/enums/ESYS_PanelPosition.md +69 -0
- package/skill/references/enums/ESYS_PanelTab.md +368 -0
- package/skill/references/enums/ESYS_RightPanelTab.md +237 -201
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorRange.md +220 -190
- package/skill/references/enums/ESYS_ShortcutKeyEffectiveEditorScene.md +103 -91
- package/skill/references/enums/ESYS_StartPageQuickStartItem.md +237 -205
- package/skill/references/enums/ESYS_Theme.md +51 -47
- package/skill/references/enums/ESYS_ToastMessageType.md +90 -80
- package/skill/references/enums/ESYS_Unit.md +116 -102
- package/skill/references/enums/ESYS_WindowEventType.md +64 -47
- package/skill/references/enums/ESYS_WindowOpenTarget.md +51 -47
- package/skill/references/enums/NetportDeviceName.md +146 -146
- package/skill/references/enums/SchToolBarDeviceName.md +278 -278
- package/skill/references/interfaces/BoardProps.md +169 -169
- package/skill/references/interfaces/BorderConfig.md +109 -0
- package/skill/references/interfaces/ButtonProps.md +196 -169
- package/skill/references/interfaces/CellClickInfo.md +142 -0
- package/skill/references/interfaces/CellCoord.md +88 -0
- package/skill/references/interfaces/CheckBoxProps.md +223 -196
- package/skill/references/interfaces/CheckChangeDetail.md +88 -0
- package/skill/references/interfaces/CheckboxEditConfig.md +159 -0
- package/skill/references/interfaces/ClipboardCellData.md +142 -0
- package/skill/references/interfaces/ClipboardConfig.md +115 -0
- package/skill/references/interfaces/ColorPickerProps.md +169 -0
- package/skill/references/interfaces/ColumnDef.md +605 -0
- package/skill/references/interfaces/ColumnEditTrigger.md +57 -0
- package/skill/references/interfaces/ColumnGroupDef.md +192 -0
- package/skill/references/interfaces/ColumnResizeConfig.md +142 -0
- package/skill/references/interfaces/ComponentPropsMap.md +517 -448
- package/skill/references/interfaces/CustomHeaderConfig.md +169 -0
- package/skill/references/interfaces/DialogProps.md +385 -385
- package/skill/references/interfaces/DragSortConfig.md +115 -0
- package/skill/references/interfaces/EditingConfig.md +196 -0
- package/skill/references/interfaces/FilteringConfig.md +250 -0
- package/skill/references/interfaces/FixedColumnConfig.md +88 -0
- package/skill/references/interfaces/FlexItemProps.md +116 -116
- package/skill/references/interfaces/FlexProps.md +224 -224
- package/skill/references/interfaces/GridItemProps.md +143 -143
- package/skill/references/interfaces/GridProps.md +143 -143
- package/skill/references/interfaces/IDMT_BoardItem.md +171 -171
- package/skill/references/interfaces/IDMT_BriefProjectItem.md +171 -171
- package/skill/references/interfaces/IDMT_EditorDocumentItem.md +169 -169
- package/skill/references/interfaces/IDMT_EditorSplitScreenItem.md +173 -173
- package/skill/references/interfaces/IDMT_EditorTabItem.md +169 -169
- package/skill/references/interfaces/IDMT_FolderItem.md +225 -225
- package/skill/references/interfaces/IDMT_IndicatorMarkerShape.md +393 -393
- package/skill/references/interfaces/IDMT_PanelItem.md +144 -144
- package/skill/references/interfaces/IDMT_PcbItem.md +171 -171
- package/skill/references/interfaces/IDMT_ProjectItem.md +143 -143
- package/skill/references/interfaces/IDMT_SchematicItem.md +225 -225
- package/skill/references/interfaces/IDMT_SchematicPageItem.md +198 -198
- package/skill/references/interfaces/IDMT_TeamItem.md +144 -144
- package/skill/references/interfaces/IDMT_WorkspaceItem.md +117 -117
- package/skill/references/interfaces/IDesignPortal.md +103 -103
- package/skill/references/interfaces/ILIB_3DModelItem.md +198 -198
- package/skill/references/interfaces/ILIB_3DModelSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_CbbItem.md +225 -225
- package/skill/references/interfaces/ILIB_CbbSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_ClassificationIndex.md +150 -150
- package/skill/references/interfaces/ILIB_ClassificationNode.md +98 -0
- package/skill/references/interfaces/ILIB_DeviceAssociationItem.md +210 -210
- package/skill/references/interfaces/ILIB_DeviceExtendPropertyItem.md +304 -304
- package/skill/references/interfaces/ILIB_DeviceItem.md +279 -279
- package/skill/references/interfaces/ILIB_DevicePropertiesForSearch.md +250 -250
- package/skill/references/interfaces/ILIB_DeviceSearchItem.md +521 -521
- package/skill/references/interfaces/ILIB_ExtendLibrary3DModelFunctions.md +64 -64
- package/skill/references/interfaces/ILIB_ExtendLibraryCbbFunctions.md +93 -99
- package/skill/references/interfaces/ILIB_ExtendLibraryClassificationIndex.md +150 -150
- package/skill/references/interfaces/ILIB_ExtendLibraryDeviceFunctions.md +143 -157
- package/skill/references/interfaces/ILIB_ExtendLibraryFootprintFunctions.md +63 -63
- package/skill/references/interfaces/ILIB_ExtendLibraryFunctions.md +123 -123
- package/skill/references/interfaces/ILIB_ExtendLibraryItem.md +97 -97
- package/skill/references/interfaces/ILIB_ExtendLibraryItemIndex.md +98 -98
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchProperty.md +115 -115
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResult.md +169 -169
- package/skill/references/interfaces/ILIB_ExtendLibrarySearchResultDataLine.md +234 -234
- package/skill/references/interfaces/ILIB_ExtendLibrarySymbolFunctions.md +91 -105
- package/skill/references/interfaces/ILIB_ExtendLibraryUserIndex.md +96 -96
- package/skill/references/interfaces/ILIB_FootprintItem.md +256 -198
- package/skill/references/interfaces/ILIB_FootprintPropertiesForSearch.md +61 -61
- package/skill/references/interfaces/ILIB_FootprintSearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_LibraryInfo.md +92 -92
- package/skill/references/interfaces/ILIB_LibraryItem.md +115 -115
- package/skill/references/interfaces/ILIB_PanelLibraryItem.md +198 -198
- package/skill/references/interfaces/ILIB_PanelLibrarySearchItem.md +277 -277
- package/skill/references/interfaces/ILIB_RegisterExtendLibraryProps.md +71 -0
- package/skill/references/interfaces/ILIB_SimulationModelItem.md +306 -306
- package/skill/references/interfaces/ILIB_SimulationModelSearchItem.md +304 -304
- package/skill/references/interfaces/ILIB_SymbolItem.md +306 -279
- package/skill/references/interfaces/ILIB_SymbolPropertiesForSearch.md +61 -61
- package/skill/references/interfaces/ILIB_SymbolSearchItem.md +304 -304
- package/skill/references/interfaces/IPCB_AutoLayoutResult.md +169 -169
- package/skill/references/interfaces/IPCB_AutoRoutingProps.md +220 -220
- package/skill/references/interfaces/IPCB_AutoRoutingResult.md +169 -169
- package/skill/references/interfaces/IPCB_BomPropertiesTableColumns.md +169 -169
- package/skill/references/interfaces/IPCB_DifferentialPairItem.md +115 -115
- package/skill/references/interfaces/IPCB_DiscretizeOptions.md +65 -65
- package/skill/references/interfaces/IPCB_DiscretizedPoint.md +88 -88
- package/skill/references/interfaces/IPCB_EqualLengthNetGroupItem.md +115 -115
- package/skill/references/interfaces/IPCB_LayerItem.md +277 -277
- package/skill/references/interfaces/IPCB_NetClassItem.md +115 -115
- package/skill/references/interfaces/IPCB_NetInfo.md +115 -115
- package/skill/references/interfaces/IPCB_PadPairGroupItem.md +88 -88
- package/skill/references/interfaces/IPCB_PadPairMinWireLengthItem.md +88 -88
- package/skill/references/interfaces/IPCB_PhysicalStackingConfiguration.md +115 -115
- package/skill/references/interfaces/IPCB_Primitive.md +218 -218
- package/skill/references/interfaces/IPCB_PrimitiveAPI.md +174 -175
- package/skill/references/interfaces/IPCB_PrimitivePadHeatWelding.md +151 -151
- package/skill/references/interfaces/IPCB_PrimitivePouredPourFill.md +142 -142
- package/skill/references/interfaces/IPCB_PrimitiveSolderMaskAndPasteMaskExpansion.md +154 -154
- package/skill/references/interfaces/IPCB_RayTracerBackgroundConfig.md +223 -0
- package/skill/references/interfaces/IPCB_RayTracerLightConfig.md +412 -0
- package/skill/references/interfaces/IPCB_RayTracerMaterialConfig.md +547 -0
- package/skill/references/interfaces/IPCB_RayTracerPcbMaterialConfig.md +196 -0
- package/skill/references/interfaces/IPCB_RayTracerRenderConfigurations.md +200 -0
- package/skill/references/interfaces/IPCB_RayTracerRendererConfig.md +196 -0
- package/skill/references/interfaces/IPCB_RayTracerSceneElement.md +115 -0
- package/skill/references/interfaces/IPCB_RayTracerSceneElementTransform.md +123 -0
- package/skill/references/interfaces/IPCB_RayTracerTexture.md +88 -0
- package/skill/references/interfaces/IPCB_SubstratePhysicalProperties.md +88 -88
- package/skill/references/interfaces/IRawNet.md +103 -103
- package/skill/references/interfaces/IRawPureSchematic.md +80 -80
- package/skill/references/interfaces/IRawSchematic.md +103 -103
- package/skill/references/interfaces/IRawWire.md +149 -149
- package/skill/references/interfaces/ISCH_DrcError.md +142 -142
- package/skill/references/interfaces/ISCH_DrcErrorPrimitive.md +142 -142
- package/skill/references/interfaces/ISCH_ExportPngResolution.md +94 -94
- package/skill/references/interfaces/ISCH_NetInfo.md +88 -88
- package/skill/references/interfaces/ISCH_Primitive.md +218 -219
- package/skill/references/interfaces/ISCH_PrimitiveAPI.md +174 -175
- package/skill/references/interfaces/ISCH_ProjectNetInfo.md +142 -142
- package/skill/references/interfaces/ISCH_WireInfo.md +169 -169
- package/skill/references/interfaces/ISYS_ComparisonResponse.md +115 -0
- package/skill/references/interfaces/ISYS_ExtensionExternalApiIndex.md +13 -0
- package/skill/references/interfaces/ISYS_ExtensionRegisteredExternalApis.md +13 -0
- package/skill/references/interfaces/ISYS_ExternalApiHelp.md +173 -0
- package/skill/references/interfaces/ISYS_ExternalApiRegistration.md +146 -0
- package/skill/references/interfaces/ISYS_FileSystemFileList.md +169 -169
- package/skill/references/interfaces/ISYS_HeaderMenuSub1MenuItem.md +205 -174
- package/skill/references/interfaces/ISYS_HeaderMenuSub2MenuItem.md +178 -147
- package/skill/references/interfaces/ISYS_HeaderMenuTopMenuItem.md +115 -115
- package/skill/references/interfaces/ISYS_HeaderMenus.md +408 -408
- package/skill/references/interfaces/ISYS_HelpAudienceEntry.md +92 -0
- package/skill/references/interfaces/ISYS_HelpClassSummary.md +205 -0
- package/skill/references/interfaces/ISYS_HelpData.md +92 -0
- package/skill/references/interfaces/ISYS_HelpMethodDetail.md +310 -0
- package/skill/references/interfaces/ISYS_JobHandle.md +65 -0
- package/skill/references/interfaces/ISYS_JobLogEntry.md +142 -0
- package/skill/references/interfaces/ISYS_JobStatus.md +176 -0
- package/skill/references/interfaces/ISYS_LogLine.md +115 -115
- package/skill/references/interfaces/ISYS_MathBBox.md +142 -142
- package/skill/references/interfaces/ISYS_MathPoint.md +88 -88
- package/skill/references/interfaces/ISYS_MathPolygonWithHoles.md +92 -92
- package/skill/references/interfaces/ISYS_MessageBusTask.md +115 -115
- package/skill/references/interfaces/ISYS_MultilingualLanguagesData.md +12 -12
- package/skill/references/interfaces/ISYS_RightClickMenuItem.md +174 -174
- package/skill/references/interfaces/ISYS_ShortcutKeyData.md +169 -169
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithCallFn.md +62 -62
- package/skill/references/interfaces/ISYS_ShortcutKeyDataWithUserDefinedShortcutKey.md +62 -62
- package/skill/references/interfaces/ISYS_WindowEventListenerRemovableObject.md +109 -109
- package/skill/references/interfaces/IconProps.md +88 -88
- package/skill/references/interfaces/ImageProps.md +115 -115
- package/skill/references/interfaces/InputEditConfig.md +182 -0
- package/skill/references/interfaces/InputProps.md +547 -520
- package/skill/references/interfaces/KeyboardConfig.md +61 -0
- package/skill/references/interfaces/ListChildren.md +223 -223
- package/skill/references/interfaces/ListProps.md +250 -223
- package/skill/references/interfaces/ModalProps.md +358 -358
- package/skill/references/interfaces/NumberEditConfig.md +234 -0
- package/skill/references/interfaces/RadioGroupProps.md +196 -196
- package/skill/references/interfaces/RadioItem.md +115 -115
- package/skill/references/interfaces/RichTableProps.md +1357 -0
- package/skill/references/interfaces/RowMetaConfig.md +142 -0
- package/skill/references/interfaces/ScrollerProps.md +169 -169
- package/skill/references/interfaces/SelectEditConfig.md +211 -0
- package/skill/references/interfaces/SelectListItem.md +142 -142
- package/skill/references/interfaces/SelectOption.md +142 -0
- package/skill/references/interfaces/SelectProps.md +169 -169
- package/skill/references/interfaces/SelectionConfig.md +358 -0
- package/skill/references/interfaces/SliderProps.md +142 -0
- package/skill/references/interfaces/SlotProps.md +88 -88
- package/skill/references/interfaces/SortState.md +88 -0
- package/skill/references/interfaces/SortingConfig.md +169 -0
- package/skill/references/interfaces/StyleProps.md +439 -385
- package/skill/references/interfaces/TextAreaProps.md +196 -196
- package/skill/references/interfaces/TextProps.md +169 -169
- package/skill/references/interfaces/TextareaEditConfig.md +182 -0
- package/skill/references/interfaces/ValidationRule.md +223 -0
- package/skill/references/interfaces/VirtualScrollConfig.md +115 -0
- package/skill/references/types/Align.md +9 -0
- package/skill/references/types/CellContentType.md +9 -0
- package/skill/references/types/ColumnDefOrGroup.md +12 -0
- package/skill/references/types/ColumnEditConfig.md +13 -0
- package/skill/references/types/ColumnType.md +9 -0
- package/skill/references/types/DataChangeType.md +9 -0
- package/skill/references/types/FilterMatchMode.md +9 -0
- package/skill/references/types/RichTableRow.md +12 -0
- package/skill/references/types/Serializable.md +10 -0
- package/skill/references/types/SerializablePrimitive.md +9 -0
- package/skill/references/types/SortOrder.md +9 -0
- package/skill/references/types/TPCB_LayerTypesOfInnerLayer.md +11 -11
- package/skill/references/types/TPCB_LayersInTheSelectable.md +42 -42
- package/skill/references/types/TPCB_LayersOfComponent.md +11 -11
- package/skill/references/types/TPCB_LayersOfCopper.md +15 -15
- package/skill/references/types/TPCB_LayersOfCustom.md +41 -41
- package/skill/references/types/TPCB_LayersOfDimension.md +16 -16
- package/skill/references/types/TPCB_LayersOfFill.md +28 -28
- package/skill/references/types/TPCB_LayersOfImage.md +22 -22
- package/skill/references/types/TPCB_LayersOfInner.md +41 -41
- package/skill/references/types/TPCB_LayersOfLine.md +25 -25
- package/skill/references/types/TPCB_LayersOfObject.md +12 -12
- package/skill/references/types/TPCB_LayersOfPad.md +11 -11
- package/skill/references/types/TPCB_LayersOfRegion.md +11 -11
- package/skill/references/types/TPCB_NumberOfCopperLayers.md +9 -9
- package/skill/references/types/TPCB_PolygonSourceArray.md +85 -83
- package/skill/references/types/TPCB_PrimitiveDimensionCoordinateSet.md +66 -66
- package/skill/references/types/TPCB_PrimitivePadHole.md +30 -30
- package/skill/references/types/TPCB_PrimitivePadShape.md +61 -61
- package/skill/references/types/TPCB_PrimitiveSpecialPadShape.md +19 -19
- package/skill/references/types/TSYS_ComparisonErrorCode.md +15 -0
- package/skill/references/types/TSYS_LanguageKeyValuePairs.md +13 -0
- package/skill/references/types/TSYS_MathPolygonGroup.md +15 -15
- package/skill/references/types/TSYS_MathPolygonInput.md +20 -20
- package/skill/references/types/TSYS_ShortcutKeys.md +96 -96
- package/skill/user-guide/using-extension.md +47 -47
- package/src/json-gen.test.js +430 -0
- package/skill/guide/ancillary-projects/pro-api-sdk.md +0 -1
- package/skill/references/interfaces/ISYS_PcbComparisonResponse.md +0 -115
- package/skill/references/types/ISYS_LanguageKeyValuePairs.md +0 -13
- package/skill/references/types/TSYS_PcbComparisonErrorCode.md +0 -10
|
@@ -1,2627 +1,2624 @@
|
|
|
1
|
-
# IPCB\_PrimitiveComponent class
|
|
2
|
-
|
|
3
|
-
Device primitive
|
|
4
|
-
|
|
5
|
-
## Signature
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
class IPCB_PrimitiveComponent implements IPCB_Primitive
|
|
9
|
-
```
|
|
10
|
-
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.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
|
-
[done()](./IPCB_PrimitiveComponent.md)
|
|
32
|
-
|
|
33
|
-
</td><td>
|
|
34
|
-
|
|
35
|
-
</td><td>
|
|
36
|
-
|
|
37
|
-
**_(BETA)_** Apply the changes to the primitives to the canvas
|
|
38
|
-
|
|
39
|
-
</td></tr>
|
|
40
|
-
<tr><td>
|
|
41
|
-
|
|
42
|
-
[getAllPins()](./IPCB_PrimitiveComponent.md)
|
|
43
|
-
|
|
44
|
-
</td><td>
|
|
45
|
-
|
|
46
|
-
</td><td>
|
|
47
|
-
|
|
48
|
-
**_(BETA)_** Get all pads associated with the device
|
|
49
|
-
|
|
50
|
-
</td></tr>
|
|
51
|
-
<tr><td>
|
|
52
|
-
|
|
53
|
-
[getState\_AddIntoBom()](./IPCB_PrimitiveComponent.md)
|
|
54
|
-
|
|
55
|
-
</td><td>
|
|
56
|
-
|
|
57
|
-
</td><td>
|
|
58
|
-
|
|
59
|
-
Get the property state: whether to add BOM
|
|
60
|
-
|
|
61
|
-
</td></tr>
|
|
62
|
-
<tr><td>
|
|
63
|
-
|
|
64
|
-
[getState\_Component()](./IPCB_PrimitiveComponent.md)
|
|
65
|
-
|
|
66
|
-
</td><td>
|
|
67
|
-
|
|
68
|
-
</td><td>
|
|
69
|
-
|
|
70
|
-
Get the property state: associate library device
|
|
71
|
-
|
|
72
|
-
</td></tr>
|
|
73
|
-
<tr><td>
|
|
74
|
-
|
|
75
|
-
[getState\_Designator()](./IPCB_PrimitiveComponent.md)
|
|
76
|
-
|
|
77
|
-
</td><td>
|
|
78
|
-
|
|
79
|
-
</td><td>
|
|
80
|
-
|
|
81
|
-
Get the property state: designator
|
|
82
|
-
|
|
83
|
-
</td></tr>
|
|
84
|
-
<tr><td>
|
|
85
|
-
|
|
86
|
-
[getState\_Footprint()](./IPCB_PrimitiveComponent.md)
|
|
87
|
-
|
|
88
|
-
</td><td>
|
|
89
|
-
|
|
90
|
-
</td><td>
|
|
91
|
-
|
|
92
|
-
Get the property state: associate library footprint
|
|
93
|
-
|
|
94
|
-
</td></tr>
|
|
95
|
-
<tr><td>
|
|
96
|
-
|
|
97
|
-
[getState\_Layer()](./IPCB_PrimitiveComponent.md)
|
|
98
|
-
|
|
99
|
-
</td><td>
|
|
100
|
-
|
|
101
|
-
</td><td>
|
|
102
|
-
|
|
103
|
-
Get the property state: Layer
|
|
104
|
-
|
|
105
|
-
</td></tr>
|
|
106
|
-
<tr><td>
|
|
107
|
-
|
|
108
|
-
[getState\_Manufacturer()](./IPCB_PrimitiveComponent.md)
|
|
109
|
-
|
|
110
|
-
</td><td>
|
|
111
|
-
|
|
112
|
-
</td><td>
|
|
113
|
-
|
|
114
|
-
Get the property state: manufacturer
|
|
115
|
-
|
|
116
|
-
</td></tr>
|
|
117
|
-
<tr><td>
|
|
118
|
-
|
|
119
|
-
[getState\_ManufacturerId()](./IPCB_PrimitiveComponent.md)
|
|
120
|
-
|
|
121
|
-
</td><td>
|
|
122
|
-
|
|
123
|
-
</td><td>
|
|
124
|
-
|
|
125
|
-
Get the property state: manufacturer ID
|
|
126
|
-
|
|
127
|
-
</td></tr>
|
|
128
|
-
<tr><td>
|
|
129
|
-
|
|
130
|
-
[getState\_Model3D()](./IPCB_PrimitiveComponent.md)
|
|
131
|
-
|
|
132
|
-
</td><td>
|
|
133
|
-
|
|
134
|
-
</td><td>
|
|
135
|
-
|
|
136
|
-
Get the property state: associate library 3D model
|
|
137
|
-
|
|
138
|
-
</td></tr>
|
|
139
|
-
<tr><td>
|
|
140
|
-
|
|
141
|
-
[getState\_Name()](./IPCB_PrimitiveComponent.md)
|
|
142
|
-
|
|
143
|
-
</td><td>
|
|
144
|
-
|
|
145
|
-
</td><td>
|
|
146
|
-
|
|
147
|
-
Get the property state: name
|
|
148
|
-
|
|
149
|
-
</td></tr>
|
|
150
|
-
<tr><td>
|
|
151
|
-
|
|
152
|
-
[getState\_OtherProperty()](./IPCB_PrimitiveComponent.md)
|
|
153
|
-
|
|
154
|
-
</td><td>
|
|
155
|
-
|
|
156
|
-
</td><td>
|
|
157
|
-
|
|
158
|
-
Get the property state: other parameters
|
|
159
|
-
|
|
160
|
-
</td></tr>
|
|
161
|
-
<tr><td>
|
|
162
|
-
|
|
163
|
-
[getState\_Pads()](./IPCB_PrimitiveComponent.md)
|
|
164
|
-
|
|
165
|
-
</td><td>
|
|
166
|
-
|
|
167
|
-
</td><td>
|
|
168
|
-
|
|
169
|
-
Get the property state: pad
|
|
170
|
-
|
|
171
|
-
</td></tr>
|
|
172
|
-
<tr><td>
|
|
173
|
-
|
|
174
|
-
[getState\_PrimitiveId()](./IPCB_PrimitiveComponent.md)
|
|
175
|
-
|
|
176
|
-
</td><td>
|
|
177
|
-
|
|
178
|
-
</td><td>
|
|
179
|
-
|
|
180
|
-
Get the property state: primitive ID
|
|
181
|
-
|
|
182
|
-
</td></tr>
|
|
183
|
-
<tr><td>
|
|
184
|
-
|
|
185
|
-
[getState\_PrimitiveLock()](./IPCB_PrimitiveComponent.md)
|
|
186
|
-
|
|
187
|
-
</td><td>
|
|
188
|
-
|
|
189
|
-
</td><td>
|
|
190
|
-
|
|
191
|
-
Get the property state: whether it is locked
|
|
192
|
-
|
|
193
|
-
</td></tr>
|
|
194
|
-
<tr><td>
|
|
195
|
-
|
|
196
|
-
[getState\_PrimitiveType()](./IPCB_PrimitiveComponent.md)
|
|
197
|
-
|
|
198
|
-
</td><td>
|
|
199
|
-
|
|
200
|
-
</td><td>
|
|
201
|
-
|
|
202
|
-
Get the property state: primitive type
|
|
203
|
-
|
|
204
|
-
</td></tr>
|
|
205
|
-
<tr><td>
|
|
206
|
-
|
|
207
|
-
[getState\_Rotation()](./IPCB_PrimitiveComponent.md)
|
|
208
|
-
|
|
209
|
-
</td><td>
|
|
210
|
-
|
|
211
|
-
</td><td>
|
|
212
|
-
|
|
213
|
-
Get the property state: rotation angle
|
|
214
|
-
|
|
215
|
-
</td></tr>
|
|
216
|
-
<tr><td>
|
|
217
|
-
|
|
218
|
-
[getState\_Supplier()](./IPCB_PrimitiveComponent.md)
|
|
219
|
-
|
|
220
|
-
</td><td>
|
|
221
|
-
|
|
222
|
-
</td><td>
|
|
223
|
-
|
|
224
|
-
Get the property state: supplier
|
|
225
|
-
|
|
226
|
-
</td></tr>
|
|
227
|
-
<tr><td>
|
|
228
|
-
|
|
229
|
-
[getState\_SupplierId()](./IPCB_PrimitiveComponent.md)
|
|
230
|
-
|
|
231
|
-
</td><td>
|
|
232
|
-
|
|
233
|
-
</td><td>
|
|
234
|
-
|
|
235
|
-
Get the property state: supplier ID
|
|
236
|
-
|
|
237
|
-
</td></tr>
|
|
238
|
-
<tr><td>
|
|
239
|
-
|
|
240
|
-
[getState\_UniqueId()](./IPCB_PrimitiveComponent.md)
|
|
241
|
-
|
|
242
|
-
</td><td>
|
|
243
|
-
|
|
244
|
-
</td><td>
|
|
245
|
-
|
|
246
|
-
Get the property state: unique ID
|
|
247
|
-
|
|
248
|
-
</td></tr>
|
|
249
|
-
<tr><td>
|
|
250
|
-
|
|
251
|
-
[getState\_X()](./IPCB_PrimitiveComponent.md)
|
|
252
|
-
|
|
253
|
-
</td><td>
|
|
254
|
-
|
|
255
|
-
</td><td>
|
|
256
|
-
|
|
257
|
-
Get the property state: X coordinate
|
|
258
|
-
|
|
259
|
-
</td></tr>
|
|
260
|
-
<tr><td>
|
|
261
|
-
|
|
262
|
-
[getState\_Y()](./IPCB_PrimitiveComponent.md)
|
|
263
|
-
|
|
264
|
-
</td><td>
|
|
265
|
-
|
|
266
|
-
</td><td>
|
|
267
|
-
|
|
268
|
-
Get the property state: Y coordinate
|
|
269
|
-
|
|
270
|
-
</td></tr>
|
|
271
|
-
<tr><td>
|
|
272
|
-
|
|
273
|
-
[isAsync()](./IPCB_PrimitiveComponent.md)
|
|
274
|
-
|
|
275
|
-
</td><td>
|
|
276
|
-
|
|
277
|
-
</td><td>
|
|
278
|
-
|
|
279
|
-
Query whether the primitive is an async primitive
|
|
280
|
-
|
|
281
|
-
</td></tr>
|
|
282
|
-
<tr><td>
|
|
283
|
-
|
|
284
|
-
[reset()](./IPCB_PrimitiveComponent.md)
|
|
285
|
-
|
|
286
|
-
</td><td>
|
|
287
|
-
|
|
288
|
-
</td><td>
|
|
289
|
-
|
|
290
|
-
**_(BETA)_** Reset the async primitive to the current canvas state
|
|
291
|
-
|
|
292
|
-
</td></tr>
|
|
293
|
-
<tr><td>
|
|
294
|
-
|
|
295
|
-
[setAttribute(key, value, keyVisible, valueVisible)](./IPCB_PrimitiveComponent.md)
|
|
296
|
-
|
|
297
|
-
</td><td>
|
|
298
|
-
|
|
299
|
-
</td><td>
|
|
300
|
-
|
|
301
|
-
**_(BETA)_** Set Property
|
|
302
|
-
|
|
303
|
-
</td></tr>
|
|
304
|
-
<tr><td>
|
|
305
|
-
|
|
306
|
-
[setState\_AddIntoBom(addIntoBom)](./IPCB_PrimitiveComponent.md)
|
|
307
|
-
|
|
308
|
-
</td><td>
|
|
309
|
-
|
|
310
|
-
</td><td>
|
|
311
|
-
|
|
312
|
-
**_(BETA)_** Set the property state: whether to add BOM
|
|
313
|
-
|
|
314
|
-
</td></tr>
|
|
315
|
-
<tr><td>
|
|
316
|
-
|
|
317
|
-
[setState\_Designator(designator)](./IPCB_PrimitiveComponent.md)
|
|
318
|
-
|
|
319
|
-
</td><td>
|
|
320
|
-
|
|
321
|
-
</td><td>
|
|
322
|
-
|
|
323
|
-
**_(BETA)_** Set the property state: designator
|
|
324
|
-
|
|
325
|
-
</td></tr>
|
|
326
|
-
<tr><td>
|
|
327
|
-
|
|
328
|
-
[setState\_Layer(layer)](./IPCB_PrimitiveComponent.md)
|
|
329
|
-
|
|
330
|
-
</td><td>
|
|
331
|
-
|
|
332
|
-
</td><td>
|
|
333
|
-
|
|
334
|
-
**_(BETA)_** Set the property state: Layer
|
|
335
|
-
|
|
336
|
-
</td></tr>
|
|
337
|
-
<tr><td>
|
|
338
|
-
|
|
339
|
-
[setState\_Manufacturer(manufacturer)](./IPCB_PrimitiveComponent.md)
|
|
340
|
-
|
|
341
|
-
</td><td>
|
|
342
|
-
|
|
343
|
-
</td><td>
|
|
344
|
-
|
|
345
|
-
**_(BETA)_** Set the property state: manufacturer
|
|
346
|
-
|
|
347
|
-
</td></tr>
|
|
348
|
-
<tr><td>
|
|
349
|
-
|
|
350
|
-
[setState\_ManufacturerId(manufacturerId)](./IPCB_PrimitiveComponent.md)
|
|
351
|
-
|
|
352
|
-
</td><td>
|
|
353
|
-
|
|
354
|
-
</td><td>
|
|
355
|
-
|
|
356
|
-
**_(BETA)_** Set the property state: manufacturer ID
|
|
357
|
-
|
|
358
|
-
</td></tr>
|
|
359
|
-
<tr><td>
|
|
360
|
-
|
|
361
|
-
[setState\_Name(name)](./IPCB_PrimitiveComponent.md)
|
|
362
|
-
|
|
363
|
-
</td><td>
|
|
364
|
-
|
|
365
|
-
</td><td>
|
|
366
|
-
|
|
367
|
-
**_(BETA)_** Set the property state: name
|
|
368
|
-
|
|
369
|
-
</td></tr>
|
|
370
|
-
<tr><td>
|
|
371
|
-
|
|
372
|
-
[setState\_OtherProperty(otherProperty)](./IPCB_PrimitiveComponent.md)
|
|
373
|
-
|
|
374
|
-
</td><td>
|
|
375
|
-
|
|
376
|
-
</td><td>
|
|
377
|
-
|
|
378
|
-
**_(BETA)_** Set the property state: other parameters
|
|
379
|
-
|
|
380
|
-
</td></tr>
|
|
381
|
-
<tr><td>
|
|
382
|
-
|
|
383
|
-
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveComponent.md)
|
|
384
|
-
|
|
385
|
-
</td><td>
|
|
386
|
-
|
|
387
|
-
</td><td>
|
|
388
|
-
|
|
389
|
-
**_(BETA)_** Set the property state: whether it is locked
|
|
390
|
-
|
|
391
|
-
</td></tr>
|
|
392
|
-
<tr><td>
|
|
393
|
-
|
|
394
|
-
[setState\_Rotation(rotation)](./IPCB_PrimitiveComponent.md)
|
|
395
|
-
|
|
396
|
-
</td><td>
|
|
397
|
-
|
|
398
|
-
</td><td>
|
|
399
|
-
|
|
400
|
-
**_(BETA)_** Set the property state: rotation angle
|
|
401
|
-
|
|
402
|
-
</td></tr>
|
|
403
|
-
<tr><td>
|
|
404
|
-
|
|
405
|
-
[setState\_Supplier(supplier)](./IPCB_PrimitiveComponent.md)
|
|
406
|
-
|
|
407
|
-
</td><td>
|
|
408
|
-
|
|
409
|
-
</td><td>
|
|
410
|
-
|
|
411
|
-
**_(BETA)_** Set the property state: supplier
|
|
412
|
-
|
|
413
|
-
</td></tr>
|
|
414
|
-
<tr><td>
|
|
415
|
-
|
|
416
|
-
[setState\_SupplierId(supplierId)](./IPCB_PrimitiveComponent.md)
|
|
417
|
-
|
|
418
|
-
</td><td>
|
|
419
|
-
|
|
420
|
-
</td><td>
|
|
421
|
-
|
|
422
|
-
**_(BETA)_** Set the property state: supplier ID
|
|
423
|
-
|
|
424
|
-
</td></tr>
|
|
425
|
-
<tr><td>
|
|
426
|
-
|
|
427
|
-
[setState\_UniqueId(uniqueId)](./IPCB_PrimitiveComponent.md)
|
|
428
|
-
|
|
429
|
-
</td><td>
|
|
430
|
-
|
|
431
|
-
</td><td>
|
|
432
|
-
|
|
433
|
-
**_(BETA)_** Set the property state: unique ID
|
|
434
|
-
|
|
435
|
-
</td></tr>
|
|
436
|
-
<tr><td>
|
|
437
|
-
|
|
438
|
-
[setState\_X(x)](./IPCB_PrimitiveComponent.md)
|
|
439
|
-
|
|
440
|
-
</td><td>
|
|
441
|
-
|
|
442
|
-
</td><td>
|
|
443
|
-
|
|
444
|
-
**_(BETA)_** Set the property state: X coordinate
|
|
445
|
-
|
|
446
|
-
</td></tr>
|
|
447
|
-
<tr><td>
|
|
448
|
-
|
|
449
|
-
[setState\_Y(y)](./IPCB_PrimitiveComponent.md)
|
|
450
|
-
|
|
451
|
-
</td><td>
|
|
452
|
-
|
|
453
|
-
</td><td>
|
|
454
|
-
|
|
455
|
-
**_(BETA)_** Set the property state: Y coordinate
|
|
456
|
-
|
|
457
|
-
</td></tr>
|
|
458
|
-
<tr><td>
|
|
459
|
-
|
|
460
|
-
[toAsync()](./IPCB_PrimitiveComponent.md)
|
|
461
|
-
|
|
462
|
-
</td><td>
|
|
463
|
-
|
|
464
|
-
</td><td>
|
|
465
|
-
|
|
466
|
-
Convert Primitive to Async primitive
|
|
467
|
-
|
|
468
|
-
</td></tr>
|
|
469
|
-
<tr><td>
|
|
470
|
-
|
|
471
|
-
[toSync()](./IPCB_PrimitiveComponent.md)
|
|
472
|
-
|
|
473
|
-
</td><td>
|
|
474
|
-
|
|
475
|
-
</td><td>
|
|
476
|
-
|
|
477
|
-
Convert Primitive to Sync primitive
|
|
478
|
-
|
|
479
|
-
</td></tr>
|
|
480
|
-
</tbody></table>
|
|
481
|
-
|
|
482
|
-
---
|
|
483
|
-
|
|
484
|
-
## 方法详情
|
|
485
|
-
|
|
486
|
-
### done
|
|
487
|
-
|
|
488
|
-
# IPCB\_PrimitiveComponent.done() method
|
|
489
|
-
|
|
490
|
-
> 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.
|
|
491
|
-
|
|
492
|
-
Apply the changes to the primitives to the canvas
|
|
493
|
-
|
|
494
|
-
## Signature
|
|
495
|
-
|
|
496
|
-
```typescript
|
|
497
|
-
function done(): Promise<IPCB_PrimitiveComponent>;
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
## Returns
|
|
501
|
-
|
|
502
|
-
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>
|
|
503
|
-
|
|
504
|
-
Device primitive object
|
|
505
|
-
|
|
506
|
-
## Example
|
|
507
|
-
|
|
508
|
-
```javascript
|
|
509
|
-
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
510
|
-
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
511
|
-
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
512
|
-
|
|
513
|
-
// 2. 放置测试器件
|
|
514
|
-
const devices = await eda.lib_Device.search('C0402');
|
|
515
|
-
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
516
|
-
const compId = comp.getState_PrimitiveId();
|
|
517
|
-
|
|
518
|
-
// 3. 记录修改前的位号和旋转角度
|
|
519
|
-
const designatorBefore = comp.getState_Designator();
|
|
520
|
-
const rotationBefore = comp.getState_Rotation();
|
|
521
|
-
|
|
522
|
-
// 4. 批量修改两个属性,一次 done() 提交
|
|
523
|
-
const asyncComp = comp.toAsync();
|
|
524
|
-
asyncComp.setState_Designator('C101');
|
|
525
|
-
asyncComp.setState_Rotation(90);
|
|
526
|
-
await asyncComp.done();
|
|
527
|
-
|
|
528
|
-
// 5. 从画布重新读取,确认批量修改已生效(保留现场供观察)
|
|
529
|
-
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
530
|
-
|
|
531
|
-
console.log('designator:', designatorBefore, '→', refetched[0].getState_Designator());
|
|
532
|
-
console.log('rotation:', rotationBefore, '→', refetched[0].getState_Rotation());
|
|
533
|
-
```
|
|
534
|
-
|
|
535
|
-
### getallpins
|
|
536
|
-
|
|
537
|
-
# IPCB\_PrimitiveComponent.getAllPins() method
|
|
538
|
-
|
|
539
|
-
> 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.
|
|
540
|
-
|
|
541
|
-
Get all pads associated with the device
|
|
542
|
-
|
|
543
|
-
## Signature
|
|
544
|
-
|
|
545
|
-
```typescript
|
|
546
|
-
function getAllPins(): Promise<Array<IPCB_PrimitiveComponentPad>>;
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
## Returns
|
|
550
|
-
|
|
551
|
-
Promise<Array<[IPCB\_PrimitiveComponentPad](./IPCB_PrimitiveComponentPad.md)<!-- -->>>
|
|
552
|
-
|
|
553
|
-
Device pad primitive array
|
|
554
|
-
|
|
555
|
-
## Example
|
|
556
|
-
|
|
557
|
-
```javascript
|
|
558
|
-
// 1. 放置一个测试器件
|
|
559
|
-
const devices = await eda.lib_Device.search('C0402');
|
|
560
|
-
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
561
|
-
const compId = comp.getState_PrimitiveId();
|
|
562
|
-
|
|
563
|
-
// 2. 获取器件关联的所有焊盘图元
|
|
564
|
-
const pins = await comp.getAllPins();
|
|
565
|
-
|
|
566
|
-
// 3. 逐个读取焊盘的归属器件和图元 ID
|
|
567
|
-
const pinInfos = pins.map(pin => ({
|
|
568
|
-
parentMatch: pin.getState_ParentComponentPrimitiveId() === compId,
|
|
569
|
-
primitiveId: pin.getState_PrimitiveId(),
|
|
570
|
-
}));
|
|
571
|
-
|
|
572
|
-
// 4. 清理测试器件
|
|
573
|
-
await eda.pcb_PrimitiveComponent.delete([compId]);
|
|
574
|
-
|
|
575
|
-
console.log('pinCount:', pins.length);
|
|
576
|
-
console.log('allBelongToComponent:', pinInfos.every(p => p.parentMatch));
|
|
577
|
-
console.log('firstPinPrimitiveId:', pinInfos[0].primitiveId);
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
### getstate_addintobom
|
|
581
|
-
|
|
582
|
-
# IPCB\_PrimitiveComponent.getState\_AddIntoBom() method
|
|
583
|
-
|
|
584
|
-
Get the property state: whether to add BOM
|
|
585
|
-
|
|
586
|
-
## Signature
|
|
587
|
-
|
|
588
|
-
```typescript
|
|
589
|
-
function getState_AddIntoBom(): boolean;
|
|
590
|
-
```
|
|
591
|
-
|
|
592
|
-
## Returns
|
|
593
|
-
|
|
594
|
-
boolean
|
|
595
|
-
|
|
596
|
-
Whether Add to BOM
|
|
597
|
-
|
|
598
|
-
## Example
|
|
599
|
-
|
|
600
|
-
```javascript
|
|
601
|
-
// 1. 放置一个测试器件
|
|
602
|
-
const devices = await eda.lib_Device.search('C0402');
|
|
603
|
-
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
604
|
-
|
|
605
|
-
// 2. 读取是否加入 BOM
|
|
606
|
-
const addIntoBom = comp.getState_AddIntoBom();
|
|
607
|
-
|
|
608
|
-
// 3. 清理测试器件
|
|
609
|
-
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
610
|
-
|
|
611
|
-
console.log('addIntoBom:', addIntoBom);
|
|
612
|
-
```
|
|
613
|
-
|
|
614
|
-
### getstate_component
|
|
615
|
-
|
|
616
|
-
# IPCB\_PrimitiveComponent.getState\_Component() method
|
|
617
|
-
|
|
618
|
-
Get the property state: associate library device
|
|
619
|
-
|
|
620
|
-
## Signature
|
|
621
|
-
|
|
622
|
-
```typescript
|
|
623
|
-
function getState_Component():
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
console.log('
|
|
647
|
-
console.log('
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
console.log('
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
```
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
```
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
```
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
```
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
//
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
const
|
|
884
|
-
|
|
885
|
-
//
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
const
|
|
918
|
-
|
|
919
|
-
//
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
```
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
const
|
|
955
|
-
|
|
956
|
-
//
|
|
957
|
-
const
|
|
958
|
-
|
|
959
|
-
//
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
const
|
|
993
|
-
|
|
994
|
-
//
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1028
|
-
//
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1062
|
-
//
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
//
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1130
|
-
//
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
//
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
//
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1232
|
-
//
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1266
|
-
//
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1300
|
-
//
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
const
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
//
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
await
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
//
|
|
1462
|
-
await
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
const
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1535
|
-
//
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
await
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1611
|
-
//
|
|
1612
|
-
const
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
await
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
const
|
|
1686
|
-
|
|
1687
|
-
//
|
|
1688
|
-
const
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
await
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
const
|
|
1762
|
-
|
|
1763
|
-
//
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
await
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1839
|
-
//
|
|
1840
|
-
const
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
await
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
const
|
|
1914
|
-
|
|
1915
|
-
//
|
|
1916
|
-
const
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
await
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
const
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
const
|
|
1992
|
-
|
|
1993
|
-
//
|
|
1994
|
-
const
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
await
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
const
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
const
|
|
2070
|
-
|
|
2071
|
-
//
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
await
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
const
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2147
|
-
//
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
await
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2223
|
-
//
|
|
2224
|
-
const
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
await
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2299
|
-
//
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
await
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
const
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
const
|
|
2374
|
-
|
|
2375
|
-
//
|
|
2376
|
-
const
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
await
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
const
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
const
|
|
2450
|
-
|
|
2451
|
-
//
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
await
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
const
|
|
2526
|
-
|
|
2527
|
-
//
|
|
2528
|
-
const
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
await
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
await
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
const
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
const
|
|
2615
|
-
|
|
2616
|
-
//
|
|
2617
|
-
const
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
console.log('designator:', before, '→', refetched[0].getState_Designator());
|
|
2627
|
-
```
|
|
1
|
+
# IPCB\_PrimitiveComponent class
|
|
2
|
+
|
|
3
|
+
Device primitive
|
|
4
|
+
|
|
5
|
+
## Signature
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
class IPCB_PrimitiveComponent implements IPCB_Primitive
|
|
9
|
+
```
|
|
10
|
+
**Implements:** [IPCB\_Primitive](../interfaces/IPCB_Primitive.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
|
+
[done()](./IPCB_PrimitiveComponent.md)
|
|
32
|
+
|
|
33
|
+
</td><td>
|
|
34
|
+
|
|
35
|
+
</td><td>
|
|
36
|
+
|
|
37
|
+
**_(BETA)_** Apply the changes to the primitives to the canvas
|
|
38
|
+
|
|
39
|
+
</td></tr>
|
|
40
|
+
<tr><td>
|
|
41
|
+
|
|
42
|
+
[getAllPins()](./IPCB_PrimitiveComponent.md)
|
|
43
|
+
|
|
44
|
+
</td><td>
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
**_(BETA)_** Get all pads associated with the device
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
<tr><td>
|
|
52
|
+
|
|
53
|
+
[getState\_AddIntoBom()](./IPCB_PrimitiveComponent.md)
|
|
54
|
+
|
|
55
|
+
</td><td>
|
|
56
|
+
|
|
57
|
+
</td><td>
|
|
58
|
+
|
|
59
|
+
Get the property state: whether to add BOM
|
|
60
|
+
|
|
61
|
+
</td></tr>
|
|
62
|
+
<tr><td>
|
|
63
|
+
|
|
64
|
+
[getState\_Component()](./IPCB_PrimitiveComponent.md)
|
|
65
|
+
|
|
66
|
+
</td><td>
|
|
67
|
+
|
|
68
|
+
</td><td>
|
|
69
|
+
|
|
70
|
+
Get the property state: associate library device
|
|
71
|
+
|
|
72
|
+
</td></tr>
|
|
73
|
+
<tr><td>
|
|
74
|
+
|
|
75
|
+
[getState\_Designator()](./IPCB_PrimitiveComponent.md)
|
|
76
|
+
|
|
77
|
+
</td><td>
|
|
78
|
+
|
|
79
|
+
</td><td>
|
|
80
|
+
|
|
81
|
+
Get the property state: designator
|
|
82
|
+
|
|
83
|
+
</td></tr>
|
|
84
|
+
<tr><td>
|
|
85
|
+
|
|
86
|
+
[getState\_Footprint()](./IPCB_PrimitiveComponent.md)
|
|
87
|
+
|
|
88
|
+
</td><td>
|
|
89
|
+
|
|
90
|
+
</td><td>
|
|
91
|
+
|
|
92
|
+
Get the property state: associate library footprint
|
|
93
|
+
|
|
94
|
+
</td></tr>
|
|
95
|
+
<tr><td>
|
|
96
|
+
|
|
97
|
+
[getState\_Layer()](./IPCB_PrimitiveComponent.md)
|
|
98
|
+
|
|
99
|
+
</td><td>
|
|
100
|
+
|
|
101
|
+
</td><td>
|
|
102
|
+
|
|
103
|
+
Get the property state: Layer
|
|
104
|
+
|
|
105
|
+
</td></tr>
|
|
106
|
+
<tr><td>
|
|
107
|
+
|
|
108
|
+
[getState\_Manufacturer()](./IPCB_PrimitiveComponent.md)
|
|
109
|
+
|
|
110
|
+
</td><td>
|
|
111
|
+
|
|
112
|
+
</td><td>
|
|
113
|
+
|
|
114
|
+
Get the property state: manufacturer
|
|
115
|
+
|
|
116
|
+
</td></tr>
|
|
117
|
+
<tr><td>
|
|
118
|
+
|
|
119
|
+
[getState\_ManufacturerId()](./IPCB_PrimitiveComponent.md)
|
|
120
|
+
|
|
121
|
+
</td><td>
|
|
122
|
+
|
|
123
|
+
</td><td>
|
|
124
|
+
|
|
125
|
+
Get the property state: manufacturer ID
|
|
126
|
+
|
|
127
|
+
</td></tr>
|
|
128
|
+
<tr><td>
|
|
129
|
+
|
|
130
|
+
[getState\_Model3D()](./IPCB_PrimitiveComponent.md)
|
|
131
|
+
|
|
132
|
+
</td><td>
|
|
133
|
+
|
|
134
|
+
</td><td>
|
|
135
|
+
|
|
136
|
+
Get the property state: associate library 3D model
|
|
137
|
+
|
|
138
|
+
</td></tr>
|
|
139
|
+
<tr><td>
|
|
140
|
+
|
|
141
|
+
[getState\_Name()](./IPCB_PrimitiveComponent.md)
|
|
142
|
+
|
|
143
|
+
</td><td>
|
|
144
|
+
|
|
145
|
+
</td><td>
|
|
146
|
+
|
|
147
|
+
Get the property state: name
|
|
148
|
+
|
|
149
|
+
</td></tr>
|
|
150
|
+
<tr><td>
|
|
151
|
+
|
|
152
|
+
[getState\_OtherProperty()](./IPCB_PrimitiveComponent.md)
|
|
153
|
+
|
|
154
|
+
</td><td>
|
|
155
|
+
|
|
156
|
+
</td><td>
|
|
157
|
+
|
|
158
|
+
Get the property state: other parameters
|
|
159
|
+
|
|
160
|
+
</td></tr>
|
|
161
|
+
<tr><td>
|
|
162
|
+
|
|
163
|
+
[getState\_Pads()](./IPCB_PrimitiveComponent.md)
|
|
164
|
+
|
|
165
|
+
</td><td>
|
|
166
|
+
|
|
167
|
+
</td><td>
|
|
168
|
+
|
|
169
|
+
Get the property state: pad
|
|
170
|
+
|
|
171
|
+
</td></tr>
|
|
172
|
+
<tr><td>
|
|
173
|
+
|
|
174
|
+
[getState\_PrimitiveId()](./IPCB_PrimitiveComponent.md)
|
|
175
|
+
|
|
176
|
+
</td><td>
|
|
177
|
+
|
|
178
|
+
</td><td>
|
|
179
|
+
|
|
180
|
+
Get the property state: primitive ID
|
|
181
|
+
|
|
182
|
+
</td></tr>
|
|
183
|
+
<tr><td>
|
|
184
|
+
|
|
185
|
+
[getState\_PrimitiveLock()](./IPCB_PrimitiveComponent.md)
|
|
186
|
+
|
|
187
|
+
</td><td>
|
|
188
|
+
|
|
189
|
+
</td><td>
|
|
190
|
+
|
|
191
|
+
Get the property state: whether it is locked
|
|
192
|
+
|
|
193
|
+
</td></tr>
|
|
194
|
+
<tr><td>
|
|
195
|
+
|
|
196
|
+
[getState\_PrimitiveType()](./IPCB_PrimitiveComponent.md)
|
|
197
|
+
|
|
198
|
+
</td><td>
|
|
199
|
+
|
|
200
|
+
</td><td>
|
|
201
|
+
|
|
202
|
+
Get the property state: primitive type
|
|
203
|
+
|
|
204
|
+
</td></tr>
|
|
205
|
+
<tr><td>
|
|
206
|
+
|
|
207
|
+
[getState\_Rotation()](./IPCB_PrimitiveComponent.md)
|
|
208
|
+
|
|
209
|
+
</td><td>
|
|
210
|
+
|
|
211
|
+
</td><td>
|
|
212
|
+
|
|
213
|
+
Get the property state: rotation angle
|
|
214
|
+
|
|
215
|
+
</td></tr>
|
|
216
|
+
<tr><td>
|
|
217
|
+
|
|
218
|
+
[getState\_Supplier()](./IPCB_PrimitiveComponent.md)
|
|
219
|
+
|
|
220
|
+
</td><td>
|
|
221
|
+
|
|
222
|
+
</td><td>
|
|
223
|
+
|
|
224
|
+
Get the property state: supplier
|
|
225
|
+
|
|
226
|
+
</td></tr>
|
|
227
|
+
<tr><td>
|
|
228
|
+
|
|
229
|
+
[getState\_SupplierId()](./IPCB_PrimitiveComponent.md)
|
|
230
|
+
|
|
231
|
+
</td><td>
|
|
232
|
+
|
|
233
|
+
</td><td>
|
|
234
|
+
|
|
235
|
+
Get the property state: supplier ID
|
|
236
|
+
|
|
237
|
+
</td></tr>
|
|
238
|
+
<tr><td>
|
|
239
|
+
|
|
240
|
+
[getState\_UniqueId()](./IPCB_PrimitiveComponent.md)
|
|
241
|
+
|
|
242
|
+
</td><td>
|
|
243
|
+
|
|
244
|
+
</td><td>
|
|
245
|
+
|
|
246
|
+
Get the property state: unique ID
|
|
247
|
+
|
|
248
|
+
</td></tr>
|
|
249
|
+
<tr><td>
|
|
250
|
+
|
|
251
|
+
[getState\_X()](./IPCB_PrimitiveComponent.md)
|
|
252
|
+
|
|
253
|
+
</td><td>
|
|
254
|
+
|
|
255
|
+
</td><td>
|
|
256
|
+
|
|
257
|
+
Get the property state: X coordinate
|
|
258
|
+
|
|
259
|
+
</td></tr>
|
|
260
|
+
<tr><td>
|
|
261
|
+
|
|
262
|
+
[getState\_Y()](./IPCB_PrimitiveComponent.md)
|
|
263
|
+
|
|
264
|
+
</td><td>
|
|
265
|
+
|
|
266
|
+
</td><td>
|
|
267
|
+
|
|
268
|
+
Get the property state: Y coordinate
|
|
269
|
+
|
|
270
|
+
</td></tr>
|
|
271
|
+
<tr><td>
|
|
272
|
+
|
|
273
|
+
[isAsync()](./IPCB_PrimitiveComponent.md)
|
|
274
|
+
|
|
275
|
+
</td><td>
|
|
276
|
+
|
|
277
|
+
</td><td>
|
|
278
|
+
|
|
279
|
+
Query whether the primitive is an async primitive
|
|
280
|
+
|
|
281
|
+
</td></tr>
|
|
282
|
+
<tr><td>
|
|
283
|
+
|
|
284
|
+
[reset()](./IPCB_PrimitiveComponent.md)
|
|
285
|
+
|
|
286
|
+
</td><td>
|
|
287
|
+
|
|
288
|
+
</td><td>
|
|
289
|
+
|
|
290
|
+
**_(BETA)_** Reset the async primitive to the current canvas state
|
|
291
|
+
|
|
292
|
+
</td></tr>
|
|
293
|
+
<tr><td>
|
|
294
|
+
|
|
295
|
+
[setAttribute(key, value, keyVisible, valueVisible)](./IPCB_PrimitiveComponent.md)
|
|
296
|
+
|
|
297
|
+
</td><td>
|
|
298
|
+
|
|
299
|
+
</td><td>
|
|
300
|
+
|
|
301
|
+
**_(BETA)_** Set Property
|
|
302
|
+
|
|
303
|
+
</td></tr>
|
|
304
|
+
<tr><td>
|
|
305
|
+
|
|
306
|
+
[setState\_AddIntoBom(addIntoBom)](./IPCB_PrimitiveComponent.md)
|
|
307
|
+
|
|
308
|
+
</td><td>
|
|
309
|
+
|
|
310
|
+
</td><td>
|
|
311
|
+
|
|
312
|
+
**_(BETA)_** Set the property state: whether to add BOM
|
|
313
|
+
|
|
314
|
+
</td></tr>
|
|
315
|
+
<tr><td>
|
|
316
|
+
|
|
317
|
+
[setState\_Designator(designator)](./IPCB_PrimitiveComponent.md)
|
|
318
|
+
|
|
319
|
+
</td><td>
|
|
320
|
+
|
|
321
|
+
</td><td>
|
|
322
|
+
|
|
323
|
+
**_(BETA)_** Set the property state: designator
|
|
324
|
+
|
|
325
|
+
</td></tr>
|
|
326
|
+
<tr><td>
|
|
327
|
+
|
|
328
|
+
[setState\_Layer(layer)](./IPCB_PrimitiveComponent.md)
|
|
329
|
+
|
|
330
|
+
</td><td>
|
|
331
|
+
|
|
332
|
+
</td><td>
|
|
333
|
+
|
|
334
|
+
**_(BETA)_** Set the property state: Layer
|
|
335
|
+
|
|
336
|
+
</td></tr>
|
|
337
|
+
<tr><td>
|
|
338
|
+
|
|
339
|
+
[setState\_Manufacturer(manufacturer)](./IPCB_PrimitiveComponent.md)
|
|
340
|
+
|
|
341
|
+
</td><td>
|
|
342
|
+
|
|
343
|
+
</td><td>
|
|
344
|
+
|
|
345
|
+
**_(BETA)_** Set the property state: manufacturer
|
|
346
|
+
|
|
347
|
+
</td></tr>
|
|
348
|
+
<tr><td>
|
|
349
|
+
|
|
350
|
+
[setState\_ManufacturerId(manufacturerId)](./IPCB_PrimitiveComponent.md)
|
|
351
|
+
|
|
352
|
+
</td><td>
|
|
353
|
+
|
|
354
|
+
</td><td>
|
|
355
|
+
|
|
356
|
+
**_(BETA)_** Set the property state: manufacturer ID
|
|
357
|
+
|
|
358
|
+
</td></tr>
|
|
359
|
+
<tr><td>
|
|
360
|
+
|
|
361
|
+
[setState\_Name(name)](./IPCB_PrimitiveComponent.md)
|
|
362
|
+
|
|
363
|
+
</td><td>
|
|
364
|
+
|
|
365
|
+
</td><td>
|
|
366
|
+
|
|
367
|
+
**_(BETA)_** Set the property state: name
|
|
368
|
+
|
|
369
|
+
</td></tr>
|
|
370
|
+
<tr><td>
|
|
371
|
+
|
|
372
|
+
[setState\_OtherProperty(otherProperty)](./IPCB_PrimitiveComponent.md)
|
|
373
|
+
|
|
374
|
+
</td><td>
|
|
375
|
+
|
|
376
|
+
</td><td>
|
|
377
|
+
|
|
378
|
+
**_(BETA)_** Set the property state: other parameters
|
|
379
|
+
|
|
380
|
+
</td></tr>
|
|
381
|
+
<tr><td>
|
|
382
|
+
|
|
383
|
+
[setState\_PrimitiveLock(primitiveLock)](./IPCB_PrimitiveComponent.md)
|
|
384
|
+
|
|
385
|
+
</td><td>
|
|
386
|
+
|
|
387
|
+
</td><td>
|
|
388
|
+
|
|
389
|
+
**_(BETA)_** Set the property state: whether it is locked
|
|
390
|
+
|
|
391
|
+
</td></tr>
|
|
392
|
+
<tr><td>
|
|
393
|
+
|
|
394
|
+
[setState\_Rotation(rotation)](./IPCB_PrimitiveComponent.md)
|
|
395
|
+
|
|
396
|
+
</td><td>
|
|
397
|
+
|
|
398
|
+
</td><td>
|
|
399
|
+
|
|
400
|
+
**_(BETA)_** Set the property state: rotation angle
|
|
401
|
+
|
|
402
|
+
</td></tr>
|
|
403
|
+
<tr><td>
|
|
404
|
+
|
|
405
|
+
[setState\_Supplier(supplier)](./IPCB_PrimitiveComponent.md)
|
|
406
|
+
|
|
407
|
+
</td><td>
|
|
408
|
+
|
|
409
|
+
</td><td>
|
|
410
|
+
|
|
411
|
+
**_(BETA)_** Set the property state: supplier
|
|
412
|
+
|
|
413
|
+
</td></tr>
|
|
414
|
+
<tr><td>
|
|
415
|
+
|
|
416
|
+
[setState\_SupplierId(supplierId)](./IPCB_PrimitiveComponent.md)
|
|
417
|
+
|
|
418
|
+
</td><td>
|
|
419
|
+
|
|
420
|
+
</td><td>
|
|
421
|
+
|
|
422
|
+
**_(BETA)_** Set the property state: supplier ID
|
|
423
|
+
|
|
424
|
+
</td></tr>
|
|
425
|
+
<tr><td>
|
|
426
|
+
|
|
427
|
+
[setState\_UniqueId(uniqueId)](./IPCB_PrimitiveComponent.md)
|
|
428
|
+
|
|
429
|
+
</td><td>
|
|
430
|
+
|
|
431
|
+
</td><td>
|
|
432
|
+
|
|
433
|
+
**_(BETA)_** Set the property state: unique ID
|
|
434
|
+
|
|
435
|
+
</td></tr>
|
|
436
|
+
<tr><td>
|
|
437
|
+
|
|
438
|
+
[setState\_X(x)](./IPCB_PrimitiveComponent.md)
|
|
439
|
+
|
|
440
|
+
</td><td>
|
|
441
|
+
|
|
442
|
+
</td><td>
|
|
443
|
+
|
|
444
|
+
**_(BETA)_** Set the property state: X coordinate
|
|
445
|
+
|
|
446
|
+
</td></tr>
|
|
447
|
+
<tr><td>
|
|
448
|
+
|
|
449
|
+
[setState\_Y(y)](./IPCB_PrimitiveComponent.md)
|
|
450
|
+
|
|
451
|
+
</td><td>
|
|
452
|
+
|
|
453
|
+
</td><td>
|
|
454
|
+
|
|
455
|
+
**_(BETA)_** Set the property state: Y coordinate
|
|
456
|
+
|
|
457
|
+
</td></tr>
|
|
458
|
+
<tr><td>
|
|
459
|
+
|
|
460
|
+
[toAsync()](./IPCB_PrimitiveComponent.md)
|
|
461
|
+
|
|
462
|
+
</td><td>
|
|
463
|
+
|
|
464
|
+
</td><td>
|
|
465
|
+
|
|
466
|
+
Convert Primitive to Async primitive
|
|
467
|
+
|
|
468
|
+
</td></tr>
|
|
469
|
+
<tr><td>
|
|
470
|
+
|
|
471
|
+
[toSync()](./IPCB_PrimitiveComponent.md)
|
|
472
|
+
|
|
473
|
+
</td><td>
|
|
474
|
+
|
|
475
|
+
</td><td>
|
|
476
|
+
|
|
477
|
+
Convert Primitive to Sync primitive
|
|
478
|
+
|
|
479
|
+
</td></tr>
|
|
480
|
+
</tbody></table>
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## 方法详情
|
|
485
|
+
|
|
486
|
+
### done
|
|
487
|
+
|
|
488
|
+
# IPCB\_PrimitiveComponent.done() method
|
|
489
|
+
|
|
490
|
+
> 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.
|
|
491
|
+
|
|
492
|
+
Apply the changes to the primitives to the canvas
|
|
493
|
+
|
|
494
|
+
## Signature
|
|
495
|
+
|
|
496
|
+
```typescript
|
|
497
|
+
function done(): Promise<IPCB_PrimitiveComponent>;
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
## Returns
|
|
501
|
+
|
|
502
|
+
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>
|
|
503
|
+
|
|
504
|
+
Device primitive object
|
|
505
|
+
|
|
506
|
+
## Example
|
|
507
|
+
|
|
508
|
+
```javascript
|
|
509
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
510
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
511
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
512
|
+
|
|
513
|
+
// 2. 放置测试器件
|
|
514
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
515
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
516
|
+
const compId = comp.getState_PrimitiveId();
|
|
517
|
+
|
|
518
|
+
// 3. 记录修改前的位号和旋转角度
|
|
519
|
+
const designatorBefore = comp.getState_Designator();
|
|
520
|
+
const rotationBefore = comp.getState_Rotation();
|
|
521
|
+
|
|
522
|
+
// 4. 批量修改两个属性,一次 done() 提交
|
|
523
|
+
const asyncComp = comp.toAsync();
|
|
524
|
+
asyncComp.setState_Designator('C101');
|
|
525
|
+
asyncComp.setState_Rotation(90);
|
|
526
|
+
await asyncComp.done();
|
|
527
|
+
|
|
528
|
+
// 5. 从画布重新读取,确认批量修改已生效(保留现场供观察)
|
|
529
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
530
|
+
|
|
531
|
+
console.log('designator:', designatorBefore, '→', refetched[0].getState_Designator());
|
|
532
|
+
console.log('rotation:', rotationBefore, '→', refetched[0].getState_Rotation());
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### getallpins
|
|
536
|
+
|
|
537
|
+
# IPCB\_PrimitiveComponent.getAllPins() method
|
|
538
|
+
|
|
539
|
+
> 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.
|
|
540
|
+
|
|
541
|
+
Get all pads associated with the device
|
|
542
|
+
|
|
543
|
+
## Signature
|
|
544
|
+
|
|
545
|
+
```typescript
|
|
546
|
+
function getAllPins(): Promise<Array<IPCB_PrimitiveComponentPad>>;
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
## Returns
|
|
550
|
+
|
|
551
|
+
Promise<Array<[IPCB\_PrimitiveComponentPad](./IPCB_PrimitiveComponentPad.md)<!-- -->>>
|
|
552
|
+
|
|
553
|
+
Device pad primitive array
|
|
554
|
+
|
|
555
|
+
## Example
|
|
556
|
+
|
|
557
|
+
```javascript
|
|
558
|
+
// 1. 放置一个测试器件
|
|
559
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
560
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
561
|
+
const compId = comp.getState_PrimitiveId();
|
|
562
|
+
|
|
563
|
+
// 2. 获取器件关联的所有焊盘图元
|
|
564
|
+
const pins = await comp.getAllPins();
|
|
565
|
+
|
|
566
|
+
// 3. 逐个读取焊盘的归属器件和图元 ID
|
|
567
|
+
const pinInfos = pins.map(pin => ({
|
|
568
|
+
parentMatch: pin.getState_ParentComponentPrimitiveId() === compId,
|
|
569
|
+
primitiveId: pin.getState_PrimitiveId(),
|
|
570
|
+
}));
|
|
571
|
+
|
|
572
|
+
// 4. 清理测试器件
|
|
573
|
+
await eda.pcb_PrimitiveComponent.delete([compId]);
|
|
574
|
+
|
|
575
|
+
console.log('pinCount:', pins.length);
|
|
576
|
+
console.log('allBelongToComponent:', pinInfos.every(p => p.parentMatch));
|
|
577
|
+
console.log('firstPinPrimitiveId:', pinInfos[0].primitiveId);
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
### getstate_addintobom
|
|
581
|
+
|
|
582
|
+
# IPCB\_PrimitiveComponent.getState\_AddIntoBom() method
|
|
583
|
+
|
|
584
|
+
Get the property state: whether to add BOM
|
|
585
|
+
|
|
586
|
+
## Signature
|
|
587
|
+
|
|
588
|
+
```typescript
|
|
589
|
+
function getState_AddIntoBom(): boolean;
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
## Returns
|
|
593
|
+
|
|
594
|
+
boolean
|
|
595
|
+
|
|
596
|
+
Whether Add to BOM
|
|
597
|
+
|
|
598
|
+
## Example
|
|
599
|
+
|
|
600
|
+
```javascript
|
|
601
|
+
// 1. 放置一个测试器件
|
|
602
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
603
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
604
|
+
|
|
605
|
+
// 2. 读取是否加入 BOM
|
|
606
|
+
const addIntoBom = comp.getState_AddIntoBom();
|
|
607
|
+
|
|
608
|
+
// 3. 清理测试器件
|
|
609
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
610
|
+
|
|
611
|
+
console.log('addIntoBom:', addIntoBom);
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
### getstate_component
|
|
615
|
+
|
|
616
|
+
# IPCB\_PrimitiveComponent.getState\_Component() method
|
|
617
|
+
|
|
618
|
+
Get the property state: associate library device
|
|
619
|
+
|
|
620
|
+
## Signature
|
|
621
|
+
|
|
622
|
+
```typescript
|
|
623
|
+
function getState_Component(): { libraryUuid: string; uuid: string; name?: string } | undefined;
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
## Returns
|
|
627
|
+
|
|
628
|
+
{ libraryUuid: string; uuid: string; name?: string } \| undefined
|
|
629
|
+
|
|
630
|
+
Associate library device
|
|
631
|
+
|
|
632
|
+
## Example
|
|
633
|
+
|
|
634
|
+
```javascript
|
|
635
|
+
// 1. 放置一个测试器件
|
|
636
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
637
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
638
|
+
|
|
639
|
+
// 2. 读取关联的库器件信息
|
|
640
|
+
const component = comp.getState_Component();
|
|
641
|
+
|
|
642
|
+
// 3. 清理测试器件
|
|
643
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
644
|
+
|
|
645
|
+
console.log('deviceName:', component.name);
|
|
646
|
+
console.log('deviceUuid:', component.uuid);
|
|
647
|
+
console.log('libraryUuid:', component.libraryUuid);
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
### getstate_designator
|
|
651
|
+
|
|
652
|
+
# IPCB\_PrimitiveComponent.getState\_Designator() method
|
|
653
|
+
|
|
654
|
+
Get the property state: designator
|
|
655
|
+
|
|
656
|
+
## Signature
|
|
657
|
+
|
|
658
|
+
```typescript
|
|
659
|
+
function getState_Designator(): string | undefined;
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
## Returns
|
|
663
|
+
|
|
664
|
+
string \| undefined
|
|
665
|
+
|
|
666
|
+
Designator
|
|
667
|
+
|
|
668
|
+
## Example
|
|
669
|
+
|
|
670
|
+
```javascript
|
|
671
|
+
// 1. 放置一个测试器件(位号由系统自动分配)
|
|
672
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
673
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
674
|
+
|
|
675
|
+
// 2. 读取位号
|
|
676
|
+
const designator = comp.getState_Designator();
|
|
677
|
+
|
|
678
|
+
// 3. 清理测试器件
|
|
679
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
680
|
+
|
|
681
|
+
console.log('designator:', designator);
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
### getstate_footprint
|
|
685
|
+
|
|
686
|
+
# IPCB\_PrimitiveComponent.getState\_Footprint() method
|
|
687
|
+
|
|
688
|
+
Get the property state: associate library footprint
|
|
689
|
+
|
|
690
|
+
## Signature
|
|
691
|
+
|
|
692
|
+
```typescript
|
|
693
|
+
function getState_Footprint(): { libraryUuid: string; uuid: string; name?: string } | undefined;
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
## Returns
|
|
697
|
+
|
|
698
|
+
{ libraryUuid: string; uuid: string; name?: string } \| undefined
|
|
699
|
+
|
|
700
|
+
Associate library footprint
|
|
701
|
+
|
|
702
|
+
## Example
|
|
703
|
+
|
|
704
|
+
```javascript
|
|
705
|
+
// 1. 放置一个测试器件
|
|
706
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
707
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
708
|
+
|
|
709
|
+
// 2. 读取关联的库封装信息
|
|
710
|
+
const footprint = comp.getState_Footprint();
|
|
711
|
+
|
|
712
|
+
// 3. 清理测试器件
|
|
713
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
714
|
+
|
|
715
|
+
console.log('footprintName:', footprint.name);
|
|
716
|
+
console.log('footprintUuid:', footprint.uuid);
|
|
717
|
+
console.log('libraryUuid:', footprint.libraryUuid);
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
### getstate_layer
|
|
721
|
+
|
|
722
|
+
# IPCB\_PrimitiveComponent.getState\_Layer() method
|
|
723
|
+
|
|
724
|
+
Get the property state: Layer
|
|
725
|
+
|
|
726
|
+
## Signature
|
|
727
|
+
|
|
728
|
+
```typescript
|
|
729
|
+
function getState_Layer(): TPCB_LayersOfComponent;
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
## Returns
|
|
733
|
+
|
|
734
|
+
[TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)
|
|
735
|
+
|
|
736
|
+
Layer
|
|
737
|
+
|
|
738
|
+
## Example
|
|
739
|
+
|
|
740
|
+
```javascript
|
|
741
|
+
// 1. 放置一个测试器件(默认贴在顶面)
|
|
742
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
743
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
744
|
+
|
|
745
|
+
// 2. 读取所在面(1=顶面, 2=底面)
|
|
746
|
+
const layer = comp.getState_Layer();
|
|
747
|
+
|
|
748
|
+
// 3. 清理测试器件
|
|
749
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
750
|
+
|
|
751
|
+
console.log('layer:', layer, layer === 1 ? '(顶面)' : '(底面)');
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
### getstate_manufacturer
|
|
755
|
+
|
|
756
|
+
# IPCB\_PrimitiveComponent.getState\_Manufacturer() method
|
|
757
|
+
|
|
758
|
+
Get the property state: manufacturer
|
|
759
|
+
|
|
760
|
+
## Signature
|
|
761
|
+
|
|
762
|
+
```typescript
|
|
763
|
+
function getState_Manufacturer(): string | undefined;
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
## Returns
|
|
767
|
+
|
|
768
|
+
string \| undefined
|
|
769
|
+
|
|
770
|
+
Manufacturer
|
|
771
|
+
|
|
772
|
+
## Example
|
|
773
|
+
|
|
774
|
+
```javascript
|
|
775
|
+
// 1. 放置一个测试器件
|
|
776
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
777
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
778
|
+
|
|
779
|
+
// 2. 读取制造商
|
|
780
|
+
const manufacturer = comp.getState_Manufacturer();
|
|
781
|
+
|
|
782
|
+
// 3. 清理测试器件
|
|
783
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
784
|
+
|
|
785
|
+
console.log('manufacturer:', manufacturer);
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
### getstate_manufacturerid
|
|
789
|
+
|
|
790
|
+
# IPCB\_PrimitiveComponent.getState\_ManufacturerId() method
|
|
791
|
+
|
|
792
|
+
Get the property state: manufacturer ID
|
|
793
|
+
|
|
794
|
+
## Signature
|
|
795
|
+
|
|
796
|
+
```typescript
|
|
797
|
+
function getState_ManufacturerId(): string | undefined;
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
## Returns
|
|
801
|
+
|
|
802
|
+
string \| undefined
|
|
803
|
+
|
|
804
|
+
Manufacturer ID
|
|
805
|
+
|
|
806
|
+
## Example
|
|
807
|
+
|
|
808
|
+
```javascript
|
|
809
|
+
// 1. 放置一个测试器件
|
|
810
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
811
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
812
|
+
|
|
813
|
+
// 2. 读取制造商编号
|
|
814
|
+
const manufacturerId = comp.getState_ManufacturerId();
|
|
815
|
+
|
|
816
|
+
// 3. 清理测试器件
|
|
817
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
818
|
+
|
|
819
|
+
console.log('manufacturerId:', manufacturerId);
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
### getstate_model3d
|
|
823
|
+
|
|
824
|
+
# IPCB\_PrimitiveComponent.getState\_Model3D() method
|
|
825
|
+
|
|
826
|
+
Get the property state: associate library 3D model
|
|
827
|
+
|
|
828
|
+
## Signature
|
|
829
|
+
|
|
830
|
+
```typescript
|
|
831
|
+
function getState_Model3D(): { libraryUuid: string; uuid: string; name?: string } | undefined;
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
## Returns
|
|
835
|
+
|
|
836
|
+
{ libraryUuid: string; uuid: string; name?: string } \| undefined
|
|
837
|
+
|
|
838
|
+
Associate library 3D model
|
|
839
|
+
|
|
840
|
+
## Example
|
|
841
|
+
|
|
842
|
+
```javascript
|
|
843
|
+
// 1. 放置一个测试器件
|
|
844
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
845
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
846
|
+
|
|
847
|
+
// 2. 读取关联的 3D 模型信息(未关联时返回 undefined)
|
|
848
|
+
const model3d = comp.getState_Model3D();
|
|
849
|
+
|
|
850
|
+
// 3. 清理测试器件
|
|
851
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
852
|
+
|
|
853
|
+
console.log('model3dName:', model3d ? model3d.name : '(未关联 3D 模型)');
|
|
854
|
+
console.log('model3dUuid:', model3d ? model3d.uuid : '(未关联 3D 模型)');
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
### getstate_name
|
|
858
|
+
|
|
859
|
+
# IPCB\_PrimitiveComponent.getState\_Name() method
|
|
860
|
+
|
|
861
|
+
Get the property state: name
|
|
862
|
+
|
|
863
|
+
## Signature
|
|
864
|
+
|
|
865
|
+
```typescript
|
|
866
|
+
function getState_Name(): string | undefined;
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
## Returns
|
|
870
|
+
|
|
871
|
+
string \| undefined
|
|
872
|
+
|
|
873
|
+
Name
|
|
874
|
+
|
|
875
|
+
## Example
|
|
876
|
+
|
|
877
|
+
```javascript
|
|
878
|
+
// 1. 放置一个测试器件
|
|
879
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
880
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
881
|
+
|
|
882
|
+
// 2. 读取名称
|
|
883
|
+
const name = comp.getState_Name();
|
|
884
|
+
|
|
885
|
+
// 3. 清理测试器件
|
|
886
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
887
|
+
|
|
888
|
+
console.log('name:', name);
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
### getstate_otherproperty
|
|
892
|
+
|
|
893
|
+
# IPCB\_PrimitiveComponent.getState\_OtherProperty() method
|
|
894
|
+
|
|
895
|
+
Get the property state: other parameters
|
|
896
|
+
|
|
897
|
+
## Signature
|
|
898
|
+
|
|
899
|
+
```typescript
|
|
900
|
+
function getState_OtherProperty(): Record<string, string | number | boolean> | undefined;
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
## Returns
|
|
904
|
+
|
|
905
|
+
Record<string, string \| number \| boolean> \| undefined
|
|
906
|
+
|
|
907
|
+
Other parameters
|
|
908
|
+
|
|
909
|
+
## Example
|
|
910
|
+
|
|
911
|
+
```javascript
|
|
912
|
+
// 1. 放置一个测试器件
|
|
913
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
914
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
915
|
+
|
|
916
|
+
// 2. 读取其它参数字典
|
|
917
|
+
const otherProperty = comp.getState_OtherProperty();
|
|
918
|
+
|
|
919
|
+
// 3. 清理测试器件
|
|
920
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
921
|
+
|
|
922
|
+
console.log('propertyCount:', Object.keys(otherProperty).length);
|
|
923
|
+
console.log('value:', otherProperty.Value);
|
|
924
|
+
console.log('description:', otherProperty.Description);
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
### getstate_pads
|
|
928
|
+
|
|
929
|
+
# IPCB\_PrimitiveComponent.getState\_Pads() method
|
|
930
|
+
|
|
931
|
+
Get the property state: pad
|
|
932
|
+
|
|
933
|
+
## Signature
|
|
934
|
+
|
|
935
|
+
```typescript
|
|
936
|
+
function getState_Pads():
|
|
937
|
+
Array<{ primitiveId: string; net: string; padNumber: string }> | undefined;
|
|
938
|
+
```
|
|
939
|
+
|
|
940
|
+
## Returns
|
|
941
|
+
|
|
942
|
+
Array<{ primitiveId: string; net: string; padNumber: string }> \| undefined
|
|
943
|
+
|
|
944
|
+
Pad
|
|
945
|
+
|
|
946
|
+
## Example
|
|
947
|
+
|
|
948
|
+
```javascript
|
|
949
|
+
// 1. 放置一个测试器件
|
|
950
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
951
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
952
|
+
|
|
953
|
+
// 2. 读取焊盘摘要数据
|
|
954
|
+
const pads = comp.getState_Pads();
|
|
955
|
+
|
|
956
|
+
// 3. 摘要出每个焊盘的编号与网络
|
|
957
|
+
const padSummaries = pads.map(pad => ({ padNumber: pad.padNumber, net: pad.net }));
|
|
958
|
+
|
|
959
|
+
// 4. 清理测试器件
|
|
960
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
961
|
+
|
|
962
|
+
console.log('padCount:', pads.length);
|
|
963
|
+
console.log('padSummaries:', JSON.stringify(padSummaries));
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
### getstate_primitiveid
|
|
967
|
+
|
|
968
|
+
# IPCB\_PrimitiveComponent.getState\_PrimitiveId() method
|
|
969
|
+
|
|
970
|
+
Get the property state: primitive ID
|
|
971
|
+
|
|
972
|
+
## Signature
|
|
973
|
+
|
|
974
|
+
```typescript
|
|
975
|
+
function getState_PrimitiveId(): string;
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
## Returns
|
|
979
|
+
|
|
980
|
+
string
|
|
981
|
+
|
|
982
|
+
Primitive ID
|
|
983
|
+
|
|
984
|
+
## Example
|
|
985
|
+
|
|
986
|
+
```javascript
|
|
987
|
+
// 1. 放置一个测试器件
|
|
988
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
989
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
990
|
+
|
|
991
|
+
// 2. 读取图元 ID
|
|
992
|
+
const primitiveId = comp.getState_PrimitiveId();
|
|
993
|
+
|
|
994
|
+
// 3. 清理测试器件
|
|
995
|
+
await eda.pcb_PrimitiveComponent.delete([primitiveId]);
|
|
996
|
+
|
|
997
|
+
console.log('primitiveId:', primitiveId);
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
### getstate_primitivelock
|
|
1001
|
+
|
|
1002
|
+
# IPCB\_PrimitiveComponent.getState\_PrimitiveLock() method
|
|
1003
|
+
|
|
1004
|
+
Get the property state: whether it is locked
|
|
1005
|
+
|
|
1006
|
+
## Signature
|
|
1007
|
+
|
|
1008
|
+
```typescript
|
|
1009
|
+
function getState_PrimitiveLock(): boolean;
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
## Returns
|
|
1013
|
+
|
|
1014
|
+
boolean
|
|
1015
|
+
|
|
1016
|
+
Whether it is locked
|
|
1017
|
+
|
|
1018
|
+
## Example
|
|
1019
|
+
|
|
1020
|
+
```javascript
|
|
1021
|
+
// 1. 放置一个测试器件
|
|
1022
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1023
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1024
|
+
|
|
1025
|
+
// 2. 读取锁定状态
|
|
1026
|
+
const primitiveLock = comp.getState_PrimitiveLock();
|
|
1027
|
+
|
|
1028
|
+
// 3. 清理测试器件
|
|
1029
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1030
|
+
|
|
1031
|
+
console.log('primitiveLock:', primitiveLock);
|
|
1032
|
+
```
|
|
1033
|
+
|
|
1034
|
+
### getstate_primitivetype
|
|
1035
|
+
|
|
1036
|
+
# IPCB\_PrimitiveComponent.getState\_PrimitiveType() method
|
|
1037
|
+
|
|
1038
|
+
Get the property state: primitive type
|
|
1039
|
+
|
|
1040
|
+
## Signature
|
|
1041
|
+
|
|
1042
|
+
```typescript
|
|
1043
|
+
function getState_PrimitiveType(): EPCB_PrimitiveType;
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
## Returns
|
|
1047
|
+
|
|
1048
|
+
[EPCB\_PrimitiveType](../enums/EPCB_PrimitiveType.md)
|
|
1049
|
+
|
|
1050
|
+
Primitive type
|
|
1051
|
+
|
|
1052
|
+
## Example
|
|
1053
|
+
|
|
1054
|
+
```javascript
|
|
1055
|
+
// 1. 放置一个测试器件
|
|
1056
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1057
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1058
|
+
|
|
1059
|
+
// 2. 读取图元类型
|
|
1060
|
+
const primitiveType = comp.getState_PrimitiveType();
|
|
1061
|
+
|
|
1062
|
+
// 3. 清理测试器件
|
|
1063
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1064
|
+
|
|
1065
|
+
console.log('primitiveType:', primitiveType);
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
### getstate_rotation
|
|
1069
|
+
|
|
1070
|
+
# IPCB\_PrimitiveComponent.getState\_Rotation() method
|
|
1071
|
+
|
|
1072
|
+
Get the property state: rotation angle
|
|
1073
|
+
|
|
1074
|
+
## Signature
|
|
1075
|
+
|
|
1076
|
+
```typescript
|
|
1077
|
+
function getState_Rotation(): number;
|
|
1078
|
+
```
|
|
1079
|
+
|
|
1080
|
+
## Returns
|
|
1081
|
+
|
|
1082
|
+
number
|
|
1083
|
+
|
|
1084
|
+
Rotation angle
|
|
1085
|
+
|
|
1086
|
+
## Example
|
|
1087
|
+
|
|
1088
|
+
```javascript
|
|
1089
|
+
// 1. 放置一个测试器件(默认 0 度)
|
|
1090
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1091
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1092
|
+
|
|
1093
|
+
// 2. 读取旋转角度
|
|
1094
|
+
const rotation = comp.getState_Rotation();
|
|
1095
|
+
|
|
1096
|
+
// 3. 清理测试器件
|
|
1097
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1098
|
+
|
|
1099
|
+
console.log('rotation:', rotation);
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
### getstate_supplier
|
|
1103
|
+
|
|
1104
|
+
# IPCB\_PrimitiveComponent.getState\_Supplier() method
|
|
1105
|
+
|
|
1106
|
+
Get the property state: supplier
|
|
1107
|
+
|
|
1108
|
+
## Signature
|
|
1109
|
+
|
|
1110
|
+
```typescript
|
|
1111
|
+
function getState_Supplier(): string | undefined;
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
## Returns
|
|
1115
|
+
|
|
1116
|
+
string \| undefined
|
|
1117
|
+
|
|
1118
|
+
Supplier
|
|
1119
|
+
|
|
1120
|
+
## Example
|
|
1121
|
+
|
|
1122
|
+
```javascript
|
|
1123
|
+
// 1. 放置一个测试器件
|
|
1124
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1125
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1126
|
+
|
|
1127
|
+
// 2. 读取供应商
|
|
1128
|
+
const supplier = comp.getState_Supplier();
|
|
1129
|
+
|
|
1130
|
+
// 3. 清理测试器件
|
|
1131
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1132
|
+
|
|
1133
|
+
console.log('supplier:', supplier);
|
|
1134
|
+
```
|
|
1135
|
+
|
|
1136
|
+
### getstate_supplierid
|
|
1137
|
+
|
|
1138
|
+
# IPCB\_PrimitiveComponent.getState\_SupplierId() method
|
|
1139
|
+
|
|
1140
|
+
Get the property state: supplier ID
|
|
1141
|
+
|
|
1142
|
+
## Signature
|
|
1143
|
+
|
|
1144
|
+
```typescript
|
|
1145
|
+
function getState_SupplierId(): string | undefined;
|
|
1146
|
+
```
|
|
1147
|
+
|
|
1148
|
+
## Returns
|
|
1149
|
+
|
|
1150
|
+
string \| undefined
|
|
1151
|
+
|
|
1152
|
+
Supplier ID
|
|
1153
|
+
|
|
1154
|
+
## Example
|
|
1155
|
+
|
|
1156
|
+
```javascript
|
|
1157
|
+
// 1. 放置一个测试器件
|
|
1158
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1159
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1160
|
+
|
|
1161
|
+
// 2. 读取供应商编号
|
|
1162
|
+
const supplierId = comp.getState_SupplierId();
|
|
1163
|
+
|
|
1164
|
+
// 3. 清理测试器件
|
|
1165
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1166
|
+
|
|
1167
|
+
console.log('supplierId:', supplierId);
|
|
1168
|
+
```
|
|
1169
|
+
|
|
1170
|
+
### getstate_uniqueid
|
|
1171
|
+
|
|
1172
|
+
# IPCB\_PrimitiveComponent.getState\_UniqueId() method
|
|
1173
|
+
|
|
1174
|
+
Get the property state: unique ID
|
|
1175
|
+
|
|
1176
|
+
## Signature
|
|
1177
|
+
|
|
1178
|
+
```typescript
|
|
1179
|
+
function getState_UniqueId(): string | undefined;
|
|
1180
|
+
```
|
|
1181
|
+
|
|
1182
|
+
## Returns
|
|
1183
|
+
|
|
1184
|
+
string \| undefined
|
|
1185
|
+
|
|
1186
|
+
Unique ID
|
|
1187
|
+
|
|
1188
|
+
## Example
|
|
1189
|
+
|
|
1190
|
+
```javascript
|
|
1191
|
+
// 1. 放置一个测试器件
|
|
1192
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1193
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1194
|
+
|
|
1195
|
+
// 2. 读取唯一 ID
|
|
1196
|
+
const uniqueId = comp.getState_UniqueId();
|
|
1197
|
+
|
|
1198
|
+
// 3. 清理测试器件
|
|
1199
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1200
|
+
|
|
1201
|
+
console.log('uniqueId:', JSON.stringify(uniqueId));
|
|
1202
|
+
```
|
|
1203
|
+
|
|
1204
|
+
### getstate_x
|
|
1205
|
+
|
|
1206
|
+
# IPCB\_PrimitiveComponent.getState\_X() method
|
|
1207
|
+
|
|
1208
|
+
Get the property state: X coordinate
|
|
1209
|
+
|
|
1210
|
+
## Signature
|
|
1211
|
+
|
|
1212
|
+
```typescript
|
|
1213
|
+
function getState_X(): number;
|
|
1214
|
+
```
|
|
1215
|
+
|
|
1216
|
+
## Returns
|
|
1217
|
+
|
|
1218
|
+
number
|
|
1219
|
+
|
|
1220
|
+
X coordinate
|
|
1221
|
+
|
|
1222
|
+
## Example
|
|
1223
|
+
|
|
1224
|
+
```javascript
|
|
1225
|
+
// 1. 放置一个测试器件
|
|
1226
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1227
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1228
|
+
|
|
1229
|
+
// 2. 读取锚点 X 坐标
|
|
1230
|
+
const x = comp.getState_X();
|
|
1231
|
+
|
|
1232
|
+
// 3. 清理测试器件
|
|
1233
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1234
|
+
|
|
1235
|
+
console.log('x:', x);
|
|
1236
|
+
```
|
|
1237
|
+
|
|
1238
|
+
### getstate_y
|
|
1239
|
+
|
|
1240
|
+
# IPCB\_PrimitiveComponent.getState\_Y() method
|
|
1241
|
+
|
|
1242
|
+
Get the property state: Y coordinate
|
|
1243
|
+
|
|
1244
|
+
## Signature
|
|
1245
|
+
|
|
1246
|
+
```typescript
|
|
1247
|
+
function getState_Y(): number;
|
|
1248
|
+
```
|
|
1249
|
+
|
|
1250
|
+
## Returns
|
|
1251
|
+
|
|
1252
|
+
number
|
|
1253
|
+
|
|
1254
|
+
Y coordinate
|
|
1255
|
+
|
|
1256
|
+
## Example
|
|
1257
|
+
|
|
1258
|
+
```javascript
|
|
1259
|
+
// 1. 放置一个测试器件
|
|
1260
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1261
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1262
|
+
|
|
1263
|
+
// 2. 读取锚点 Y 坐标
|
|
1264
|
+
const y = comp.getState_Y();
|
|
1265
|
+
|
|
1266
|
+
// 3. 清理测试器件
|
|
1267
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1268
|
+
|
|
1269
|
+
console.log('y:', y);
|
|
1270
|
+
```
|
|
1271
|
+
|
|
1272
|
+
### isasync
|
|
1273
|
+
|
|
1274
|
+
# IPCB\_PrimitiveComponent.isAsync() method
|
|
1275
|
+
|
|
1276
|
+
Query whether the primitive is an async primitive
|
|
1277
|
+
|
|
1278
|
+
## Signature
|
|
1279
|
+
|
|
1280
|
+
```typescript
|
|
1281
|
+
function isAsync(): boolean;
|
|
1282
|
+
```
|
|
1283
|
+
|
|
1284
|
+
## Returns
|
|
1285
|
+
|
|
1286
|
+
boolean
|
|
1287
|
+
|
|
1288
|
+
Whether Is async primitive
|
|
1289
|
+
|
|
1290
|
+
## Example
|
|
1291
|
+
|
|
1292
|
+
```javascript
|
|
1293
|
+
// 1. 放置一个测试器件
|
|
1294
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1295
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, 5000, 5000);
|
|
1296
|
+
|
|
1297
|
+
// 2. 查询异步状态
|
|
1298
|
+
const isAsync = comp.isAsync();
|
|
1299
|
+
|
|
1300
|
+
// 3. 清理测试器件
|
|
1301
|
+
await eda.pcb_PrimitiveComponent.delete([comp.getState_PrimitiveId()]);
|
|
1302
|
+
|
|
1303
|
+
console.log('isAsync:', isAsync);
|
|
1304
|
+
```
|
|
1305
|
+
|
|
1306
|
+
### reset
|
|
1307
|
+
|
|
1308
|
+
# IPCB\_PrimitiveComponent.reset() method
|
|
1309
|
+
|
|
1310
|
+
> 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.
|
|
1311
|
+
|
|
1312
|
+
Reset the async primitive to the current canvas state
|
|
1313
|
+
|
|
1314
|
+
## Signature
|
|
1315
|
+
|
|
1316
|
+
```typescript
|
|
1317
|
+
function reset(): Promise<IPCB_PrimitiveComponent>;
|
|
1318
|
+
```
|
|
1319
|
+
|
|
1320
|
+
## Returns
|
|
1321
|
+
|
|
1322
|
+
Promise<[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)<!-- -->>
|
|
1323
|
+
|
|
1324
|
+
Device primitive object
|
|
1325
|
+
|
|
1326
|
+
## Example
|
|
1327
|
+
|
|
1328
|
+
```javascript
|
|
1329
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1330
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1331
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1332
|
+
|
|
1333
|
+
// 2. 放置测试器件(默认 0 度)
|
|
1334
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1335
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1336
|
+
const compId = comp.getState_PrimitiveId();
|
|
1337
|
+
|
|
1338
|
+
// 3. 记录画布上的原始旋转角度
|
|
1339
|
+
const original = comp.getState_Rotation();
|
|
1340
|
+
|
|
1341
|
+
// 4. 异步模式下改一个错误值,但不提交,直接 reset() 丢弃
|
|
1342
|
+
const asyncComp = comp.toAsync();
|
|
1343
|
+
asyncComp.setState_Rotation(270);
|
|
1344
|
+
await asyncComp.reset();
|
|
1345
|
+
|
|
1346
|
+
// 5. 从画布重新读取,确认值仍是原始值(保留现场供观察)
|
|
1347
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
1348
|
+
|
|
1349
|
+
console.log('rotation:', original, '→', refetched[0].getState_Rotation(), '(修改已丢弃)');
|
|
1350
|
+
```
|
|
1351
|
+
|
|
1352
|
+
### setattribute
|
|
1353
|
+
|
|
1354
|
+
# IPCB\_PrimitiveComponent.setAttribute() method
|
|
1355
|
+
|
|
1356
|
+
> 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.
|
|
1357
|
+
|
|
1358
|
+
Set Property
|
|
1359
|
+
|
|
1360
|
+
## Signature
|
|
1361
|
+
|
|
1362
|
+
```typescript
|
|
1363
|
+
function setAttribute(
|
|
1364
|
+
key: string,
|
|
1365
|
+
value?: string | number | boolean,
|
|
1366
|
+
keyVisible?: boolean,
|
|
1367
|
+
valueVisible?: boolean,
|
|
1368
|
+
): Promise<IPCB_PrimitiveAttribute>;
|
|
1369
|
+
```
|
|
1370
|
+
|
|
1371
|
+
## Parameters
|
|
1372
|
+
|
|
1373
|
+
<table><thead><tr><th>
|
|
1374
|
+
|
|
1375
|
+
Parameter
|
|
1376
|
+
|
|
1377
|
+
</th><th>
|
|
1378
|
+
|
|
1379
|
+
Type
|
|
1380
|
+
|
|
1381
|
+
</th><th>
|
|
1382
|
+
|
|
1383
|
+
Description
|
|
1384
|
+
|
|
1385
|
+
</th></tr></thead>
|
|
1386
|
+
<tbody><tr><td>
|
|
1387
|
+
|
|
1388
|
+
key
|
|
1389
|
+
|
|
1390
|
+
</td><td>
|
|
1391
|
+
|
|
1392
|
+
string
|
|
1393
|
+
|
|
1394
|
+
</td><td>
|
|
1395
|
+
|
|
1396
|
+
Attribute name. If the device does not have an attribute with this name, the attribute will be added
|
|
1397
|
+
|
|
1398
|
+
</td></tr>
|
|
1399
|
+
<tr><td>
|
|
1400
|
+
|
|
1401
|
+
value
|
|
1402
|
+
|
|
1403
|
+
</td><td>
|
|
1404
|
+
|
|
1405
|
+
string \| number \| boolean
|
|
1406
|
+
|
|
1407
|
+
</td><td>
|
|
1408
|
+
|
|
1409
|
+
_(Optional)_ Property value
|
|
1410
|
+
|
|
1411
|
+
</td></tr>
|
|
1412
|
+
<tr><td>
|
|
1413
|
+
|
|
1414
|
+
keyVisible
|
|
1415
|
+
|
|
1416
|
+
</td><td>
|
|
1417
|
+
|
|
1418
|
+
boolean
|
|
1419
|
+
|
|
1420
|
+
</td><td>
|
|
1421
|
+
|
|
1422
|
+
_(Optional)_ Attribute name visibility
|
|
1423
|
+
|
|
1424
|
+
</td></tr>
|
|
1425
|
+
<tr><td>
|
|
1426
|
+
|
|
1427
|
+
valueVisible
|
|
1428
|
+
|
|
1429
|
+
</td><td>
|
|
1430
|
+
|
|
1431
|
+
boolean
|
|
1432
|
+
|
|
1433
|
+
</td><td>
|
|
1434
|
+
|
|
1435
|
+
_(Optional)_ Attribute value visibility
|
|
1436
|
+
|
|
1437
|
+
</td></tr>
|
|
1438
|
+
</tbody></table>
|
|
1439
|
+
|
|
1440
|
+
## Returns
|
|
1441
|
+
|
|
1442
|
+
Promise<[IPCB\_PrimitiveAttribute](./IPCB_PrimitiveAttribute.md)<!-- -->>
|
|
1443
|
+
|
|
1444
|
+
Attribute primitive object
|
|
1445
|
+
|
|
1446
|
+
## Example
|
|
1447
|
+
|
|
1448
|
+
```javascript
|
|
1449
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1450
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1451
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1452
|
+
|
|
1453
|
+
// 2. 放置测试器件
|
|
1454
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1455
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1456
|
+
const compId = comp.getState_PrimitiveId();
|
|
1457
|
+
|
|
1458
|
+
// 3. 设置自定义属性(属性名、属性值、名称可见、值可见)
|
|
1459
|
+
await comp.setAttribute('嘉立创示例_Tolerance', '1%', true, true);
|
|
1460
|
+
|
|
1461
|
+
// 4. 通过属性图元接口确认属性已写入(保留现场供观察)
|
|
1462
|
+
const attrIds = await eda.pcb_PrimitiveAttribute.getAllPrimitiveId(compId);
|
|
1463
|
+
const attrs = await eda.pcb_PrimitiveAttribute.get(attrIds);
|
|
1464
|
+
const added = attrs.find(a => a.getState_Key() === '嘉立创示例_Tolerance');
|
|
1465
|
+
|
|
1466
|
+
console.log('attrKey:', added.getState_Key());
|
|
1467
|
+
console.log('attrValue:', added.getState_Value());
|
|
1468
|
+
```
|
|
1469
|
+
|
|
1470
|
+
### setstate_addintobom
|
|
1471
|
+
|
|
1472
|
+
# IPCB\_PrimitiveComponent.setState\_AddIntoBom() method
|
|
1473
|
+
|
|
1474
|
+
> 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.
|
|
1475
|
+
|
|
1476
|
+
Set the property state: whether to add BOM
|
|
1477
|
+
|
|
1478
|
+
## Signature
|
|
1479
|
+
|
|
1480
|
+
```typescript
|
|
1481
|
+
function setState_AddIntoBom(addIntoBom: boolean): IPCB_PrimitiveComponent;
|
|
1482
|
+
```
|
|
1483
|
+
|
|
1484
|
+
## Parameters
|
|
1485
|
+
|
|
1486
|
+
<table><thead><tr><th>
|
|
1487
|
+
|
|
1488
|
+
Parameter
|
|
1489
|
+
|
|
1490
|
+
</th><th>
|
|
1491
|
+
|
|
1492
|
+
Type
|
|
1493
|
+
|
|
1494
|
+
</th><th>
|
|
1495
|
+
|
|
1496
|
+
Description
|
|
1497
|
+
|
|
1498
|
+
</th></tr></thead>
|
|
1499
|
+
<tbody><tr><td>
|
|
1500
|
+
|
|
1501
|
+
addIntoBom
|
|
1502
|
+
|
|
1503
|
+
</td><td>
|
|
1504
|
+
|
|
1505
|
+
boolean
|
|
1506
|
+
|
|
1507
|
+
</td><td>
|
|
1508
|
+
|
|
1509
|
+
Whether Add to BOM
|
|
1510
|
+
|
|
1511
|
+
</td></tr>
|
|
1512
|
+
</tbody></table>
|
|
1513
|
+
|
|
1514
|
+
## Returns
|
|
1515
|
+
|
|
1516
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
1517
|
+
|
|
1518
|
+
Device primitive object
|
|
1519
|
+
|
|
1520
|
+
## Example
|
|
1521
|
+
|
|
1522
|
+
```javascript
|
|
1523
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1524
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1525
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1526
|
+
|
|
1527
|
+
// 2. 放置测试器件
|
|
1528
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1529
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1530
|
+
const compId = comp.getState_PrimitiveId();
|
|
1531
|
+
|
|
1532
|
+
// 3. 读取修改前的值
|
|
1533
|
+
const before = comp.getState_AddIntoBom();
|
|
1534
|
+
|
|
1535
|
+
// 4. 异步模式改为不加入 BOM 并提交
|
|
1536
|
+
const asyncComp = comp.toAsync();
|
|
1537
|
+
asyncComp.setState_AddIntoBom(false);
|
|
1538
|
+
await asyncComp.done();
|
|
1539
|
+
|
|
1540
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
1541
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
1542
|
+
|
|
1543
|
+
console.log('addIntoBom:', before, '→', refetched[0].getState_AddIntoBom());
|
|
1544
|
+
```
|
|
1545
|
+
|
|
1546
|
+
### setstate_designator
|
|
1547
|
+
|
|
1548
|
+
# IPCB\_PrimitiveComponent.setState\_Designator() method
|
|
1549
|
+
|
|
1550
|
+
> 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.
|
|
1551
|
+
|
|
1552
|
+
Set the property state: designator
|
|
1553
|
+
|
|
1554
|
+
## Signature
|
|
1555
|
+
|
|
1556
|
+
```typescript
|
|
1557
|
+
function setState_Designator(designator: string | undefined): IPCB_PrimitiveComponent;
|
|
1558
|
+
```
|
|
1559
|
+
|
|
1560
|
+
## Parameters
|
|
1561
|
+
|
|
1562
|
+
<table><thead><tr><th>
|
|
1563
|
+
|
|
1564
|
+
Parameter
|
|
1565
|
+
|
|
1566
|
+
</th><th>
|
|
1567
|
+
|
|
1568
|
+
Type
|
|
1569
|
+
|
|
1570
|
+
</th><th>
|
|
1571
|
+
|
|
1572
|
+
Description
|
|
1573
|
+
|
|
1574
|
+
</th></tr></thead>
|
|
1575
|
+
<tbody><tr><td>
|
|
1576
|
+
|
|
1577
|
+
designator
|
|
1578
|
+
|
|
1579
|
+
</td><td>
|
|
1580
|
+
|
|
1581
|
+
string \| undefined
|
|
1582
|
+
|
|
1583
|
+
</td><td>
|
|
1584
|
+
|
|
1585
|
+
Designator
|
|
1586
|
+
|
|
1587
|
+
</td></tr>
|
|
1588
|
+
</tbody></table>
|
|
1589
|
+
|
|
1590
|
+
## Returns
|
|
1591
|
+
|
|
1592
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
1593
|
+
|
|
1594
|
+
Device primitive object
|
|
1595
|
+
|
|
1596
|
+
## Example
|
|
1597
|
+
|
|
1598
|
+
```javascript
|
|
1599
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1600
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1601
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1602
|
+
|
|
1603
|
+
// 2. 放置测试器件(位号由系统自动分配)
|
|
1604
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1605
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1606
|
+
const compId = comp.getState_PrimitiveId();
|
|
1607
|
+
|
|
1608
|
+
// 3. 读取修改前的位号
|
|
1609
|
+
const before = comp.getState_Designator();
|
|
1610
|
+
|
|
1611
|
+
// 4. 异步模式改位号并提交
|
|
1612
|
+
const asyncComp = comp.toAsync();
|
|
1613
|
+
asyncComp.setState_Designator('C101');
|
|
1614
|
+
await asyncComp.done();
|
|
1615
|
+
|
|
1616
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
1617
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
1618
|
+
|
|
1619
|
+
console.log('designator:', before, '→', refetched[0].getState_Designator());
|
|
1620
|
+
```
|
|
1621
|
+
|
|
1622
|
+
### setstate_layer
|
|
1623
|
+
|
|
1624
|
+
# IPCB\_PrimitiveComponent.setState\_Layer() method
|
|
1625
|
+
|
|
1626
|
+
> 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.
|
|
1627
|
+
|
|
1628
|
+
Set the property state: Layer
|
|
1629
|
+
|
|
1630
|
+
## Signature
|
|
1631
|
+
|
|
1632
|
+
```typescript
|
|
1633
|
+
function setState_Layer(layer: TPCB_LayersOfComponent): IPCB_PrimitiveComponent;
|
|
1634
|
+
```
|
|
1635
|
+
|
|
1636
|
+
## Parameters
|
|
1637
|
+
|
|
1638
|
+
<table><thead><tr><th>
|
|
1639
|
+
|
|
1640
|
+
Parameter
|
|
1641
|
+
|
|
1642
|
+
</th><th>
|
|
1643
|
+
|
|
1644
|
+
Type
|
|
1645
|
+
|
|
1646
|
+
</th><th>
|
|
1647
|
+
|
|
1648
|
+
Description
|
|
1649
|
+
|
|
1650
|
+
</th></tr></thead>
|
|
1651
|
+
<tbody><tr><td>
|
|
1652
|
+
|
|
1653
|
+
layer
|
|
1654
|
+
|
|
1655
|
+
</td><td>
|
|
1656
|
+
|
|
1657
|
+
[TPCB\_LayersOfComponent](../types/TPCB_LayersOfComponent.md)
|
|
1658
|
+
|
|
1659
|
+
</td><td>
|
|
1660
|
+
|
|
1661
|
+
Layer
|
|
1662
|
+
|
|
1663
|
+
</td></tr>
|
|
1664
|
+
</tbody></table>
|
|
1665
|
+
|
|
1666
|
+
## Returns
|
|
1667
|
+
|
|
1668
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
1669
|
+
|
|
1670
|
+
Device primitive object
|
|
1671
|
+
|
|
1672
|
+
## Example
|
|
1673
|
+
|
|
1674
|
+
```javascript
|
|
1675
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1676
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1677
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1678
|
+
|
|
1679
|
+
// 2. 放置测试器件(默认贴顶面)
|
|
1680
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1681
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1682
|
+
const compId = comp.getState_PrimitiveId();
|
|
1683
|
+
|
|
1684
|
+
// 3. 读取修改前的所在面
|
|
1685
|
+
const before = comp.getState_Layer();
|
|
1686
|
+
|
|
1687
|
+
// 4. 异步模式翻到底面并提交
|
|
1688
|
+
const asyncComp = comp.toAsync();
|
|
1689
|
+
asyncComp.setState_Layer(2);
|
|
1690
|
+
await asyncComp.done();
|
|
1691
|
+
|
|
1692
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
1693
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
1694
|
+
|
|
1695
|
+
console.log('layer:', before, '→', refetched[0].getState_Layer());
|
|
1696
|
+
```
|
|
1697
|
+
|
|
1698
|
+
### setstate_manufacturer
|
|
1699
|
+
|
|
1700
|
+
# IPCB\_PrimitiveComponent.setState\_Manufacturer() method
|
|
1701
|
+
|
|
1702
|
+
> 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.
|
|
1703
|
+
|
|
1704
|
+
Set the property state: manufacturer
|
|
1705
|
+
|
|
1706
|
+
## Signature
|
|
1707
|
+
|
|
1708
|
+
```typescript
|
|
1709
|
+
function setState_Manufacturer(manufacturer: string | undefined): IPCB_PrimitiveComponent;
|
|
1710
|
+
```
|
|
1711
|
+
|
|
1712
|
+
## Parameters
|
|
1713
|
+
|
|
1714
|
+
<table><thead><tr><th>
|
|
1715
|
+
|
|
1716
|
+
Parameter
|
|
1717
|
+
|
|
1718
|
+
</th><th>
|
|
1719
|
+
|
|
1720
|
+
Type
|
|
1721
|
+
|
|
1722
|
+
</th><th>
|
|
1723
|
+
|
|
1724
|
+
Description
|
|
1725
|
+
|
|
1726
|
+
</th></tr></thead>
|
|
1727
|
+
<tbody><tr><td>
|
|
1728
|
+
|
|
1729
|
+
manufacturer
|
|
1730
|
+
|
|
1731
|
+
</td><td>
|
|
1732
|
+
|
|
1733
|
+
string \| undefined
|
|
1734
|
+
|
|
1735
|
+
</td><td>
|
|
1736
|
+
|
|
1737
|
+
Manufacturer
|
|
1738
|
+
|
|
1739
|
+
</td></tr>
|
|
1740
|
+
</tbody></table>
|
|
1741
|
+
|
|
1742
|
+
## Returns
|
|
1743
|
+
|
|
1744
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
1745
|
+
|
|
1746
|
+
Device primitive object
|
|
1747
|
+
|
|
1748
|
+
## Example
|
|
1749
|
+
|
|
1750
|
+
```javascript
|
|
1751
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1752
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1753
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1754
|
+
|
|
1755
|
+
// 2. 放置测试器件
|
|
1756
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1757
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1758
|
+
const compId = comp.getState_PrimitiveId();
|
|
1759
|
+
|
|
1760
|
+
// 3. 读取修改前的制造商
|
|
1761
|
+
const before = comp.getState_Manufacturer();
|
|
1762
|
+
|
|
1763
|
+
// 4. 异步模式修改制造商并提交
|
|
1764
|
+
const asyncComp = comp.toAsync();
|
|
1765
|
+
asyncComp.setState_Manufacturer('嘉立创示例_MFR');
|
|
1766
|
+
await asyncComp.done();
|
|
1767
|
+
|
|
1768
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
1769
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
1770
|
+
|
|
1771
|
+
console.log('manufacturer:', before, '→', refetched[0].getState_Manufacturer());
|
|
1772
|
+
```
|
|
1773
|
+
|
|
1774
|
+
### setstate_manufacturerid
|
|
1775
|
+
|
|
1776
|
+
# IPCB\_PrimitiveComponent.setState\_ManufacturerId() method
|
|
1777
|
+
|
|
1778
|
+
> 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.
|
|
1779
|
+
|
|
1780
|
+
Set the property state: manufacturer ID
|
|
1781
|
+
|
|
1782
|
+
## Signature
|
|
1783
|
+
|
|
1784
|
+
```typescript
|
|
1785
|
+
function setState_ManufacturerId(manufacturerId: string | undefined): IPCB_PrimitiveComponent;
|
|
1786
|
+
```
|
|
1787
|
+
|
|
1788
|
+
## Parameters
|
|
1789
|
+
|
|
1790
|
+
<table><thead><tr><th>
|
|
1791
|
+
|
|
1792
|
+
Parameter
|
|
1793
|
+
|
|
1794
|
+
</th><th>
|
|
1795
|
+
|
|
1796
|
+
Type
|
|
1797
|
+
|
|
1798
|
+
</th><th>
|
|
1799
|
+
|
|
1800
|
+
Description
|
|
1801
|
+
|
|
1802
|
+
</th></tr></thead>
|
|
1803
|
+
<tbody><tr><td>
|
|
1804
|
+
|
|
1805
|
+
manufacturerId
|
|
1806
|
+
|
|
1807
|
+
</td><td>
|
|
1808
|
+
|
|
1809
|
+
string \| undefined
|
|
1810
|
+
|
|
1811
|
+
</td><td>
|
|
1812
|
+
|
|
1813
|
+
Manufacturer ID
|
|
1814
|
+
|
|
1815
|
+
</td></tr>
|
|
1816
|
+
</tbody></table>
|
|
1817
|
+
|
|
1818
|
+
## Returns
|
|
1819
|
+
|
|
1820
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
1821
|
+
|
|
1822
|
+
Device primitive object
|
|
1823
|
+
|
|
1824
|
+
## Example
|
|
1825
|
+
|
|
1826
|
+
```javascript
|
|
1827
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1828
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1829
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1830
|
+
|
|
1831
|
+
// 2. 放置测试器件
|
|
1832
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1833
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1834
|
+
const compId = comp.getState_PrimitiveId();
|
|
1835
|
+
|
|
1836
|
+
// 3. 读取修改前的制造商编号
|
|
1837
|
+
const before = comp.getState_ManufacturerId();
|
|
1838
|
+
|
|
1839
|
+
// 4. 异步模式修改制造商编号并提交
|
|
1840
|
+
const asyncComp = comp.toAsync();
|
|
1841
|
+
asyncComp.setState_ManufacturerId('MFR-DEMO-001');
|
|
1842
|
+
await asyncComp.done();
|
|
1843
|
+
|
|
1844
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
1845
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
1846
|
+
|
|
1847
|
+
console.log('manufacturerId:', before, '→', refetched[0].getState_ManufacturerId());
|
|
1848
|
+
```
|
|
1849
|
+
|
|
1850
|
+
### setstate_name
|
|
1851
|
+
|
|
1852
|
+
# IPCB\_PrimitiveComponent.setState\_Name() method
|
|
1853
|
+
|
|
1854
|
+
> 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.
|
|
1855
|
+
|
|
1856
|
+
Set the property state: name
|
|
1857
|
+
|
|
1858
|
+
## Signature
|
|
1859
|
+
|
|
1860
|
+
```typescript
|
|
1861
|
+
function setState_Name(name: string | undefined): IPCB_PrimitiveComponent;
|
|
1862
|
+
```
|
|
1863
|
+
|
|
1864
|
+
## Parameters
|
|
1865
|
+
|
|
1866
|
+
<table><thead><tr><th>
|
|
1867
|
+
|
|
1868
|
+
Parameter
|
|
1869
|
+
|
|
1870
|
+
</th><th>
|
|
1871
|
+
|
|
1872
|
+
Type
|
|
1873
|
+
|
|
1874
|
+
</th><th>
|
|
1875
|
+
|
|
1876
|
+
Description
|
|
1877
|
+
|
|
1878
|
+
</th></tr></thead>
|
|
1879
|
+
<tbody><tr><td>
|
|
1880
|
+
|
|
1881
|
+
name
|
|
1882
|
+
|
|
1883
|
+
</td><td>
|
|
1884
|
+
|
|
1885
|
+
string \| undefined
|
|
1886
|
+
|
|
1887
|
+
</td><td>
|
|
1888
|
+
|
|
1889
|
+
Name
|
|
1890
|
+
|
|
1891
|
+
</td></tr>
|
|
1892
|
+
</tbody></table>
|
|
1893
|
+
|
|
1894
|
+
## Returns
|
|
1895
|
+
|
|
1896
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
1897
|
+
|
|
1898
|
+
Device primitive object
|
|
1899
|
+
|
|
1900
|
+
## Example
|
|
1901
|
+
|
|
1902
|
+
```javascript
|
|
1903
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1904
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1905
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1906
|
+
|
|
1907
|
+
// 2. 放置测试器件
|
|
1908
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1909
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1910
|
+
const compId = comp.getState_PrimitiveId();
|
|
1911
|
+
|
|
1912
|
+
// 3. 读取修改前的名称(模板表达式)
|
|
1913
|
+
const before = comp.getState_Name();
|
|
1914
|
+
|
|
1915
|
+
// 4. 异步模式改为固定名称并提交
|
|
1916
|
+
const asyncComp = comp.toAsync();
|
|
1917
|
+
asyncComp.setState_Name('嘉立创示例_Name');
|
|
1918
|
+
await asyncComp.done();
|
|
1919
|
+
|
|
1920
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
1921
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
1922
|
+
|
|
1923
|
+
console.log('name:', before, '→', refetched[0].getState_Name());
|
|
1924
|
+
```
|
|
1925
|
+
|
|
1926
|
+
### setstate_otherproperty
|
|
1927
|
+
|
|
1928
|
+
# IPCB\_PrimitiveComponent.setState\_OtherProperty() method
|
|
1929
|
+
|
|
1930
|
+
> 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.
|
|
1931
|
+
|
|
1932
|
+
Set the property state: other parameters
|
|
1933
|
+
|
|
1934
|
+
## Signature
|
|
1935
|
+
|
|
1936
|
+
```typescript
|
|
1937
|
+
function setState_OtherProperty(
|
|
1938
|
+
otherProperty: Record<string, string | number | boolean>,
|
|
1939
|
+
): IPCB_PrimitiveComponent;
|
|
1940
|
+
```
|
|
1941
|
+
|
|
1942
|
+
## Parameters
|
|
1943
|
+
|
|
1944
|
+
<table><thead><tr><th>
|
|
1945
|
+
|
|
1946
|
+
Parameter
|
|
1947
|
+
|
|
1948
|
+
</th><th>
|
|
1949
|
+
|
|
1950
|
+
Type
|
|
1951
|
+
|
|
1952
|
+
</th><th>
|
|
1953
|
+
|
|
1954
|
+
Description
|
|
1955
|
+
|
|
1956
|
+
</th></tr></thead>
|
|
1957
|
+
<tbody><tr><td>
|
|
1958
|
+
|
|
1959
|
+
otherProperty
|
|
1960
|
+
|
|
1961
|
+
</td><td>
|
|
1962
|
+
|
|
1963
|
+
Record<string, string \| number \| boolean>
|
|
1964
|
+
|
|
1965
|
+
</td><td>
|
|
1966
|
+
|
|
1967
|
+
Other parameters
|
|
1968
|
+
|
|
1969
|
+
</td></tr>
|
|
1970
|
+
</tbody></table>
|
|
1971
|
+
|
|
1972
|
+
## Returns
|
|
1973
|
+
|
|
1974
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
1975
|
+
|
|
1976
|
+
Device primitive object
|
|
1977
|
+
|
|
1978
|
+
## Example
|
|
1979
|
+
|
|
1980
|
+
```javascript
|
|
1981
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
1982
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
1983
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
1984
|
+
|
|
1985
|
+
// 2. 放置测试器件
|
|
1986
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
1987
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
1988
|
+
const compId = comp.getState_PrimitiveId();
|
|
1989
|
+
|
|
1990
|
+
// 3. 读取修改前的参数数量
|
|
1991
|
+
const beforeCount = Object.keys(comp.getState_OtherProperty() || {}).length;
|
|
1992
|
+
|
|
1993
|
+
// 4. 异步模式写入新的参数字典并提交
|
|
1994
|
+
const asyncComp = comp.toAsync();
|
|
1995
|
+
asyncComp.setState_OtherProperty({ 嘉立创示例_Custom: 'ABC', Count: 3 });
|
|
1996
|
+
await asyncComp.done();
|
|
1997
|
+
|
|
1998
|
+
// 5. 从画布重新读取,确认参数已写入(保留现场供观察)
|
|
1999
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2000
|
+
const after = refetched[0].getState_OtherProperty();
|
|
2001
|
+
|
|
2002
|
+
console.log('propertyCount:', beforeCount, '→', Object.keys(after).length);
|
|
2003
|
+
console.log('customValue:', after['嘉立创示例_Custom']);
|
|
2004
|
+
```
|
|
2005
|
+
|
|
2006
|
+
### setstate_primitivelock
|
|
2007
|
+
|
|
2008
|
+
# IPCB\_PrimitiveComponent.setState\_PrimitiveLock() method
|
|
2009
|
+
|
|
2010
|
+
> 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.
|
|
2011
|
+
|
|
2012
|
+
Set the property state: whether it is locked
|
|
2013
|
+
|
|
2014
|
+
## Signature
|
|
2015
|
+
|
|
2016
|
+
```typescript
|
|
2017
|
+
function setState_PrimitiveLock(primitiveLock: boolean): IPCB_PrimitiveComponent;
|
|
2018
|
+
```
|
|
2019
|
+
|
|
2020
|
+
## Parameters
|
|
2021
|
+
|
|
2022
|
+
<table><thead><tr><th>
|
|
2023
|
+
|
|
2024
|
+
Parameter
|
|
2025
|
+
|
|
2026
|
+
</th><th>
|
|
2027
|
+
|
|
2028
|
+
Type
|
|
2029
|
+
|
|
2030
|
+
</th><th>
|
|
2031
|
+
|
|
2032
|
+
Description
|
|
2033
|
+
|
|
2034
|
+
</th></tr></thead>
|
|
2035
|
+
<tbody><tr><td>
|
|
2036
|
+
|
|
2037
|
+
primitiveLock
|
|
2038
|
+
|
|
2039
|
+
</td><td>
|
|
2040
|
+
|
|
2041
|
+
boolean
|
|
2042
|
+
|
|
2043
|
+
</td><td>
|
|
2044
|
+
|
|
2045
|
+
Whether it is locked
|
|
2046
|
+
|
|
2047
|
+
</td></tr>
|
|
2048
|
+
</tbody></table>
|
|
2049
|
+
|
|
2050
|
+
## Returns
|
|
2051
|
+
|
|
2052
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2053
|
+
|
|
2054
|
+
Device primitive object
|
|
2055
|
+
|
|
2056
|
+
## Example
|
|
2057
|
+
|
|
2058
|
+
```javascript
|
|
2059
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2060
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2061
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2062
|
+
|
|
2063
|
+
// 2. 放置测试器件
|
|
2064
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2065
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2066
|
+
const compId = comp.getState_PrimitiveId();
|
|
2067
|
+
|
|
2068
|
+
// 3. 读取修改前的锁定状态
|
|
2069
|
+
const before = comp.getState_PrimitiveLock();
|
|
2070
|
+
|
|
2071
|
+
// 4. 异步模式锁定器件并提交
|
|
2072
|
+
const asyncComp = comp.toAsync();
|
|
2073
|
+
asyncComp.setState_PrimitiveLock(true);
|
|
2074
|
+
await asyncComp.done();
|
|
2075
|
+
|
|
2076
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2077
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2078
|
+
|
|
2079
|
+
console.log('primitiveLock:', before, '→', refetched[0].getState_PrimitiveLock());
|
|
2080
|
+
```
|
|
2081
|
+
|
|
2082
|
+
### setstate_rotation
|
|
2083
|
+
|
|
2084
|
+
# IPCB\_PrimitiveComponent.setState\_Rotation() method
|
|
2085
|
+
|
|
2086
|
+
> 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.
|
|
2087
|
+
|
|
2088
|
+
Set the property state: rotation angle
|
|
2089
|
+
|
|
2090
|
+
## Signature
|
|
2091
|
+
|
|
2092
|
+
```typescript
|
|
2093
|
+
function setState_Rotation(rotation: number): IPCB_PrimitiveComponent;
|
|
2094
|
+
```
|
|
2095
|
+
|
|
2096
|
+
## Parameters
|
|
2097
|
+
|
|
2098
|
+
<table><thead><tr><th>
|
|
2099
|
+
|
|
2100
|
+
Parameter
|
|
2101
|
+
|
|
2102
|
+
</th><th>
|
|
2103
|
+
|
|
2104
|
+
Type
|
|
2105
|
+
|
|
2106
|
+
</th><th>
|
|
2107
|
+
|
|
2108
|
+
Description
|
|
2109
|
+
|
|
2110
|
+
</th></tr></thead>
|
|
2111
|
+
<tbody><tr><td>
|
|
2112
|
+
|
|
2113
|
+
rotation
|
|
2114
|
+
|
|
2115
|
+
</td><td>
|
|
2116
|
+
|
|
2117
|
+
number
|
|
2118
|
+
|
|
2119
|
+
</td><td>
|
|
2120
|
+
|
|
2121
|
+
Rotation angle
|
|
2122
|
+
|
|
2123
|
+
</td></tr>
|
|
2124
|
+
</tbody></table>
|
|
2125
|
+
|
|
2126
|
+
## Returns
|
|
2127
|
+
|
|
2128
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2129
|
+
|
|
2130
|
+
Device primitive object
|
|
2131
|
+
|
|
2132
|
+
## Example
|
|
2133
|
+
|
|
2134
|
+
```javascript
|
|
2135
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2136
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2137
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2138
|
+
|
|
2139
|
+
// 2. 放置测试器件(默认 0 度)
|
|
2140
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2141
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2142
|
+
const compId = comp.getState_PrimitiveId();
|
|
2143
|
+
|
|
2144
|
+
// 3. 读取修改前的旋转角度
|
|
2145
|
+
const before = comp.getState_Rotation();
|
|
2146
|
+
|
|
2147
|
+
// 4. 异步模式旋转 90 度并提交
|
|
2148
|
+
const asyncComp = comp.toAsync();
|
|
2149
|
+
asyncComp.setState_Rotation(90);
|
|
2150
|
+
await asyncComp.done();
|
|
2151
|
+
|
|
2152
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2153
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2154
|
+
|
|
2155
|
+
console.log('rotation:', before, '→', refetched[0].getState_Rotation());
|
|
2156
|
+
```
|
|
2157
|
+
|
|
2158
|
+
### setstate_supplier
|
|
2159
|
+
|
|
2160
|
+
# IPCB\_PrimitiveComponent.setState\_Supplier() method
|
|
2161
|
+
|
|
2162
|
+
> 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.
|
|
2163
|
+
|
|
2164
|
+
Set the property state: supplier
|
|
2165
|
+
|
|
2166
|
+
## Signature
|
|
2167
|
+
|
|
2168
|
+
```typescript
|
|
2169
|
+
function setState_Supplier(supplier: string | undefined): IPCB_PrimitiveComponent;
|
|
2170
|
+
```
|
|
2171
|
+
|
|
2172
|
+
## Parameters
|
|
2173
|
+
|
|
2174
|
+
<table><thead><tr><th>
|
|
2175
|
+
|
|
2176
|
+
Parameter
|
|
2177
|
+
|
|
2178
|
+
</th><th>
|
|
2179
|
+
|
|
2180
|
+
Type
|
|
2181
|
+
|
|
2182
|
+
</th><th>
|
|
2183
|
+
|
|
2184
|
+
Description
|
|
2185
|
+
|
|
2186
|
+
</th></tr></thead>
|
|
2187
|
+
<tbody><tr><td>
|
|
2188
|
+
|
|
2189
|
+
supplier
|
|
2190
|
+
|
|
2191
|
+
</td><td>
|
|
2192
|
+
|
|
2193
|
+
string \| undefined
|
|
2194
|
+
|
|
2195
|
+
</td><td>
|
|
2196
|
+
|
|
2197
|
+
Supplier
|
|
2198
|
+
|
|
2199
|
+
</td></tr>
|
|
2200
|
+
</tbody></table>
|
|
2201
|
+
|
|
2202
|
+
## Returns
|
|
2203
|
+
|
|
2204
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2205
|
+
|
|
2206
|
+
Device primitive object
|
|
2207
|
+
|
|
2208
|
+
## Example
|
|
2209
|
+
|
|
2210
|
+
```javascript
|
|
2211
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2212
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2213
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2214
|
+
|
|
2215
|
+
// 2. 放置测试器件
|
|
2216
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2217
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2218
|
+
const compId = comp.getState_PrimitiveId();
|
|
2219
|
+
|
|
2220
|
+
// 3. 读取修改前的供应商
|
|
2221
|
+
const before = comp.getState_Supplier();
|
|
2222
|
+
|
|
2223
|
+
// 4. 异步模式修改供应商并提交
|
|
2224
|
+
const asyncComp = comp.toAsync();
|
|
2225
|
+
asyncComp.setState_Supplier('嘉立创示例_SUP');
|
|
2226
|
+
await asyncComp.done();
|
|
2227
|
+
|
|
2228
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2229
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2230
|
+
|
|
2231
|
+
console.log('supplier:', before, '→', refetched[0].getState_Supplier());
|
|
2232
|
+
```
|
|
2233
|
+
|
|
2234
|
+
### setstate_supplierid
|
|
2235
|
+
|
|
2236
|
+
# IPCB\_PrimitiveComponent.setState\_SupplierId() method
|
|
2237
|
+
|
|
2238
|
+
> 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.
|
|
2239
|
+
|
|
2240
|
+
Set the property state: supplier ID
|
|
2241
|
+
|
|
2242
|
+
## Signature
|
|
2243
|
+
|
|
2244
|
+
```typescript
|
|
2245
|
+
function setState_SupplierId(supplierId: string | undefined): IPCB_PrimitiveComponent;
|
|
2246
|
+
```
|
|
2247
|
+
|
|
2248
|
+
## Parameters
|
|
2249
|
+
|
|
2250
|
+
<table><thead><tr><th>
|
|
2251
|
+
|
|
2252
|
+
Parameter
|
|
2253
|
+
|
|
2254
|
+
</th><th>
|
|
2255
|
+
|
|
2256
|
+
Type
|
|
2257
|
+
|
|
2258
|
+
</th><th>
|
|
2259
|
+
|
|
2260
|
+
Description
|
|
2261
|
+
|
|
2262
|
+
</th></tr></thead>
|
|
2263
|
+
<tbody><tr><td>
|
|
2264
|
+
|
|
2265
|
+
supplierId
|
|
2266
|
+
|
|
2267
|
+
</td><td>
|
|
2268
|
+
|
|
2269
|
+
string \| undefined
|
|
2270
|
+
|
|
2271
|
+
</td><td>
|
|
2272
|
+
|
|
2273
|
+
Supplier ID
|
|
2274
|
+
|
|
2275
|
+
</td></tr>
|
|
2276
|
+
</tbody></table>
|
|
2277
|
+
|
|
2278
|
+
## Returns
|
|
2279
|
+
|
|
2280
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2281
|
+
|
|
2282
|
+
Device primitive object
|
|
2283
|
+
|
|
2284
|
+
## Example
|
|
2285
|
+
|
|
2286
|
+
```javascript
|
|
2287
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2288
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2289
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2290
|
+
|
|
2291
|
+
// 2. 放置测试器件
|
|
2292
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2293
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2294
|
+
const compId = comp.getState_PrimitiveId();
|
|
2295
|
+
|
|
2296
|
+
// 3. 读取修改前的供应商编号
|
|
2297
|
+
const before = comp.getState_SupplierId();
|
|
2298
|
+
|
|
2299
|
+
// 4. 异步模式修改供应商编号并提交
|
|
2300
|
+
const asyncComp = comp.toAsync();
|
|
2301
|
+
asyncComp.setState_SupplierId('SUP-DEMO-001');
|
|
2302
|
+
await asyncComp.done();
|
|
2303
|
+
|
|
2304
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2305
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2306
|
+
|
|
2307
|
+
console.log('supplierId:', before, '→', refetched[0].getState_SupplierId());
|
|
2308
|
+
```
|
|
2309
|
+
|
|
2310
|
+
### setstate_uniqueid
|
|
2311
|
+
|
|
2312
|
+
# IPCB\_PrimitiveComponent.setState\_UniqueId() method
|
|
2313
|
+
|
|
2314
|
+
> 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.
|
|
2315
|
+
|
|
2316
|
+
Set the property state: unique ID
|
|
2317
|
+
|
|
2318
|
+
## Signature
|
|
2319
|
+
|
|
2320
|
+
```typescript
|
|
2321
|
+
function setState_UniqueId(uniqueId: string | undefined): IPCB_PrimitiveComponent;
|
|
2322
|
+
```
|
|
2323
|
+
|
|
2324
|
+
## Parameters
|
|
2325
|
+
|
|
2326
|
+
<table><thead><tr><th>
|
|
2327
|
+
|
|
2328
|
+
Parameter
|
|
2329
|
+
|
|
2330
|
+
</th><th>
|
|
2331
|
+
|
|
2332
|
+
Type
|
|
2333
|
+
|
|
2334
|
+
</th><th>
|
|
2335
|
+
|
|
2336
|
+
Description
|
|
2337
|
+
|
|
2338
|
+
</th></tr></thead>
|
|
2339
|
+
<tbody><tr><td>
|
|
2340
|
+
|
|
2341
|
+
uniqueId
|
|
2342
|
+
|
|
2343
|
+
</td><td>
|
|
2344
|
+
|
|
2345
|
+
string \| undefined
|
|
2346
|
+
|
|
2347
|
+
</td><td>
|
|
2348
|
+
|
|
2349
|
+
Unique ID
|
|
2350
|
+
|
|
2351
|
+
</td></tr>
|
|
2352
|
+
</tbody></table>
|
|
2353
|
+
|
|
2354
|
+
## Returns
|
|
2355
|
+
|
|
2356
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2357
|
+
|
|
2358
|
+
Device primitive object
|
|
2359
|
+
|
|
2360
|
+
## Example
|
|
2361
|
+
|
|
2362
|
+
```javascript
|
|
2363
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2364
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2365
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2366
|
+
|
|
2367
|
+
// 2. 放置测试器件
|
|
2368
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2369
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2370
|
+
const compId = comp.getState_PrimitiveId();
|
|
2371
|
+
|
|
2372
|
+
// 3. 读取修改前的唯一 ID(默认空字符串)
|
|
2373
|
+
const before = comp.getState_UniqueId();
|
|
2374
|
+
|
|
2375
|
+
// 4. 异步模式设置分组唯一 ID 并提交
|
|
2376
|
+
const asyncComp = comp.toAsync();
|
|
2377
|
+
asyncComp.setState_UniqueId('JLC-DEMO-001');
|
|
2378
|
+
await asyncComp.done();
|
|
2379
|
+
|
|
2380
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2381
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2382
|
+
|
|
2383
|
+
console.log('uniqueId:', JSON.stringify(before), '→', JSON.stringify(refetched[0].getState_UniqueId()));
|
|
2384
|
+
```
|
|
2385
|
+
|
|
2386
|
+
### setstate_x
|
|
2387
|
+
|
|
2388
|
+
# IPCB\_PrimitiveComponent.setState\_X() method
|
|
2389
|
+
|
|
2390
|
+
> 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.
|
|
2391
|
+
|
|
2392
|
+
Set the property state: X coordinate
|
|
2393
|
+
|
|
2394
|
+
## Signature
|
|
2395
|
+
|
|
2396
|
+
```typescript
|
|
2397
|
+
function setState_X(x: number): IPCB_PrimitiveComponent;
|
|
2398
|
+
```
|
|
2399
|
+
|
|
2400
|
+
## Parameters
|
|
2401
|
+
|
|
2402
|
+
<table><thead><tr><th>
|
|
2403
|
+
|
|
2404
|
+
Parameter
|
|
2405
|
+
|
|
2406
|
+
</th><th>
|
|
2407
|
+
|
|
2408
|
+
Type
|
|
2409
|
+
|
|
2410
|
+
</th><th>
|
|
2411
|
+
|
|
2412
|
+
Description
|
|
2413
|
+
|
|
2414
|
+
</th></tr></thead>
|
|
2415
|
+
<tbody><tr><td>
|
|
2416
|
+
|
|
2417
|
+
x
|
|
2418
|
+
|
|
2419
|
+
</td><td>
|
|
2420
|
+
|
|
2421
|
+
number
|
|
2422
|
+
|
|
2423
|
+
</td><td>
|
|
2424
|
+
|
|
2425
|
+
X coordinate
|
|
2426
|
+
|
|
2427
|
+
</td></tr>
|
|
2428
|
+
</tbody></table>
|
|
2429
|
+
|
|
2430
|
+
## Returns
|
|
2431
|
+
|
|
2432
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2433
|
+
|
|
2434
|
+
Device primitive object
|
|
2435
|
+
|
|
2436
|
+
## Example
|
|
2437
|
+
|
|
2438
|
+
```javascript
|
|
2439
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2440
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2441
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2442
|
+
|
|
2443
|
+
// 2. 放置测试器件
|
|
2444
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2445
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2446
|
+
const compId = comp.getState_PrimitiveId();
|
|
2447
|
+
|
|
2448
|
+
// 3. 读取修改前的锚点 X 坐标
|
|
2449
|
+
const before = comp.getState_X();
|
|
2450
|
+
|
|
2451
|
+
// 4. 异步模式向右移动 300mil 并提交
|
|
2452
|
+
const asyncComp = comp.toAsync();
|
|
2453
|
+
asyncComp.setState_X(before + 300);
|
|
2454
|
+
await asyncComp.done();
|
|
2455
|
+
|
|
2456
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2457
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2458
|
+
|
|
2459
|
+
console.log('x:', before, '→', refetched[0].getState_X());
|
|
2460
|
+
```
|
|
2461
|
+
|
|
2462
|
+
### setstate_y
|
|
2463
|
+
|
|
2464
|
+
# IPCB\_PrimitiveComponent.setState\_Y() method
|
|
2465
|
+
|
|
2466
|
+
> 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.
|
|
2467
|
+
|
|
2468
|
+
Set the property state: Y coordinate
|
|
2469
|
+
|
|
2470
|
+
## Signature
|
|
2471
|
+
|
|
2472
|
+
```typescript
|
|
2473
|
+
function setState_Y(y: number): IPCB_PrimitiveComponent;
|
|
2474
|
+
```
|
|
2475
|
+
|
|
2476
|
+
## Parameters
|
|
2477
|
+
|
|
2478
|
+
<table><thead><tr><th>
|
|
2479
|
+
|
|
2480
|
+
Parameter
|
|
2481
|
+
|
|
2482
|
+
</th><th>
|
|
2483
|
+
|
|
2484
|
+
Type
|
|
2485
|
+
|
|
2486
|
+
</th><th>
|
|
2487
|
+
|
|
2488
|
+
Description
|
|
2489
|
+
|
|
2490
|
+
</th></tr></thead>
|
|
2491
|
+
<tbody><tr><td>
|
|
2492
|
+
|
|
2493
|
+
y
|
|
2494
|
+
|
|
2495
|
+
</td><td>
|
|
2496
|
+
|
|
2497
|
+
number
|
|
2498
|
+
|
|
2499
|
+
</td><td>
|
|
2500
|
+
|
|
2501
|
+
Y coordinate
|
|
2502
|
+
|
|
2503
|
+
</td></tr>
|
|
2504
|
+
</tbody></table>
|
|
2505
|
+
|
|
2506
|
+
## Returns
|
|
2507
|
+
|
|
2508
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2509
|
+
|
|
2510
|
+
Device primitive object
|
|
2511
|
+
|
|
2512
|
+
## Example
|
|
2513
|
+
|
|
2514
|
+
```javascript
|
|
2515
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2516
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2517
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2518
|
+
|
|
2519
|
+
// 2. 放置测试器件
|
|
2520
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2521
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2522
|
+
const compId = comp.getState_PrimitiveId();
|
|
2523
|
+
|
|
2524
|
+
// 3. 读取修改前的锚点 Y 坐标
|
|
2525
|
+
const before = comp.getState_Y();
|
|
2526
|
+
|
|
2527
|
+
// 4. 异步模式向上移动 300mil 并提交
|
|
2528
|
+
const asyncComp = comp.toAsync();
|
|
2529
|
+
asyncComp.setState_Y(before + 300);
|
|
2530
|
+
await asyncComp.done();
|
|
2531
|
+
|
|
2532
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2533
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2534
|
+
|
|
2535
|
+
console.log('y:', before, '→', refetched[0].getState_Y());
|
|
2536
|
+
```
|
|
2537
|
+
|
|
2538
|
+
### toasync
|
|
2539
|
+
|
|
2540
|
+
# IPCB\_PrimitiveComponent.toAsync() method
|
|
2541
|
+
|
|
2542
|
+
Convert Primitive to Async primitive
|
|
2543
|
+
|
|
2544
|
+
## Signature
|
|
2545
|
+
|
|
2546
|
+
```typescript
|
|
2547
|
+
function toAsync(): IPCB_PrimitiveComponent;
|
|
2548
|
+
```
|
|
2549
|
+
|
|
2550
|
+
## Returns
|
|
2551
|
+
|
|
2552
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2553
|
+
|
|
2554
|
+
Device primitive object
|
|
2555
|
+
|
|
2556
|
+
## Example
|
|
2557
|
+
|
|
2558
|
+
```javascript
|
|
2559
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2560
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2561
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2562
|
+
|
|
2563
|
+
// 2. 放置测试器件
|
|
2564
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2565
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2566
|
+
const compId = comp.getState_PrimitiveId();
|
|
2567
|
+
|
|
2568
|
+
// 3. 转换为异步图元
|
|
2569
|
+
const asyncComp = comp.toAsync();
|
|
2570
|
+
const isAsyncNow = asyncComp.isAsync();
|
|
2571
|
+
|
|
2572
|
+
// 4. 在异步模式下修改位号并提交
|
|
2573
|
+
asyncComp.setState_Designator('C102');
|
|
2574
|
+
await asyncComp.done();
|
|
2575
|
+
|
|
2576
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2577
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2578
|
+
|
|
2579
|
+
console.log('isAsync:', isAsyncNow);
|
|
2580
|
+
console.log('designator:', refetched[0].getState_Designator());
|
|
2581
|
+
```
|
|
2582
|
+
|
|
2583
|
+
### tosync
|
|
2584
|
+
|
|
2585
|
+
# IPCB\_PrimitiveComponent.toSync() method
|
|
2586
|
+
|
|
2587
|
+
Convert Primitive to Sync primitive
|
|
2588
|
+
|
|
2589
|
+
## Signature
|
|
2590
|
+
|
|
2591
|
+
```typescript
|
|
2592
|
+
function toSync(): IPCB_PrimitiveComponent;
|
|
2593
|
+
```
|
|
2594
|
+
|
|
2595
|
+
## Returns
|
|
2596
|
+
|
|
2597
|
+
[IPCB\_PrimitiveComponent](./IPCB_PrimitiveComponent.md)
|
|
2598
|
+
|
|
2599
|
+
Device primitive object
|
|
2600
|
+
|
|
2601
|
+
## Example
|
|
2602
|
+
|
|
2603
|
+
```javascript
|
|
2604
|
+
// 1. 生成本次运行专用的坐标,避免与之前保留的测试器件重合
|
|
2605
|
+
const x = 20000 + Math.floor(Math.random() * 80000);
|
|
2606
|
+
const y = 20000 + Math.floor(Math.random() * 80000);
|
|
2607
|
+
|
|
2608
|
+
// 2. 放置测试器件
|
|
2609
|
+
const devices = await eda.lib_Device.search('C0402');
|
|
2610
|
+
const comp = await eda.pcb_PrimitiveComponent.create(devices[0], 1, x, y);
|
|
2611
|
+
const compId = comp.getState_PrimitiveId();
|
|
2612
|
+
|
|
2613
|
+
// 3. 读取修改前的位号
|
|
2614
|
+
const before = comp.getState_Designator();
|
|
2615
|
+
|
|
2616
|
+
// 4. 转换为同步图元后直接修改,立即生效(无需 done())
|
|
2617
|
+
const syncComp = comp.toSync();
|
|
2618
|
+
syncComp.setState_Designator('C103');
|
|
2619
|
+
|
|
2620
|
+
// 5. 从画布重新读取,确认修改已生效(保留现场供观察)
|
|
2621
|
+
const refetched = await eda.pcb_PrimitiveComponent.get([compId]);
|
|
2622
|
+
|
|
2623
|
+
console.log('designator:', before, '→', refetched[0].getState_Designator());
|
|
2624
|
+
```
|