@windypro-rourou/dsh-eda 0.1.0 → 0.1.2

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