You need to use EasyEDA editor to create some projects before publishing
EasyEDA API: Inserting Image
1095 4
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. I've also looked at this 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 Still currently unable to get what I want out of the API.
Comments
eric 5 years ago
Currently EasyEDA cannot insert image with API script. We're working to improve the script api. Instead, you can try this way: 1. Create a new schematic module. (Menu -> New -> Schematic Module) 2. Click the "Image" button on the "Drawing Tools" tool panel. 3. Select your image file and insert into the schematic module. 4. Save the schematic module document. 5. In your schematic document, click "Libraries" -> "SCH Modules",select the module and put into your document just like a component. ![image.png](//image.easyeda.com/pullimage/Wt0RmV060fhyY08L6h5LZ3KtI6fKtJwyKzNH7rvy.png) ![image.png](//image.easyeda.com/pullimage/HLEc9yRMox8PsXUaSkPS5PVfiYPB0RqPGQ0sDoBP.png) ![image.png](//image.easyeda.com/pullimage/vXMiBTioFbrJfi9Kk7BQ1i92X3j8v9BHzXgaMfcz.png) ![image.png](//image.easyeda.com/pullimage/aUxZqx1qvYwDdWsAsZ5NZQT8xKQLlZfXFPlqcy2o.png)
Reply
cjohnson 5 years ago
@eric Great, I'll use this until the API improves. Is the possibility of changing the default schematic template in the future road plan?
Reply
cjohnson 5 years ago
Right now what I do is just open a previous schematic, copy the image and change its location to exactly where I always put it. I just tried it, and it's a little easier than what I normally do, but still not exactly what I want.
Reply
andyfierman 5 years ago
@cjohnson, What if you create an empty "template" schematic with the border and details all set up as you want and then just save it in a project. Then when create a new project clone the "template" schematic into it. Not having tried it I don't know if you will then have to edit the text fields to match the new project but at least the logo will be in the right place every time.
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