API Error: extId is required on createCommand
285 2
andreasbernhofer 1 year ago
Hi, I wanted to try to create an extension, but I ran into the error "extId is required" as soon as I call api('createCommand', { ... }). I copied the code from[https://github.com/dillonHe/EasyEDA-Documents/blob/master/API/example/theme/main.js](https://github.com/dillonHe/EasyEDA-Documents/blob/master/API/example/theme/main.js) and pasted it into Tools -> Extensions -> Run Script. Also tried this simple code in Tools -> Extensions -> Run Script: `api('createToolbarButton', {` `    title:'Shape',` `    fordoctype:'pcb',` `    "menu" : [` `        {"text":"Log Selection", "cmd":"extension-debugshape-log"},` `    ]` `});``api('createCommand', {` `    'extension-debugshape-log' : function() {` `        console.log(api('getSelectedIds'));` `    }` `});` Toolbar button shows up, but same error on createCommand Since I found no documentation ... what is wrong?
duritskiy 1 year ago
IT WOULD HELP YOU [https://easyeda.com/forum/topic/Share-your-own-scripts-and-Extensions-here-3ef2feca9adc45f0a0f311029c3dcdc9](https://easyeda.com/forum/topic/Share-your-own-scripts-and-Extensions-here-3ef2feca9adc45f0a0f311029c3dcdc9)
andreasbernhofer 5 months ago
Okay, I found out how to use it. I created my own example: [https://github.com/xsrf/easyeda-extension-example](https://github.com/xsrf/easyeda-extension-example)
Login or Register to add a comment
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.