Skip to main content
Glama
JLC_EDA-MCP
by mayjack0312

English | 中文

JLC_EDA-MCP — Complete EasyEDA Pro MCP

面向嘉立创EDA / EasyEDA Pro 的完整 MCP 服务。在官方扩展开发调试 MCP 基础上,自动对接当前 @jlceda/pro-api-types 中 EDA 根对象公开的全部 API,并保留插件导入、调试和浏览器控制台日志能力。

v2.0 当前覆盖

  • 98 个官方 API 命名空间

  • 760 个公开 API 方法,全部生成直接 MCP Tool

  • 6 个 API 管理 / 连接工具

  • 保留 import_plugin、dev_plugin、get_console_logs 3 个扩展开发工具

  • MCP Tool 总数:769

  • 内置仅监听本机的 WebSocket Bridge,无需另启 Bridge 进程

  • 附带官方 bundled-gateway/run-api-gateway_v1.0.6.eext

  • bundled-gateway 按官方 pro-api-sdk v1.6.27 对齐 MCP 调试所需的 Debug 热加载实现(npm run debug / 59394);不镜像 SDK 的项目创建、更新、manifest、模板或发布工具

  • 支持 Full / Compact 两种工具暴露模式

完整统计与边界说明见 docs/COVERAGE_REPORT.md。API 调用方法见 docs/API_USAGE.md。

Related MCP server: a2n-easyeda-mcp

快速开始

1. 环境要求

  • Node.js 20.17.0+

  • Google Chrome 或 Microsoft Edge(插件导入 / 浏览器日志功能使用)

  • 嘉立创EDA / EasyEDA Pro

2. 获取并构建

git clone https://github.com/mayjack0312/JLC_EDA-MCP.git
cd JLC_EDA-MCP
npm install
npm run build
npm test

Windows 也可以直接运行根目录的 START_MCP_WINDOWS.bat。脚本会在缺少依赖时安装依赖,并在每次启动前执行构建,确保 dist 与当前源码一致,然后启动 MCP。

3. 安装 EasyEDA API Gateway

在嘉立创EDA专业版中导入:

bundled-gateway/run-api-gateway_v1.0.6.eext

并允许扩展所需的 WebSocket / 外部交互权限。MCP 内置 Bridge 会在 127.0.0.1:49620-49629 中选择可用端口,仅监听本机。

4. 生成 MCP 配置

npm run mcp-config

会在项目根目录生成 mcp-config.json 和 opencode.json,默认 MCP Server ID 为 jlc-eda-mcp。将对应配置导入所使用的 AI Agent 后重启 Agent。

生成配置默认不会自动批准 760 个 EasyEDA API Tool;是否自动批准高权限工具由客户端侧自行决定。

5. 确认连接

在 MCP Client / Agent 中调用:

easyeda_bridge_status

若 count > 0 且存在已连接窗口,即可开始调用官方 EasyEDA Pro API。多窗口时可使用 easyeda_select_window 指定目标窗口。

API 调用方式

Full 模式(默认)

默认 EASYEDA_TOOL_PROFILE=all,760 个官方方法均注册成独立 MCP Tool。工具名格式为:

eda_<namespace>_<method>

直接 API Tool 统一接受:

  • args:按官方签名顺序排列的 JSON 参数数组

  • windowId:可选;多窗口时指定目标 EDA 窗口

Full 模式适合能够承载较大 tools/list 的 Agent / MCP Client。

Compact 模式

若客户端无法稳定承载 760 个直接 Tool,可设置:

EASYEDA_TOOL_PROFILE=compact

Compact 模式不注册 760 个独立 Tool,但仍可通过以下流程访问全部官方方法:

easyeda_api_search
        ↓
easyeda_api_describe
        ↓
easyeda_api_call

例如查询当前工程信息时,可先搜索 API,再描述 dmt_Project.getCurrentProjectInfo 的完整签名,最后通过 easyeda_api_call 调用。

6 个 API 管理 / 连接工具

Tool

作用

easyeda_bridge_status

查看 Bridge、当前活动窗口及全部已连接 EDA 窗口

easyeda_select_window

多窗口时选择后续 API 调用的目标窗口

easyeda_api_catalog

查看官方 API 类型版本、命名空间和方法统计

easyeda_api_search

按方法名、命名空间、说明或参数类型搜索 API

easyeda_api_describe

获取方法完整签名、参数、返回值、重载和弃用信息

easyeda_api_call

调用自动生成白名单中的任一官方 API

扩展开发 / 调试工具

Tool

作用

import_plugin

自动导入 .eext 插件,并开启浏览器控制台监听

dev_plugin

导入插件并监听 error;检测到错误后返回日志供 Agent 分析

get_console_logs

获取浏览器控制台日志;可独立调用,支持过滤、限制条数和清空缓存

get_console_logs 不再要求必须先调用 import_plugin / dev_plugin。若当前没有监听器,它会自动连接浏览器并启动监听。

官方 SDK Debug 热加载

bundled-gateway 的开发框架已对齐官方 pro-api-sdk v1.6.27。需要 EasyEDA 官方扩展 Debug 热加载时:

cd bundled-gateway
npm install
npm run debug

该模式会在 ws://localhost:59394 启动官方 SDK Debug Server,监听源码变化,自动增量构建、重新打包并向 EasyEDA Pro 官方 Debug 客户端推送新的 .eext。

59394 是 SDK 热加载专用端口;JLC_EDA-MCP API Bridge 仍使用 127.0.0.1:49620-49629。

工作原理

EasyEDA API

AI Agent / MCP Client
        │ stdio
        ▼
JLC_EDA-MCP
        │ localhost WebSocket
        ▼
run-api-gateway_v1.0.6.eext
        │
        ▼
EDA.* 官方 EasyEDA Pro API

API 目录由构建脚本从 @jlceda/pro-api-types 自动生成,不手工维护 760 个工具定义。统一调用只允许目录白名单中的 namespace.method,参数必须为 JSON 可序列化值。

插件开发调试

插件导入 / 控制台日志功能使用 Playwright 控制 Chrome / Edge。登录状态保存在本机 .browser-data/,最多缓存 500 条浏览器控制台日志。

更新官方 SDK / API 目录

当前包使用 @jlceda/pro-api-types 0.4.23。升级版本后执行:

npm install
npm run build
npm test

npm run build 会重新扫描官方类型定义并生成 API Catalog;npm test 会检查 Tool 数量、重复名称和关键管理工具。

环境变量

变量

说明

默认值

EASYEDA_TOOL_PROFILE

all 注册全部直接 API Tool;compact 仅保留管理 / 统一调用入口

all

EASYEDA_API_TIMEOUT_MS

EasyEDA API 单次调用超时

30000

CHROME_PATH

手动指定 Chrome / Chromium / Edge 路径

自动检测

文档

说明

这里的“100% API 覆盖”表示当前官方类型定义中 EDA 根对象公开的方法均进入 API Catalog、统一调用白名单并生成直接 MCP Tool;并不表示所有 API 都能通过纯 JSON 参数远程执行。包含回调函数、浏览器对象、File / Blob,或受特定版本、编辑器状态、权限限制的方法,仍以 EasyEDA Pro 实际运行时行为为准。

本项目基于 EasyEDA 官方 extension-dev-mcp-tools 的扩展开发调试能力继续完善。许可证和第三方声明见 LICENSE 与 NOTICE.txt。

Available Tools

769 tools
dev_pluginA

调试插件到嘉立创EDA并持续监听控制台,直到出现 error 日志时返回错误内容。插件文件通常位于项目的 build/dist 目录下,后缀为 .eext。调用前请先确认 pluginPath 指向该目录下的 .eext 文件。适用于需要自动捕获插件运行错误的调试场景。超时未检测到错误则返回成功。

Inputs: pluginPath (required), timeout, browserPath.

easyeda_api_callB

调用目录内任一官方EasyEDA Pro API。仅允许自动生成白名单中的方法,不接受任意代码。

Inputs: method (required), args, windowId.

easyeda_api_catalogA

列出当前包对接的官方EasyEDA Pro API版本、命名空间和方法数量。

Inputs: no named parameters.

easyeda_api_describeA

获取一个官方EasyEDA Pro API方法的完整签名、重载和说明。

Inputs: method (required).

easyeda_bridge_statusB

检查 EasyEDA API Bridge 和当前连接的嘉立创EDA窗口。

Inputs: no named parameters.

easyeda_select_windowB

当连接了多个嘉立创EDA窗口时,选择后续API调用使用的窗口。

Inputs: windowId (required).

eda_dmt_board_copy_boardC

dmt_Board.copyBoard(sourceBoardName: string) -> Promise<string | undefined> 复制板子 returns: 新板子名称,如若为 undefined 则复制失败

Inputs: args, windowId.

eda_dmt_board_create_boardA

dmt_Board.createBoard(schematicUuid?: string, pcbUuid?: string) -> Promise<string | undefined> 创建板子 returns: 板子名称,如若为 undefined 则创建失败

Inputs: args, windowId.

eda_dmt_board_delete_boardB

dmt_Board.deleteBoard(boardName: string) -> Promise 删除板子 remarks: 如若指定板子不存在,接口将返回 false 的结果,表示操作失败 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_board_get_all_boards_infoB

dmt_Board.getAllBoardsInfo() -> Promise<Array<IDMT_BoardItem>> 获取工程内所有板子的详细属性 returns: 所有板子的详细属性的数组

Inputs: args, windowId.

eda_dmt_board_get_board_infoB

dmt_Board.getBoardInfo(boardName: string) -> Promise<IDMT_BoardItem | undefined> 获取板子的详细属性 returns: 板子的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_board_get_current_board_infoA

dmt_Board.getCurrentBoardInfo() -> Promise<IDMT_BoardItem | undefined> 获取当前板子的详细属性 remarks: 将会获取当前打开且拥有最后输入焦点的原理图、PCB 所关联的板子的详细属性 returns: 板子的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_board_modify_board_nameC

dmt_Board.modifyBoardName(originalBoardName: string, boardName: string) -> Promise 修改板子名称 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_editor_control_activate_documentA

dmt_EditorControl.activateDocument(tabId: string) -> Promise 激活文档 remarks: 切换到指定文档的标签页,并将输入焦点置于其中 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_editor_control_activate_split_screenC

dmt_EditorControl.activateSplitScreen(splitScreenId: string) -> Promise 激活分屏 remarks: 使输入焦点 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_editor_control_close_documentB

dmt_EditorControl.closeDocument(tabId: string) -> Promise 关闭文档 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_editor_control_create_split_screenC

dmt_EditorControl.createSplitScreen(splitScreenType: EDMT_EditorSplitScreenDirection, tabId: string) -> Promise<{ sourceSplitScreenId: string; newSplitScreenId: string } | undefined> 创建分屏 returns: 分屏 ID,sourceSplitScreenId 代表源分屏,newSplitScreenId 代表新分屏

Inputs: args, windowId.

eda_dmt_editor_control_generate_indicator_markersB

dmt_EditorControl.generateIndicatorMarkers(markers: Array<IDMT_IndicatorMarkerShape>, color?: { r: number; g: number; b: number; alpha: number }, lineWidth?: number, zoom?: boolean, tabId?: string) -> Promise 生成指示标记 remarks: 指示标记外形数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil returns: 指示标记生成是否成功,false 表示画布不支持该操作或 tabId 不存在

Inputs: args, windowId.

eda_dmt_editor_control_get_current_rendered_area_imageB

dmt_EditorControl.getCurrentRenderedAreaImage(tabId?: string) -> Promise<Blob | undefined> 获取画布渲染区域图像 returns: - 画布渲染区域的 Blob 格式图像数据

Inputs: args, windowId.

eda_dmt_editor_control_get_split_screen_id_by_tab_idB

dmt_EditorControl.getSplitScreenIdByTabId(tabId: string) -> Promise<string | undefined> 使用标签页 ID 获取分屏 ID returns: 分屏 ID

Inputs: args, windowId.

eda_dmt_editor_control_get_split_screen_treeB

dmt_EditorControl.getSplitScreenTree() -> Promise<IDMT_EditorSplitScreenItem | undefined> 获取编辑器分屏属性树 returns: 编辑器分屏属性树,如若为 undefined,则数据获取失败

Inputs: args, windowId.

eda_dmt_editor_control_get_tabs_by_split_screen_idA

dmt_EditorControl.getTabsBySplitScreenId(splitScreenId: string) -> Promise<Array<IDMT_EditorTabItem>> 获取指定分屏 ID 下的所有标签页 returns: 标签页列表

Inputs: args, windowId.

eda_dmt_editor_control_merge_all_document_from_split_screenA

dmt_EditorControl.mergeAllDocumentFromSplitScreen() -> Promise 合并所有分屏 remarks: 仅当存在子分屏时可用,将会取消所有子分屏,并将所有文档标签页合并到初始分屏内 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_editor_control_move_document_to_split_screenB

dmt_EditorControl.moveDocumentToSplitScreen(tabId: string, splitScreenId: string) -> Promise 将文档移动到指定分屏 remarks: 移动文档后,编辑器分屏属性树可能会出现变化 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_editor_control_open_documentB

dmt_EditorControl.openDocument(documentUuid: string, splitScreenId?: string) -> Promise<string | undefined> 打开文档 returns: 标签页 ID,如若为 undefined,则打开文档失败

Inputs: args, windowId.

eda_dmt_editor_control_open_library_documentC

dmt_EditorControl.openLibraryDocument(libraryUuid: string, libraryType: ELIB_LibraryType.SYMBOL | ELIB_LibraryType.FOOTPRINT, uuid: string, splitScreenId?: string) -> Promise<string | undefined> 打开库符号、封装文档 returns: 标签页 ID,如若为 undefined,则打开文档失败

Inputs: args, windowId.

eda_dmt_editor_control_remove_indicator_markersB

dmt_EditorControl.removeIndicatorMarkers(tabId?: string) -> Promise 移除指示标记 remarks: 本接口会移除所有已生成的指示标记 returns: 指示标记移除是否成功,false 表示画布不支持该操作或 tabId 不存在

Inputs: args, windowId.

eda_dmt_editor_control_tile_all_document_to_split_screenA

dmt_EditorControl.tileAllDocumentToSplitScreen() -> Promise 平铺所有文档 remarks: 仅当不存在子分屏时可用,将会自动为所有已打开的文档标签页创建分屏 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_editor_control_zoomB

dmt_EditorControl.zoom(percent: number, tabId?: string) -> { left: number; right: number; top: number; bottom: number } | false 设置缩放比例 remarks: 在返回数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil returns: 缩放到的区域数据,false 表示画布不支持该缩放操作或 tabId 不存在

Inputs: args, windowId.

eda_dmt_editor_control_zoom_toA

dmt_EditorControl.zoomTo(x?: number, y?: number, scaleRatio?: number, tabId?: string) -> Promise<{ left: number; right: number; top: number; bottom: number } | false> 缩放到坐标 remarks: 在原理图、符号画布坐标单位跨度为 0.01inch,在 PCB、封装画布坐标单位跨度为 mil returns: 缩放到的区域数据,false 表示画布不支持该缩放操作或 tabId 不存在

Inputs: args, windowId.

eda_dmt_editor_control_zoom_to_all_primitivesA

dmt_EditorControl.zoomToAllPrimitives(tabId?: string) -> Promise<{ left: number; right: number; top: number; bottom: number } | false> 缩放到所有图元(适应全部) remarks: 在返回数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil returns: 缩放到的区域数据,false 表示画布不支持该缩放操作或 tabId 不存在

Inputs: args, windowId.

eda_dmt_editor_control_zoom_to_regionC

dmt_EditorControl.zoomToRegion(left: number, right: number, top: number, bottom: number, tabId?: string) -> Promise 缩放到区域 remarks: 在原理图、符号画布坐标单位跨度为 0.01inch,在 PCB、封装画布坐标单位跨度为 mil returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_editor_control_zoom_to_selected_primitivesA

dmt_EditorControl.zoomToSelectedPrimitives(tabId?: string) -> Promise<{ left: number; right: number; top: number; bottom: number } | false> 缩放到已选中图元(适应选中) remarks: 在返回数据中,原理图、符号画布坐标单位跨度为 0.01inch,PCB、封装画布坐标单位跨度为 mil returns: 缩放到的区域数据,false 表示画布不支持该缩放操作或 tabId 不存在

Inputs: args, windowId.

eda_dmt_event_add_editor_tab_event_listenerB

dmt_Event.addEditorTabEventListener(id: string, eventType: 'all' | EDMT_EditorTabEventType, callFn: (eventType: EDMT_EditorTabEventType, props: { documentType: EDMT_EditorDocumentType; title: string; tabId: string }) => void | Promise, onlyOnce?: boolean) -> void 新增编辑器标签页事件监听

Inputs: args, windowId.

eda_dmt_event_is_event_listener_already_existA

dmt_Event.isEventListenerAlreadyExist(id: string) -> boolean 查询事件监听是否存在 returns: 事件监听是否存在

Inputs: args, windowId.

eda_dmt_event_remove_event_listenerC

dmt_Event.removeEventListener(id: string) -> boolean 移除事件监听 returns: 是否移除指定事件监听

Inputs: args, windowId.

eda_dmt_folder_create_folderB

dmt_Folder.createFolder(folderName: string, teamUuid: string, parentFolderUuid?: string, description?: string) -> Promise<string | undefined> 创建文件夹 returns: 文件夹 UUID,如若为 undefined 则创建失败

Inputs: args, windowId.

eda_dmt_folder_delete_folderB

dmt_Folder.deleteFolder(teamUuid: string, folderUuid: string) -> Promise 删除文件夹 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_folder_get_all_folders_uuidB

dmt_Folder.getAllFoldersUuid(teamUuid: string) -> Promise<Array> 获取所有文件夹的 UUID remarks: 本接口忽略层级信息,将会返回所有层级的文件夹的 UUID 并放置于一维数组中 returns: 文件夹 UUID 数组

Inputs: args, windowId.

eda_dmt_folder_get_folder_infoB

dmt_Folder.getFolderInfo(teamUuid: string, folderUuid: string) -> Promise<IDMT_FolderItem | undefined> 获取文件夹详细属性 returns: 文件夹属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_folder_modify_folder_descriptionC

dmt_Folder.modifyFolderDescription(teamUuid: string, folderUuid: string, description?: string) -> Promise 修改文件夹描述 remarks: 修改文件夹描述需要与工作区系统进行交互,修改操作存在延迟,需要短暂等待后才会呈现效果 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_folder_modify_folder_nameB

dmt_Folder.modifyFolderName(teamUuid: string, folderUuid: string, folderName: string) -> Promise 修改文件夹名称 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_folder_move_folder_to_folderC

dmt_Folder.moveFolderToFolder(teamUuid: string, folderUuid: string, parentFolderUuid?: string) -> Promise 移动文件夹 returns: 是否移动成功

Inputs: args, windowId.

eda_dmt_panel_copy_panelB

dmt_Panel.copyPanel(panelUuid: string) -> Promise<string | undefined> 复制面板 returns: 新面板 UUID,如若为 undefined 则复制失败

Inputs: args, windowId.

eda_dmt_panel_create_panelC

dmt_Panel.createPanel() -> Promise<string | undefined> 创建面板 returns: 面板 UUID,如若为 undefined 则创建失败

Inputs: args, windowId.

eda_dmt_panel_delete_panelA

dmt_Panel.deletePanel(panelUuid: string) -> Promise 删除面板 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_panel_get_all_panels_infoC

dmt_Panel.getAllPanelsInfo() -> Promise<Array<IDMT_PanelItem>> 获取工程内所有面板的详细属性 returns: 所有面板的详细属性的数组

Inputs: args, windowId.

eda_dmt_panel_get_current_panel_infoA

dmt_Panel.getCurrentPanelInfo() -> Promise<IDMT_PanelItem | undefined> 获取当前面板的详细属性 remarks: 将会获取当前打开且拥有最后输入焦点的面板的详细属性 returns: 面板的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_panel_get_panel_infoB

dmt_Panel.getPanelInfo(panelUuid: string) -> Promise<IDMT_PanelItem | undefined> 获取面板的详细属性 returns: 面板的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_panel_modify_panel_nameA

dmt_Panel.modifyPanelName(panelUuid: string, panelName: string) -> Promise 修改面板名称 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_pcb_copy_pcbA

dmt_Pcb.copyPcb(pcbUuid: string, boardName?: string) -> Promise<string | undefined> 复制 PCB remarks: 即使此处 PCB 已关联复用模块(在工程库内存在同名的复用模块符号),也不新建复用模块符号,此操作逻辑与当前编辑器前端保持一致 returns: 新 PCB UUID,如若为 undefined 则复制失败

Inputs: args, windowId.

eda_dmt_pcb_create_pcbA

dmt_Pcb.createPcb(boardName?: string) -> Promise<string | undefined> 创建 PCB returns: PCB UUID,如若为 undefined 则创建失败

Inputs: args, windowId.

eda_dmt_pcb_delete_pcbA

dmt_Pcb.deletePcb(pcbUuid: string) -> Promise 删除 PCB remarks: 如若 PCB 已关联复用模块(在工程库内存在同名的复用模块符号),则删除 PCB 时将同步删除关联的原理图和复用模块符号,复用模块符号不可删除则跳过 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_pcb_get_all_pcbs_infoC

dmt_Pcb.getAllPcbsInfo() -> Promise<Array<IDMT_PcbItem>> 获取工程内所有 PCB 的详细属性 returns: 所有 PCB 的详细属性的数组

Inputs: args, windowId.

eda_dmt_pcb_get_current_pcb_infoB

dmt_Pcb.getCurrentPcbInfo() -> Promise<IDMT_PcbItem | undefined> 获取当前 PCB 的详细属性 remarks: 将会获取当前打开且拥有最后输入焦点的 PCB 的详细属性 returns: PCB 的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_pcb_get_pcb_infoB

dmt_Pcb.getPcbInfo(pcbUuid: string) -> Promise<IDMT_PcbItem | undefined> 获取 PCB 的详细属性 returns: PCB 的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_pcb_modify_pcb_nameA

dmt_Pcb.modifyPcbName(pcbUuid: string, pcbName: string) -> Promise 修改 PCB 名称 remarks: 如若 PCB 已关联复用模块(在工程库内存在同名的复用模块符号),则修改名称时将同步修改复用模块符号名称与关联原理图名称 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_project_copy_projectB

dmt_Project.copyProject(sourceProjectUuid: string, targetTeamUuid?: string, targetFolderUuid?: string, newProjectFriendlyName?: string, newProjectName?: string) -> string | undefined 复制工程 returns: 新工程 UUID,如若为 undefined 则复制失败

Inputs: args, windowId.

eda_dmt_project_create_projectB

dmt_Project.createProject(projectFriendlyName: string, projectName?: string, teamUuid?: string, folderUuid?: string, description?: string, collaborationMode?: EDMT_ProjectCollaborationMode) -> Promise<string | undefined> 创建工程 returns: 工程 UUID,如若为 undefined 则创建失败

Inputs: args, windowId.

eda_dmt_project_delete_projectB

dmt_Project.deleteProject(projectUuid: string) -> boolean 删除工程 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_project_get_all_projects_uuidA

dmt_Project.getAllProjectsUuid(teamUuid?: string, folderUuid?: string, workspaceUuid?: string) -> Promise<Array> 获取所有工程的 UUID remarks: 如若指定 teamUuid,则获取指定团队下的所有工程;

如若指定 folderUuid,则获取指定文件夹下的所有工程;

teamUuid、folderUuid 需要且仅允许指定其一,如若都指定则只取 folderUuid;

如若指定 workspaceUuid,则在指定 Workspace 下获取指定团队/文件夹下的所有工程 returns: 工程 UUID 数组

Inputs: args, windowId.

eda_dmt_project_get_current_project_infoA

dmt_Project.getCurrentProjectInfo() -> Promise<IDMT_ProjectItem | undefined> 获取当前工程的详细属性 remarks: 将会获取当前打开且拥有最后输入焦点的原理图、PCB、面板所关联的工程的详细属性 returns: 工程属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_project_get_project_infoB

dmt_Project.getProjectInfo(projectUuid: string) -> Promise<IDMT_BriefProjectItem | undefined> 获取工程属性 returns: 简略的工程属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_project_modify_project_collaboration_modeB

dmt_Project.modifyProjectCollaborationMode(projectUuid: string, collaborationMode: EDMT_ProjectCollaborationMode) -> boolean 修改工程协作模式 remarks: 如若团队权限无需工程设置协作模式,则将返回 false returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_project_modify_project_descriptionB

dmt_Project.modifyProjectDescription(projectUuid: string, description?: string) -> boolean 修改工程描述 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_project_modify_project_friendly_nameB

dmt_Project.modifyProjectFriendlyName(projectUuid: string, projectFriendlyName: string) -> boolean 修改工程友好名称 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_project_move_projectC

dmt_Project.moveProject(projectUuid: string, teamUuid: string, folderUuid?: string) -> boolean 移动工程 returns: 是否移动成功

Inputs: args, windowId.

eda_dmt_project_move_project_to_folderB

dmt_Project.moveProjectToFolder(projectUuid: string, folderUuid?: string) -> Promise 移动工程到文件夹 returns: 是否移动成功

Inputs: args, windowId.

eda_dmt_project_open_projectA

dmt_Project.openProject(projectUuid: string) -> Promise 打开工程 remarks: 本操作将会在 EDA 前端打开指定工程,如若原先已打开其它工程且有未保存的变更,执行本操作将直接丢失所有未保存的数据 returns: 是否成功打开工程

Inputs: args, windowId.

eda_dmt_schematic_copy_schematicB

dmt_Schematic.copySchematic(schematicUuid: string, boardName?: string) -> Promise<string | undefined> 复制原理图 remarks: 如若原理图已关联复用模块(在工程库内存在同名的复用模块符号),则复制原理图时将同步新建复用模块符号 returns: 新原理图 UUID,如若为 undefined 则复制失败

Inputs: args, windowId.

eda_dmt_schematic_copy_schematic_pageC

dmt_Schematic.copySchematicPage(schematicPageUuid: string, schematicUuid?: string) -> Promise<string | undefined> 复制原理图图页 returns: 新原理图图页 UUID,如若为 undefined 则复制失败

Inputs: args, windowId.

eda_dmt_schematic_create_schematicB

dmt_Schematic.createSchematic(boardName?: string) -> Promise<string | undefined> 创建原理图 returns: 原理图 UUID,如若为 undefined 则创建失败

Inputs: args, windowId.

eda_dmt_schematic_create_schematic_pageB

dmt_Schematic.createSchematicPage(schematicUuid: string) -> Promise<string | undefined> 创建原理图图页 returns: 原理图图页 UUID,如若为 undefined 则创建失败

Inputs: args, windowId.

eda_dmt_schematic_delete_schematicA

dmt_Schematic.deleteSchematic(schematicUuid: string) -> Promise 删除原理图 remarks: 如若原理图已关联复用模块(在工程库内存在同名的复用模块符号),则删除原理图时将同步删除关联的 PCB 和复用模块符号,复用模块符号不可删除则跳过 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_schematic_delete_schematic_pageB

dmt_Schematic.deleteSchematicPage(schematicPageUuid: string) -> Promise 删除原理图图页 returns: 操作是否成功

Inputs: args, windowId.

eda_dmt_schematic_get_all_schematic_pages_infoB

dmt_Schematic.getAllSchematicPagesInfo() -> Promise<Array<IDMT_SchematicPageItem>> 获取工程内所有原理图图页的详细属性 returns: 所有原理图图页的详细属性的数组

Inputs: args, windowId.

eda_dmt_schematic_get_all_schematics_infoC

dmt_Schematic.getAllSchematicsInfo() -> Promise<Array<IDMT_SchematicItem>> 获取工程内所有原理图的详细属性 returns: 所有原理图的详细属性的数组

Inputs: args, windowId.

eda_dmt_schematic_get_current_schematic_all_schematic_pages_infoC

dmt_Schematic.getCurrentSchematicAllSchematicPagesInfo() -> Promise<Array<IDMT_SchematicPageItem>> 获取当前原理图内所有原理图图页的详细属性 returns: 所有原理图图页的详细属性的数组

Inputs: args, windowId.

eda_dmt_schematic_get_current_schematic_infoA

dmt_Schematic.getCurrentSchematicInfo() -> Promise<IDMT_SchematicItem | undefined> 获取当前原理图的详细属性 remarks: 将会获取当前打开且拥有最后输入焦点的原理图图页所关联的原理图的详细属性 returns: 原理图的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_schematic_get_current_schematic_page_infoB

dmt_Schematic.getCurrentSchematicPageInfo() -> Promise<IDMT_SchematicPageItem | undefined> 获取当前原理图图页的详细属性 remarks: 将会获取当前打开且拥有最后输入焦点的原理图图页的详细属性 returns: 原理图图页的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_schematic_get_schematic_infoB

dmt_Schematic.getSchematicInfo(schematicUuid: string) -> Promise<IDMT_SchematicItem | undefined> 获取原理图的详细属性 returns: 原理图的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_schematic_get_schematic_page_infoB

dmt_Schematic.getSchematicPageInfo(schematicPageUuid: string) -> Promise<IDMT_SchematicPageItem | undefined> 获取原理图图页的详细属性 returns: 原理图图页的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_schematic_modify_schematic_nameA

dmt_Schematic.modifySchematicName(schematicUuid: string, schematicName: string) -> Promise 修改原理图名称 remarks: 如若原理图已关联复用模块(在工程库内存在同名的复用模块符号),则修改名称时将同步修改复用模块符号名称与关联 PCB 名称 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_schematic_modify_schematic_page_nameB

dmt_Schematic.modifySchematicPageName(schematicPageUuid: string, schematicPageName: string) -> Promise 修改原理图图页名称 returns: 是否修改成功

Inputs: args, windowId.

eda_dmt_schematic_modify_schematic_page_title_blockA

dmt_Schematic.modifySchematicPageTitleBlock(showTitleBlock?: boolean, titleBlockData?: Record<string, { showTitle?: boolean; showValue?: boolean; value?: any }>) -> Promise 修改原理图图页明细表 remarks: titleBlockData 仅需要传入任何需要修改的明细项作为 key,并传入其需要修改的值,任何无法识别的明细项将被忽略,任何未传入的项和值将保持默认状态 returns: 修改操作是否成功,如若未传入 showTitleBlock 和 titleBlockData 将返回 false;请注意,如若存在无法识别的明细项但程序并未出错,将返回 true 的结果,因为无法识别的明细项被忽略

Inputs: args, windowId.

eda_dmt_schematic_reorder_schematic_pagesC

dmt_Schematic.reorderSchematicPages(schematicUuid: string, schematicPageItemsArray: Array<IDMT_SchematicPageItem>) -> Promise 重新排序原理图图页 returns: 排序操作是否成功

Inputs: args, windowId.

eda_dmt_select_control_get_current_document_infoA

dmt_SelectControl.getCurrentDocumentInfo() -> Promise<IDMT_EditorDocumentItem | undefined> 获取当前文档的属性 remarks: 将会获取当前打开且拥有最后输入焦点的文档的文档类型、UUID、所属工程的 UUID 或所属库的 UUID returns: 文档类型、UUID、所属工程的 UUID、所属库的 UUID 组成的对象,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_team_get_all_involved_team_infoB

dmt_Team.getAllInvolvedTeamInfo() -> Promise<Array<IDMT_TeamItem>> 获取所有参与的团队的详细属性 returns: 所有参与的团队的详细属性

Inputs: args, windowId.

eda_dmt_team_get_all_teams_infoB

dmt_Team.getAllTeamsInfo() -> Promise<Array<IDMT_TeamItem>> 获取所有直接团队的详细属性 remarks: 个人本质上也是一个名为 个人 的团队 returns: 所有团队的详细属性

Inputs: args, windowId.

eda_dmt_team_get_current_team_infoA

dmt_Team.getCurrentTeamInfo() -> Promise<IDMT_TeamItem | undefined> 获取当前团队的详细属性 remarks: 将会获取当前打开且拥有最后输入焦点的原理图、PCB、面板所关联的工程的所属团队的详细属性 returns: 团队的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_workspace_get_all_workspaces_infoC

dmt_Workspace.getAllWorkspacesInfo() -> Promise<Array<IDMT_WorkspaceItem>> 获取所有工作区的详细属性 returns: 所有工作区的详细属性

Inputs: args, windowId.

eda_dmt_workspace_get_current_workspace_infoC

dmt_Workspace.getCurrentWorkspaceInfo() -> Promise<IDMT_WorkspaceItem | undefined> 获取当前工作区的详细属性 remarks: 将会获取当前工作区的详细属性 returns: 工作区的详细属性,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_dmt_workspace_toggle_to_workspaceC

dmt_Workspace.toggleToWorkspace(workspaceUuid?: string) -> Promise 切换到工作区 returns: 切换操作是否成功

Inputs: args, windowId.

eda_lib_3_dmodel_copyC

lib_3DModel.copy(modelUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array, newModelName?: string) -> Promise<string | undefined> 复制 3D 模型 returns: 目标库内新 3D 模型的 UUID

Inputs: args, windowId.

eda_lib_3_dmodel_createB

lib_3DModel.create(libraryUuid: string, modelFile: Blob, classification?: ILIB_ClassificationIndex | Array, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.METER | ESYS_Unit.MIL | ESYS_Unit.INCH) -> Promise<Array | undefined> 创建 3D 模型 remarks: 传入的 modelFile 可以为多个模型文件的压缩包,EDA 将会自动提取多个模型 returns: 创建的所有 3D 模型的 UUID

Inputs: args, windowId.

eda_lib_3_dmodel_deleteA

lib_3DModel.delete(modelUuid: string, libraryUuid: string) -> Promise 删除 3D 模型 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_3_dmodel_getB

lib_3DModel.get(modelUuid: string, libraryUuid?: string) -> Promise<ILIB_3DModelItem | undefined> 获取 3D 模型的所有属性 returns: 3D 模型属性

Inputs: args, windowId.

eda_lib_3_dmodel_modifyB

lib_3DModel.modify(modelUuid: string, libraryUuid: string, modelName?: string, classification?: ILIB_ClassificationIndex | Array | null, description?: string | null) -> Promise 修改 3D 模型 remarks: 如希望清除某些属性,则将其的值设置为 null returns: 操作是否成功

Inputs: args, windowId.

eda_lib_cbb_copyC

lib_Cbb.copy(cbbUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array, newCbbName?: string) -> Promise<string | undefined> 复制复用模块 returns: 目标库内新复用模块的 UUID

Inputs: args, windowId.

eda_lib_cbb_createB

lib_Cbb.create(libraryUuid: string, cbbName: string, classification?: ILIB_ClassificationIndex | Array, description?: string) -> Promise<string | undefined> 创建复用模块 returns: 复用模块 UUID

Inputs: args, windowId.

eda_lib_cbb_deleteB

lib_Cbb.delete(cbbUuid: string, libraryUuid: string) -> Promise 删除复用模块 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_cbb_getC

lib_Cbb.get(cbbUuid: string, libraryUuid?: string) -> Promise<ILIB_CbbItem | undefined> 获取复用模块的所有属性 returns: 复用模块属性

Inputs: args, windowId.

eda_lib_cbb_modifyB

lib_Cbb.modify(cbbUuid: string, libraryUuid: string, cbbName?: string, classification?: ILIB_ClassificationIndex | Array | null, description?: string | null) -> Promise 修改复用模块 remarks: 如希望清除某些属性,则将其的值设置为 null returns: 操作是否成功

Inputs: args, windowId.

eda_lib_cbb_open_project_in_editorA

lib_Cbb.openProjectInEditor(cbbUuid: string, libraryUuid: string) -> Promise 在编辑器打开复用模块工程 remarks: 本操作将会在 EDA 前端打开模块工程,如若原先已打开其它工程且有未保存的变更,执行本操作将直接丢失所有未保存的数据

Inputs: args, windowId.

eda_lib_cbb_open_symbol_in_editorC

lib_Cbb.openSymbolInEditor(cbbUuid: string, libraryUuid: string, splitScreenId?: string) -> Promise<string | undefined> 在编辑器打开复用模块符号

Inputs: args, windowId.

eda_lib_classification_create_primaryB

lib_Classification.createPrimary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string) -> Promise<ILIB_ClassificationIndex | undefined> 创建一级分类 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 分类索引 [已弃用]

Inputs: args, windowId.

eda_lib_classification_create_secondaryC

lib_Classification.createSecondary(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationName: string) -> Promise<ILIB_ClassificationIndex | undefined> 创建二级分类 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 分类索引 [已弃用]

Inputs: args, windowId.

eda_lib_classification_delete_by_indexB

lib_Classification.deleteByIndex(classificationIndex: ILIB_ClassificationIndex) -> Promise 删除指定索引的分类 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 操作是否成功 [已弃用]

Inputs: args, windowId.

eda_lib_classification_delete_by_uuidA

lib_Classification.deleteByUuid(libraryUuid: string, classificationUuid: string) -> Promise 删除指定 UUID 的分类 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 操作是否成功 [已弃用]

Inputs: args, windowId.

eda_lib_classification_get_all_classification_treeA

lib_Classification.getAllClassificationTree(libraryUuid: string, libraryType: ELIB_LibraryType) -> Promise<Array<{ name: string; uuid: string; children?: Array<{ name: string; uuid: string }> | undefined }>> 获取所有分类信息组成的树 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 分类信息组成的树结构数据 [已弃用]

Inputs: args, windowId.

eda_lib_classification_get_index_by_nameB

lib_Classification.getIndexByName(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationName: string, secondaryClassificationName?: string) -> Promise<ILIB_ClassificationIndex | undefined> 获取指定名称的分类的分类索引 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 分类索引 [已弃用]

Inputs: args, windowId.

eda_lib_classification_get_name_by_indexC

lib_Classification.getNameByIndex(classificationIndex: ILIB_ClassificationIndex) -> Promise<{ primaryClassificationName: string; secondaryClassificationName?: string | undefined } | undefined> 获取指定索引的分类的名称 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 两级分类的名称 [已弃用]

Inputs: args, windowId.

eda_lib_classification_get_name_by_uuidA

lib_Classification.getNameByUuid(libraryUuid: string, libraryType: ELIB_LibraryType, primaryClassificationUuid: string, secondaryClassificationUuid?: string) -> Promise<{ primaryClassificationName: string; secondaryClassificationName?: string | undefined } | undefined> 获取指定 UUID 的分类的名称 deprecated: since EDA v3.2; dropped EDA v3.3 returns: 两级分类的名称 [已弃用]

Inputs: args, windowId.

eda_lib_device_copyB

lib_Device.copy(deviceUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array, newDeviceName?: string) -> Promise<string | undefined> 复制器件 returns: 目标库内新器件的 UUID

Inputs: args, windowId.

eda_lib_device_createB

lib_Device.create(libraryUuid: string, deviceName: string, classification?: ILIB_ClassificationIndex | Array, association?: { symbolType?: ELIB_SymbolType; symbolUuid?: string; symbol?: { uuid: string; libraryUuid: string }; footprintUuid?: string; footprint?: { uuid: string; libraryUuid: string }; model3D?: { uuid: string; libraryUuid: string }; imageData?: File | Blob }, description?: string, property?: ILIB_DeviceExtendPropertyItem) -> Promise<string | undefined> 创建器件 returns: 器件 UUID

Inputs: args, windowId.

eda_lib_device_deleteB

lib_Device.delete(deviceUuid: string, libraryUuid: string) -> Promise 删除器件 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_device_getB

lib_Device.get(deviceUuid: string, libraryUuid?: string) -> Promise<ILIB_DeviceItem | undefined> 获取器件的所有属性 returns: 器件属性

Inputs: args, windowId.

eda_lib_device_get_by_lcsc_idsA

lib_Device.getByLcscIds(lcscIds: string, libraryUuid?: string, allowMultiMatch?: T) -> Promise<T extends true ? ILIB_DeviceSearchItem | undefined : Array<ILIB_DeviceSearchItem>> 使用立创 C 编号获取器件 remarks: 默认情况下,如果在同一个库内匹配到多个相同 C 编号的器件,将只会返回第一个结果;

如果希望返回多个结果,请将 allowMultiMatch 置为 true;

私有化部署环境暂无法使用本接口 returns: 搜索到的器件属性

Inputs: args, windowId.

eda_lib_device_modifyA

lib_Device.modify(deviceUuid: string, libraryUuid: string, deviceName?: string, classification?: ILIB_ClassificationIndex | Array | null, association?: { symbolUuid?: string; symbol?: { uuid: string; libraryUuid: string }; footprintUuid?: string | null; footprint?: { uuid: string; libraryUuid: string } | null; model3D?: { uuid: string; libraryUuid: string } | null; imageData?: File | Blob | null }, description?: string | null, property?: { name?: string | null; designator?: string; addIntoBom?: boolean; addIntoPcb?: boolean; net?: string; manufacturer?: string | null; manufacturerId?: string | null; supplier?: string | null; supplierId?: string | null; otherProperty?: Record<string, boolean | number | string | undefined | null> }) -> Promise 修改器件 remarks: 如希望清除某些属性,则将其的值设置为 null returns: 操作是否成功

Inputs: args, windowId.

eda_lib_device_search_by_propertiesC

lib_Device.searchByProperties(properties: ILIB_DevicePropertiesForSearch, libraryUuid?: string, classification?: Array, symbolType?: ELIB_SymbolType, itemsOfPage?: number, page?: number) -> Promise<Array<ILIB_DeviceSearchItem>> 使用属性精确搜索器件 returns: 搜索到的器件属性的列表

Inputs: args, windowId.

eda_lib_footprint_copyB

lib_Footprint.copy(footprintUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array, newFootprintName?: string) -> Promise<string | undefined> 复制封装 returns: 目标库内新封装的 UUID

Inputs: args, windowId.

eda_lib_footprint_createC

lib_Footprint.create(libraryUuid: string, footprintName: string, classification?: ILIB_ClassificationIndex | Array, description?: string, otherProperty?: Record<string, boolean | number | string | undefined>) -> Promise<string | undefined> 创建封装 returns: 封装 UUID

Inputs: args, windowId.

eda_lib_footprint_deleteB

lib_Footprint.delete(footprintUuid: string, libraryUuid: string) -> Promise 删除封装 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_footprint_getB

lib_Footprint.get(footprintUuid: string, libraryUuid?: string) -> Promise<ILIB_FootprintItem | undefined> 获取封装的所有属性 returns: 封装属性

Inputs: args, windowId.

eda_lib_footprint_get_render_imageC

lib_Footprint.getRenderImage(source: { footprintUuid: string; libraryUuid: string }) -> Promise<Blob | undefined> 获取封装渲染图 returns: 封装渲染图

Inputs: args, windowId.

eda_lib_footprint_modifyB

lib_Footprint.modify(footprintUuid: string, libraryUuid: string, footprintName?: string, classification?: ILIB_ClassificationIndex | Array | null, description?: string | null, otherProperty?: Record<string, boolean | number | string | undefined | null>) -> Promise 修改封装 remarks: 如希望清除某些属性,则将其的值设置为 null returns: 操作是否成功

Inputs: args, windowId.

eda_lib_footprint_open_in_editorB

lib_Footprint.openInEditor(footprintUuid: string, libraryUuid: string, splitScreenId?: string) -> Promise<string | undefined> 在编辑器打开文档

Inputs: args, windowId.

eda_lib_footprint_search_by_propertiesC

lib_Footprint.searchByProperties(properties: ILIB_FootprintPropertiesForSearch, libraryUuid?: string) -> Promise<Array<ILIB_FootprintSearchItem>> 使用属性精确搜索封装 returns: 搜索到的封装属性的列表

Inputs: args, windowId.

eda_lib_footprint_update_document_sourceC

lib_Footprint.updateDocumentSource(footprintUuid: string, libraryUuid: string, documentSource: string) -> Promise<boolean | undefined> 更新封装的文档源码 returns: 是否更新成功

Inputs: args, windowId.

eda_lib_libraries_list_get_all_libraries_listB

lib_LibrariesList.getAllLibrariesList() -> Promise<Array<ILIB_LibraryInfo>> 获取所有库的列表 returns: 库信息列表

Inputs: args, windowId.

eda_lib_libraries_list_get_favorite_library_uuidA

lib_LibrariesList.getFavoriteLibraryUuid() -> Promise<string | undefined> 获取收藏库的 UUID remarks: 将会获取当前编辑器工作区下的收藏库的 UUID returns: 收藏库的 UUID

Inputs: args, windowId.

eda_lib_libraries_list_get_personal_library_uuidB

lib_LibrariesList.getPersonalLibraryUuid() -> Promise<string | undefined> 获取个人库的 UUID remarks: 将会获取当前编辑器工作区下的个人库的 UUID,在私有部署环境下不存在个人库,此接口将永远返回 undefined returns: 个人库的 UUID

Inputs: args, windowId.

eda_lib_libraries_list_get_project_library_uuidB

lib_LibrariesList.getProjectLibraryUuid() -> Promise<string | undefined> 获取工程库的 UUID remarks: 在未打开工程的情况下调用将返回 undefined returns: 工程库的 UUID

Inputs: args, windowId.

eda_lib_libraries_list_get_system_library_uuidC

lib_LibrariesList.getSystemLibraryUuid() -> Promise<string | undefined> 获取系统库的 UUID returns: 系统库的 UUID

Inputs: args, windowId.

eda_lib_libraries_list_register_extend_libraryA

lib_LibrariesList.registerExtendLibrary(title: string, libraryFunctions: { device?: ILIB_ExtendLibraryDeviceFunctions; symbol?: ILIB_ExtendLibrarySymbolFunctions; footprint?: ILIB_ExtendLibraryFootprintFunctions; cbb?: ILIB_ExtendLibraryCbbFunctions; model3d?: ILIB_ExtendLibrary3DModelFunctions }) -> Promise<string | undefined> 注册外部库 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 库 UUID

Inputs: args, windowId.

eda_lib_panel_library_copyC

lib_PanelLibrary.copy(panelLibraryUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array, newPanelLibraryName?: string) -> Promise<string | undefined> 复制面板库 returns: 目标库内新面板库的 UUID

Inputs: args, windowId.

eda_lib_panel_library_createC

lib_PanelLibrary.create(libraryUuid: string, panelLibraryName: string, classification?: ILIB_ClassificationIndex | Array, description?: string) -> Promise<string | undefined> 创建面板库 returns: 面板库 UUID

Inputs: args, windowId.

eda_lib_panel_library_deleteA

lib_PanelLibrary.delete(panelLibraryUuid: string, libraryUuid: string) -> Promise 删除面板库 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_panel_library_getC

lib_PanelLibrary.get(panelLibraryUuid: string, libraryUuid?: string) -> Promise<ILIB_PanelLibraryItem | undefined> 获取面板库的所有属性 returns: 面板库属性

Inputs: args, windowId.

eda_lib_panel_library_modifyA

lib_PanelLibrary.modify(panelLibraryUuid: string, libraryUuid: string, panelLibraryName?: string, classification?: ILIB_ClassificationIndex | Array | null, description?: string | null) -> Promise 修改面板库 remarks: 如希望清除某些属性,则将其的值设置为 null returns: 操作是否成功

Inputs: args, windowId.

eda_lib_panel_library_open_in_editorC

lib_PanelLibrary.openInEditor(panelLibraryUuid: string, libraryUuid: string, splitScreenId?: string) -> Promise<string | undefined> 在编辑器打开文档

Inputs: args, windowId.

eda_lib_select_control_get_selected_library_row_infoA

lib_SelectControl.getSelectedLibraryRowInfo() -> Promise<ILIB_LibraryItem | undefined> 获取当前底部库选中行的信息 remarks: 将会获取当前底部库选中行的库类型、UUID、所属库 UUID returns: 库属性对象,如若为 undefined 则获取失败

Inputs: args, windowId.

eda_lib_simulation_model_copyC

lib_SimulationModel.copy(simulationModelUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: Array, newSimulationModelName?: string) -> Promise<string | undefined> 复制仿真模型 remarks: ADD since EDA v3.2.167 returns: 目标库内新仿真模型的 UUID

Inputs: args, windowId.

eda_lib_simulation_model_createA

lib_SimulationModel.create(libraryUuid: string, model: { modelType: 'Ngspice' } & ({ modelFile: Blob; modelName?: string; modelCategory?: string; modelPin?: string } | { modelData: string; modelName?: string; modelCategory?: string; modelPin?: string }), classification?: Array, description?: string) -> Promise<string | undefined> 创建仿真模型 remarks: ADD since EDA v3.2.167 returns: 仿真模型 UUID

Inputs: args, windowId.

eda_lib_simulation_model_deleteC

lib_SimulationModel.delete(simulationModelUuid: string, libraryUuid: string) -> Promise 删除仿真模型 remarks: ADD since EDA v3.2.167 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_simulation_model_getA

lib_SimulationModel.get(simulationModelUuid: string, libraryUuid?: string) -> Promise<ILIB_SimulationModelItem | undefined> 获取仿真模型的所有属性 remarks: 注意:本接口仅私有化部署版本有效,如若在其他版本调用将始终 throw Error

ADD since EDA v3.2.167 returns: 仿真模型属性

Inputs: args, windowId.

eda_lib_simulation_model_modifyA

lib_SimulationModel.modify(simulationModelUuid: string, libraryUuid: string, modelProps?: { modelName?: string; modelCategory?: string; modelPin?: string }, classification?: Array | null, description?: string | null) -> Promise 修改仿真模型 remarks: 如希望清除某些属性,则将其的值设置为 null

ADD since EDA v3.2.167 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_symbol_copyC

lib_Symbol.copy(symbolUuid: string, libraryUuid: string, targetLibraryUuid: string, targetClassification?: ILIB_ClassificationIndex | Array, newSymbolName?: string) -> Promise<string | undefined> 复制符号 returns: 目标库内新符号的 UUID

Inputs: args, windowId.

eda_lib_symbol_createC

lib_Symbol.create(libraryUuid: string, symbolName: string, classification?: ILIB_ClassificationIndex | Array, symbolType?: ELIB_SymbolType, description?: string, otherProperty?: Record<string, boolean | number | string | undefined>) -> Promise<string | undefined> 创建符号 returns: 符号 UUID

Inputs: args, windowId.

eda_lib_symbol_deleteB

lib_Symbol.delete(symbolUuid: string, libraryUuid: string) -> Promise 删除符号 returns: 操作是否成功

Inputs: args, windowId.

eda_lib_symbol_getC

lib_Symbol.get(symbolUuid: string, libraryUuid?: string) -> Promise<ILIB_SymbolItem | undefined> 获取符号的所有属性 returns: 符号属性

Inputs: args, windowId.

eda_lib_symbol_get_render_imageB

lib_Symbol.getRenderImage(source: { symbolUuid: string; libraryUuid: string; subPartName?: string }) -> Promise<Blob | undefined> 获取符号渲染图 returns: 符号渲染图

Inputs: args, windowId.

eda_lib_symbol_modifyA

lib_Symbol.modify(symbolUuid: string, libraryUuid: string, symbolName?: string, classification?: ILIB_ClassificationIndex | Array | null, description?: string | null, otherProperty?: Record<string, boolean | number | string | undefined | null>) -> Promise 修改符号 remarks: 如希望清除某些属性,则将其的值设置为 null returns: 操作是否成功

Inputs: args, windowId.

eda_lib_symbol_open_in_editorC

lib_Symbol.openInEditor(symbolUuid: string, libraryUuid: string, splitScreenId?: string) -> Promise<string | undefined> 在编辑器打开文档

Inputs: args, windowId.

eda_lib_symbol_search_by_propertiesB

lib_Symbol.searchByProperties(properties: ILIB_SymbolPropertiesForSearch, libraryUuid?: string) -> Promise<Array<ILIB_SymbolSearchItem>> 使用属性精确搜索符号 returns: 搜索到的符号属性的列表

Inputs: args, windowId.

eda_lib_symbol_update_document_sourceC

lib_Symbol.updateDocumentSource(symbolUuid: string, libraryUuid: string, documentSource: string) -> Promise<boolean | undefined> 更新符号的文档源码 returns: 是否更新成功

Inputs: args, windowId.

eda_pcb_document_auto_layoutC

pcb_Document.autoLayout() -> Promise<IPCB_AutoLayoutResult> 自动布局 remarks: ADD since EDA v3.2.162 returns: 自动布局结果

Inputs: args, windowId.

eda_pcb_document_auto_routingC

pcb_Document.autoRouting(props?: IPCB_AutoRoutingProps) -> Promise<IPCB_AutoRoutingResult> 自动布线 remarks: 如不传入任何参数,将对所有未布线的网络进行自动布线

ADD since EDA v3.2.162 returns: 自动布线结果

Inputs: args, windowId.

eda_pcb_document_clear_routingC

pcb_Document.clearRouting(type?: 'all' | 'net' | 'connection') -> Promise 清除布线

Inputs: args, windowId.

eda_pcb_document_convert_canvas_origin_to_data_originA

pcb_Document.convertCanvasOriginToDataOrigin(x: number, y: number) -> Promise<{ x: number; y: number }> 输入画布坐标返回该坐标对应的数据坐标 remarks: 嘉立创 EDA 前端显示的坐标均为画布原点;嘉立创 EDA API 使用的均为数据原点;在创建 PCB 时,默认画布原点等于数据原点 returns: 数据原点坐标

Inputs: args, windowId.

eda_pcb_document_convert_data_origin_to_canvas_originA

pcb_Document.convertDataOriginToCanvasOrigin(x: number, y: number) -> Promise<{ x: number; y: number }> 输入数据坐标返回该坐标对应的画布坐标 remarks: 嘉立创 EDA 前端显示的坐标均为画布原点;嘉立创 EDA API 使用的均为数据原点;在创建 PCB 时,默认画布原点等于数据原点 returns: 画布原点坐标

Inputs: args, windowId.

eda_pcb_document_get_calculating_ratline_statusA

pcb_Document.getCalculatingRatlineStatus() -> Promise<EPCB_DocumentRatlineCalculatingActiveStatus | undefined> 获取当前飞线计算功能状态 deprecated: since EDA v4.2 returns: 功能状态 [已弃用]

Inputs: args, windowId.

eda_pcb_document_get_canvas_originA

pcb_Document.getCanvasOrigin() -> Promise<{ offsetX: number; offsetY: number }> 获取画布原点相对于数据原点的偏移坐标 remarks: 嘉立创 EDA 专业版前端显示的坐标均为画布原点;

嘉立创 EDA 专业版 API 使用的均为数据原点;

如果返回的数据为 { canvasOriginOffsetX: 100, canvasOriginOffsetY: 200 }, 则代表画布原点在数据原点的向右 100 单位且向上 200 单位的位置;

此处的单位为数据层面单位,在跨度上等同于画布层面的 mil returns: 画布原点相对于数据原点的偏移坐标

Inputs: args, windowId.

eda_pcb_document_get_canvas_update_calculation_statusB

pcb_Document.getCanvasUpdateCalculationStatus() -> Promise<EPCB_DocumentCanvasUpdateCalculationActiveStatus | undefined> 查询当前画布更新计算状态 remarks: 画布更新计算包括画布渲染更新、属性面板更新等

ADD since EDA v4.2 returns: 画布更新计算功能状态

Inputs: args, windowId.

eda_pcb_document_get_current_filter_configurationB

pcb_Document.getCurrentFilterConfiguration() -> Promise<Record<string, any> | undefined> 获取当前画布过滤器配置 returns: 当前画布过滤器配置,undefined 为获取失败

Inputs: args, windowId.

eda_pcb_document_get_primitive_at_pointB

pcb_Document.getPrimitiveAtPoint(x: number, y: number) -> Promise<IPCB_Primitive | undefined> 获取坐标点的图元 remarks: 本操作和前端鼠标点击操作类似,将会获取指定坐标点上的图元 returns: 坐标点的图元,如若坐标点无法找到图元,将返回 undefined

Inputs: args, windowId.

eda_pcb_document_get_primitives_in_regionC

pcb_Document.getPrimitivesInRegion(left: number, right: number, top: number, bottom: number, leftToRight?: boolean) -> Promise<Array<IPCB_Primitive>> 获取区域内所有图元 returns: 区域内所有图元

Inputs: args, windowId.

eda_pcb_document_import_auto_layout_json_fileC

pcb_Document.importAutoLayoutJsonFile(autoLayoutFile: File) -> Promise 导入自动布局文件(JSON) returns: 导入操作是否成功

Inputs: args, windowId.

eda_pcb_document_import_auto_route_json_fileC

pcb_Document.importAutoRouteJsonFile(autoRouteFile: File) -> Promise 导入自动布线文件(JSON) returns: 导入操作是否成功

Inputs: args, windowId.

eda_pcb_document_import_auto_route_ses_fileC

pcb_Document.importAutoRouteSesFile(autoRouteFile: File) -> Promise 导入自动布线文件(SES) returns: 导入操作是否成功

Inputs: args, windowId.

eda_pcb_document_import_changesC

pcb_Document.importChanges(uuid?: string) -> Promise 从原理图导入变更 returns: 导入操作是否成功,导入失败或未传入原理图 UUID 的游离 PCB 将返回 false

Inputs: args, windowId.

eda_pcb_document_navigate_to_coordinatesC

pcb_Document.navigateToCoordinates(x: number, y: number) -> Promise 定位到画布坐标 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_document_navigate_to_regionA

pcb_Document.navigateToRegion(left: number, right: number, top: number, bottom: number) -> Promise 定位到画布区域 remarks: 本接口在前端画布上定位到指定的区域,区域数据为相对于数据原点的偏移;

例如:传入数据为 {left: 0, right: 60, top: 100, bottom: -20} => navigateToRegion(0, 60, 100, -20), 则画布将会定位到以 [30, 40] 为中心的,x 轴方向长度为 60,y 轴方向长度为 120 的矩形范围;

本接口不进行缩放操作,但会生成指示定位中心及表示区域范围的矩形框;

此处的单位为数据层面单位,在跨度上等同于画布层面的 mil returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_document_saveA

pcb_Document.save() -> Promise 保存文档 returns: 保存操作是否成功,保存失败、上传失败等错误均返回 false

Inputs: args, windowId.

eda_pcb_document_set_canvas_originA

pcb_Document.setCanvasOrigin(offsetX: number, offsetY: number) -> Promise 设置画布原点相对于数据原点的偏移坐标 remarks: 嘉立创 EDA 专业版前端显示的坐标均为画布原点;

嘉立创 EDA 专业版 API 使用的均为数据原点;

如果希望在 API 操作时前端画布坐标能与数据一致, 建议调用本方法并设置偏移量为零, 即 setCanvasOrigin(0, 0);

此处的单位为数据层面单位,在跨度上等同于画布层面的 mil returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_document_start_calculating_ratlineC

pcb_Document.startCalculatingRatline() -> Promise 启动飞线计算功能 deprecated: since EDA v4.2 remarks: 在启动时将会触发一次飞线计算 returns: 操作是否成功 [已弃用]

Inputs: args, windowId.

eda_pcb_document_start_canvas_update_calculationC

pcb_Document.startCanvasUpdateCalculation() -> Promise 开始画布更新计算 remarks: 画布更新计算包括画布渲染更新、属性面板更新等

如若不理解该开关的含义,请勿调用本接口进行任何操作

ADD since EDA v4.2 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_document_stop_calculating_ratlineB

pcb_Document.stopCalculatingRatline() -> Promise 停止飞线计算功能 deprecated: since EDA v4.2 returns: 操作是否成功 [已弃用]

Inputs: args, windowId.

eda_pcb_document_stop_canvas_update_calculationB

pcb_Document.stopCanvasUpdateCalculation() -> Promise 停止画布更新计算 remarks: 画布更新计算包括画布渲染更新、属性面板更新等

如若不理解该开关的含义,请勿调用本接口进行任何操作

ADD since EDA v4.2 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_document_trigger_canvas_update_calculationC

pcb_Document.triggerCanvasUpdateCalculation() -> Promise 触发一次画布更新计算 remarks: 画布更新计算包括画布渲染更新、属性面板更新等

如若不理解该开关的含义,请勿调用本接口进行任何操作

ADD since EDA v4.2 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_document_zoom_to_board_outlineC

pcb_Document.zoomToBoardOutline() -> Promise 缩放到板框(适应板框) returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_add_net_to_equal_length_net_groupB

pcb_Drc.addNetToEqualLengthNetGroup(equalLengthNetGroupName: string, net: string | Array) -> Promise 将网络添加到等长网络组 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_add_net_to_net_classC

pcb_Drc.addNetToNetClass(netClassName: string, net: string | Array) -> Promise 将网络添加到网络类 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_add_pad_pair_to_pad_pair_groupC

pcb_Drc.addPadPairToPadPairGroup(padPairGroupName: string, padPair: [string, string] | Array<[string, string]>) -> Promise 将焊盘对添加到焊盘对组 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_checkC

pcb_Drc.check(strict: boolean, userInterface: boolean, includeVerboseError: false) -> Promise 检查 DRC returns: DRC 检查是否通过

Inputs: args, windowId.

eda_pcb_drc_create_differential_pairB

pcb_Drc.createDifferentialPair(differentialPairName: string, positiveNet: string, negativeNet: string) -> Promise 创建差分对 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_create_equal_length_net_groupC

pcb_Drc.createEqualLengthNetGroup(equalLengthNetGroupName: string, nets: Array, color: IPCB_EqualLengthNetGroupItem['color']) -> Promise 创建等长网络组 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_create_net_classC

pcb_Drc.createNetClass(netClassName: string, nets: Array, color: IPCB_EqualLengthNetGroupItem['color']) -> Promise 创建网络类 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_create_pad_pair_groupC

pcb_Drc.createPadPairGroup(padPairGroupName: string, padPairs: Array<[string, string]>) -> Promise 创建焊盘对组 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_delete_differential_pairC

pcb_Drc.deleteDifferentialPair(differentialPairName: string) -> Promise 删除差分对 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_delete_equal_length_net_groupB

pcb_Drc.deleteEqualLengthNetGroup(equalLengthNetGroupName: string) -> Promise 删除等长网络组 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_delete_net_classC

pcb_Drc.deleteNetClass(netClassName: string) -> Promise 删除网络类 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_delete_pad_pair_groupB

pcb_Drc.deletePadPairGroup(padPairGroupName: string) -> Promise 删除焊盘对组 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_delete_rule_configurationA

pcb_Drc.deleteRuleConfiguration(configurationName: string) -> Promise 删除设计规则配置 remarks: 系统配置不允许删除 returns: 删除是否成功

Inputs: args, windowId.

eda_pcb_drc_get_all_differential_pairsB

pcb_Drc.getAllDifferentialPairs() -> Promise<Array<IPCB_DifferentialPairItem> | Record<string, any>> 获取所有差分对的详细属性 remarks: BREAKING CHANGE since EDA v3.4

  • 返回值类型更改为对象 returns: 所有差分对的详细属性

Inputs: args, windowId.

eda_pcb_drc_get_all_equal_length_net_groupsB

pcb_Drc.getAllEqualLengthNetGroups() -> Promise<Array<IPCB_EqualLengthNetGroupItem>> 获取所有等长网络组的详细属性 returns: 所有等长网络组的详细属性

Inputs: args, windowId.

eda_pcb_drc_get_all_net_classesC

pcb_Drc.getAllNetClasses() -> Promise<Array<IPCB_NetClassItem>> 获取所有网络类的详细属性 returns: 所有网络类的详细属性

Inputs: args, windowId.

eda_pcb_drc_get_all_pad_pair_groupsC

pcb_Drc.getAllPadPairGroups() -> Promise<Array<IPCB_PadPairGroupItem>> 获取所有焊盘对组的详细属性 returns: 所有焊盘对组的详细属性

Inputs: args, windowId.

eda_pcb_drc_get_all_rule_configurationsC

pcb_Drc.getAllRuleConfigurations(includeSystem?: boolean) -> Promise<Array<Record<string, any>>> 获取所有设计规则配置 returns: 所有设计规则配置

Inputs: args, windowId.

eda_pcb_drc_get_current_rule_configurationB

pcb_Drc.getCurrentRuleConfiguration() -> Promise<Record<string, any> | undefined> 获取当前设计规则配置 returns: 当前设计规则配置,undefined 为获取失败

Inputs: args, windowId.

eda_pcb_drc_get_current_rule_configuration_nameB

pcb_Drc.getCurrentRuleConfigurationName() -> Promise<string | undefined> 获取当前设计规则配置名称 returns: 当前设计规则配置名称,undefined 为获取失败

Inputs: args, windowId.

eda_pcb_drc_get_default_rule_configuration_nameB

pcb_Drc.getDefaultRuleConfigurationName() -> Promise<string | undefined> 获取新建 PCB 默认设计规则配置的名称 returns: 默认设计规则配置的名称,undefined 为获取失败

Inputs: args, windowId.

eda_pcb_drc_get_net_by_net_rulesB

pcb_Drc.getNetByNetRules() -> Promise<Record<string, any>> 获取网络-网络规则 returns: 当前 PCB 的所有网络-网络规则

Inputs: args, windowId.

eda_pcb_drc_get_net_rulesC

pcb_Drc.getNetRules() -> Promise<Array<Record<string, any>>> 获取网络规则 returns: 当前 PCB 的所有网络规则

Inputs: args, windowId.

eda_pcb_drc_get_pad_pair_group_min_wire_lengthA

pcb_Drc.getPadPairGroupMinWireLength(padPairGroupName: string) -> Promise<Array<IPCB_PadPairMinWireLengthItem>> 获取焊盘对组最短导线长度 returns: 所有焊盘对的最短导线长度

Inputs: args, windowId.

eda_pcb_drc_get_real_time_drc_statusA

pcb_Drc.getRealTimeDrcStatus() -> Promise 获取实时 DRC 检查状态 remarks: ADD since EDA v4.2 returns: 实时 DRC 检查状态,实时 DRC 已停止、不处于 PCB 或获取失败均返回 false

Inputs: args, windowId.

eda_pcb_drc_get_region_rulesB

pcb_Drc.getRegionRules() -> Promise<Array<Record<string, any>>> 获取区域规则 returns: - 当前 PCB 的所有区域规则

Inputs: args, windowId.

eda_pcb_drc_get_rule_configurationB

pcb_Drc.getRuleConfiguration(configurationName: string) -> Promise<Record<string, any> | undefined> 获取指定设计规则配置 returns: 设计规则配置,undefined 为不存在该设计规则

Inputs: args, windowId.

eda_pcb_drc_modify_differential_pair_nameB

pcb_Drc.modifyDifferentialPairName(originalDifferentialPairName: string, differentialPairName: string) -> Promise 修改差分对的名称 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_modify_differential_pair_negative_netB

pcb_Drc.modifyDifferentialPairNegativeNet(differentialPairName: string, negativeNet: string) -> Promise 修改差分对负网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_modify_differential_pair_positive_netB

pcb_Drc.modifyDifferentialPairPositiveNet(differentialPairName: string, positiveNet: string) -> Promise 修改差分对正网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_modify_equal_length_net_group_nameB

pcb_Drc.modifyEqualLengthNetGroupName(originalEqualLengthNetGroupName: string, equalLengthNetGroupName: string) -> Promise 修改等长网络组的名称 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_modify_net_class_nameA

pcb_Drc.modifyNetClassName(originalNetClassName: string, netClassName: string) -> Promise 修改网络类的名称 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_modify_pad_pair_group_nameB

pcb_Drc.modifyPadPairGroupName(originalPadPairGroupName: string, padPairGroupName: string) -> Promise 修改焊盘对组的名称 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_overwrite_current_rule_configurationB

pcb_Drc.overwriteCurrentRuleConfiguration(ruleConfiguration: Record<string, any>) -> Promise 覆写当前设计规则配置 remarks: 将会覆写 PCB 当前的设计规则配置,请注意数据丢失风险 returns: 覆写是否成功

Inputs: args, windowId.

eda_pcb_drc_overwrite_net_by_net_rulesC

pcb_Drc.overwriteNetByNetRules(netByNetRules: Record<string, any>) -> Promise 覆写网络-网络规则 remarks: 将会覆写当前 PCB 的所有网络-网络规则,请注意数据丢失风险 returns: 覆写是否成功

Inputs: args, windowId.

eda_pcb_drc_overwrite_net_rulesB

pcb_Drc.overwriteNetRules(netRules: Array<Record<string, any>>) -> Promise 覆写网络规则 remarks: 将会覆写当前 PCB 的所有网络规则,请注意数据丢失风险 returns: 覆写是否成功

Inputs: args, windowId.

eda_pcb_drc_overwrite_region_rulesB

pcb_Drc.overwriteRegionRules(regionRules: Array<Record<string, any>>) -> Promise 覆写区域规则 remarks: 将会覆写当前 PCB 的所有区域规则,请注意数据丢失风险 returns: 覆写是否成功

Inputs: args, windowId.

eda_pcb_drc_remove_net_from_equal_length_net_groupA

pcb_Drc.removeNetFromEqualLengthNetGroup(equalLengthNetGroupName: string, net: string | Array) -> Promise 从等长网络组中移除网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_remove_net_from_net_classB

pcb_Drc.removeNetFromNetClass(netClassName: string, net: string | Array) -> Promise 从网络类中移除网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_remove_pad_pair_from_pad_pair_groupB

pcb_Drc.removePadPairFromPadPairGroup(padPairGroupName: string, padPair: [string, string] | Array<[string, string]>) -> Promise 从焊盘对组中移除焊盘对 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_drc_rename_rule_configurationA

pcb_Drc.renameRuleConfiguration(originalConfigurationName: string, configurationName: string) -> Promise 重命名设计规则配置 remarks: 只有自定义配置可以重命名,系统配置不允许重命名 returns: 重命名是否成功

Inputs: args, windowId.

eda_pcb_drc_save_rule_configurationB

pcb_Drc.saveRuleConfiguration(ruleConfiguration: Record<string, any>, configurationName: string, allowOverwrite?: boolean) -> Promise 保存设计规则配置 remarks: 只有自定义配置可以覆盖保存,系统配置不允许修改和覆盖 returns: 保存是否成功

Inputs: args, windowId.

eda_pcb_drc_set_as_default_rule_configurationC

pcb_Drc.setAsDefaultRuleConfiguration(configurationName: string) -> Promise 设置为新建 PCB 默认设计规则配置 remarks: 返回值为结果导向,重复设置相同的设计规则为默认设计规则也将返回 true returns: 设置是否成功

Inputs: args, windowId.

eda_pcb_drc_start_real_time_drcA

pcb_Drc.startRealTimeDrc() -> Promise 开始实时 DRC 检查 remarks: 本接口返回值为结果导向,调用本接口前已启用实时 DRC 检查也将返回 true

ADD since EDA v4.2 returns: 是否成功启用实时 DRC 检查

Inputs: args, windowId.

eda_pcb_drc_stop_real_time_drcA

pcb_Drc.stopRealTimeDrc() -> Promise 停止实时 DRC 检查 remarks: 本接口返回值为结果导向,调用本接口前已停用实时 DRC 检查也将返回 true

ADD since EDA v4.2 returns: 是否成功停用实时 DRC 检查

Inputs: args, windowId.

eda_pcb_event_add_cross_probe_select_event_listenerD

pcb_Event.addCrossProbeSelectEventListener(id: string, callFn: (props: any) => void | Promise) -> void 新增交叉选择事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_pcb_event_add_image_event_listenerA

pcb_Event.addImageEventListener(id: string, callFn: (message: { file?: File; source: 'toolbar' | 'paste' }) => void | Promise) -> boolean 新增插入图片事件监听 deprecated: 临时接口(插入图片 PCB 迁移打通流程用):统一事件机制落地后替换,请尽快迁移,勿在新功能中继续依赖 remarks: ADD since EDA v5 returns: 是否注册成功 [已弃用]

Inputs: args, windowId.

eda_pcb_event_add_mouse_event_listenerB

pcb_Event.addMouseEventListener(id: string, eventType: 'all' | EPCB_MouseEventType, callFn: (eventType: EPCB_MouseEventType, props: [{ primitiveId: string; primitiveType: EPCB_PrimitiveType; net?: string; designator?: string; parentComponentPrimitiveId?: string; parentComponentDesignator?: string }]) => void | Promise, onlyOnce?: boolean) -> void 新增鼠标事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_pcb_event_add_net_event_listenerA

pcb_Event.addNetEventListener(id: string, eventType: 'all' | EPCB_NetEventType, callFn: (eventType: EPCB_NetEventType, props: [{ net: string }]) => void | Promise, onlyOnce?: boolean) -> void 新增网络事件监听 remarks: 网络选中事件仅

①在过滤面板选中网络选项并在画布选中网络时

②在工程设计 -> 网络内选中网络时

会被触发

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_pcb_event_add_primitive_event_listenerA

pcb_Event.addPrimitiveEventListener(id: string, eventType: 'all' | EPCB_PrimitiveEventType, callFn: (eventType: EPCB_PrimitiveEventType, props: [{ primitiveId: string; primitiveType: EPCB_PrimitiveType; net?: string; designator?: string; parentComponentPrimitiveId?: string; parentComponentDesignator?: string }]) => void | Promise, onlyOnce?: boolean) -> void 新增图元事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_pcb_event_add_ray_tracer_engine3_dview_camera_change_event_listenerA

pcb_Event.addRayTracerEngine3DViewCameraChangeEventListener(id: string, callFn: (props: { position: { x: number; y: number; z: number }; rotation: { x: number; y: number; z: number }; focalLength: number }) => void | Promise, onlyOnce?: boolean) -> void 新增光线追踪引擎 3D 预览相机变动(拖动 3D 模型)事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4

Inputs: args, windowId.

eda_pcb_event_add_ray_tracer_engine3_dview_click_material_event_listenerA

pcb_Event.addRayTracerEngine3DViewClickMaterialEventListener(id: string, callFn: (props: { materialId: number; material: any }) => void | Promise, onlyOnce?: boolean) -> void 新增光线追踪引擎 3D 预览点击材质事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4

Inputs: args, windowId.

eda_pcb_event_add_ray_tracer_engine_render_progress_event_listenerA

pcb_Event.addRayTracerEngineRenderProgressEventListener(id: string, callFn: (props: { loaded: boolean; sampleCount: number }) => void | Promise, onlyOnce?: boolean) -> void 新增光线追踪引擎渲染进度事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

渲染进度事件的回调数据格式为 { loaded: boolean, sampleCount: number }:

  • loaded:光线追踪引擎是否已加载完成

  • sampleCount:当前渲染的采样次数

Inputs: args, windowId.

eda_pcb_event_add_real_time_drc_result_event_listenerA

pcb_Event.addRealTimeDrcResultEventListener(id: string, eventType: 'all', callFn: (eventType: undefined, props: [{ drcResult: any }]) => void | Promise) -> void 新增实时 DRC 结果事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_pcb_event_is_event_listener_already_existC

pcb_Event.isEventListenerAlreadyExist(id: string) -> boolean 查询事件监听是否存在 returns: 事件监听是否存在

Inputs: args, windowId.

eda_pcb_event_remove_event_listenerC

pcb_Event.removeEventListener(id: string) -> boolean 移除事件监听 returns: 是否移除指定事件监听

Inputs: args, windowId.

eda_pcb_image_tool_process_imageA

pcb_ImageTool.processImage(file: File, options?: { maxBytes?: number; acceptableBytes?: number }) -> Promise<{ file: File; dataURL: string; width: number; height: number; msg: string | null }> 选图处理门面(弹窗内重选图片:校验/压缩/读尺寸/预览 dataURL 全由服务端完成) deprecated: 临时接口(插入图片 PCB 迁移打通流程用):等统一放置接口重构落地后删除替换,请尽快迁移,勿在新功能中继续依赖 remarks: ADD since EDA v5 returns: 处理结果:file 压缩后文件;dataURL 预览图 dataURL(decode 失败为空字符串);width/height 原始自然尺寸;msg 提示消息(有值需 toast,如「不能超过 50MB」「已压缩至小于2MB」) [已弃用]

Inputs: args, windowId.

eda_pcb_image_tool_start_place_true_color_pictureA

pcb_ImageTool.startPlaceTrueColorPicture(options: { imageBlob: Blob; width: number; height: number; unit?: 'mm' | 'mil'; fileName: string }) -> Promise 开始放置真彩图片(权限校验 → 图片审核 → 内核上传 → 模板注册 → 触发放置) deprecated: 临时接口(插入图片 PCB 迁移打通流程用):等统一放置接口重构落地后删除替换,请尽快迁移,勿在新功能中继续依赖 remarks: ADD since EDA v5 returns: 放置工具是否成功触发(权限未过/审核未过/导入失败返回 false) [已弃用]

Inputs: args, windowId.

eda_pcb_image_tool_start_place_vector_imageB

pcb_ImageTool.startPlaceVectorImage(options: { path: string; width: number; height: number; unit?: 'mm' | 'mil' }) -> Promise 开始放置矢量图片(将描摹好的路径交给内核,触发十字光标放置) deprecated: 临时接口(插入图片 PCB 迁移打通流程用):等统一放置接口重构落地后删除替换,请尽快迁移,勿在新功能中继续依赖 remarks: ADD since EDA v5 returns: 放置工具是否成功触发 [已弃用]

Inputs: args, windowId.

eda_pcb_layer_add_custom_layerB

pcb_Layer.addCustomLayer() -> Promise<TPCB_LayersOfCustom | undefined> 新增自定义层 returns: 新增的自定义层的图层 ID,如若为 undefined 则为新增失败,可能是自定义层数量已达到上限

Inputs: args, windowId.

eda_pcb_layer_delete_physical_stacking_configurationA

pcb_Layer.deletePhysicalStackingConfiguration(configurationName: string, physicalProps?: IPCB_SubstratePhysicalProperties) -> Promise 删除物理叠层配置 remarks: ADD since EDA v4.2 returns: 删除是否成功

Inputs: args, windowId.

eda_pcb_layer_get_all_layersB

pcb_Layer.getAllLayers() -> Promise<Array<IPCB_LayerItem>> 获取所有图层的详细属性 returns: 所有图层的详细属性

Inputs: args, windowId.

eda_pcb_layer_get_all_physical_stacking_configurationsC

pcb_Layer.getAllPhysicalStackingConfigurations(physicalProps?: IPCB_SubstratePhysicalProperties) -> Promise<Array<IPCB_PhysicalStackingConfiguration>> 获取所有物理叠层配置 remarks: ADD since EDA v4.2 returns: 所有物理叠层配置

Inputs: args, windowId.

eda_pcb_layer_get_current_layerA

pcb_Layer.getCurrentLayer() -> Promise<IPCB_LayerItem | undefined> 获取当前图层的详细属性 remarks: ADD since EDA v4.2 returns: 当前图层的详细属性,无激活层或无 PCB 画布时返回 undefined

Inputs: args, windowId.

eda_pcb_layer_get_current_physical_stacking_configurationC

pcb_Layer.getCurrentPhysicalStackingConfiguration() -> Promise<IPCB_PhysicalStackingConfiguration | undefined> 获取当前物理叠层配置 remarks: ADD since EDA v4.2 returns: 当前物理叠层配置,undefined 为获取失败

Inputs: args, windowId.

eda_pcb_layer_get_current_physical_stacking_configuration_nameC

pcb_Layer.getCurrentPhysicalStackingConfigurationName() -> Promise<string | undefined> 获取当前物理叠层配置名称 remarks: ADD since EDA v4.2 returns: 当前物理叠层配置名称,undefined 为获取失败

Inputs: args, windowId.

eda_pcb_layer_get_default_physical_stacking_configuration_nameA

pcb_Layer.getDefaultPhysicalStackingConfigurationName(physicalProps?: IPCB_SubstratePhysicalProperties) -> Promise<string | undefined> 获取新建 PCB 默认物理叠层配置的名称 remarks: ADD since EDA v4.2 returns: 默认物理叠层配置的名称,undefined 为获取失败

Inputs: args, windowId.

eda_pcb_layer_get_physical_stacking_configurationC

pcb_Layer.getPhysicalStackingConfiguration(configurationName: string, physicalProps?: IPCB_SubstratePhysicalProperties) -> Promise<IPCB_PhysicalStackingConfiguration | undefined> 获取指定物理叠层配置 remarks: ADD since EDA v4.2 returns: 物理叠层配置,undefined 为不存在该物理叠层

Inputs: args, windowId.

eda_pcb_layer_get_the_number_of_copper_layersC

pcb_Layer.getTheNumberOfCopperLayers() -> Promise 获取铜箔层数 returns: 层数

Inputs: args, windowId.

eda_pcb_layer_lock_layerC

pcb_Layer.lockLayer(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>) -> Promise 锁定层 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_modify_layerA

pcb_Layer.modifyLayer(layer: TPCB_LayersInTheSelectable, property: { name?: string; type?: TPCB_LayerTypesOfInnerLayer; color?: string; transparency?: number }) -> Promise 修改图层属性 remarks: 仅内层和自定义层允许修改名称;仅内层允许修改类型, 透明度仅支持0-100之间的数 returns: 修改后的图层属性,如若为 undefined 则代表修改失败或图层不存在

Inputs: args, windowId.

eda_pcb_layer_overwrite_current_physical_stacking_configurationA

pcb_Layer.overwriteCurrentPhysicalStackingConfiguration(physicalStackingConfiguration: IPCB_PhysicalStackingConfiguration) -> Promise 覆写当前物理叠层配置 remarks: 将会覆写 PCB 当前的物理叠层配置,请注意数据丢失风险

如果传入的物理叠层配置不符合当前 PCB 的物理属性,将会直接返回 false 且不进行修改

ADD since EDA v4.2 returns: 覆写是否成功

Inputs: args, windowId.

eda_pcb_layer_remove_layerB

pcb_Layer.removeLayer(layer: TPCB_LayersOfCustom) -> Promise 移除层 remarks: 当前仅支持移除自定义层 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_rename_physical_stacking_configurationC

pcb_Layer.renamePhysicalStackingConfiguration(originalConfigurationName: string, configurationName: string, physicalProps?: IPCB_SubstratePhysicalProperties) -> Promise 重命名物理叠层配置 remarks: ADD since EDA v4.2 returns: 重命名是否成功

Inputs: args, windowId.

eda_pcb_layer_save_physical_stacking_configurationC

pcb_Layer.savePhysicalStackingConfiguration(physicalStackingConfiguration: IPCB_PhysicalStackingConfiguration, configurationName: string, physicalProps?: IPCB_SubstratePhysicalProperties, allowOverwrite?: boolean) -> Promise 保存物理叠层配置 remarks: ADD since EDA v4.2 returns: 保存是否成功

Inputs: args, windowId.

eda_pcb_layer_select_layerC

pcb_Layer.selectLayer(layer: TPCB_LayersInTheSelectable) -> Promise 选中图层 returns: 操作是否成功,不存在指定层将返回 false

Inputs: args, windowId.

eda_pcb_layer_set_as_default_physical_stacking_configurationA

pcb_Layer.setAsDefaultPhysicalStackingConfiguration(configurationName: string, physicalProps?: IPCB_SubstratePhysicalProperties) -> Promise 设置为新建 PCB 默认物理叠层配置 remarks: 返回值为结果导向,重复设置相同的物理叠层为默认物理叠层也将返回 true

ADD since EDA v4.2 returns: 设置是否成功

Inputs: args, windowId.

eda_pcb_layer_set_inactive_layer_display_modeC

pcb_Layer.setInactiveLayerDisplayMode(displayMode?: EPCB_InactiveLayerDisplayMode) -> Promise 设置非激活层展示模式 returns: 是否设置成功

Inputs: args, windowId.

eda_pcb_layer_set_inactive_layer_transparencyC

pcb_Layer.setInactiveLayerTransparency(transparency: number) -> Promise 设置非激活层透明度 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_set_layer_color_configurationD

pcb_Layer.setLayerColorConfiguration(colorConfiguration: EPCB_LayerColorConfiguration) -> Promise 设置层颜色配置 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_set_layer_invisibleC

pcb_Layer.setLayerInvisible(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>, setOtherLayerVisible?: boolean) -> Promise 将层设置为不可见 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_set_layer_visibleC

pcb_Layer.setLayerVisible(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>, setOtherLayerInvisible?: boolean) -> Promise 将层设置为可见 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_set_pcb_typeA

pcb_Layer.setPcbType(pcbType: EPCB_PcbPlateType) -> Promise 设置 PCB 类型 remarks: 此处主要是为了适配 FPC 软板的设计,如若将 PCB 类型设置为 FPC 软板,将会新增 FPC 补强层图层。

请注意:

  1. 嘉立创暂不支持超过 2 层铜箔层的 FPC 软板生产;

  2. 将 PCB 类型从 FPC 软板切换为普通板材时需要预先删除 FPC 补强层上的任何图元,否则将无法切换并返回 false 的结果。 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_set_the_number_of_copper_layersB

pcb_Layer.setTheNumberOfCopperLayers(numberOfLayers: TPCB_NumberOfCopperLayers) -> Promise 设置铜箔层数 remarks: 新建的 PCB 文档默认拥有两层铜箔层 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_layer_unlock_layerC

pcb_Layer.unlockLayer(layer?: TPCB_LayersInTheSelectable | Array<TPCB_LayersInTheSelectable>) -> Promise 取消锁定层 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_manufacture_data_delete_bom_templateC

pcb_ManufactureData.deleteBomTemplate(template: string) -> Promise 删除 BOM 模板 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_manufacture_data_get3_dfileB

pcb_ManufactureData.get3DFile(fileName?: string, fileType?: 'step' | 'obj', element?: Array<'Component Model' | 'Via' | 'Silkscreen' | 'Wire In Signal Layer'>, modelMode?: 'Outfit' | 'Parts', autoGenerateModels?: boolean) -> Promise<File | undefined> 获取 3D 模型文件 returns: 3D 模型文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get3_dshell_fileB

pcb_ManufactureData.get3DShellFile(fileName?: string, fileType?: 'stl' | 'step' | 'obj') -> Promise<File | undefined> 获取 3D 外壳文件 returns: 3D 外壳文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_altium_designer_fileC

pcb_ManufactureData.getAltiumDesignerFile(fileName?: string) -> Promise<File | undefined> 获取 Altium Designer 文件 returns: Altium Designer 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_auto_layout_json_fileC

pcb_ManufactureData.getAutoLayoutJsonFile(fileName?: string) -> Promise<File | undefined> 获取自动布局文件(JSON) returns: 自动布局 JSON 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_auto_route_json_fileB

pcb_ManufactureData.getAutoRouteJsonFile(fileName?: string) -> Promise<File | undefined> 获取自动布线文件(JSON) returns: 自动布线 JSON 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_auto_route_json_file_for_jrouterB

pcb_ManufactureData.getAutoRouteJsonFileForJRouter(fileName?: string) -> Promise<File | undefined> 获取 JRouter 专用自动布线文件(JSON) returns: 自动布线 JSON 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_bom_fileB

pcb_ManufactureData.getBomFile(fileName?: string, fileType?: 'xlsx' | 'csv', template?: string, filterOptions?: Array<{ property: string; includeValue: boolean | string }>, statistics?: Array, property?: Array, columns?: Array<IPCB_BomPropertiesTableColumns>) -> Promise<File | undefined> 获取 BOM 文件 returns: BOM 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_bom_template_fileC

pcb_ManufactureData.getBomTemplateFile(template: string) -> Promise<File | undefined> 获取 BOM 模板文件 returns: BOM 模板文件

Inputs: args, windowId.

eda_pcb_manufacture_data_get_bom_templatesB

pcb_ManufactureData.getBomTemplates() -> Promise<Array> 获取 BOM 模板列表 returns: BOM 模板列表

Inputs: args, windowId.

eda_pcb_manufacture_data_get_dsn_fileC

pcb_ManufactureData.getDsnFile(fileName?: string) -> Promise<File | undefined> 获取自动布线文件(DSN) returns: 自动布线 DSN 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_dxf_fileB

pcb_ManufactureData.getDxfFile(fileName?: string, layers?: Array<{ layerId: EPCB_LayerId; mirror: boolean }>, objects?: Array) -> Promise<File | undefined> 获取 DXF 文件 returns: DXF 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_flying_probe_test_fileC

pcb_ManufactureData.getFlyingProbeTestFile(fileName?: string) -> Promise<File | undefined> 获取飞针测试文件 returns: 飞针测试文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_gerber_fileC

pcb_ManufactureData.getGerberFile(fileName?: string, colorSilkscreen?: boolean, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.INCH, digitalFormat?: { integerNumber: number; decimalNumber: number }, other?: { metallicDrillingInformation: boolean; nonMetallicDrillingInformation: boolean; drillTable: boolean; flyingProbeTestingFile: boolean }, layers?: Array<{ layerId: EPCB_LayerId; isMirror: boolean }>, objects?: Array<'Pad' | 'Via' | 'Track' | 'Text' | 'Image' | 'Dimension' | 'BoardOutline' | 'BoardCutout' | 'CopperFilled' | 'SolidRegion' | 'FPCStiffener' | 'Line' | 'PlaneZone' | 'ComponentProperty' | 'ComponentSilkscreen' | 'TearDrop'>) -> Promise<File | undefined> 获取 PCB 制版文件(Gerber) returns: PCB 制版文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_idx_fileC

pcb_ManufactureData.getIdxFile(fileName?: string) -> Promise<File | undefined> 获取 IDX 文件 returns: IDX 文件

Inputs: args, windowId.

eda_pcb_manufacture_data_get_interactive_bom_fileC

pcb_ManufactureData.getInteractiveBomFile(fileName?: string) -> Promise<File | undefined> 获取交互式 BOM 文件 returns: 交互式 BOM 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_ipc2581_cfileB

pcb_ManufactureData.getIpc2581CFile(fileName?: string, fileType?: 'xml' | 'cvg' | '2581', unit?: ESYS_Unit.INCH | ESYS_Unit.MILLIMETER, oemNumber?: 'Device' | 'Manufacturer Part' | 'Supplier Part' | 'Comment') -> Promise<File | undefined> 获取 IPC-2581C 文件 returns: IPC-2581C 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_ipc_d356_afileC

pcb_ManufactureData.getIpcD356AFile(fileName?: string) -> Promise<File | undefined> 获取 IPC-D-356A 文件 returns: IPC-D-356A 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_manufacture_dataB

pcb_ManufactureData.getManufactureData() -> Promise<File | undefined> 导出制造文件 remarks: 本接口对应私有化部署版本一键导出制造文件功能

将根据前端一键导出制造文件弹窗的配置获取其文件数据

注意:本接口仅私有化部署版本有效,如若在其他版本调用将始终 throw Error returns: 制造文件

Inputs: args, windowId.

eda_pcb_manufacture_data_get_netlist_fileC

pcb_ManufactureData.getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType) -> Promise<File | undefined> 获取网表文件(Netlist) returns: 网表文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_open_database_double_plus_fileB

pcb_ManufactureData.getOpenDatabaseDoublePlusFile(fileName?: string, unit?: ESYS_Unit.INCH | ESYS_Unit.MILLIMETER, otherData?: { metallizedDrilledHoles?: boolean; nonMetallizedDrilledHoles?: boolean; drillTable?: boolean; flyingProbeTestFile?: boolean }, layers?: Array<{ layerId: EPCB_LayerId; mirror: boolean }>, objects?: Array<{ objectName: string }>) -> Promise<File | undefined> 获取 ODB++ 文件 returns: ODB++ 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_pads_fileC

pcb_ManufactureData.getPadsFile(fileName?: string) -> Promise<File | undefined> 获取 PADS 文件 returns: PADS 文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_pcb_info_fileB

pcb_ManufactureData.getPcbInfoFile(fileName?: string) -> Promise<File | undefined> 获取 PCB 信息文件 returns: PCB 信息文件

Inputs: args, windowId.

eda_pcb_manufacture_data_get_pdf_fileC

pcb_ManufactureData.getPdfFile(fileName?: string, outputMethod?: EPCB_PdfOutputMethod, contentConfig?: { displayAttributesAsMenu: boolean; showOutlineOnly: boolean }, watermark?: { show?: boolean; content?: string; styleConfig?: { color: string; transparency: 'Opaque' | '75%' | '50%' | '25%'; font: string; fontSize: { unit: ESYS_Unit.INCH | ESYS_Unit.MIL | ESYS_Unit.MILLIMETER; value: number }; style: { bold: boolean; italic: boolean; underline: boolean }; slope: 0 | 45 | 90; denseness: 'Single' | 'Sparse' | 'Std' | 'Dense' } }, graphPageConfig?: Array<Record<string, any>>) -> Promise<File | undefined> 获取 PDF 文件 returns: PDF 文件数据(或压缩包)

Inputs: args, windowId.

eda_pcb_manufacture_data_get_pick_and_place_fileB

pcb_ManufactureData.getPickAndPlaceFile(fileName?: string, fileType?: 'xlsx' | 'csv', unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.MIL) -> Promise<File | undefined> 获取坐标文件(PickAndPlace) returns: 坐标文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_get_test_point_fileB

pcb_ManufactureData.getTestPointFile(fileName?: string, fileType?: 'xlsx' | 'csv') -> Promise<File | undefined> 获取测试点报告文件 returns: 测试点报告文件数据

Inputs: args, windowId.

eda_pcb_manufacture_data_place3_dshell_orderA

pcb_ManufactureData.place3DShellOrder(interactive?: boolean, ignoreWarning?: boolean) -> Promise 3D 外壳下单 remarks: 本接口暂时只支持交互式检查,入参暂无作用,预留后续开发 returns: 是否通过下单检查;在入参开发完成前,返回值没有实际作用,不会等待执行结果

Inputs: args, windowId.

eda_pcb_manufacture_data_place_components_orderB

pcb_ManufactureData.placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean) -> Promise 元件下单 remarks: 本接口暂时只支持交互式检查,入参暂无作用,预留后续开发 returns: 是否通过下单检查;在入参开发完成前,返回值没有实际作用,不会等待执行结果

Inputs: args, windowId.

eda_pcb_manufacture_data_place_pcb_orderB

pcb_ManufactureData.placePcbOrder(interactive?: boolean, ignoreWarning?: boolean) -> Promise PCB 下单 remarks: 本接口暂时只支持交互式检查,入参暂无作用,预留后续开发 returns: 是否通过下单检查;在入参开发完成前,返回值没有实际作用,不会等待执行结果

Inputs: args, windowId.

eda_pcb_manufacture_data_place_smt_components_orderA

pcb_ManufactureData.placeSmtComponentsOrder(interactive?: boolean, ignoreWarning?: boolean) -> Promise SMT 元件下单 remarks: 本接口暂时只支持交互式检查,入参暂无作用,预留后续开发 returns: 是否通过下单检查;在入参开发完成前,返回值没有实际作用,不会等待执行结果

Inputs: args, windowId.

eda_pcb_manufacture_data_upload_bom_template_fileC

pcb_ManufactureData.uploadBomTemplateFile(templateFile: File, template?: string) -> Promise<string | undefined> 上传 BOM 模板文件 returns: BOM 模板名称

Inputs: args, windowId.

eda_pcb_math_polygon_calculate_bbox_heightC

pcb_MathPolygon.calculateBBoxHeight(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray>) -> number 计算多边形源数组的 BBox 高度

Inputs: args, windowId.

eda_pcb_math_polygon_calculate_heightB

pcb_MathPolygon.calculateHeight(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | IPCB_ComplexPolygon) -> number 计算复杂多边形 BBox 高度 returns: BBox 高度

Inputs: args, windowId.

eda_pcb_math_polygon_calculate_widthC

pcb_MathPolygon.calculateWidth(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | IPCB_ComplexPolygon) -> number 计算复杂多边形 BBox 宽度 returns: BBox 宽度

Inputs: args, windowId.

eda_pcb_math_polygon_convert_image_to_complex_polygonC

pcb_MathPolygon.convertImageToComplexPolygon(imageBlob: Blob, imageWidth: number, imageHeight: number, tolerance?: number, simplification?: number, smoothing?: number, despeckling?: number, whiteAsBackgroundColor?: boolean, inversion?: boolean) -> Promise<IPCB_ComplexPolygon | undefined> 将图像转换为复杂多边形对象 returns: 复杂多边形对象

Inputs: args, windowId.

eda_pcb_math_polygon_create_complex_polygonB

pcb_MathPolygon.createComplexPolygon(complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | Array<IPCB_Polygon>) -> IPCB_ComplexPolygon | undefined 创建复杂多边形 returns: 复杂多边形对象,undefined 表示数据不合法

Inputs: args, windowId.

eda_pcb_math_polygon_create_polygonC

pcb_MathPolygon.createPolygon(polygon: TPCB_PolygonSourceArray) -> IPCB_Polygon | undefined 创建单多边形 returns: 单多边形对象,undefined 表示数据不合法

Inputs: args, windowId.

eda_pcb_math_polygon_discretizeC

pcb_MathPolygon.discretize(polygon: IPCB_Polygon | TPCB_PolygonSourceArray, options?: IPCB_DiscretizeOptions) -> Promise<Array<IPCB_DiscretizedPoint>> 将单多边形离散化为点数据 remarks: 将单多边形的边界离散化为一系列点 returns: 离散化点数据

Inputs: args, windowId.

eda_pcb_math_polygon_split_polygonC

pcb_MathPolygon.splitPolygon(...complexPolygons: Array<IPCB_ComplexPolygon>) -> Array<IPCB_Polygon> 拆分单多边形 returns: 单多边形数组

Inputs: args, windowId.

eda_pcb_math_polygon_trace_imageA

pcb_MathPolygon.traceImage(options: { imageBlob?: Blob; imageWidth?: number; imageHeight?: number; quality?: 'low' | 'high'; tolerance?: number; simplify?: number; smoothness?: number; despeckle?: number; whiteAsTransparent?: boolean; antiphase?: boolean }) -> Promise<{ path: string; sourcePreviewUrl: string; previewUrl: string; width: number; height: number } | undefined> 将图片描摹为矢量路径(SVG path),并导出预览图 remarks: 纯预览接口,不触发任何放置工具(放置由临时接口 eda.pcb_ImageTool.startPlaceVectorImage 单独承担)。服务端内置读原始图片尺寸(扩展沙盒无 new Image()/canvas,无法提供原始尺寸),返回的 width/height 为原始自然尺寸(非描摹 bbox 尺寸)。首次调用需传 imageBlob(服务端缓存像素),之后拖动只传参数

ADD since EDA v5 returns: 描摹结果:path = SVG D 字符串(放置时回传给临时接口);sourcePreviewUrl = 原图预览 dataURL(缩放居中 300×300,对应旧世界 SourceCanvasPreview);previewUrl = 描摹结果预览图 dataURL(尺寸 ≤300×300);width/height = 描摹 bbox 归一最长边 300 基准的尺寸(pixel 语义,与原图分辨率/缩放无关,作为放置尺寸默认值的换算基准);空描摹(没有可描摹的轮廓)返回 undefined

Inputs: args, windowId.

eda_pcb_net_get_all_net_nameC

pcb_Net.getAllNetName() -> Promise<Array> 获取所有网络的网络名称 returns: 网络名称数组 [已弃用]

Inputs: args, windowId.

eda_pcb_net_get_all_netsC

pcb_Net.getAllNets() -> Promise<Array<IPCB_NetInfo>> 获取所有网络的详细信息 returns: 所有网络的详细信息

Inputs: args, windowId.

eda_pcb_net_get_all_nets_nameB

pcb_Net.getAllNetsName() -> Promise<Array> 获取所有网络的网络名称 returns: 网络名称数组

Inputs: args, windowId.

eda_pcb_net_get_all_primitives_by_netC

pcb_Net.getAllPrimitivesByNet(net: string, primitiveTypes?: Array<EPCB_PrimitiveType>) -> Promise<Array<IPCB_Primitive>> 获取关联指定网络的所有图元 returns: 图元对象数组

Inputs: args, windowId.

eda_pcb_net_get_netB

pcb_Net.getNet(net: string) -> Promise<IPCB_NetInfo | undefined> 获取指定网络的详细信息 returns: 网络的详细信息, undefined 为不存在该网络

Inputs: args, windowId.

eda_pcb_net_get_net_colorA

pcb_Net.getNetColor(net: string) -> Promise<IPCB_NetInfo['color'] | undefined> 获取指定网络的颜色 returns: 网络颜色,undefined 为不存在该网络

Inputs: args, windowId.

eda_pcb_net_get_net_lengthA

pcb_Net.getNetLength(net: string) -> Promise<number | undefined> 获取指定网络的长度 returns: 网络长度,undefined 为不存在该网络,0 为网络无长度

Inputs: args, windowId.

eda_pcb_net_get_netlistC

pcb_Net.getNetlist(type?: ESYS_NetlistType) -> Promise 获取网表 returns: 网表数据

Inputs: args, windowId.

eda_pcb_net_highlight_netB

pcb_Net.highlightNet(net: string) -> Promise 高亮网络 remarks: 本接口的返回值为结果导向,如果该网络原先已高亮,也将返回 true returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_net_select_netB

pcb_Net.selectNet(net: string) -> Promise 选中网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_net_set_net_colorB

pcb_Net.setNetColor(net: string, color: IPCB_NetInfo['color']) -> Promise 设置指定网络的颜色 returns: 是否设置成功, false 为不存在该网络

Inputs: args, windowId.

eda_pcb_net_set_netlistD

pcb_Net.setNetlist(type: ESYS_NetlistType | undefined, netlist: string) -> Promise 更新网表

Inputs: args, windowId.

eda_pcb_net_unhighlight_all_netsB

pcb_Net.unhighlightAllNets() -> Promise 取消高亮所有网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_net_unhighlight_netA

pcb_Net.unhighlightNet(net: string) -> Promise 取消高亮网络 remarks: 本接口的返回值为结果导向,如果该网络原先未高亮,也将返回 true returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_net_unselect_all_netsB

pcb_Net.unselectAllNets() -> Promise 取消选中所有网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_net_unselect_netB

pcb_Net.unselectNet(net: string) -> Promise 取消选中网络 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_arc_createC

pcb_PrimitiveArc.create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, arcAngle: number, lineWidth?: number, interactiveMode?: EPCB_PrimitiveArcInteractiveMode, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveArc | undefined> 创建圆弧线 returns: 圆弧线图元对象

Inputs: args, windowId.

eda_pcb_primitive_arc_deleteC

pcb_PrimitiveArc.delete(primitiveIds: string | IPCB_PrimitiveArc | Array | Array<IPCB_PrimitiveArc>) -> Promise 删除圆弧线 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_arc_getB

pcb_PrimitiveArc.get(primitiveIds: string) -> Promise<IPCB_PrimitiveArc | undefined> 获取圆弧线 returns: 圆弧线图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_arc_get_allC

pcb_PrimitiveArc.getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveArc>> 获取所有圆弧线 returns: 圆弧线图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_arc_get_all_primitive_idC

pcb_PrimitiveArc.getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean) -> Promise<Array> 获取所有圆弧线的图元 ID returns: 圆弧线的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_arc_modifyC

pcb_PrimitiveArc.modify(primitiveId: string | IPCB_PrimitiveArc, property: { net?: string; layer?: TPCB_LayersOfLine; startX?: number; startY?: number; endX?: number; endY?: number; arcAngle?: number; lineWidth?: number; interactiveMode?: EPCB_PrimitiveArcInteractiveMode; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveArc | undefined> 修改圆弧线 returns: 圆弧线图元对象

Inputs: args, windowId.

eda_pcb_primitive_attribute_createB

pcb_PrimitiveAttribute.create() -> undefined 创建属性 remarks: 属性图元不支持新建,本接口调用将不会有任何效果 returns: undefined

Inputs: args, windowId.

eda_pcb_primitive_attribute_deleteC

pcb_PrimitiveAttribute.delete(primitiveIds: string | IPCB_PrimitiveAttribute | Array | Array<IPCB_PrimitiveAttribute>) -> Promise 删除属性 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_attribute_getC

pcb_PrimitiveAttribute.get(primitiveIds: string) -> Promise<IPCB_PrimitiveAttribute | undefined> 获取属性 returns: 属性图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_attribute_get_allC

pcb_PrimitiveAttribute.getAll(parentPrimitiveId?: string, layer?: TPCB_LayersOfImage, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveAttribute>> 获取所有属性 returns: 属性图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_attribute_get_all_primitive_idC

pcb_PrimitiveAttribute.getAllPrimitiveId(parentPrimitiveId?: string, layer?: TPCB_LayersOfImage, primitiveLock?: boolean) -> Promise<Array> 获取所有属性的图元 ID returns: 属性的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_attribute_modifyC

pcb_PrimitiveAttribute.modify(primitiveId: string | IPCB_PrimitiveAttribute, property: { layer?: TPCB_LayersOfImage; x?: number; y?: number; key?: string; value?: string; keyVisible?: boolean; valueVisible?: boolean; fontFamily?: string; fontSize?: number; lineWidth?: number; alignMode?: EPCB_PrimitiveStringAlignMode; rotation?: number; reverse?: boolean; expansion?: number; mirror?: boolean; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveAttribute | undefined> 修改文本 returns: 文本图元对象

Inputs: args, windowId.

eda_pcb_primitive_component_createB

pcb_PrimitiveComponent.create(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem | { libraryType: ELIB_LibraryType.FOOTPRINT; libraryUuid: string; uuid: string } | ILIB_FootprintItem | ILIB_FootprintSearchItem, layer: TPCB_LayersOfComponent, x: number, y: number, rotation?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveComponent | undefined> 创建器件 returns: 器件图元对象

Inputs: args, windowId.

eda_pcb_primitive_component_deleteC

pcb_PrimitiveComponent.delete(primitiveIds: string | IPCB_PrimitiveComponent | Array | Array<IPCB_PrimitiveComponent>) -> Promise 删除器件 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_component_getB

pcb_PrimitiveComponent.get(primitiveIds: string) -> Promise<IPCB_PrimitiveComponent | undefined> 获取器件 returns: 器件图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_component_get_allB

pcb_PrimitiveComponent.getAll(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveComponent>> 获取所有器件 returns: 器件图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_component_get_all_pins_by_primitive_idA

pcb_PrimitiveComponent.getAllPinsByPrimitiveId(primitiveId: string) -> Promise<Array<IPCB_PrimitiveComponentPad> | undefined> 获取器件关联的所有焊盘 returns: 器件焊盘图元数组

Inputs: args, windowId.

eda_pcb_primitive_component_get_all_primitive_idA

pcb_PrimitiveComponent.getAllPrimitiveId(layer?: TPCB_LayersOfComponent, primitiveLock?: boolean) -> Promise<Array> 获取所有器件的图元 ID returns: 器件的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_component_get_all_property_namesC

pcb_PrimitiveComponent.getAllPropertyNames() -> Promise<Array> 获取所有器件的所有属性名称集合 returns: 所有器件的所有属性名称集合

Inputs: args, windowId.

eda_pcb_primitive_component_modifyB

pcb_PrimitiveComponent.modify(primitiveId: string | IPCB_PrimitiveComponent, property: { layer?: TPCB_LayersOfComponent; x?: number; y?: number; rotation?: number; primitiveLock?: boolean; addIntoBom?: boolean; designator?: string | null; name?: string | null; uniqueId?: string | null; manufacturer?: string | null; manufacturerId?: string | null; supplier?: string | null; supplierId?: string | null; otherProperty?: Record<string, any> }) -> Promise<IPCB_PrimitiveComponent | undefined> 修改器件 returns: 器件图元对象

Inputs: args, windowId.

eda_pcb_primitive_component_place_cbb_pcbB

pcb_PrimitiveComponent.placeCbbPcb(cbbPcb: { libraryUuid: string; cbbUuid: string; uuid: string }, x: number, y: number, props?: { reimportWhenNameRepeated?: boolean }) -> Promise 放置复用模块 PCB returns: 放置操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_component_place_component_with_mouseA

pcb_PrimitiveComponent.placeComponentWithMouse(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 使用鼠标放置器件 remarks: 本接口模拟前端点击放置按钮,指定的器件将绑定到当前鼠标,并在用户后续点击时放置于画布

本接口的返回时机并不会等待用户的放置操作,一旦器件被绑定到鼠标,本接口将立即返回 true 的结果 returns: 是否找到器件

Inputs: args, windowId.

eda_pcb_primitive_component_place_footprint_with_mouseA

pcb_PrimitiveComponent.placeFootprintWithMouse(footprint: { libraryUuid: string; uuid: string } | ILIB_FootprintItem | ILIB_FootprintSearchItem, properties?: Record<string, boolean | number | string | undefined>) -> Promise 使用鼠标放置封装 remarks: ADD since API v0.2.26

本接口模拟前端点击放置按钮,指定的封装将绑定到当前鼠标,并在用户后续点击时放置于画布

本接口的返回时机并不会等待用户的放置操作,一旦封装被绑定到鼠标,本接口将立即返回 true 的结果 returns: 是否找到封装

Inputs: args, windowId.

eda_pcb_primitive_dimension_createB

pcb_PrimitiveDimension.create(dimensionType: EPCB_PrimitiveDimensionType, coordinateSet: TPCB_PrimitiveDimensionCoordinateSet, layer?: TPCB_LayersOfDimension, unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL, lineWidth?: number, precision?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveDimension | undefined> 创建尺寸标注 returns: 尺寸标注图元对象

Inputs: args, windowId.

eda_pcb_primitive_dimension_deleteC

pcb_PrimitiveDimension.delete(primitiveIds: string | IPCB_PrimitiveDimension | Array | Array<IPCB_PrimitiveDimension>) -> Promise 删除尺寸标注 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_dimension_getC

pcb_PrimitiveDimension.get(primitiveIds: string) -> Promise<IPCB_PrimitiveDimension | undefined> 获取尺寸标注 returns: 尺寸标注图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_dimension_get_allC

pcb_PrimitiveDimension.getAll(layer?: TPCB_LayersOfDimension, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveDimension>> 获取所有尺寸标注 returns: 尺寸标注图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_dimension_get_all_primitive_idB

pcb_PrimitiveDimension.getAllPrimitiveId(layer?: TPCB_LayersOfDimension, primitiveLock?: boolean) -> Promise<Array> 获取所有尺寸标注的图元 ID returns: 尺寸标注的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_dimension_modifyB

pcb_PrimitiveDimension.modify(primitiveId: string | IPCB_PrimitiveDimension, property: { dimensionType?: EPCB_PrimitiveDimensionType; coordinateSet?: TPCB_PrimitiveDimensionCoordinateSet; layer?: TPCB_LayersOfDimension; unit?: ESYS_Unit.MILLIMETER | ESYS_Unit.CENTIMETER | ESYS_Unit.INCH | ESYS_Unit.MIL; lineWidth?: number; precision?: number; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveDimension | undefined> 修改尺寸标注 returns: 尺寸标注图元对象

Inputs: args, windowId.

eda_pcb_primitive_fill_createC

pcb_PrimitiveFill.create(layer: TPCB_LayersOfFill, complexPolygon: IPCB_Polygon, net?: string, fillMode?: EPCB_PrimitiveFillMode, lineWidth?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveFill | undefined> 创建填充 returns: 填充图元对象

Inputs: args, windowId.

eda_pcb_primitive_fill_deleteC

pcb_PrimitiveFill.delete(primitiveIds: string | IPCB_PrimitiveFill | Array | Array<IPCB_PrimitiveFill>) -> Promise 删除填充 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_fill_getB

pcb_PrimitiveFill.get(primitiveIds: string) -> Promise<IPCB_PrimitiveFill | undefined> 获取填充 returns: 填充图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_fill_get_allA

pcb_PrimitiveFill.getAll(layer?: TPCB_LayersOfFill, net?: string, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveFill>> 获取所有填充 returns: 填充图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_fill_get_all_primitive_idC

pcb_PrimitiveFill.getAllPrimitiveId(layer?: TPCB_LayersOfFill, net?: string, primitiveLock?: boolean) -> Promise<Array> 获取所有填充的图元 ID returns: 填充的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_fill_modifyA

pcb_PrimitiveFill.modify(primitiveId: string | IPCB_PrimitiveFill, property: { layer?: TPCB_LayersOfFill; complexPolygon?: IPCB_Polygon; net?: string; fillMode?: EPCB_PrimitiveFillMode; lineWidth?: number; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveFill | undefined> 修改填充 returns: 填充图元对象,undefined 表示修改失败

Inputs: args, windowId.

eda_pcb_primitive_get_primitive_board_lineB

pcb_Primitive.getPrimitiveBoardLine(primitiveId: string, layers?: Array<EPCB_LayerId>) -> Promise<IPCB_ComplexPolygon | undefined> 获取图元的边框线 returns: 复杂多边形,如果图元 ID 未匹配或图元在指定层上不存在,则返回 undefined

Inputs: args, windowId.

eda_pcb_primitive_get_primitive_by_primitive_idC

pcb_Primitive.getPrimitiveByPrimitiveId(id: string) -> Promise<IPCB_Primitive | undefined> 获取指定 ID 的图元的所有属性 returns: 图元的所有属性

Inputs: args, windowId.

eda_pcb_primitive_get_primitives_bboxA

pcb_Primitive.getPrimitivesBBox(primitiveIds: Array<string | IPCB_Primitive>) -> Promise<{ minX: number; minY: number; maxX: number; maxY: number } | undefined> 获取图元的 BBox returns: 图元的 BBox,如若图元不存在或没有 BBox,将会返回 undefined 的结果

Inputs: args, windowId.

eda_pcb_primitive_get_primitives_by_primitive_idC

pcb_Primitive.getPrimitivesByPrimitiveId(ids: Array) -> Promise<Array<IPCB_Primitive>> 获取指定所有 ID 的图元的所有属性 returns: 所有图元的所有属性

Inputs: args, windowId.

eda_pcb_primitive_get_primitive_type_by_primitive_idB

pcb_Primitive.getPrimitiveTypeByPrimitiveId(id: string) -> Promise<EPCB_PrimitiveType | undefined> 获取指定 ID 的图元的图元类型 returns: 图元类型

Inputs: args, windowId.

eda_pcb_primitive_image_createB

pcb_PrimitiveImage.create(x: number, y: number, complexPolygon: TPCB_PolygonSourceArray | Array<TPCB_PolygonSourceArray> | IPCB_Polygon | IPCB_ComplexPolygon, layer: TPCB_LayersOfImage, width?: number, height?: number, rotation?: number, horizonMirror?: boolean, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveImage | undefined> 创建图像 returns: 图像图元对象

Inputs: args, windowId.

eda_pcb_primitive_image_deleteD

pcb_PrimitiveImage.delete(primitiveIds: string | IPCB_PrimitiveImage | Array | Array<IPCB_PrimitiveImage>) -> Promise 删除图像 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_image_getC

pcb_PrimitiveImage.get(primitiveIds: string) -> Promise<IPCB_PrimitiveImage | undefined> 获取图像 returns: 图像图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_image_get_allC

pcb_PrimitiveImage.getAll(layer?: TPCB_LayersOfImage, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveImage>> 获取所有图像 returns: 图像图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_image_get_all_primitive_idB

pcb_PrimitiveImage.getAllPrimitiveId(layer?: TPCB_LayersOfImage, primitiveLock?: boolean) -> Promise<Array> 获取所有图像的图元 ID returns: 图像的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_image_modifyB

pcb_PrimitiveImage.modify(primitiveId: string | IPCB_PrimitiveImage, property: { x?: number; y?: number; layer?: TPCB_LayersOfImage; width?: number; height?: number; rotation?: number; horizonMirror?: boolean; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveImage | undefined> 修改图像 returns: 图像图元对象

Inputs: args, windowId.

eda_pcb_primitive_line_createB

pcb_PrimitiveLine.create(net: string, layer: TPCB_LayersOfLine, startX: number, startY: number, endX: number, endY: number, lineWidth?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveLine | undefined> 创建直线 returns: 直线图元对象

Inputs: args, windowId.

eda_pcb_primitive_line_deleteB

pcb_PrimitiveLine.delete(primitiveIds: string | IPCB_PrimitiveLine | Array | Array<IPCB_PrimitiveLine>) -> Promise 删除直线 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_line_getB

pcb_PrimitiveLine.get(primitiveIds: string) -> Promise<IPCB_PrimitiveLine | undefined> 获取直线 returns: 直线图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_line_get_allA

pcb_PrimitiveLine.getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveLine>> 获取所有直线 returns: 直线图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_line_get_all_primitive_idC

pcb_PrimitiveLine.getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean) -> Promise<Array> 获取所有直线的图元 ID returns: 折线的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_line_modifyB

pcb_PrimitiveLine.modify(primitiveId: string | IPCB_PrimitiveLine, property: { net?: string; layer?: TPCB_LayersOfLine; startX?: number; startY?: number; endX?: number; endY?: number; lineWidth?: number; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveLine | undefined> 修改直线 returns: 直线图元对象

Inputs: args, windowId.

eda_pcb_primitive_object_createC

pcb_PrimitiveObject.create(layer: TPCB_LayersOfObject, topLeftX: number, topLeftY: number, binaryData: string, width: number, height: number, rotation?: number, mirror?: boolean, fileName?: string, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveObject | undefined> 创建二进制内嵌对象 returns: - 二进制内嵌对象图元对象

Inputs: args, windowId.

eda_pcb_primitive_object_deleteC

pcb_PrimitiveObject.delete(primitiveIds: string | IPCB_PrimitiveObject | Array | Array<IPCB_PrimitiveObject>) -> Promise 删除二进制内嵌对象 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_object_getB

pcb_PrimitiveObject.get(primitiveIds: string) -> Promise<IPCB_PrimitiveObject | undefined> 获取二进制内嵌对象 returns: 二进制内嵌对象图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_object_get_allB

pcb_PrimitiveObject.getAll(layer?: TPCB_LayersOfObject, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveObject>> 获取所有二进制内嵌对象 returns: 二进制内嵌对象图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_object_get_all_primitive_idB

pcb_PrimitiveObject.getAllPrimitiveId(layer?: TPCB_LayersOfObject, primitiveLock?: boolean) -> Promise<Array> 获取所有二进制内嵌对象的图元 ID returns: 二进制内嵌对象的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_object_modifyB

pcb_PrimitiveObject.modify(primitiveId: string | IPCB_PrimitiveObject, property: { layer?: TPCB_LayersOfObject; topLeftX?: number; topLeftY?: number; binaryData?: string; width?: number; height?: number; rotation?: number; mirror?: boolean; fileName?: string; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveObject | undefined> 修改二进制内嵌对象 returns: 二进制内嵌对象图元对象,undefined 表示修改失败

Inputs: args, windowId.

eda_pcb_primitive_pad_createB

pcb_PrimitivePad.create(layer: TPCB_LayersOfPad, padNumber: string, x: number, y: number, rotation?: number, pad?: TPCB_PrimitivePadShape, net?: string, hole?: TPCB_PrimitivePadHole | null, holeOffsetX?: number, holeOffsetY?: number, holeRotation?: number, metallization?: boolean, padType?: EPCB_PrimitivePadType, specialPad?: TPCB_PrimitiveSpecialPadShape, solderMaskAndPasteMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null, heatWelding?: IPCB_PrimitivePadHeatWelding | null, primitiveLock?: boolean) -> Promise<IPCB_PrimitivePad | undefined> 创建焊盘 returns: 焊盘图元对象

Inputs: args, windowId.

eda_pcb_primitive_pad_deleteB

pcb_PrimitivePad.delete(primitiveIds: string | IPCB_PrimitivePad | Array | Array<IPCB_PrimitivePad>) -> Promise 删除焊盘 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_pad_getB

pcb_PrimitivePad.get(primitiveIds: string) -> Promise<IPCB_PrimitivePad | undefined> 获取焊盘 returns: 焊盘图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_pad_get_allC

pcb_PrimitivePad.getAll(layer?: TPCB_LayersOfPad, net?: string, primitiveLock?: boolean, padType?: EPCB_PrimitivePadType) -> Promise<Array<IPCB_PrimitivePad>> 获取所有焊盘 returns: 焊盘图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_pad_get_all_primitive_idB

pcb_PrimitivePad.getAllPrimitiveId(layer?: TPCB_LayersOfPad, net?: string, primitiveLock?: boolean, padType?: EPCB_PrimitivePadType) -> Promise<Array> 获取所有焊盘的图元 ID returns: 焊盘的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_pad_modifyB

pcb_PrimitivePad.modify(primitiveId: string | IPCB_PrimitivePad, property: { layer?: TPCB_LayersOfPad; padNumber?: string; x?: number; y?: number; rotation?: number; pad?: TPCB_PrimitivePadShape; net?: string; hole?: TPCB_PrimitivePadHole | null; holeOffsetX?: number; holeOffsetY?: number; holeRotation?: number; metallization?: boolean; specialPad?: TPCB_PrimitiveSpecialPadShape; solderMaskAndPasteMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null; heatWelding?: IPCB_PrimitivePadHeatWelding | null; primitiveLock?: boolean }) -> Promise<IPCB_PrimitivePad | undefined> 修改焊盘 returns: 焊盘图元对象

Inputs: args, windowId.

eda_pcb_primitive_polyline_createB

pcb_PrimitivePolyline.create(net: string, layer: TPCB_LayersOfLine, polygon: IPCB_Polygon, lineWidth?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitivePolyline | undefined> 创建折线 returns: 折线图元对象

Inputs: args, windowId.

eda_pcb_primitive_polyline_deleteC

pcb_PrimitivePolyline.delete(primitiveIds: string | IPCB_PrimitivePolyline | Array | Array<IPCB_PrimitivePolyline>) -> Promise 删除折线 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_polyline_getB

pcb_PrimitivePolyline.get(primitiveIds: string) -> Promise<IPCB_PrimitivePolyline | undefined> 获取折线 returns: 折线图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_polyline_get_allC

pcb_PrimitivePolyline.getAll(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitivePolyline>> 获取所有折线 returns: 折线图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_polyline_get_all_primitive_idB

pcb_PrimitivePolyline.getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfLine, primitiveLock?: boolean) -> Promise<Array> 获取所有折线的图元 ID returns: 折线的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_polyline_modifyC

pcb_PrimitivePolyline.modify(primitiveId: string | IPCB_PrimitivePolyline, property: { net?: string; layer?: TPCB_LayersOfLine; polygon?: IPCB_Polygon; lineWidth?: number; primitiveLock?: boolean }) -> Promise<IPCB_PrimitivePolyline | undefined> 修改折线 returns: 折线图元对象

Inputs: args, windowId.

eda_pcb_primitive_pour_createC

pcb_PrimitivePour.create(net: string, layer: TPCB_LayersOfCopper, complexPolygon: IPCB_Polygon, pourFillMethod?: EPCB_PrimitivePourFillMethod, preserveSilos?: boolean, pourName?: string, pourPriority?: number, lineWidth?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitivePour | undefined> 创建覆铜边框 returns: 覆铜边框图元对象

Inputs: args, windowId.

eda_pcb_primitive_pour_deleteB

pcb_PrimitivePour.delete(primitiveIds: string | IPCB_PrimitivePour | Array | Array<IPCB_PrimitivePour>) -> Promise 删除覆铜边框 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_poured_createB

pcb_PrimitivePoured.create() -> undefined 创建覆铜填充 remarks: 覆铜填充图元不支持新建,本接口调用将不会有任何效果 returns: undefined

Inputs: args, windowId.

eda_pcb_primitive_poured_deleteB

pcb_PrimitivePoured.delete(primitiveIds: string | IPCB_PrimitivePoured | Array | Array<IPCB_PrimitivePoured>) -> Promise 删除覆铜填充 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_poured_getB

pcb_PrimitivePoured.get(primitiveIds: string) -> Promise<IPCB_PrimitivePoured | undefined> 获取覆铜填充 returns: 覆铜填充图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_poured_get_allC

pcb_PrimitivePoured.getAll() -> Promise<Array<IPCB_PrimitivePoured>> 获取所有覆铜填充图元 returns: 覆铜填充图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_poured_get_all_primitive_idC

pcb_PrimitivePoured.getAllPrimitiveId() -> Promise<Array> 获取所有覆铜填充的图元 ID returns: 覆铜填充的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_poured_modifyA

pcb_PrimitivePoured.modify() -> undefined 修改覆铜填充 remarks: 覆铜填充图元不支持修改,本接口调用将不会有任何效果 returns: undefined

Inputs: args, windowId.

eda_pcb_primitive_pour_getB

pcb_PrimitivePour.get(primitiveIds: string) -> Promise<IPCB_PrimitivePour | undefined> 获取覆铜边框 returns: 覆铜边框图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_pour_get_allB

pcb_PrimitivePour.getAll(net?: string, layer?: TPCB_LayersOfCopper, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitivePour>> 获取所有覆铜边框图元 returns: 覆铜边框图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_pour_get_all_primitive_idA

pcb_PrimitivePour.getAllPrimitiveId(net?: string, layer?: TPCB_LayersOfCopper, primitiveLock?: boolean) -> Promise<Array> 获取所有覆铜边框的图元 ID returns: 覆铜边框的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_pour_modifyB

pcb_PrimitivePour.modify(primitiveId: string | IPCB_PrimitivePour, property: { net?: string; layer?: TPCB_LayersOfCopper; complexPolygon?: IPCB_Polygon; pourFillMethod?: EPCB_PrimitivePourFillMethod; preserveSilos?: boolean; pourName?: string; pourPriority?: number; lineWidth?: number; primitiveLock?: boolean }) -> Promise<IPCB_PrimitivePour | undefined> 修改覆铜边框 returns: 覆铜边框图元对象,undefined 表示修改失败

Inputs: args, windowId.

eda_pcb_primitive_pour_rebuild_copper_regionsC

pcb_PrimitivePour.rebuildCopperRegions(primitiveIds?: Array) -> Promise<Array<IPCB_PrimitivePoured>> 重建覆铜区域 returns: 覆铜填充图元数组

Inputs: args, windowId.

eda_pcb_primitive_region_createB

pcb_PrimitiveRegion.create(layer: TPCB_LayersOfRegion, complexPolygon: IPCB_Polygon, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, regionName?: string, lineWidth?: number, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveRegion | undefined> 创建区域 returns: 区域图元对象

Inputs: args, windowId.

eda_pcb_primitive_region_deleteC

pcb_PrimitiveRegion.delete(primitiveIds: string | IPCB_PrimitiveRegion | Array | Array<IPCB_PrimitiveRegion>) -> Promise 删除区域 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_region_getB

pcb_PrimitiveRegion.get(primitiveIds: string) -> Promise<IPCB_PrimitiveRegion | undefined> 获取区域 returns: 区域图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_region_get_allB

pcb_PrimitiveRegion.getAll(layer?: TPCB_LayersOfRegion, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveRegion>> 获取所有区域 returns: 区域图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_region_get_all_primitive_idC

pcb_PrimitiveRegion.getAllPrimitiveId(layer?: TPCB_LayersOfRegion, ruleType?: Array<EPCB_PrimitiveRegionRuleType>, primitiveLock?: boolean) -> Promise<Array> 获取所有区域的图元 ID returns: 区域的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_region_modifyC

pcb_PrimitiveRegion.modify(primitiveId: string | IPCB_PrimitiveRegion, property: { layer?: TPCB_LayersOfRegion; complexPolygon?: IPCB_Polygon; ruleType?: Array<EPCB_PrimitiveRegionRuleType>; regionName?: string; lineWidth?: number; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveRegion | undefined> 修改区域 returns: 区域图元对象,undefined 表示修改失败

Inputs: args, windowId.

eda_pcb_primitive_string_createD

pcb_PrimitiveString.create(layer: TPCB_LayersOfImage, x: number, y: number, text: string, fontFamily: string, fontSize: number, lineWidth: number, alignMode: EPCB_PrimitiveStringAlignMode, rotation: number, reverse: boolean, expansion: number, mirror: boolean, primitiveLock: boolean) -> Promise<IPCB_PrimitiveString | undefined> 创建文本 returns: 文本图元对象

Inputs: args, windowId.

eda_pcb_primitive_string_deleteC

pcb_PrimitiveString.delete(primitiveIds: string | IPCB_PrimitiveString | Array | Array<IPCB_PrimitiveString>) -> Promise 删除文本 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_string_getB

pcb_PrimitiveString.get(primitiveIds: string) -> Promise<IPCB_PrimitiveString | undefined> 获取文本 returns: 文本图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_string_get_allC

pcb_PrimitiveString.getAll(layer?: TPCB_LayersOfImage, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveString>> 获取所有文本 returns: 文本图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_string_get_all_primitive_idB

pcb_PrimitiveString.getAllPrimitiveId(layer?: TPCB_LayersOfImage, primitiveLock?: boolean) -> Promise<Array> 获取所有文本的图元 ID returns: 文本的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_string_modifyC

pcb_PrimitiveString.modify(primitiveId: string | IPCB_PrimitiveString, property: { layer?: TPCB_LayersOfImage; x?: number; y?: number; text?: string; fontFamily?: string; fontSize?: number; lineWidth?: number; alignMode?: EPCB_PrimitiveStringAlignMode; rotation?: number; reverse?: boolean; expansion?: number; mirror?: boolean; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveString | undefined> 修改文本 returns: 文本图元对象

Inputs: args, windowId.

eda_pcb_primitive_via_createB

pcb_PrimitiveVia.create(net: string, x: number, y: number, holeDiameter: number, diameter: number, viaType?: EPCB_PrimitiveViaType, designRuleBlindViaName?: string | null, solderMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null, primitiveLock?: boolean) -> Promise<IPCB_PrimitiveVia | undefined> 创建过孔 returns: 过孔图元对象

Inputs: args, windowId.

eda_pcb_primitive_via_deleteB

pcb_PrimitiveVia.delete(primitiveIds: string | IPCB_PrimitiveVia | Array | Array<IPCB_PrimitiveVia>) -> Promise 删除过孔 returns: 删除操作是否成功

Inputs: args, windowId.

eda_pcb_primitive_via_getB

pcb_PrimitiveVia.get(primitiveIds: string) -> Promise<IPCB_PrimitiveVia | undefined> 获取过孔 returns: 过孔图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_pcb_primitive_via_get_allB

pcb_PrimitiveVia.getAll(net?: string, primitiveLock?: boolean) -> Promise<Array<IPCB_PrimitiveVia>> 获取所有过孔 returns: 过孔图元对象数组

Inputs: args, windowId.

eda_pcb_primitive_via_get_all_primitive_idB

pcb_PrimitiveVia.getAllPrimitiveId(net?: string, primitiveLock?: boolean) -> Promise<Array> 获取所有过孔图元 ID returns: 过孔的图元 ID 数组

Inputs: args, windowId.

eda_pcb_primitive_via_modifyA

pcb_PrimitiveVia.modify(primitiveId: string | IPCB_PrimitiveVia, property: { net?: string; x?: number; y?: number; holeDiameter?: number; diameter?: number; viaType?: EPCB_PrimitiveViaType; designRuleBlindViaName?: string | null; solderMaskExpansion?: IPCB_PrimitiveSolderMaskAndPasteMaskExpansion | null; primitiveLock?: boolean }) -> Promise<IPCB_PrimitiveVia | undefined> 修改过孔 returns: 过孔图元对象

Inputs: args, windowId.

eda_pcb_ray_tracer_engine_disposeC

pcb_RayTracerEngine.dispose() -> Promise 停止光线追踪引擎 remarks: ADD since EDA v4

Inputs: args, windowId.

eda_pcb_ray_tracer_engine_get_light_configurationsD

pcb_RayTracerEngine.getLightConfigurations(lightName: string) -> Promise 获取光线追踪光源配置 returns: 光源配置

Inputs: args, windowId.

eda_pcb_ray_tracer_engine_get_render_configurationsC

pcb_RayTracerEngine.getRenderConfigurations() -> Promise 获取光线追踪渲染配置 remarks: 本接口配置定义还在进行中

ADD since EDA v4 returns: 渲染配置

Inputs: args, windowId.

eda_pcb_ray_tracer_engine_initC

pcb_RayTracerEngine.init() -> Promise 初始化光线追踪引擎 remarks: ADD since EDA v4

Inputs: args, windowId.

eda_pcb_ray_tracer_engine_pause_renderB

pcb_RayTracerEngine.pauseRender() -> Promise 暂停光线追踪渲染 remarks: 暂停后光线追踪引擎将停止继续渲染

Inputs: args, windowId.

eda_pcb_ray_tracer_engine_set_render_configurationsC

pcb_RayTracerEngine.setRenderConfigurations(configurations: any) -> Promise 设置光线追踪渲染配置 remarks: 本接口配置定义还在进行中

ADD since EDA v4

Inputs: args, windowId.

eda_pcb_select_control_clear_selectedB

pcb_SelectControl.clearSelected() -> Promise 清除选中 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_select_control_do_cross_probe_selectC

pcb_SelectControl.doCrossProbeSelect(components?: Array, pins?: Array, nets?: Array, highlight?: boolean, select?: boolean) -> Promise 进行交叉选择

Inputs: args, windowId.

eda_pcb_select_control_do_cross_probe_select_by_objectC

pcb_SelectControl.doCrossProbeSelectByObject(components?: Array, pins?: Array, nets?: Array) -> Promise 进行交叉选择

Inputs: args, windowId.

eda_pcb_select_control_do_select_primitivesC

pcb_SelectControl.doSelectPrimitives(primitiveIds: string | Array) -> Promise 使用图元 ID 选中图元 returns: 操作是否成功

Inputs: args, windowId.

eda_pcb_select_control_get_all_selected_primitivesB

pcb_SelectControl.getAllSelectedPrimitives() -> Promise<Array<IPCB_Primitive>> 查询所有已选中图元的图元对象 returns: 所有已选中图元的图元对象

Inputs: args, windowId.

eda_pcb_select_control_get_all_selected_primitives_primitive_idB

pcb_SelectControl.getAllSelectedPrimitives_PrimitiveId() -> Promise<Array> 查询所有已选中图元的图元 ID returns: 所有已选中图元的图元 ID

Inputs: args, windowId.

eda_pcb_select_control_get_current_mouse_positionB

pcb_SelectControl.getCurrentMousePosition() -> Promise<{ x: number; y: number } | undefined> 获取当前鼠标在画布上的位置 returns: 鼠标在画布上的位置,undefined 代表当前鼠标不在画布上

Inputs: args, windowId.

eda_pcb_select_control_get_selected_primitivesC

pcb_SelectControl.getSelectedPrimitives() -> Promise<Array> 查询选中图元的所有参数 returns: 选中图元的所有参数 [已弃用]

Inputs: args, windowId.

eda_pnl_document_saveB

pnl_Document.save() -> Promise 保存文档 returns: 保存操作是否成功,保存失败、上传失败等错误均返回 false

Inputs: args, windowId.

eda_sch_document_auto_layoutB

sch_Document.autoLayout(props?: { uuids?: Array; netlist?: { component: Record<string, { pinInfoMap: Record<string, { name: string; number: string; net: string; props: { 'Pin Number': string } }> }> }; designatorDeviceTypeMap?: Record<string, 'resistor' | 'capacitor' | 'inductive' | 'diode' | 'triode' | 'oscillator' | 'chip' | 'otherDevice'> }) -> Promise 自动布局 remarks: 如不传入任何参数,将对所有器件进行自动布局 returns: 自动布局结果

Inputs: args, windowId.

eda_sch_document_auto_routingC

sch_Document.autoRouting(props?: { uuids?: Array; netlist?: { component: Record<string, { pinInfoMap: Record<string, { name: string; number: string; net: string; props: { 'Pin Number': string } }> }> }; designatorDeviceTypeMap?: Record<string, 'resistor' | 'capacitor' | 'inductive' | 'diode' | 'triode' | 'oscillator' | 'chip' | 'otherDevice'> }) -> Promise 自动布线 remarks: 如不传入任何参数,将对所有未布线的网络进行自动布线 returns: 自动布线结果

Inputs: args, windowId.

eda_sch_document_get_current_filter_configurationC

sch_Document.getCurrentFilterConfiguration() -> Promise<Record<string, boolean> | undefined> 获取当前画布过滤器配置 remarks: ADD since EDA v4.2 returns: 当前画布过滤器配置,undefined 为获取失败

Inputs: args, windowId.

eda_sch_document_get_primitive_at_pointA

sch_Document.getPrimitiveAtPoint(x: number, y: number) -> Promise<ISCH_Primitive | undefined> 获取坐标点的图元 remarks: 本操作和前端鼠标点击操作类似,将会获取指定坐标点上的图元

ADD since EDA v4.2 returns: 坐标点的图元,如若坐标点无法找到图元,将返回 undefined

Inputs: args, windowId.

eda_sch_document_get_primitives_in_regionA

sch_Document.getPrimitivesInRegion(left: number, right: number, top: number, bottom: number) -> Promise<Array<ISCH_Primitive>> 获取区域内所有图元 remarks: 本接口仅会返回完全包含在区域内的图元,如果图元有部分位于区域外,将被忽略

ADD since EDA v4.2 returns: 区域内所有图元

Inputs: args, windowId.

eda_sch_document_import_changesB

sch_Document.importChanges() -> Promise 从 PCB 导入变更 returns: 导入操作是否成功,导入失败或游离原理图返回 false

Inputs: args, windowId.

eda_sch_document_navigate_to_coordinatesB

sch_Document.navigateToCoordinates(x: number, y: number) -> Promise 定位到画布坐标 remarks: 本接口在前端画布上定位到指定的坐标;

此处的单位跨度为 0.01inch

ADD since EDA v4.2 returns: 操作是否成功

Inputs: args, windowId.

eda_sch_document_navigate_to_regionA

sch_Document.navigateToRegion(left: number, right: number, top: number, bottom: number) -> Promise 定位到画布区域 remarks: 本接口在前端画布上定位到指定的区域;

例如:传入数据为 {left: 0, right: 60, top: 100, bottom: -20} => navigateToRegion(0, 60, 100, -20), 则画布将会定位到以 [30, 40] 为中心的,x 轴方向长度为 60,y 轴方向长度为 120 的矩形范围;

本接口不进行缩放操作,但会生成指示定位中心及表示区域范围的矩形框;

此处的单位跨度为 0.01inch

ADD since EDA v4.2 returns: 操作是否成功

Inputs: args, windowId.

eda_sch_document_saveB

sch_Document.save() -> Promise 保存文档 returns: 保存操作是否成功,保存失败、上传失败等错误均返回 false

Inputs: args, windowId.

eda_sch_drc_checkC

sch_Drc.check(strict: boolean, userInterface: boolean, includeVerboseError: false) -> Promise 检查 DRC returns: DRC 检查是否通过

Inputs: args, windowId.

eda_sch_event_add_mouse_event_listenerA

sch_Event.addMouseEventListener(id: string, eventType: 'all' | ESCH_MouseEventType, callFn: (eventType: ESCH_MouseEventType) => void | Promise, onlyOnce?: boolean) -> void 新增鼠标事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_sch_event_add_primitive_event_listenerA

sch_Event.addPrimitiveEventListener(id: string, eventType: 'all' | ESCH_PrimitiveEventType, callFn: (eventType: ESCH_PrimitiveEventType, props: { primitiveIds: Array }) => void | Promise, onlyOnce?: boolean) -> void 新增图元事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_sch_event_add_simulation_engine_pull_event_listenerA

sch_Event.addSimulationEnginePullEventListener(id: string, eventType: 'all', callFn: (eventType: ESCH_DynamicSimulationEnginePullEventType | ESCH_SpiceSimulationEnginePullEventType, props: Record<string, any>) => void | Promise) -> void 注册仿真引擎拉取事件监听 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

Inputs: args, windowId.

eda_sch_event_is_event_listener_already_existC

sch_Event.isEventListenerAlreadyExist(id: string) -> boolean 查询事件监听是否存在 returns: 事件监听是否存在

Inputs: args, windowId.

eda_sch_event_remove_event_listenerB

sch_Event.removeEventListener(id: string) -> boolean 移除事件监听 returns: 是否移除指定事件监听

Inputs: args, windowId.

eda_sch_manufacture_data_delete_bom_templateC

sch_ManufactureData.deleteBomTemplate(template: string) -> Promise 删除 BOM 模板 returns: 操作是否成功

Inputs: args, windowId.

eda_sch_manufacture_data_get_assembly_variants_configsB

sch_ManufactureData.getAssemblyVariantsConfigs() -> Promise<Array<{ text: string; value: string }>> 获取装配体变量配置列表 returns: 装配体变量配置列表

Inputs: args, windowId.

eda_sch_manufacture_data_get_bom_fileC

sch_ManufactureData.getBomFile(fileName?: string, fileType?: 'xlsx' | 'csv', template?: string, filterOptions?: Array<{ property: string; includeValue: boolean | string }>, statistics?: Array, property?: Array, columns?: Array<IPCB_BomPropertiesTableColumns>, assemblyVariantsConfig?: { text: string; value: string }) -> Promise<File | undefined> 获取 BOM 文件 returns: BOM 文件数据

Inputs: args, windowId.

eda_sch_manufacture_data_get_bom_template_fileD

sch_ManufactureData.getBomTemplateFile(template: string) -> Promise<File | undefined> 获取 BOM 模板文件 returns: BOM 模板文件

Inputs: args, windowId.

eda_sch_manufacture_data_get_bom_templatesC

sch_ManufactureData.getBomTemplates() -> Promise<Array> 获取 BOM 模板列表 returns: BOM 模板列表

Inputs: args, windowId.

eda_sch_manufacture_data_get_export_document_fileC

sch_ManufactureData.getExportDocumentFile(fileName?: string, fileType?: ESCH_ExportDocumentFileType, typeSpecificParams?: { theme?: 'Default' | 'White on Black' | 'Black on White'; lineWidth?: 'Default' | 'Always 1px' | 'Follow the Zoom Change'; displayAttributesAsMenu?: boolean; size?: 'Original Size' | string | { width: number; height: number; unit: ESYS_Unit.INCH | ESYS_Unit.MILLIMETER } }, object?: 'All Schematic' | 'Current Schematic' | 'Current Schematic Page' | string, objectSpecificParams?: { range?: 'All' | [number, number]; outputMethod?: 'Merged sheet' | 'Separated sheet' }) -> Promise<File | undefined> 获取导出文档文件 deprecated: - DEPRECATED since EDA v4.1 returns: 导出文档文件数据(或压缩包) [已弃用]

Inputs: args, windowId.

eda_sch_manufacture_data_get_netlist_fileC

sch_ManufactureData.getNetlistFile(fileName?: string, netlistType?: ESYS_NetlistType) -> Promise<File | undefined> 获取网表文件(Netlist) returns: 网表文件数据

Inputs: args, windowId.

eda_sch_manufacture_data_get_pdf_fileC

sch_ManufactureData.getPdfFile(fileName?: string, typeSpecificParams?: { theme?: 'Default' | 'White on Black' | 'Black on White'; lineWidth?: 'Default' | 'Always 1px' | 'Follow the Zoom Change'; displayAttributesAsMenu?: boolean; size?: 'Original Size' | string | { width: number; height: number; unit: ESYS_Unit.INCH | ESYS_Unit.MILLIMETER } }, object?: 'All Schematic' | 'Current Schematic' | 'Current Schematic Page' | string, objectSpecificParams?: { range?: 'All' | [number, number]; outputMethod?: 'Merged sheet' | 'Separated sheet' }) -> Promise<File | undefined> 获取 PDF 文件 returns: PDF 文件数据(或压缩包)

Inputs: args, windowId.

eda_sch_manufacture_data_get_png_fileA

sch_ManufactureData.getPngFile(fileName?: string, resolution?: ISCH_ExportPngResolution) -> Promise<File | undefined> 获取 PNG 文件 remarks: 支持按长宽分辨率导出高清图片(最大 4096); 支持只传入 width 或 height 中的任意一个,另一侧将按原始比例自动拉伸输出; width 与 height 均不传时,按当前一倍分辨率输出

ADD since EDA v3.2.183 / EDA v4.1.23 returns: PNG 文件数据(或压缩包)

Inputs: args, windowId.

eda_sch_manufacture_data_get_simulation_netlist_fileC

sch_ManufactureData.getSimulationNetlistFile(fileName?: string, netlistType?: ESCH_SimulationNetlistType) -> Promise<File | undefined> 获取仿真网表文件 returns: 仿真网表文件数据

Inputs: args, windowId.

eda_sch_manufacture_data_get_svg_fileA

sch_ManufactureData.getSvgFile(fileName?: string) -> Promise<File | undefined> 获取 SVG 文件 remarks: 多图页时会导出为压缩包(zip)

ADD since EDA v3.2.183 / EDA v4.1.23 returns: SVG 文件数据(或压缩包)

Inputs: args, windowId.

eda_sch_manufacture_data_place_components_orderD

sch_ManufactureData.placeComponentsOrder(interactive?: boolean, ignoreWarning?: boolean) -> Promise 元件下单 returns: 是否通过下单检查

Inputs: args, windowId.

eda_sch_manufacture_data_place_smt_components_orderC

sch_ManufactureData.placeSmtComponentsOrder(interactive?: boolean, ignoreWarning?: boolean) -> Promise SMT 元件下单 returns: 是否通过下单检查

Inputs: args, windowId.

eda_sch_manufacture_data_upload_bom_template_fileB

sch_ManufactureData.uploadBomTemplateFile(templateFile: File, template?: string) -> Promise<string | undefined> 上传 BOM 模板文件 returns: BOM 模板名称

Inputs: args, windowId.

eda_sch_net_get_all_netsC

sch_Net.getAllNets() -> Promise<Array<ISCH_NetInfo>> 获取所有网络的详细信息 remarks: ADD since EDA v4.2 returns: 所有网络的详细信息

Inputs: args, windowId.

eda_sch_net_get_all_nets_nameB

sch_Net.getAllNetsName() -> Promise<Array> 获取所有网络的网络名称 remarks: ADD since EDA v4.2 returns: 网络名称数组

Inputs: args, windowId.

eda_sch_net_get_current_project_all_netsC

sch_Net.getCurrentProjectAllNets() -> Promise<Array<ISCH_ProjectNetInfo>> 获取当前工程下所有网络的详细信息 remarks: ADD since EDA v4.2 returns: 当前工程下所有网络的详细信息

Inputs: args, windowId.

eda_sch_net_get_netB

sch_Net.getNet(net: string) -> Promise<ISCH_NetInfo | undefined> 获取指定网络的详细信息 remarks: ADD since EDA v4.2 returns: 网络的详细信息, undefined 为不存在该网络

Inputs: args, windowId.

eda_sch_netlist_get_netlistC

sch_Netlist.getNetlist(type?: ESYS_NetlistType) -> Promise 获取网表 returns: 网表数据 [已弃用]

Inputs: args, windowId.

eda_sch_netlist_set_netlistD

sch_Netlist.setNetlist(type: ESYS_NetlistType | undefined, netlist: string) -> Promise 更新网表

Inputs: args, windowId.

eda_sch_primitive_arc_createC

sch_PrimitiveArc.create(startX: number, startY: number, referenceX: number, referenceY: number, endX: number, endY: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null) -> Promise<ISCH_PrimitiveArc | undefined> 创建圆弧 returns: 圆弧图元对象

Inputs: args, windowId.

eda_sch_primitive_arc_deleteB

sch_PrimitiveArc.delete(primitiveIds: string | ISCH_PrimitiveArc | Array | Array<ISCH_PrimitiveArc>) -> Promise 删除圆弧 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_arc_getC

sch_PrimitiveArc.get(primitiveIds: string) -> Promise<ISCH_PrimitiveArc | undefined> 获取圆弧 returns: 圆弧图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_arc_get_allB

sch_PrimitiveArc.getAll() -> Promise<Array<ISCH_PrimitiveArc>> 获取所有圆弧 returns: 圆弧图元对象数组

Inputs: args, windowId.

eda_sch_primitive_arc_get_all_primitive_idC

sch_PrimitiveArc.getAllPrimitiveId() -> Promise<Array> 获取所有圆弧的图元 ID returns: 圆弧的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_arc_modifyB

sch_PrimitiveArc.modify(primitiveId: string | ISCH_PrimitiveArc, property: { startX?: number; startY?: number; referenceX?: number; referenceY?: number; endX?: number; endY?: number; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null }) -> Promise<ISCH_PrimitiveArc | undefined> 修改圆弧 returns: 圆弧图元对象

Inputs: args, windowId.

eda_sch_primitive_attribute_createA

sch_PrimitiveAttribute.create() -> undefined 创建属性 remarks: 属性图元不支持新建,本接口调用将不会有任何效果 returns: undefined

Inputs: args, windowId.

eda_sch_primitive_attribute_create_net_labelC

sch_PrimitiveAttribute.createNetLabel(x: number, y: number, net: string) -> Promise<ISCH_PrimitiveAttribute | undefined> 创建网络标签 remarks: ADD since EDA v4 returns: 网络标签属性图元

Inputs: args, windowId.

eda_sch_primitive_attribute_deleteA

sch_PrimitiveAttribute.delete() -> boolean 删除属性 remarks: 属性图元不支持删除,本接口调用将不会有任何效果 returns: false

Inputs: args, windowId.

eda_sch_primitive_attribute_getB

sch_PrimitiveAttribute.get(primitiveIds: string) -> Promise<ISCH_PrimitiveAttribute | undefined> 获取属性 returns: 属性图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_attribute_get_allB

sch_PrimitiveAttribute.getAll(parentPrimitiveId?: string) -> Promise<Array<ISCH_PrimitiveAttribute>> 获取所有属性 remarks: 不传递父图元 ID 将拿到图页中的所有属性图元 returns: 属性图元对象数组

Inputs: args, windowId.

eda_sch_primitive_attribute_get_all_primitive_idB

sch_PrimitiveAttribute.getAllPrimitiveId(parentPrimitiveId?: string) -> Promise<Array> 获取所有属性的图元 ID remarks: 不传递父图元 ID 将拿到图页中的所有属性图元 returns: 属性的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_attribute_modifyB

sch_PrimitiveAttribute.modify(primitiveId: string | ISCH_PrimitiveAttribute, property: { x?: number | null; y?: number | null; rotation?: number | null; color?: string | null; fontName?: string | null; fontSize?: number | null; bold?: boolean | null; italic?: boolean | null; underLine?: boolean | null; alignMode?: ESCH_PrimitiveTextAlignMode | null; fillColor?: string | null; key?: string; value?: string; keyVisible?: boolean | null; valueVisible?: boolean | null }) -> Promise<ISCH_PrimitiveAttribute | undefined> 修改属性 returns: 属性图元对象

Inputs: args, windowId.

eda_sch_primitive_bus_createC

sch_PrimitiveBus.create(busName: string, line: Array | Array<Array>, color?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null) -> Promise<ISCH_PrimitiveBus | undefined> 创建总线 returns: 总线图元对象

Inputs: args, windowId.

eda_sch_primitive_bus_deleteC

sch_PrimitiveBus.delete(primitiveIds: string | ISCH_PrimitiveBus | Array | Array<ISCH_PrimitiveBus>) -> Promise 删除总线 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_bus_getB

sch_PrimitiveBus.get(primitiveIds: string) -> Promise<ISCH_PrimitiveBus | undefined> 获取总线 returns: 总线图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_bus_get_allB

sch_PrimitiveBus.getAll() -> Promise<Array<ISCH_PrimitiveBus>> 获取所有总线 returns: 总线图元对象数组

Inputs: args, windowId.

eda_sch_primitive_bus_get_all_primitive_idC

sch_PrimitiveBus.getAllPrimitiveId() -> Promise<Array> 获取所有总线的图元 ID returns: 总线的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_bus_modifyB

sch_PrimitiveBus.modify(primitiveId: string | ISCH_PrimitiveBus, property: { busName?: string; line?: Array | Array<Array>; color?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null }) -> Promise<ISCH_PrimitiveBus | undefined> 修改总线 returns: 总线图元对象

Inputs: args, windowId.

eda_sch_primitive_circle_createA

sch_PrimitiveCircle.create(centerX: number, centerY: number, radius: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null, fillStyle?: ESCH_PrimitiveFillStyle | null) -> Promise<ISCH_PrimitiveCircle | undefined> 创建圆 returns: 圆图元对象

Inputs: args, windowId.

eda_sch_primitive_circle_deleteB

sch_PrimitiveCircle.delete(primitiveIds: string | ISCH_PrimitiveCircle | Array | Array<ISCH_PrimitiveCircle>) -> Promise 删除圆 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_circle_getB

sch_PrimitiveCircle.get(primitiveIds: string) -> Promise<ISCH_PrimitiveCircle | undefined> 获取圆 returns: 圆图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_circle_get_allC

sch_PrimitiveCircle.getAll() -> Promise<Array<ISCH_PrimitiveCircle>> 获取所有圆 returns: 圆图元对象数组

Inputs: args, windowId.

eda_sch_primitive_circle_get_all_primitive_idC

sch_PrimitiveCircle.getAllPrimitiveId() -> Promise<Array> 获取所有圆的图元 ID returns: 圆的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_circle_modifyC

sch_PrimitiveCircle.modify(primitiveId: string | ISCH_PrimitiveCircle, property: { centerX?: number; centerY?: number; radius?: number; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; fillStyle?: ESCH_PrimitiveFillStyle | null }) -> Promise<ISCH_PrimitiveCircle | undefined> 修改圆 returns: 圆图元对象

Inputs: args, windowId.

eda_sch_primitive_component_createC

sch_PrimitiveComponent.create(component: { libraryType?: ELIB_LibraryType.DEVICE; libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem | { libraryType: ELIB_LibraryType.SYMBOL; libraryUuid: string; uuid: string } | ILIB_SymbolItem | ILIB_SymbolSearchItem, x: number, y: number, subPartName?: string, rotation?: number, mirror?: boolean, addIntoBom?: boolean, addIntoPcb?: boolean) -> Promise<ISCH_PrimitiveComponent | undefined> 创建器件 returns: 器件图元对象

Inputs: args, windowId.

eda_sch_primitive_component_create_cbb_symbolB

sch_PrimitiveComponent.createCbbSymbol(cbbSymbol: { libraryUuid: string; cbbUuid: string; uuid?: string }, x: number, y: number, rotation?: number, mirror?: boolean) -> Promise<ISCH_PrimitiveCbbSymbolComponent | undefined> 创建复用模块符号 returns: 复用模块符号图元对象

Inputs: args, windowId.

eda_sch_primitive_component_create_net_flagA

sch_PrimitiveComponent.createNetFlag(identification: 'Power' | 'Ground' | 'AnalogGround' | 'ProtectGround', net: string, x: number, y: number, rotation?: number, mirror?: boolean) -> Promise<ISCH_PrimitiveComponent | undefined> 创建网络标识 returns: 器件图元对象

Inputs: args, windowId.

eda_sch_primitive_component_create_net_portC

sch_PrimitiveComponent.createNetPort(direction: 'IN' | 'OUT' | 'BI', net: string, x: number, y: number, rotation?: number, mirror?: boolean) -> Promise<ISCH_PrimitiveComponent | undefined> 创建网络端口 returns: 器件图元对象

Inputs: args, windowId.

eda_sch_primitive_component_create_short_circuit_flagC

sch_PrimitiveComponent.createShortCircuitFlag(x: number, y: number, rotation?: number, mirror?: boolean) -> Promise<ISCH_PrimitiveComponent | undefined> 创建短接标识 returns: 器件图元对象

Inputs: args, windowId.

eda_sch_primitive_component_deleteC

sch_PrimitiveComponent.delete(primitiveIds: string | ISCH_PrimitiveComponent | Array | Array<ISCH_PrimitiveComponent>) -> Promise 删除器件 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_getC

sch_PrimitiveComponent.get(primitiveIds: string) -> Promise<ISCH_PrimitiveComponent | undefined> 获取器件 returns: 器件图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_component_get_allB

sch_PrimitiveComponent.getAll(componentType?: ESCH_PrimitiveComponentType, allSchematicPages?: boolean) -> Promise<Array<ISCH_PrimitiveComponent>> 获取所有器件 returns: 器件图元对象数组

Inputs: args, windowId.

eda_sch_primitive_component_get_all_pins_by_primitive_idC

sch_PrimitiveComponent.getAllPinsByPrimitiveId(primitiveId: string) -> Promise<Array<ISCH_PrimitiveComponentPin> | undefined> 获取器件关联的所有引脚 returns: 器件引脚图元数组

Inputs: args, windowId.

eda_sch_primitive_component_get_all_primitive_idC

sch_PrimitiveComponent.getAllPrimitiveId(componentType?: ESCH_PrimitiveComponentType, allSchematicPages?: boolean) -> Promise<Array> 获取所有器件的图元 ID returns: 器件的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_component_get_all_property_namesB

sch_PrimitiveComponent.getAllPropertyNames() -> Promise<Array> 获取所有器件的所有属性名称集合 returns: 所有器件的所有属性名称集合

Inputs: args, windowId.

eda_sch_primitive_component_modifyB

sch_PrimitiveComponent.modify(primitiveId: string | ISCH_PrimitiveComponent, property: { x?: number; y?: number; rotation?: number; mirror?: boolean; addIntoBom?: boolean; addIntoPcb?: boolean; designator?: string | null; name?: string | null; uniqueId?: string | null; manufacturer?: string | null; manufacturerId?: string | null; supplier?: string | null; supplierId?: string | null; otherProperty?: Record<string, string | number | boolean> }) -> Promise<ISCH_PrimitiveComponent | undefined> 修改器件 returns: 器件图元对象

Inputs: args, windowId.

eda_sch_primitive_component_place_cbb_schematic_pageC

sch_PrimitiveComponent.placeCbbSchematicPage(cbbSchematicPage: { libraryUuid: string; cbbUuid: string; uuid: string }, x: number, y: number, props?: { reimportWhenNameRepeated?: boolean }) -> Promise 放置复用模块原理图图页 returns: 放置操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_place_component_with_mouseB

sch_PrimitiveComponent.placeComponentWithMouse(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem, subPartName?: string) -> Promise 使用鼠标放置器件 remarks: 本接口模拟前端点击放置按钮,指定的器件将绑定到当前鼠标,并在用户后续点击时放置于画布

本接口的返回时机并不会等待用户的放置操作,一旦器件被绑定到鼠标,本接口将立即返回 true 的结果 returns: 是否找到器件

Inputs: args, windowId.

eda_sch_primitive_component_place_symbol_with_mouseB

sch_PrimitiveComponent.placeSymbolWithMouse(symbol: { libraryUuid: string; uuid: string } | ILIB_SymbolItem | ILIB_SymbolSearchItem, subPartName?: string, properties?: Record<string, boolean | number | string | undefined>) -> Promise 使用鼠标放置符号 remarks: ADD since API v0.2.26

本接口模拟前端点击放置按钮,指定的符号将绑定到当前鼠标,并在用户后续点击时放置于画布

本接口的返回时机并不会等待用户的放置操作,一旦符号被绑定到鼠标,本接口将立即返回 true 的结果 returns: 是否找到符号

Inputs: args, windowId.

eda_sch_primitive_component_set_net_flag_component_uuid_analog_groundB

sch_PrimitiveComponent.setNetFlagComponentUuid_AnalogGround(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 设置在扩展 API 中 AnalogGround 网络标识关联的器件 UUID returns: 操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_set_net_flag_component_uuid_groundC

sch_PrimitiveComponent.setNetFlagComponentUuid_Ground(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 设置在扩展 API 中 Ground 网络标识关联的器件 UUID returns: 操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_set_net_flag_component_uuid_powerB

sch_PrimitiveComponent.setNetFlagComponentUuid_Power(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 设置在扩展 API 中 Power 网络标识关联的器件 UUID returns: 操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_set_net_flag_component_uuid_protect_groundB

sch_PrimitiveComponent.setNetFlagComponentUuid_ProtectGround(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 设置在扩展 API 中 ProtectGround 网络标识关联的器件 UUID returns: 操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_set_net_port_component_uuid_biC

sch_PrimitiveComponent.setNetPortComponentUuid_BI(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 设置在扩展 API 中 BI 网络端口关联的器件 UUID returns: 操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_set_net_port_component_uuid_inB

sch_PrimitiveComponent.setNetPortComponentUuid_IN(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 设置在扩展 API 中 IN 网络端口关联的器件 UUID returns: 操作是否成功

Inputs: args, windowId.

eda_sch_primitive_component_set_net_port_component_uuid_outB

sch_PrimitiveComponent.setNetPortComponentUuid_OUT(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem) -> Promise 设置在扩展 API 中 OUT 网络端口关联的器件 UUID returns: 操作是否成功

Inputs: args, windowId.

eda_sch_primitive_get_primitive_by_primitive_idB

sch_Primitive.getPrimitiveByPrimitiveId(id: string) -> Promise<ISCH_Primitive | undefined> 获取指定 ID 的图元的所有属性 returns: 图元的所有属性

Inputs: args, windowId.

eda_sch_primitive_get_primitives_bboxB

sch_Primitive.getPrimitivesBBox(primitiveIds: Array<string | ISCH_Primitive>) -> Promise<{ minX: number; minY: number; maxX: number; maxY: number } | undefined> 获取图元的 BBox returns: 图元的 BBox,如若图元不存在或没有 BBox,将会返回 undefined 的结果

Inputs: args, windowId.

eda_sch_primitive_get_primitives_by_primitive_idC

sch_Primitive.getPrimitivesByPrimitiveId(ids: Array) -> Promise<Array<ISCH_Primitive>> 获取指定所有 ID 的图元的所有属性 returns: 所有图元的所有属性

Inputs: args, windowId.

eda_sch_primitive_get_primitive_type_by_primitive_idB

sch_Primitive.getPrimitiveTypeByPrimitiveId(id: string) -> Promise<ESCH_PrimitiveType | undefined> 获取指定 ID 的图元的图元类型 returns: 图元类型

Inputs: args, windowId.

eda_sch_primitive_object_createA

sch_PrimitiveObject.create(content: File | string, startX: number, startY: number, width?: number, height?: number, rotation?: number, mirror?: boolean, fileName?: string) -> Promise<ISCH_PrimitiveObject | undefined> 创建二进制内嵌对象 returns: 二进制内嵌对象图元对象

Inputs: args, windowId.

eda_sch_primitive_object_deleteB

sch_PrimitiveObject.delete(primitiveIds: string | ISCH_PrimitiveObject | Array | Array<ISCH_PrimitiveObject>) -> Promise 删除二进制内嵌对象 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_object_getB

sch_PrimitiveObject.get(primitiveIds: string) -> Promise<ISCH_PrimitiveObject | undefined> 获取二进制内嵌对象 returns: 二进制内嵌对象图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_object_get_allC

sch_PrimitiveObject.getAll() -> Promise<Array<ISCH_PrimitiveObject>> 获取所有二进制内嵌对象 returns: 二进制内嵌对象图元对象数组

Inputs: args, windowId.

eda_sch_primitive_object_get_all_primitive_idB

sch_PrimitiveObject.getAllPrimitiveId() -> Promise<Array> 获取所有二进制内嵌对象的图元 ID returns: 二进制内嵌对象的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_object_modifyB

sch_PrimitiveObject.modify(primitiveId: string | ISCH_PrimitiveObject, property: { content?: File | string; startX?: number; startY?: number; width?: number; height?: number; rotation?: number; mirror?: boolean; fileName?: string }) -> Promise<ISCH_PrimitiveObject | undefined> 修改二进制内嵌对象 returns: 二进制内嵌对象图元对象,undefined 表示修改失败

Inputs: args, windowId.

eda_sch_primitive_pin_createC

sch_PrimitivePin.create(x: number, y: number, pinNumber: string, pinName?: string, rotation?: number, pinLength?: number, pinColor?: string | null, pinShape?: ESCH_PrimitivePinShape, pinType?: ESCH_PrimitivePinType) -> Promise<ISCH_PrimitivePin | undefined> 创建引脚 returns: 引脚图元对象

Inputs: args, windowId.

eda_sch_primitive_pin_deleteB

sch_PrimitivePin.delete(primitiveIds: string | ISCH_PrimitivePin | Array | Array<ISCH_PrimitivePin>) -> Promise 删除引脚 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_pin_getC

sch_PrimitivePin.get(primitiveIds: string) -> Promise<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin | undefined> 获取引脚 returns: 引脚图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_pin_get_allC

sch_PrimitivePin.getAll() -> Promise<Array<ISCH_PrimitivePin>> 获取所有引脚 returns: 引脚图元对象数组

Inputs: args, windowId.

eda_sch_primitive_pin_get_all_primitive_idC

sch_PrimitivePin.getAllPrimitiveId() -> Promise<Array> 获取所有引脚的图元 ID returns: 引脚的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_pin_modifyC

sch_PrimitivePin.modify(primitiveId: string | ISCH_PrimitivePin | ISCH_PrimitiveComponentPin, property: { x?: number; y?: number; pinNumber?: string; pinName?: string; rotation?: number; pinLength?: number; pinColor?: string | null; pinShape?: ESCH_PrimitivePinShape; pinType?: ESCH_PrimitivePinType; noConnected?: boolean; otherProperty?: Record<string, string | number | boolean> }) -> Promise<ISCH_PrimitivePin | ISCH_PrimitiveComponentPin | undefined> 修改引脚 returns: 引脚图元对象

Inputs: args, windowId.

eda_sch_primitive_polygon_createB

sch_PrimitivePolygon.create(line: Array, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null) -> Promise<ISCH_PrimitivePolygon | undefined> 创建多边形 returns: 多边形图元对象

Inputs: args, windowId.

eda_sch_primitive_polygon_deleteC

sch_PrimitivePolygon.delete(primitiveIds: string | ISCH_PrimitivePolygon | Array | Array<ISCH_PrimitivePolygon>) -> Promise 删除多边形 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_polygon_getB

sch_PrimitivePolygon.get(primitiveIds: string) -> Promise<ISCH_PrimitivePolygon | undefined> 获取多边形 returns: 多边形图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_polygon_get_allC

sch_PrimitivePolygon.getAll() -> Promise<Array<ISCH_PrimitivePolygon>> 获取所有多边形 returns: 多边形图元对象数组

Inputs: args, windowId.

eda_sch_primitive_polygon_get_all_primitive_idB

sch_PrimitivePolygon.getAllPrimitiveId() -> Promise<Array> 获取所有多边形的图元 ID returns: 多边形的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_polygon_modifyB

sch_PrimitivePolygon.modify(primitiveId: string | ISCH_PrimitivePolygon, property: { line?: Array; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null }) -> Promise<ISCH_PrimitivePolygon | undefined> 修改多边形 returns: 多边形图元对象

Inputs: args, windowId.

eda_sch_primitive_rectangle_createC

sch_PrimitiveRectangle.create(topLeftX: number, topLeftY: number, width: number, height: number, cornerRadius?: number, rotation?: number, color?: string | null, fillColor?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null, fillStyle?: ESCH_PrimitiveFillStyle | null) -> Promise<ISCH_PrimitiveRectangle | undefined> 创建矩形 returns: 矩形图元对象

Inputs: args, windowId.

eda_sch_primitive_rectangle_deleteC

sch_PrimitiveRectangle.delete(primitiveIds: string | ISCH_PrimitiveRectangle | Array | Array<ISCH_PrimitiveRectangle>) -> Promise 删除矩形 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_rectangle_getB

sch_PrimitiveRectangle.get(primitiveIds: string) -> Promise<ISCH_PrimitiveRectangle | undefined> 获取矩形 returns: 矩形图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_rectangle_get_allB

sch_PrimitiveRectangle.getAll() -> Promise<Array<ISCH_PrimitiveRectangle>> 获取所有矩形 returns: 矩形图元对象数组

Inputs: args, windowId.

eda_sch_primitive_rectangle_get_all_primitive_idB

sch_PrimitiveRectangle.getAllPrimitiveId() -> Promise<Array> 获取所有矩形的图元 ID returns: 矩形的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_rectangle_modifyA

sch_PrimitiveRectangle.modify(primitiveId: string | ISCH_PrimitiveRectangle, property: { topLeftX?: number; topLeftY?: number; width?: number; height?: number; cornerRadius?: number; rotation?: number; color?: string | null; fillColor?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null; fillStyle?: ESCH_PrimitiveFillStyle | null }) -> Promise<ISCH_PrimitiveRectangle | undefined> 修改矩形 returns: 矩形图元对象

Inputs: args, windowId.

eda_sch_primitive_text_createB

sch_PrimitiveText.create(x: number, y: number, content: string, rotation?: number, textColor?: string | null, fontName?: string | null, fontSize?: number | null, bold?: boolean, italic?: boolean, underLine?: boolean, alignMode?: ESCH_PrimitiveTextAlignMode) -> Promise<ISCH_PrimitiveText | undefined> 创建文本 returns: 文本图元对象

Inputs: args, windowId.

eda_sch_primitive_text_deleteC

sch_PrimitiveText.delete(primitiveIds: string | ISCH_PrimitiveText | Array | Array<ISCH_PrimitiveText>) -> Promise 删除文本 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_text_getB

sch_PrimitiveText.get(primitiveIds: string) -> Promise<ISCH_PrimitiveText | undefined> 获取文本 returns: 文本图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_text_get_allB

sch_PrimitiveText.getAll() -> Promise<Array<ISCH_PrimitiveText>> 获取所有文本 returns: 文本图元对象数组

Inputs: args, windowId.

eda_sch_primitive_text_get_all_primitive_idC

sch_PrimitiveText.getAllPrimitiveId() -> Promise<Array> 获取所有文本的图元 ID returns: 文本的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_text_modifyC

sch_PrimitiveText.modify(primitiveId: string | ISCH_PrimitiveText, property: { x?: number; y?: number; content?: string; rotation?: number; textColor?: string | null; fontName?: string | null; fontSize?: number | null; bold?: boolean; italic?: boolean; underLine?: boolean; alignMode?: ESCH_PrimitiveTextAlignMode }) -> Promise<ISCH_PrimitiveText | undefined> 修改文本 returns: 文本图元对象

Inputs: args, windowId.

eda_sch_primitive_wire_createB

sch_PrimitiveWire.create(line: Array | Array<Array>, net?: string, color?: string | null, lineWidth?: number | null, lineType?: ESCH_PrimitiveLineType | null) -> Promise<ISCH_PrimitiveWire | undefined> 创建导线 returns: 导线图元对象

Inputs: args, windowId.

eda_sch_primitive_wire_deleteB

sch_PrimitiveWire.delete(primitiveIds: string | ISCH_PrimitiveWire | Array | Array<ISCH_PrimitiveWire>) -> Promise 删除导线 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sch_primitive_wire_getC

sch_PrimitiveWire.get(primitiveIds: string) -> Promise<ISCH_PrimitiveWire | undefined> 获取导线 returns: 导线图元对象,undefined 表示获取失败

Inputs: args, windowId.

eda_sch_primitive_wire_get_allA

sch_PrimitiveWire.getAll(net?: string | Array) -> Promise<Array<ISCH_PrimitiveWire>> 获取所有导线 returns: 导线图元对象数组

Inputs: args, windowId.

eda_sch_primitive_wire_get_all_primitive_idC

sch_PrimitiveWire.getAllPrimitiveId(net?: string | Array) -> Promise<Array> 获取所有导线的图元 ID returns: 导线的图元 ID 数组

Inputs: args, windowId.

eda_sch_primitive_wire_modifyC

sch_PrimitiveWire.modify(primitiveId: string | ISCH_PrimitiveWire, property: { line?: Array | Array<Array>; net?: string; color?: string | null; lineWidth?: number | null; lineType?: ESCH_PrimitiveLineType | null }) -> Promise<ISCH_PrimitiveWire | undefined> 修改导线 returns: 导线图元对象

Inputs: args, windowId.

eda_sch_select_control_clear_selectedC

sch_SelectControl.clearSelected() -> boolean 清除选中 returns: 操作是否成功

Inputs: args, windowId.

eda_sch_select_control_do_cross_probe_selectD

sch_SelectControl.doCrossProbeSelect(components?: Array, pins?: Array, nets?: Array, highlight?: boolean, select?: boolean) -> boolean 进行交叉选择 returns: 操作是否成功

Inputs: args, windowId.

eda_sch_select_control_do_select_primitivesB

sch_SelectControl.doSelectPrimitives(primitiveIds: string | Array) -> Promise 使用图元 ID 选中图元 returns: 操作是否成功

Inputs: args, windowId.

eda_sch_select_control_get_all_selected_primitivesC

sch_SelectControl.getAllSelectedPrimitives() -> Promise<Array<ISCH_Primitive>> 查询所有已选中图元的图元对象 returns: 所有已选中图元的图元对象

Inputs: args, windowId.

eda_sch_select_control_get_all_selected_primitives_primitive_idC

sch_SelectControl.getAllSelectedPrimitives_PrimitiveId() -> Promise<Array> 查询所有已选中图元的图元 ID returns: 所有已选中图元的图元 ID

Inputs: args, windowId.

eda_sch_select_control_get_current_mouse_positionA

sch_SelectControl.getCurrentMousePosition() -> Promise<{ x: number; y: number } | undefined> 获取当前鼠标在画布上的位置 returns: 鼠标在画布上的位置,undefined 代表当前鼠标不在画布上

Inputs: args, windowId.

eda_sch_select_control_get_selected_primitivesC

sch_SelectControl.getSelectedPrimitives() -> Promise<Array> 查询选中图元的所有参数 returns: 选中图元的所有参数 [已弃用]

Inputs: args, windowId.

eda_sch_select_control_get_selected_primitives_primitive_idC

sch_SelectControl.getSelectedPrimitives_PrimitiveId() -> Promise<Array> 查询选中图元的图元 ID returns: 选中图元的图元 ID [已弃用]

Inputs: args, windowId.

eda_sch_simulation_engine_push_dataC

sch_SimulationEngine.pushData(eventType: ESCH_DynamicSimulationEnginePushEventType | ESCH_SpiceSimulationEnginePushEventType, props: Record<string, any>) -> void 向仿真内核发送数据

Inputs: args, windowId.

eda_sch_utils_split_linesC

sch_Utils.splitLines(lines: Array<number | Array>) -> Array<Array<number | Array>> | undefined 拆分多段线

Inputs: args, windowId.

eda_sys_client_url_requestC

sys_ClientUrl.request(url: string, method?: 'GET' | 'POST' | 'HEAD' | 'PUT' | 'DELETE' | 'PATCH', data?: string | Blob | FormData | URLSearchParams, options?: { headers?: { [header: string]: any }; integrity?: string }, succeedCallFn?: (data: Response) => void | Promise) -> Promise 发起即时请求 returns: Fetch 的返回结果

Inputs: args, windowId.

eda_sys_dialog_create_design_portalB

sys_Dialog.createDesignPortal() -> IDesignPortal 创建组件化弹出窗口的通信入口 remarks: 返回一个 IDesignPortal 对象,扩展结合 lc-editor-design-react 的 VirtualRender / 虚拟机组件使用。 所有通信(发消息 + 收事件)均封装在对象内部。 returns: 实现 IDesignPortal 的通信对象

Inputs: args, windowId.

eda_sys_dialog_insert_script_to_dialogC

sys_Dialog.insertScriptToDialog(dialogId: string, scriptFunction: (...args: Array) => void | Promise, ...args: Array) -> void 向指定原生弹窗注入函数

Inputs: args, windowId.

eda_sys_dialog_show_confirmation_messageB

sys_Dialog.showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void) -> void 弹出确认窗口 remarks: 显示一个拥有确认和取消按钮的窗口

Inputs: args, windowId.

eda_sys_dialog_show_information_messageB

sys_Dialog.showInformationMessage(content: string, title?: string, buttonTitle?: string) -> void 弹出消息窗口 remarks: 显示一个文字消息窗口

Inputs: args, windowId.

eda_sys_dialog_show_input_dialogB

sys_Dialog.showInputDialog(beforeContent?: string, afterContent?: string, title?: string, type?: 'color' | 'date' | 'datetime-local' | 'email' | 'mouth' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'url' | 'week', value?: string | number, otherProperty?: { max?: number; maxlength?: number; min?: number; minlength?: number; multiple?: boolean; pattern?: RegExp; placeholder?: string; readonly?: boolean; step?: number }, callbackFn?: (value: any) => void) -> void 弹出输入窗口 returns: 用户输入的值,始终为 string 类型,除非用户点击了 取消 按钮

Inputs: args, windowId.

eda_sys_dialog_show_select_dialogB

sys_Dialog.showSelectDialog(options: Array | Array<{ value: string; displayContent: string }>, beforeContent?: string, afterContent?: string, title?: string, defaultOption?: string, multiple?: false, callbackFn?: (value: string) => void | Promise) -> void 弹出选择窗口 returns: 用户选择的值,对应传入的 options 中的 value 字段

Inputs: args, windowId.

eda_sys_environment_get_editor_complied_dateC

sys_Environment.getEditorCompliedDate() -> string 获取编辑器编译日期 returns: 编辑器编译日期

Inputs: args, windowId.

eda_sys_environment_get_editor_current_versionC

sys_Environment.getEditorCurrentVersion(onlySemantic?: boolean) -> string 获取编辑器当前版本 returns: 编辑器当前版本

Inputs: args, windowId.

eda_sys_environment_get_user_infoC

sys_Environment.getUserInfo() -> { username?: string; nickname?: string; avatar?: string; uuid?: string; customerCode?: string } 获取用户信息 returns: 用户信息

Inputs: args, windowId.

eda_sys_environment_is_clientC

sys_Environment.isClient() -> boolean 是否处于客户端环境 returns: 是否处于客户端环境

Inputs: args, windowId.

eda_sys_environment_is_easy_edapro_editionC

sys_Environment.isEasyEDAProEdition() -> boolean 是否为 EasyEDA Pro 版本 returns: 是否为 EasyEDA Pro 版本

Inputs: args, windowId.

eda_sys_environment_is_half_offline_modeD

sys_Environment.isHalfOfflineMode() -> boolean 是否为半离线模式 returns: 是否为半离线模式

Inputs: args, windowId.

eda_sys_environment_is_jlcedapro_editionC

sys_Environment.isJLCEDAProEdition() -> boolean 是否为 嘉立创EDA 专业版本 returns: 是否为嘉立创EDA 专业版本

Inputs: args, windowId.

eda_sys_environment_is_offline_modeC

sys_Environment.isOfflineMode() -> boolean 是否为全离线模式 returns: 是否为全离线模式

Inputs: args, windowId.

eda_sys_environment_is_online_modeB

sys_Environment.isOnlineMode() -> boolean 是否为在线模式 returns: 是否为在线模式

Inputs: args, windowId.

eda_sys_environment_is_pro_private_editionB

sys_Environment.isProPrivateEdition() -> boolean 是否为私有化部署版本 returns: 是否为私有化部署版本

Inputs: args, windowId.

eda_sys_environment_is_webC

sys_Environment.isWeb() -> boolean 是否处于浏览器环境 returns: 是否处于浏览器环境

Inputs: args, windowId.

eda_sys_environment_set_keep_project_has_only_one_boardB

sys_Environment.setKeepProjectHasOnlyOneBoard(status?: boolean) -> Promise 设置环境:保持工程仅拥有一个板子 remarks: Board、Schematic、PCB 均保持唯一

Inputs: args, windowId.

eda_sys_external_api_registerB

sys_ExternalApi.register(namespace: string, apiName: string, callFn: (...args: any[]) => any | Promise, help?: ISYS_ExternalApiHelp) -> void 注册一个上层接口

Inputs: args, windowId.

eda_sys_external_api_unregisterB

sys_ExternalApi.unregister(namespace: string, apiName: string) -> boolean 注销指定接口 returns: 是否成功注销

Inputs: args, windowId.

eda_sys_file_manager_extract_lib_infoC

sys_FileManager.extractLibInfo(data: File | Array) -> Promise 提取文件内的库配置信息 returns: 库配置信息

Inputs: args, windowId.

eda_sys_file_manager_extract_project_infoC

sys_FileManager.extractProjectInfo(data: File) -> Promise 提取文件内的工程配置信息 returns: 工程配置信息

Inputs: args, windowId.

eda_sys_file_manager_get_cbb_file_by_cbb_uuidB

sys_FileManager.getCbbFileByCbbUuid(cbbUuid: string, libraryUuid?: string, props?: { fileName?: string; password?: string; fileType?: 'epro' | 'epro2'; templateSchematicUuid?: string; templatePcbUuid?: string }) -> Promise<File | undefined> 使用复用模块 UUID 获取复用模块文件 returns: 复用模块文件数据,undefined 表示数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_device_file_by_device_uuidA

sys_FileManager.getDeviceFileByDeviceUuid(deviceUuid: string | Array, libraryUuid?: string, fileType?: 'elibz' | 'elibz2') -> Promise<File | undefined> 使用器件 UUID 获取器件文件 returns: 器件文件数据,undefined 表示数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_document_fileC

sys_FileManager.getDocumentFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2') -> Promise<File | undefined> 获取文档文件 returns: 文档文件数据,undefined 表示当前未打开文档或数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_document_footprint_sourcesB

sys_FileManager.getDocumentFootprintSources() -> Promise<Array<{ footprintUuid: string; documentSource: string }>> 获取文档封装源码 returns: 文档封装源码数据,数据获取失败将返回空数组

Inputs: args, windowId.

eda_sys_file_manager_get_document_sourceB

sys_FileManager.getDocumentSource() -> Promise<string | undefined> 获取文档源码 returns: 文档源码数据,undefined 表示当前未打开文档或数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_footprint_file_by_footprint_uuidB

sys_FileManager.getFootprintFileByFootprintUuid(footprintUuid: string | Array, libraryUuid?: string, fileType?: 'elibz' | 'elibz2') -> Promise<File | undefined> 使用封装 UUID 获取封装文件 returns: 封装文件数据,undefined 表示数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_panel_library_file_by_panel_library_uuidB

sys_FileManager.getPanelLibraryFileByPanelLibraryUuid(panelLibraryUuid: string | Array, libraryUuid?: string, fileType?: 'elibz' | 'elibz2') -> Promise<File | undefined> 使用面板库 UUID 获取面板库文件 returns: 面板库文件数据,undefined 表示数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_project_fileB

sys_FileManager.getProjectFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2') -> Promise<File | undefined> 获取工程文件 returns: 工程文件数据,undefined 表示当前未打开工程或数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_project_file_by_project_uuidA

sys_FileManager.getProjectFileByProjectUuid(projectUuid: string, fileName?: string, password?: string, fileType?: 'epro' | 'epro2') -> Promise<File | undefined> 使用工程 UUID 获取工程文件 returns: 工程文件数据,undefined 表示当前未打开工程或数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_schematic_fileB

sys_FileManager.getSchematicFile(fileName?: string, password?: string, fileType?: 'epro' | 'epro2') -> Promise<File | undefined> 获取原理图文件 returns: 原理图文件数据,undefined 表示当前未打开原理图图页或数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_get_symbol_file_by_symbol_uuidC

sys_FileManager.getSymbolFileBySymbolUuid(symbolUuid: string | Array, libraryUuid?: string, fileType?: 'elibz' | 'elibz2') -> Promise<File | undefined> 使用符号 UUID 获取符号文件 returns: 符号文件数据,undefined 表示数据获取失败

Inputs: args, windowId.

eda_sys_file_manager_import_project_by_project_fileC

sys_FileManager.importProjectByProjectFile(projectFile: File, fileType?: 'JLCEDA' | 'JLCEDA Pro' | 'EasyEDA' | 'EasyEDA Pro' | 'Allegro' | 'OrCAD' | 'EAGLE' | 'KiCad' | 'PADS' | 'LTspice', props?: { importOption?: ESYS_ImportProjectImportOption; schematicObjectStyle?: ESYS_ImportProjectSchematicObjectStyle; associateFootprint?: boolean; associate3DModel?: boolean; importFootprintNotesLayer?: boolean }, saveTo?: { operation: 'New Project'; newProjectOwnerTeamUuid: IDMT_TeamItem['uuid']; newProjectOwnerFolderUuid?: IDMT_FolderItem['uuid']; newProjectName?: string; newProjectFriendlyName?: string; newProjectDescription?: string; newProjectCollaborationMode?: EDMT_ProjectCollaborationMode } | { operation: 'Existing Project'; existingProjectUuid: IDMT_BriefProjectItem['uuid'] } | { operation: 'Offline Client Local Path'; folderPath: string }, librariesImportSetting?: { ownerTeamUuid: IDMT_TeamItem['uuid']; deviceClassification?: Array; symbolClassification?: Array; footprintClassification?: Array; createDeviceForSingleSymbol?: boolean; updateExistingLibrariesWithTheSameName?: boolean }) -> Promise<IDMT_BriefProjectItem | undefined> 使用工程文件导入工程 remarks: 暂不支持提取库的相关配置,如果需求提取库,将会按照默认配置提取 returns: 导入的工程的简略工程属性

Inputs: args, windowId.

eda_sys_file_manager_set_document_sourceC

sys_FileManager.setDocumentSource(source: string) -> Promise 修改文档源码 returns: 是否修改成功,如果输入的文档源码格式错误,将返回 false 的结果

Inputs: args, windowId.

eda_sys_file_system_create_directory_in_file_systemA

sys_FileSystem.createDirectoryInFileSystem(folderPath: string) -> Promise 在文件系统内创建文件夹 remarks: 支持递归创建多层目录

注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

ADD since EDA v3.2.166 returns: 创建操作是否成功

Inputs: args, windowId.

eda_sys_file_system_create_object_urlB

sys_FileSystem.createObjectURL(blob: Blob | File) -> string 创建 ObjectURL remarks: 创建一个指向传入 Blob / File 对象的 ObjectURL

ADD since EDA v3.2.162 returns: ObjectURL 字符串

Inputs: args, windowId.

eda_sys_file_system_delete_file_in_file_systemB

sys_FileSystem.deleteFileInFileSystem(uri: string, force?: boolean) -> Promise 删除文件系统内的文件 remarks: 注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: 删除操作是否成功

Inputs: args, windowId.

eda_sys_file_system_exists_path_in_file_systemA

sys_FileSystem.existsPathInFileSystem(uri: string) -> Promise 检查文件系统内的文件或目录是否存在 remarks: 注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

ADD since EDA v3.2.167 returns: 文件或目录是否存在

Inputs: args, windowId.

eda_sys_file_system_get_documents_pathA

sys_FileSystem.getDocumentsPath() -> Promise 获取文档目录路径 remarks: 返回的路径中,结尾不包含斜杠 /(或反斜杠 \)

注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: 文档目录路径

Inputs: args, windowId.

eda_sys_file_system_get_eda_pathA

sys_FileSystem.getEdaPath() -> Promise 获取 EDA 文档目录路径 remarks: 返回的路径中,结尾不包含斜杠 /(或反斜杠 \)

注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: EDA 文档目录路径

Inputs: args, windowId.

eda_sys_file_system_get_extension_fileB

sys_FileSystem.getExtensionFile(uri: string) -> Promise<File | undefined> 获取扩展内的文件 returns: File 格式文件

Inputs: args, windowId.

eda_sys_file_system_get_libraries_pathsB

sys_FileSystem.getLibrariesPaths() -> Promise<Array> 获取库目录路径 remarks: 注意 1:本接口仅全离线客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: 库目录路径数组

Inputs: args, windowId.

eda_sys_file_system_get_projects_pathsA

sys_FileSystem.getProjectsPaths() -> Promise<Array> 获取工程目录路径 remarks: 注意 1:本接口仅半、全离线客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: 工程目录路径数组

Inputs: args, windowId.

eda_sys_file_system_list_files_of_file_systemA

sys_FileSystem.listFilesOfFileSystem(folderPath: string, recursive?: boolean) -> Promise<Array<ISYS_FileSystemFileList>> 查看文件系统路径下的文件列表 remarks: 注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: 当前目录下的文件列表

Inputs: args, windowId.

eda_sys_file_system_open_read_file_dialogC

sys_FileSystem.openReadFileDialog(filenameExtensions?: string | Array, multiFiles?: true) -> Promise<Array | undefined> 打开读入文件窗口 returns: File 格式文件数组

Inputs: args, windowId.

eda_sys_file_system_open_read_file_path_dialogA

sys_FileSystem.openReadFilePathDialog(filenameExtensions?: string | Array, multiFiles?: true) -> Promise<Array> 打开读取文件路径窗口 remarks: 注意:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error returns: 文件路径数组

Inputs: args, windowId.

eda_sys_file_system_open_read_folder_dialogC

sys_FileSystem.openReadFolderDialog() -> Promise<Array<{ relativePath: string; file: File }>> 打开读入文件夹窗口 returns: 读取到的所有文件及其路径信息

Inputs: args, windowId.

eda_sys_file_system_open_read_folder_path_dialogB

sys_FileSystem.openReadFolderPathDialog() -> Promise<string | undefined> 打开读取目录路径窗口 remarks: 注意:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error returns: 目录路径

Inputs: args, windowId.

eda_sys_file_system_read_file_from_file_systemA

sys_FileSystem.readFileFromFileSystem(uri: string) -> Promise<File | undefined> 从文件系统读取文件 remarks: 注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: File 格式文件

Inputs: args, windowId.

eda_sys_file_system_revoke_object_urlC

sys_FileSystem.revokeObjectURL(url: string) -> void 吊销 ObjectURL remarks: 吊销指定的 ObjectURL

ADD since EDA v3.2.162

Inputs: args, windowId.

eda_sys_file_system_save_fileB

sys_FileSystem.saveFile(fileData: File | Blob, fileName?: string) -> Promise 保存文件 remarks: 调用浏览器下载接口或 Electron 保存文件接口,将传入的文件流保存到本地

Inputs: args, windowId.

eda_sys_file_system_save_file_to_file_systemA

sys_FileSystem.saveFileToFileSystem(uri: string, fileData: File | Blob, fileName?: string, force?: boolean) -> Promise 向文件系统写入文件 remarks: 注意 1:本接口仅客户端有效,在浏览器环境内调用将始终 throw Error

注意 2:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error returns: 写入操作是否成功,如若不允许覆盖但文件已存在将返回 false 的结果

Inputs: args, windowId.

eda_sys_font_manager_add_fontC

sys_FontManager.addFont(fontName: string) -> Promise 添加字体到字体列表 returns: 添加操作是否成功

Inputs: args, windowId.

eda_sys_font_manager_delete_fontB

sys_FontManager.deleteFont(fontName: string) -> Promise 删除字体列表内的指定字体 returns: 删除操作是否成功

Inputs: args, windowId.

eda_sys_font_manager_get_fonts_listA

sys_FontManager.getFontsList() -> Promise<Array> 获取当前已经配置的字体列表 returns: 字体列表

Inputs: args, windowId.

eda_sys_format_conversion_convert_altium_designer_libraries_to_easy_edamulti_filesC

sys_FormatConversion.convertAltiumDesignerLibrariesToEasyEDAMultiFiles(file: File | Array) -> Promise<Array> 转换 Altium Designer 库到多个嘉立创库文件(每个器件一个文件) returns: 多个嘉立创库文件

Inputs: args, windowId.

eda_sys_format_conversion_convert_altium_designer_libraries_to_easy_edasingle_fileA

sys_FormatConversion.convertAltiumDesignerLibrariesToEasyEDASingleFile(file: File | Array) -> Promise<File | undefined> 转换 Altium Designer 库到单个嘉立创库文件 returns: 嘉立创库文件

Inputs: args, windowId.

eda_sys_format_conversion_convert_disa_libraries_to_easy_edamulti_filesA

sys_FormatConversion.convertDisaLibrariesToEasyEDAMultiFiles(file: File | Array) -> Promise<Array> 转换 T/DISA 4001 库到多个嘉立创库文件(每个器件一个文件) returns: 多个嘉立创库文件

Inputs: args, windowId.

eda_sys_format_conversion_convert_disa_libraries_to_easy_edasingle_fileB

sys_FormatConversion.convertDisaLibrariesToEasyEDASingleFile(file: File | Array) -> Promise<File | undefined> 转换 T/DISA 4001 库到单个嘉立创库文件 returns: 嘉立创库文件

Inputs: args, windowId.

eda_sys_header_menu_insert_header_menusC

sys_HeaderMenu.insertHeaderMenus(headerMenus: ISYS_HeaderMenus) -> Promise 导入顶部菜单数据

Inputs: args, windowId.

eda_sys_header_menu_insert_system_header_menu_itemA

sys_HeaderMenu.insertSystemHeaderMenuItem(env: ESYS_HeaderMenuEnvironment, id: Array, props: { title: string; registerFn?: string; icon?: string; shortcutKey?: TSYS_ShortcutKeys; menuItems?: Array<ISYS_HeaderMenuSub1MenuItem | ISYS_HeaderMenuSub2MenuItem | null>; insertDividerBefore?: boolean; insertDividerAfter?: boolean; insertBefore?: string; crossDividerWhenInsert?: boolean }) -> Promise<string | undefined> 在指定位置插入系统顶部菜单项 remarks: 本接口需要在系统已有的系统一级菜单下新增子菜单,无法新增和修改一级菜单,id 数组请至少传递 2 个值

本接口将会强制新建的系统顶部菜单的 ID 包含扩展 UUID,例如输入的 id = 'example',将会被自动重写为 e143d88179874e7f851cc890cd22fc71|example,后续如需移除该菜单,请输入重写后的名称

本接口不能在 高级 菜单下新增任何子菜单

本接口新增的子菜单将默认排列在原菜单的结尾,除非指定了 props.insertBefore 参数

注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

非公开接口使用提醒:本接口按原样提供,不提供参数的额外文档,参数可能在任何版本出现破坏性更改并不另行通知 returns: 顶部菜单项的 ID,分隔线是否插入并不会影响操作结果的返回值,不包含 menuItems 中的子项的 ID

Inputs: args, windowId.

eda_sys_header_menu_insert_system_header_menusA

sys_HeaderMenu.insertSystemHeaderMenus(headerMenus: ISYS_HeaderMenus) -> void 导入系统顶部菜单 暂不开发 remarks: 系统顶部菜单一旦新增无法有效删除,需要重启嘉立创 EDA 软件才可以恢复

本接口需要在系统已有的系统一级菜单下新增子菜单,无法新增和修改一级菜单

本接口不能在 高级 菜单下新增任何子菜单

本接口新增的子菜单将默认排列在原菜单的结尾

注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

非公开接口使用提醒:本接口按原样提供,不提供参数的额外文档,参数可能在任何版本出现破坏性更改并不另行通知

Inputs: args, windowId.

eda_sys_header_menu_remove_header_menusC

sys_HeaderMenu.removeHeaderMenus() -> void 移除顶部菜单数据

Inputs: args, windowId.

eda_sys_header_menu_remove_system_header_menu_itemB

sys_HeaderMenu.removeSystemHeaderMenuItem(id: Array, props?: { removeTheBeforeDivider?: boolean; removeTheAfterDivider?: boolean }) -> Promise 移除系统顶部菜单项 returns: 移除操作是否成功,菜单已移除但分隔线未找到也会返回 true 的结果

Inputs: args, windowId.

eda_sys_header_menu_replace_header_menusC

sys_HeaderMenu.replaceHeaderMenus(headerMenus: ISYS_HeaderMenus) -> Promise 替换顶部菜单数据

Inputs: args, windowId.

eda_sys_help_helpA

sys_Help.help(namespace?: string, className?: string, methodName?: string) -> Promise<ISYS_HelpData | Record<string, any> | ISYS_HelpClassSummary | ISYS_HelpMethodDetail> 查询 Help 信息(渐进式) returns: 渐进式查询结果:

  • 无参:返回 { eda: { className: [方法列表] }, external: { namespace: { apiName: 标题 } } } 总览;

  • 仅 namespace:返回该命名空间下各分组及其方法列表;

  • namespace + className:返回该分组内所有方法摘要;

  • 三个参数齐全:返回单方法的完整详情(入参、出参、返回值)

Inputs: args, windowId.

eda_sys_i18n_add_language_changed_event_listenerB

sys_I18n.addLanguageChangedEventListener(id: string, callFn: (newLanguage: string, lastLanguage: string) => void | Promise, onlyOnce: boolean) -> void 新增语言切换事件监听

Inputs: args, windowId.

eda_sys_i18n_get_all_supported_languagesC

sys_I18n.getAllSupportedLanguages() -> Array 查询所有支持的语言 returns: 所有支持的语言列表

Inputs: args, windowId.

eda_sys_i18n_get_current_languageB

sys_I18n.getCurrentLanguage() -> Promise 获取当前语言环境 remarks: 能够获取到的语言受 EDA 当前支持语言限制,其它 API 支持的语言需要显式指定 language 参数才能使用 returns: 语言

Inputs: args, windowId.

eda_sys_i18n_import_multilingualA

sys_I18n.importMultilingual(language: string, source: TSYS_LanguageKeyValuePairs) -> boolean 导入多语言 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 导入是否成功

Inputs: args, windowId.

eda_sys_i18n_import_multilingual_languageB

sys_I18n.importMultilingualLanguage(namespace: string, language: string, source: TSYS_LanguageKeyValuePairs) -> boolean 导入多语言:指定命名空间和语言 returns: 导入是否成功

Inputs: args, windowId.

eda_sys_i18n_import_multilingual_namespaceC

sys_I18n.importMultilingualNamespace(namespace: string, source: ISYS_MultilingualLanguagesData) -> boolean 导入多语言:指定命名空间 returns: 导入是否成功

Inputs: args, windowId.

eda_sys_i18n_is_event_listener_already_existD

sys_I18n.isEventListenerAlreadyExist(id: string) -> boolean 查询事件监听是否存在 returns: 事件监听是否存在

Inputs: args, windowId.

eda_sys_i18n_is_language_supportedC

sys_I18n.isLanguageSupported(language: string) -> boolean 检查语言是否受支持 returns: 是否受支持

Inputs: args, windowId.

eda_sys_i18n_remove_event_listenerC

sys_I18n.removeEventListener(id: string) -> boolean 移除事件监听 returns: 是否移除指定事件监听

Inputs: args, windowId.

eda_sys_i18n_textA

sys_I18n.text(tag: string, namespace?: string, language?: string, ...args: Array) -> string 输出语言文本 remarks: 可以使用 ${1} 格式的占位符表示参数;

语言优先级:当前显示语言 > 系统默认语言 > 数据集中第一个搜索到的包含该文本标签的语言 > 文本标签(tag) returns: 语言文本

Inputs: args, windowId.

eda_sys_iframe_close_iframeA

sys_IFrame.closeIFrame(id?: string) -> Promise 关闭内联框架窗口 remarks: 关闭指定 ID 的内联框架窗口

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_iframe_hide_iframeA

sys_IFrame.hideIFrame(id?: string) -> Promise 隐藏内联框架窗口 remarks: 本接口为结果导向的: 如若未找到指定内联框架窗口,接口将会返回 false; 如若在执行操作前该内联框架窗口已处于隐藏状态,接口将会返回 true

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_iframe_is_iframe_already_existB

sys_IFrame.isIFrameAlreadyExist(id: string) -> Promise 内联框架是否已存在 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4.2 returns: 是否存在

Inputs: args, windowId.

eda_sys_iframe_open_iframeA

sys_IFrame.openIFrame(htmlFileName: string, width?: number, height?: number, id?: string, props?: { maximizeButton?: boolean; minimizeButton?: boolean; minimizeStyle?: 'collapsed' | 'constricted'; buttonCallbackFn?: (button: 'close' | 'minimize' | 'maximize') => void | Promise; onBeforeCloseCallFn?: () => boolean | undefined | Promise<boolean | undefined>; grayscaleMask?: boolean; title?: string; x?: number; y?: number }) -> Promise 打开内联框架窗口 remarks: 本接口仅扩展包允许调用,用户需要在扩展包内包含用于内联的 HTML 文件;

本接口调用后将会打开一个 Dialog 窗口,该 Dialog 窗口的标题为 HTML 文件的 <title>,标题栏有关闭按钮;

正文部分为内联框架,width 和 height 均为正文部分内联框架的宽高;

内联框架需要展示 htmlFileName 的内容,该 HTML 从扩展包内获取,并已在安装时被存储至 IndexedDB 中

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_iframe_show_iframeA

sys_IFrame.showIFrame(id?: string) -> Promise 显示内联框架窗口 remarks: 本接口为结果导向的: 如若未找到指定内联框架窗口,接口将会返回 false; 如若在执行操作前该内联框架窗口已处于显示状态,接口将会返回 true

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_loading_and_progress_bar_destroy_loadingC

sys_LoadingAndProgressBar.destroyLoading() -> void 销毁无进度加载覆盖

Inputs: args, windowId.

eda_sys_loading_and_progress_bar_destroy_progress_barC

sys_LoadingAndProgressBar.destroyProgressBar() -> void 销毁进度条

Inputs: args, windowId.

eda_sys_loading_and_progress_bar_show_loadingA

sys_LoadingAndProgressBar.showLoading() -> void 显示无进度加载覆盖 remarks: 没有进度指示,但会存在与进度条一致的灰色覆盖,阻止用户进一步操作

Inputs: args, windowId.

eda_sys_loading_and_progress_bar_show_progress_barB

sys_LoadingAndProgressBar.showProgressBar(progress?: number, title?: string) -> void 显示进度条或设置进度条进度 remarks: 当进度达到 100 时,进度条将自动销毁

Inputs: args, windowId.

eda_sys_log_addB

sys_Log.add(message: string, type?: ESYS_LogType) -> void 添加日志条目

Inputs: args, windowId.

eda_sys_log_clearC

sys_Log.clear() -> void 清空日志

Inputs: args, windowId.

eda_sys_log_exportC

sys_Log.export(types?: ESYS_LogType | Array<ESYS_LogType>) -> void 导出日志

Inputs: args, windowId.

eda_sys_log_findB

sys_Log.find(message: string | Array<string | { text: string; attr?: { id?: string; path?: string; sheet?: string; pcbid?: string; type?: string } }>, types?: ESYS_LogType | Array<ESYS_LogType>) -> Promise<Array<ISYS_LogLine>> 查找条目 remarks: 如果日志面板处于打开状态,查找操作会同时在前端展现 returns: 符合查找条件的日志条目数组

Inputs: args, windowId.

eda_sys_log_sortB

sys_Log.sort(types?: ESYS_LogType | Array<ESYS_LogType>) -> Promise<Array<ISYS_LogLine>> 筛选并获取日志条目 remarks: 如果日志面板处于打开状态,筛选操作会同时在前端展现 returns: 符合筛选条件的日志条目数组

Inputs: args, windowId.

eda_sys_math_bbox_intersectsC

sys_Math.bboxIntersects(bbox1: ISYS_MathBBox, bbox2: ISYS_MathBBox) -> boolean 快速判断两个 BBox 是否相交 returns: 是否相交

Inputs: args, windowId.

eda_sys_math_calculate_areaA

sys_Math.calculateArea(polygon: TSYS_MathPolygonInput) -> number 计算多边形面积 returns: 面积(单个多边形为绝对面积,多边形组为净面积)

Inputs: args, windowId.

eda_sys_math_calculate_perimeterC

sys_Math.calculatePerimeter(polygon: TSYS_MathPolygonInput) -> number 计算多边形周长 returns: 周长

Inputs: args, windowId.

eda_sys_math_containsA

sys_Math.contains(polygon1: TSYS_MathPolygonInput, polygon2: TSYS_MathPolygonInput) -> boolean 判断 polygon1 是否完全包含 polygon2 returns: polygon1 是否完全包含 polygon2

Inputs: args, windowId.

eda_sys_math_contains_pointB

sys_Math.containsPoint(polygon: TSYS_MathPolygonInput, point: ISYS_MathPoint) -> boolean 判断点是否在多边形内部 returns: 是否在多边形内部

Inputs: args, windowId.

eda_sys_math_distance_to_pointB

sys_Math.distanceToPoint(polygon: TSYS_MathPolygonInput, point: ISYS_MathPoint) -> number 计算点到多边形边界的最短距离 returns: 最短距离,如点在多边形内部则返回 0

Inputs: args, windowId.

eda_sys_math_get_bboxC

sys_Math.getBBox(polygon: TSYS_MathPolygonInput) -> ISYS_MathBBox 获取多边形的最小外接矩形(BBox) returns: BBox

Inputs: args, windowId.

eda_sys_math_get_centroidB

sys_Math.getCentroid(polygon: TSYS_MathPolygonInput) -> ISYS_MathPoint 计算多边形质心 returns: 质心坐标

Inputs: args, windowId.

eda_sys_math_intersectionB

sys_Math.intersection(polygon1: TSYS_MathPolygonInput, polygon2: TSYS_MathPolygonInput) -> TSYS_MathPolygonGroup 计算两个多边形的交集 returns: 交集结果的多边形组,空数组表示无交集

Inputs: args, windowId.

eda_sys_math_intersectsA

sys_Math.intersects(polygon1: TSYS_MathPolygonInput, polygon2: TSYS_MathPolygonInput) -> boolean 判断两个多边形是否相交 remarks: 判断两个多边形的区域是否有任何重叠(包括包含、部分相交、边界接触) returns: 是否相交

Inputs: args, windowId.

eda_sys_math_rotateA

sys_Math.rotate(polygon: TSYS_MathPolygonInput, angle: number, centerX?: number, centerY?: number) -> Array<ISYS_MathPoint> 旋转多边形 returns: 旋转后的离散点数组

Inputs: args, windowId.

eda_sys_math_scaleC

sys_Math.scale(polygon: TSYS_MathPolygonInput, scaleX: number, scaleY?: number, centerX?: number, centerY?: number) -> Array<ISYS_MathPoint> 缩放多边形 returns: 缩放后的离散点数组

Inputs: args, windowId.

eda_sys_math_subtractA

sys_Math.subtract(polygon1: TSYS_MathPolygonInput, polygon2: TSYS_MathPolygonInput) -> TSYS_MathPolygonGroup 计算两个多边形的差集(polygon1 - polygon2) returns: 差集结果的多边形组,保留外环与孔洞的归属关系

Inputs: args, windowId.

eda_sys_math_translateB

sys_Math.translate(polygon: TSYS_MathPolygonInput, dx: number, dy: number) -> Array<ISYS_MathPoint> 平移多边形 returns: 平移后的离散点数组

Inputs: args, windowId.

eda_sys_math_unionB

sys_Math.union(polygon1: TSYS_MathPolygonInput, polygon2: TSYS_MathPolygonInput) -> TSYS_MathPolygonGroup 计算两个多边形的并集 returns: 并集结果的多边形组,保留外环与孔洞的归属关系

Inputs: args, windowId.

eda_sys_math_xorA

sys_Math.xor(polygon1: TSYS_MathPolygonInput, polygon2: TSYS_MathPolygonInput) -> TSYS_MathPolygonGroup 计算两个多边形的对称差集(异或) returns: 对称差集结果的多边形组,保留外环与孔洞的归属关系

Inputs: args, windowId.

eda_sys_message_box_show_confirmation_messageB

sys_MessageBox.showConfirmationMessage(content: string, title?: string, mainButtonTitle?: string, buttonTitle?: string, callbackFn?: (mainButtonClicked: boolean) => void) -> void 显示确认框 remarks: 显示一个拥有确认和取消按钮的确认框 [已弃用]

Inputs: args, windowId.

eda_sys_message_box_show_information_messageB

sys_MessageBox.showInformationMessage(content: string, title?: string, buttonTitle?: string) -> void 显示消息框 remarks: 显示一个文字消息提示框 [已弃用]

Inputs: args, windowId.

eda_sys_message_bus_create_private_message_busA

sys_MessageBus.createPrivateMessageBus() -> void 创建私有消息总线 remarks: 一般无需调用该方法,在进行监听或发送消息时会自动创建私有消息总线

Inputs: args, windowId.

eda_sys_message_bus_publishB

sys_MessageBus.publish(topic: string, message: any) -> void 私有消息总线:发布消息 remarks: 将消息广播给每一个 Subscriber

Inputs: args, windowId.

eda_sys_message_bus_publish_publicC

sys_MessageBus.publishPublic(topic: string, message: any) -> void 公共消息总线:发布消息 remarks: 将消息广播给每一个 Subscriber

Inputs: args, windowId.

eda_sys_message_bus_pullB

sys_MessageBus.pull(topic: string, callbackFn: (message: any) => void) -> ISYS_MessageBusTask 私有消息总线:拉消息 remarks: 每次只能拉一个消息 returns: 消息总线任务

Inputs: args, windowId.

eda_sys_message_bus_pull_asyncC

sys_MessageBus.pullAsync(topic: string) -> Promise 私有消息总线:拉消息 Promise 版本 remarks: 每次只能拉一个消息,可以使用 await 等待消息拉取 returns: 拉取到的消息

Inputs: args, windowId.

eda_sys_message_bus_pull_async_publicB

sys_MessageBus.pullAsyncPublic(topic: string) -> Promise 公共消息总线:拉消息 Promise 版本 remarks: 每次只能拉一个消息,可以使用 await 等待消息拉取 returns: 拉取到的消息

Inputs: args, windowId.

eda_sys_message_bus_pull_publicC

sys_MessageBus.pullPublic(topic: string, callbackFn: (message: any) => void) -> ISYS_MessageBusTask 公共消息总线:拉消息 remarks: 每次只能拉一个消息 returns: 消息总线任务

Inputs: args, windowId.

eda_sys_message_bus_pushB

sys_MessageBus.push(topic: string, message: any) -> void 私有消息总线:推消息 remarks: 每个消息只有一个 Puller 可以收到

Inputs: args, windowId.

eda_sys_message_bus_push_publicB

sys_MessageBus.pushPublic(topic: string, message: any) -> void 公共消息总线:推消息 remarks: 每个消息只有一个 Puller 可以收到

Inputs: args, windowId.

eda_sys_message_bus_remove_private_message_busB

sys_MessageBus.removePrivateMessageBus() -> void 移除私有消息总线 remarks: 一般无需调用该方法,除非你知道自己在做什么

Inputs: args, windowId.

eda_sys_message_bus_rpc_callC

sys_MessageBus.rpcCall(topic: string, message?: any, timeout?: number) -> Promise 私有消息总线:调用 RPC 服务 returns: RPC 服务返回

Inputs: args, windowId.

eda_sys_message_bus_rpc_call_publicC

sys_MessageBus.rpcCallPublic(topic: string, message?: any, timeout?: number) -> Promise 公共消息总线:调用 RPC 服务 returns: RPC 服务返回

Inputs: args, windowId.

eda_sys_message_bus_rpc_serviceC

sys_MessageBus.rpcService(topic: string, callbackFn: (...args: Array) => any | Promise) -> void 私有消息总线:注册 RPC 服务

Inputs: args, windowId.

eda_sys_message_bus_rpc_service_publicC

sys_MessageBus.rpcServicePublic(topic: string, callbackFn: (...args: Array) => any | Promise) -> void 公共消息总线:注册 RPC 服务

Inputs: args, windowId.

eda_sys_message_bus_subscribeA

sys_MessageBus.subscribe(topic: string, callbackFn: (message: any) => void) -> ISYS_MessageBusTask 私有消息总线:订阅消息 remarks: 持久性订阅消息 returns: 消息总线任务

Inputs: args, windowId.

eda_sys_message_bus_subscribe_onceB

sys_MessageBus.subscribeOnce(topic: string, callbackFn: (message: any) => void) -> ISYS_MessageBusTask 私有消息总线:订阅单次消息 returns: 消息总线任务

Inputs: args, windowId.

eda_sys_message_bus_subscribe_once_publicC

sys_MessageBus.subscribeOncePublic(topic: string, callbackFn: (message: any) => void) -> ISYS_MessageBusTask 公共消息总线:订阅单次消息 returns: 消息总线任务

Inputs: args, windowId.

eda_sys_message_bus_subscribe_publicB

sys_MessageBus.subscribePublic(topic: string, callbackFn: (message: any) => void) -> ISYS_MessageBusTask 公共消息总线:订阅消息 remarks: 持久性订阅消息 returns: 消息总线任务

Inputs: args, windowId.

eda_sys_message_remove_follow_mouse_tipC

sys_Message.removeFollowMouseTip(tip?: string) -> Promise 移除跟随鼠标的提示 remarks: 移除当前或指定的跟随鼠标的提示

Inputs: args, windowId.

eda_sys_message_show_follow_mouse_tipB

sys_Message.showFollowMouseTip(tip: string, msTimeout?: number) -> Promise 展示跟随鼠标的提示 remarks: 同一时间只能展示一条提示,如果展示新的提示,则之前的提示将被自动移除

Inputs: args, windowId.

eda_sys_message_show_toast_messageC

sys_Message.showToastMessage(message: string, messageType?: ESYS_ToastMessageType, timer?: number, bottomPanel?: ESYS_BottomPanelTab, buttonTitle?: string, buttonCallbackFn?: string) -> void 显示吐司消息

Inputs: args, windowId.

eda_sys_panel_control_close_bottom_panelB

sys_PanelControl.closeBottomPanel() -> void 关闭底部面板

Inputs: args, windowId.

eda_sys_panel_control_close_left_panelC

sys_PanelControl.closeLeftPanel() -> void 关闭左侧面板

Inputs: args, windowId.

eda_sys_panel_control_close_right_panelC

sys_PanelControl.closeRightPanel() -> void 关闭右侧面板

Inputs: args, windowId.

eda_sys_panel_control_is_bottom_panel_lockedB

sys_PanelControl.isBottomPanelLocked() -> Promise 查询底部面板是否已锁定 returns: 是否已锁定

Inputs: args, windowId.

eda_sys_panel_control_is_left_panel_lockedA

sys_PanelControl.isLeftPanelLocked() -> Promise 查询左侧面板是否已锁定 returns: 是否已锁定

Inputs: args, windowId.

eda_sys_panel_control_is_right_panel_lockedA

sys_PanelControl.isRightPanelLocked() -> Promise 查询右侧面板是否已锁定 returns: 是否已锁定

Inputs: args, windowId.

eda_sys_panel_control_open_bottom_panelC

sys_PanelControl.openBottomPanel(tab?: ESYS_BottomPanelTab) -> void 打开底部面板

Inputs: args, windowId.

eda_sys_panel_control_open_left_panelC

sys_PanelControl.openLeftPanel(tab?: ESYS_LeftPanelTab) -> void 打开左侧面板

Inputs: args, windowId.

eda_sys_panel_control_open_right_panelC

sys_PanelControl.openRightPanel(tab?: ESYS_RightPanelTab) -> void 打开右侧面板

Inputs: args, windowId.

eda_sys_panel_control_toggle_bottom_panel_lock_stateC

sys_PanelControl.toggleBottomPanelLockState(state?: boolean) -> void 切换底部面板锁定状态

Inputs: args, windowId.

eda_sys_panel_control_toggle_left_panel_lock_stateC

sys_PanelControl.toggleLeftPanelLockState(state?: boolean) -> void 切换左侧面板锁定状态

Inputs: args, windowId.

eda_sys_panel_control_toggle_right_panel_lock_stateC

sys_PanelControl.toggleRightPanelLockState(state?: boolean) -> void 切换右侧面板锁定状态

Inputs: args, windowId.

eda_sys_right_click_menu_change_menuC

sys_RightClickMenu.changeMenu(menuId: string, menuItems: Array<ISYS_RightClickMenuItem | null>) -> Promise 修改右键菜单

Inputs: args, windowId.

eda_sys_setting_get_jlccolor_silk_enabledA

sys_Setting.getJLCColorSilkEnabled() -> Promise 获取是否启用嘉立创彩色丝印工艺 deprecated: 临时接口(插入图片 PCB 迁移打通流程用):等统一设置接口落地后删除替换,请尽快迁移,勿在新功能中继续依赖 remarks: ADD since EDA v5 returns: 是否启用;读取失败返回 false [已弃用]

Inputs: args, windowId.

eda_sys_setting_restore_defaultA

sys_Setting.restoreDefault() -> Promise 全局恢复默认设置 remarks: 将所有 EDA 设置恢复到默认状态,本操作将会丢失所有设置项,在调用时请特别注意 returns: 操作是否成功

Inputs: args, windowId.

eda_sys_shortcut_key_getA

sys_ShortcutKey.get(id: string) -> ISYS_ShortcutKeyDataWithUserDefinedShortcutKey | undefined 获取快捷键数据 remarks: 本接口允许获取其它扩展的快捷键数据,仅需按格式拼接快捷键 ID

本接口无法获取系统快捷键数据

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4.2 returns: 获取到的快捷键数据

Inputs: args, windowId.

eda_sys_shortcut_key_get_allA

sys_ShortcutKey.getAll() -> Record<string, ISYS_ShortcutKeyDataWithUserDefinedShortcutKey> 获取所有快捷键数据 remarks: 本接口将会获取本扩展的所有快捷键数据

本接口无法获取系统快捷键数据

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4.2 returns: 获取到的快捷键数据

Inputs: args, windowId.

eda_sys_shortcut_key_get_shortcut_keysB

sys_ShortcutKey.getShortcutKeys(includeSystem?: boolean) -> Promise<Array<{ shortcutKey: TSYS_ShortcutKeys; title: string; documentType: Array<ESYS_ShortcutKeyEffectiveEditorRange>; scene: Array<ESYS_ShortcutKeyEffectiveEditorScene> }>> 查询快捷键列表 deprecated: since EDA v4.2 returns: 快捷键列表 [已弃用]

Inputs: args, windowId.

eda_sys_shortcut_key_registerA

sys_ShortcutKey.register(id: string, props: ISYS_ShortcutKeyDataWithCallFn) -> boolean 注册快捷键 remarks: 此处注册快捷键时传入的 shortcutKey 仅为默认快捷键,用户可以在设置中修改

如若该快捷键与系统快捷键冲突,系统快捷键将会优先生效

如果需要修改已注册的快捷键信息,可以直接调用本接口,并在 props 中传入完整的需要修改的快捷键数据

本接口无法修改系统快捷键

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4.2 returns: 注册是否成功

Inputs: args, windowId.

eda_sys_shortcut_key_register_shortcut_keyC

sys_ShortcutKey.registerShortcutKey(shortcutKey: TSYS_ShortcutKeys, title: string, callbackFn: (shortcutKey: TSYS_ShortcutKeys) => void | Promise, documentType?: Array<ESYS_ShortcutKeyEffectiveEditorRange>, scene?: Array<ESYS_ShortcutKeyEffectiveEditorScene>) -> Promise 注册快捷键 deprecated: since EDA v4.2 returns: 注册操作是否成功 [已弃用]

Inputs: args, windowId.

eda_sys_shortcut_key_unregisterA

sys_ShortcutKey.unregister(id: string) -> boolean 反注册快捷键 remarks: 本接口允许反注册其它扩展的快捷键,仅需按格式拼接快捷键 ID

本接口无法反注册系统快捷键

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error

ADD since EDA v4.2 returns: 反注册是否成功

Inputs: args, windowId.

eda_sys_shortcut_key_unregister_shortcut_keyC

sys_ShortcutKey.unregisterShortcutKey(shortcutKey: TSYS_ShortcutKeys) -> Promise 反注册快捷键 deprecated: since EDA v4.2 returns: 反注册操作是否成功 [已弃用]

Inputs: args, windowId.

eda_sys_storage_clear_extension_all_user_configsA

sys_Storage.clearExtensionAllUserConfigs() -> Promise 清除扩展所有用户配置 remarks: 此举会删除当前扩展的所有用户配置信息,请谨慎操作

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_storage_delete_extension_user_configA

sys_Storage.deleteExtensionUserConfig(key: string) -> Promise 删除扩展用户配置 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_storage_get_extension_all_user_configsB

sys_Storage.getExtensionAllUserConfigs() -> Record<string, any> 获取扩展所有用户配置 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 扩展所有用户配置信息

Inputs: args, windowId.

eda_sys_storage_get_extension_user_configA

sys_Storage.getExtensionUserConfig(key: string) -> any | undefined 获取扩展用户配置 remarks: 注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 配置项对应的值,不存在将返回 undefined

Inputs: args, windowId.

eda_sys_storage_set_extension_all_user_configsA

sys_Storage.setExtensionAllUserConfigs(configs: Record<string, any>) -> Promise 设置扩展所有用户配置 remarks: 此举会覆盖当前扩展的所有用户配置信息,请谨慎操作

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_storage_set_extension_user_configA

sys_Storage.setExtensionUserConfig(key: string, value: any) -> Promise 设置扩展用户配置 remarks: 新建扩展用户配置也使用本接口,在设置时如果不存在将会自动新建

注意:本接口仅扩展有效,在独立脚本环境内调用将始终 throw Error returns: 操作是否成功

Inputs: args, windowId.

eda_sys_timer_clear_interval_timerA

sys_Timer.clearIntervalTimer(id: string) -> boolean 清除指定循环定时器 returns: 定时器是否清除成功

Inputs: args, windowId.

eda_sys_timer_clear_timeout_timerC

sys_Timer.clearTimeoutTimer(id: string) -> boolean 清除指定单次定时器 returns: 定时器是否清除成功

Inputs: args, windowId.

eda_sys_timer_set_interval_timerB

sys_Timer.setIntervalTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any) -> boolean 设置循环定时器 remarks: 如果遇到 ID 重复的定时器,则之前设置的定时器将被清除 returns: 定时器是否设置成功

Inputs: args, windowId.

eda_sys_timer_set_timeout_timerA

sys_Timer.setTimeoutTimer(id: string, timeout: number, callFn: (...args: any) => void, ...args: any) -> boolean 设置单次定时器 remarks: 如果遇到 ID 重复的定时器,则之前设置的定时器将被清除 returns: 定时器是否设置成功

Inputs: args, windowId.

eda_sys_toast_message_show_messageB

sys_ToastMessage.showMessage(message: string, messageType?: ESYS_ToastMessageType, timer?: number, bottomPanel?: ESYS_BottomPanelTab, buttonTitle?: string, buttonCallbackFn?: string) -> void 显示吐司消息 [已弃用]

Inputs: args, windowId.

eda_sys_tool_netlist_comparisonC

sys_Tool.netlistComparison(netlist1: string | { projectUuid: string; documentUuid: string } | File, netlist2: string | { projectUuid: string; documentUuid: string } | File) -> Promise<Array<{ type: 'Net' | 'Component'; object: string; netlist1Name: Array; netlist2Name: Array }>> 网表对比 returns: 网表对比结果

Inputs: args, windowId.

eda_sys_tool_pcb_comparisonC

sys_Tool.pcbComparison(pcb1: string | { projectUuid: string; pcbUuid: string } | File, pcb2: string | { projectUuid: string; pcbUuid: string } | File, options?: { valUnit?: ESYS_Unit.MIL | ESYS_Unit.MILLIMETER | ESYS_Unit.INCH | ESYS_Unit.CENTIMETER; deviation?: number; comparisonSize?: number }) -> Promise<ISYS_PcbComparisonResponse> PCB 对比 remarks: ADD since EDA v4.2 returns: PCB 对比响应:success = true 时 data 为对比结果;success = false 时 error 包含错误码与信息

Inputs: args, windowId.

eda_sys_tool_schematic_comparisonC

sys_Tool.schematicComparison(schematic1: string | { projectUuid: string; schematicUuid: string } | File, schematic2: string | { projectUuid: string; schematicUuid: string } | File) -> Promise 原理图对比 returns: 原理图对比结果

Inputs: args, windowId.

eda_sys_unit_get_frontend_data_unitB

sys_Unit.getFrontendDataUnit() -> Promise<ESYS_Unit | undefined> 获取 EDA 前端数据单位跨度 remarks: 此处指的是前端用户可以切换的单位,需要同时兼容原理图和 PCB 画布 returns: 单位

Inputs: args, windowId.

eda_sys_unit_inch_to_milA

sys_Unit.inchToMil(inch: number, numberOfDecimals?: number) -> number 单位转换:英寸到密尔 returns: 输出密尔数

Inputs: args, windowId.

eda_sys_unit_inch_to_mmA

sys_Unit.inchToMm(inch: number, numberOfDecimals?: number) -> number 单位转换:英寸到毫米 returns: 输出毫米数

Inputs: args, windowId.

eda_sys_unit_mil_to_inchA

sys_Unit.milToInch(mil: number, numberOfDecimals?: number) -> number 单位转换:密尔到英寸 returns: 输出英寸数

Inputs: args, windowId.

eda_sys_unit_mil_to_mmA

sys_Unit.milToMm(mil: number, numberOfDecimals?: number) -> number 单位转换:密尔到毫米 returns: 输出毫米数

Inputs: args, windowId.

eda_sys_unit_mm_to_inchA

sys_Unit.mmToInch(mm: number, numberOfDecimals?: number) -> number 单位转换:毫米到英寸 returns: 输出英寸数

Inputs: args, windowId.

eda_sys_unit_mm_to_milA

sys_Unit.mmToMil(mm: number, numberOfDecimals?: number) -> number 单位转换:毫米到密尔 returns: 输出密尔数

Inputs: args, windowId.

eda_sys_web_socket_closeA

sys_WebSocket.close(id: string, code?: number, reason?: string, extensionUuid?: string) -> void 关闭 WebSocket 连接 remarks: 注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

Inputs: args, windowId.

eda_sys_web_socket_registerA

sys_WebSocket.register(id: string, serviceUri: string, receiveMessageCallFn?: (event: MessageEvent) => void | Promise, connectedCallFn?: () => void | Promise, protocols?: string | Array) -> void 注册 WebSocket 连接 remarks: 可以用来执行前检测 WebSocket 连接是否正常,但需要注意 不要尝试相同 ID 不同参数的连接,这会造成混乱: 如果存在指定 ID 且处于活跃状态中的 WebSocket 连接,那么其余参数的变更将不会被应用

注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

Inputs: args, windowId.

eda_sys_web_socket_sendA

sys_WebSocket.send(id: string, data: string | Blob | BufferSource, extensionUuid?: string) -> void 向 WebSocket 服务器发送数据 remarks: 注意:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

Inputs: args, windowId.

eda_sys_window_add_event_listenerA

sys_Window.addEventListener(type: ESYS_WindowEventType, listener: (ev: any) => any, options?: { capture?: boolean; once?: boolean; passive?: boolean; signal?: AbortSignal }) -> ISYS_WindowEventListenerRemovableObject | undefined 新增事件监听 returns: 事件监听方法,用于移除事件监听,如若为 undefined 则表示创建事件监听失败

Inputs: args, windowId.

eda_sys_window_get_current_themeB

sys_Window.getCurrentTheme() -> Promise<ESYS_Theme> 获取当前主题 remarks: 获取当前 EDA 主题,浅色 或 深色 returns: 当前主题

Inputs: args, windowId.

eda_sys_window_get_url_anchorC

sys_Window.getUrlAnchor() -> string 获取 URL 锚点 returns: URL 锚点值

Inputs: args, windowId.

eda_sys_window_get_url_paramB

sys_Window.getUrlParam(key: string) -> string | null 获取 URL 参数 returns: 参数值

Inputs: args, windowId.

eda_sys_window_get_viewport_sizeB

sys_Window.getViewportSize() -> { width: number; height: number } 获取页面当前视口大小 remarks: ADD since EDA v3.2.162 returns: 视口宽高(单位:像素)

Inputs: args, windowId.

eda_sys_window_hide_start_page_quick_start_itemsA

sys_Window.hideStartPageQuickStartItems(items: Array<ESYS_StartPageQuickStartItem>) -> Promise 隐藏开始页快速启动选项 remarks: 隐藏开始页快速启动模块中的指定项

注意 1:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

注意 2:本接口为私有化部署版本专用接口,如若在其它版本调用将始终 throw Error

ADD since EDA v3.2.162 returns: 是否全部隐藏成功(若存在未知项或已隐藏的项则返回 false)

Inputs: args, windowId.

eda_sys_window_hide_start_page_support_float_bar_itemsA

sys_Window.hideStartPageSupportFloatBarItems() -> Promise 隐藏开始页支持信息悬浮组件 remarks: 隐藏开始页右侧悬浮组件(微信、客服、电话、反馈)

注意 1:本接口需要使用者启用扩展的外部交互权限,如若未启用将始终 throw Error

注意 2:本接口为私有化部署版本专用接口,如若在其它版本调用将始终 throw Error

ADD since EDA v3.2.162 returns: 是否隐藏成功

Inputs: args, windowId.

eda_sys_window_openC

sys_Window.open(url: string, target?: ESYS_WindowOpenTarget) -> void 打开资源窗口

Inputs: args, windowId.

eda_sys_window_open_uiC

sys_Window.openUI(uiName: string, args?: Record<string, any>) -> Promise 打开 UI 窗口 remarks: 非公开接口使用提醒:本接口按原样提供,不提供参数的额外文档,参数可能在任何版本出现破坏性更改并不另行通知

Inputs: args, windowId.

eda_sys_window_remove_event_listenerC

sys_Window.removeEventListener(removableObject: ISYS_WindowEventListenerRemovableObject) -> void 移除事件监听

Inputs: args, windowId.

eda_sys_window_url_push_stateC

sys_Window.urlPushState(url: string) -> void 追加新的 URL 历史记录栈信息

Inputs: args, windowId.

eda_sys_window_url_replace_stateC

sys_Window.urlReplaceState(url: string) -> void 修改当前的 URL 历史记录栈信息

Inputs: args, windowId.

get_console_logsA

获取嘉立创EDA浏览器控制台日志。可独立调用;若当前尚未建立控制台监听,会自动连接浏览器并启动监听。支持按类型/关键词过滤,可指定返回条数,可选择获取后清空。

Inputs: clear, count, filter, browserPath.

import_pluginA

导入插件到嘉立创EDA并开启浏览器控制台监听。插件文件通常位于项目的 build/dist 目录下,后缀为 .eext。调用前请先确认 pluginPath 指向该目录下的 .eext 文件。自动打开浏览器访问立创EDA,如果未登录会弹出扫码登录页面等待用户扫码,登录后自动执行:高级→扩展管理器→上传插件文件→导入。登录状态会缓存,下次无需重复登录。导入后可通过 get_console_logs 获取控制台输出。

Inputs: pluginPath (required), browserPath.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 769 tools

    Disambiguation3/5

    The strict eda_<domain>_<module>_<action>_<object> hierarchy makes the vast majority of tools structurally distinguishable, but overlapping pairs exist—deprecated tools alongside near-identical replacements (e.g., eda_sys_dialog_show_confirmation_message and eda_sys_message_box_show_confirmation_message, eda_pcb_net_get_all_net_name vs eda_pcb_net_get_all_nets_name) create real misselection risk. Several descriptions are also copy-pasted incorrectly across primitive tools (e.g., a line tool documented as '折线' and an attribute tool documented as '修改文本'), further undermining the agent's ability to disambiguate.

    Naming Consistency4/5

    The overwhelming majority of tools follow a consistent snake_case pattern of eda_<domain>_<module>_<action>_<object>, which is highly predictable across domains. Minor deviations: the meta-tools (easyeda_api_search, import_plugin, get_console_logs, dev_plugin) use a different prefix or none at all, and at least one method breaks convention with camelCase (getAllSelectedPrimitives_PrimitiveId) alongside snake_case equivalents.

    Tool Count1/5

    769 tools is an extreme count—15x the rubric's 50+ threshold—and places an enormous context-window and navigation burden on any agent. While the count faithfully mirrors the official EasyEDA Pro API surface, such a monolithic server should be split into focused servers (schematic, PCB, library, system) to be usable in practice.

    Completeness5/5

    The surface is exceptionally complete, covering the full EDA lifecycle: project/document/folder/team management, schematic and PCB primitives with full CRUD, DRC rules (net classes, differential pairs, configurations), layer management, library operations (symbols, footprints, devices, CBBs, 3D models, simulation models), manufacturing file exports (Gerber, BOM, PDF, DXF, ODB++), event listeners, and system utilities (math, units, file system, message bus). No significant gaps are apparent in the provided subset.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables MCP clients to control EasyEDA Pro for schematic and PCB design through natural language, bridging the EasyEDA API without external AI or API keys.
      49
      MIT
    • F
      license
      A
      quality
      C
      maintenance
      Enables MCP clients like Claude Code to control a running EasyEDA Pro instance for PCB design automation, including DRC checks, project management, and script execution via a bridge server.
      16
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Local Model Context Protocol server that exposes EasyEDA Pro design capabilities as MCP tools, enabling project inspection, schematic editing, PCB design, validation, and manufacturing exports through natural language.
      MIT