You need to use EasyEDA editor to create some projects before publishing
API moveObjs reports ERROR
892 4
BillyBuerger 5 years ago
I have some scripting I used before to auto-place a large number of footprints in a specific configuration.  I haven't used it in a while.  Just tried and I'm getting a generic error.  It seems to specifically be the moveObjs method that causes the problem.  Here's the script and the error... api('moveObjs', {objs:["gge1404"], addX:75,addY:0}); ![image.png](//image.easyeda.com/pullimage/krJsE6WekdfWLmXH3L0bjipOMemefFfyp5f9fZWM.png) The interesting thing is that most of the object moves but it leaves some of the pads behind.  If I move the object after this it snaps the pads back into the correct location.  So that's kind of a workaround.  Except that the script stops when it gets this error.  So I can't run it in bulk.  I would have to enter the command one at a time and then move it slightly for each of the 108 items I have to place.  Not so automated.  Any thoughts on what the error might be?  Was there any change in the moveObjs API call that might have caused a bug?  I tried some other PCB lib objects that aren't my own and I at least get the error even if in some cases everything moves.  So it doesn't appear to be directly an issue with my lib.  Thanks.
Comments
Rodrigo Schramm 5 years ago
Hi. I am having the same issue here.
Reply
Rodrigo Schramm 5 years ago
I got this output error message: **Error: TypeError:Cannot read property 'notCopper' of undefined** **TypeError: Cannot read property 'notCopper' of undefined** **    at fn ([https://easyeda.com/editor/6.2.46/js/editorPCB.min.js:5:1846](https://easyeda.com/editor/6.2.46/js/editorPCB.min.js:5:1846))** **    at move ([https://easyeda.com/editor/6.2.46/js/editorPCB.min.js:38:9606](https://easyeda.com/editor/6.2.46/js/editorPCB.min.js:38:9606))** **    at a ([https://easyeda.com/editor/6.2.46/js/editorPCB.min.js:2:134](https://easyeda.com/editor/6.2.46/js/editorPCB.min.js:2:134))** **    at ea ([https://easyeda.com/editor/6.2.46/js/main.min.js:8:24561](https://easyeda.com/editor/6.2.46/js/main.min.js:8:24561))** **    at moveObjs ([https://easyeda.com/editor/6.2.46/js/main.min.js:17:6013](https://easyeda.com/editor/6.2.46/js/main.min.js:17:6013))** **    at [https://easyeda.com/editor/6.2.46/js/main.min.js:16:14963](https://easyeda.com/editor/6.2.46/js/main.min.js:16:14963)** **    at move (eval at \ ([https://easyeda.com/editor/6.2.46/js/main.min.js:16:14822](https://easyeda.com/editor/6.2.46/js/main.min.js:16:14822)), \:11:1)** **    at __userjs_230504__ (eval at \ ([https://easyeda.com/editor/6.2.46/js/main.min.js:16:14822](https://easyeda.com/editor/6.2.46/js/main.min.js:16:14822)), \:19:1)** **    at [https://easyeda.com/editor/6.2.46/js/main.min.js:16:14830](https://easyeda.com/editor/6.2.46/js/main.min.js:16:14830)**
Reply
I'm having the same issue
Reply
JLCPCBsupport 4 years ago
@alexjvanderpotwebdesign It appears like the you are not using the API properly to move selected objects.. once you select the objects to move then you don't need to specify then, only write the API as follows : ``` api('moveObjs', {addX:20}); //Move selected objects from left to right in 20pixel or 200mil step ``` please to refer to EasyEDA API list to find more details about how to properly use the APIs : [https://docs.easyeda.com/en/API/3-API-List/index.html](https://docs.easyeda.com/en/API/3-API-List/index.html)
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