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