You need to use EasyEDA editor to create some projects before publishing
EasyEDA API : Inserting image
1003 5
cjohnson 5 years ago
Working on trying to standardize our company schematics. When we create them we always place our company logo and company name in the title block. I'm working on trying to automate this with a script, and am running in to a documentation limitation. `api('createShape', {shapeType:'image', from:'system', title:'company_logo', x:500, y:500})` What is the JSON tag to insert the url for this image? I've tried shortUrl and data:image/png;base64,\ but haven't had any luck.
Comments
andyfierman 5 years ago
How about opening a new schematic and inserting an image into it using the image tool: ![image.png](//image.easyeda.com/pullimage/Jd5TAuBiya8xlpMjCRuYW0xtg4GLdT7gCnJomvli.png) then compare the original (blank schematic) JSON with after inserting the image? Or see how the EasyEDA logo is already inserted? ![image.png](//image.easyeda.com/pullimage/2N9GtTwkZiinW5c54SWK2VAZ4fs56FtVrSpH8mgz.png)
Reply
cjohnson 5 years ago
So, I tried that. There's actually documentation on the result of this, but I'm still unable to replicate it using the API. Documentation:[https://docs.easyeda.com/en/DocumentFormat/2-EasyEDA-Schematic-File-Format/index.html](https://docs.easyeda.com/en/DocumentFormat/2-EasyEDA-Schematic-File-Format/index.html)-> scroll down to "Image" ### Image ``` "I~610~10~271~105~0~https://easyeda.com/assets/static/images/logo-140x39.png~gge12" ``` **Format:** Check [Image element of SVG](http://www.w3.org/TR/SVG11/struct.html#ImageElement) out. 1. command: I 2. x: 610 3. y: 10 4. width: 271 5. height: 105 6. rotation: 0 7. href:[https://easyeda.com/assets/static/images/logo-140x39.png](https://easyeda.com/assets/static/images/logo-140x39.png) 8. id: gge12 9. locked:null
Reply
cjohnson 5 years ago
Anyone have any feedback on this?
Reply
andyfierman 5 years ago
You might need to change the category of this thread to Bug Report. Or repost as a new one.
Reply
cjohnson 5 years ago
@andyfierman I'll try reposting it to Bug Report
Reply
Login or Register to add a comment
goToTop
你现在访问的是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 -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice