I am trying to make a script, that would select all the objects from one layer and paste them onto different layer. But in API documentation I can't seem to find paste special. There is one example, but it reads element by element and redraws them onto different layer.
You select everything, open PCB list panel (view menu), and edit the layer it's on.
Takes a few seconds, unless you do this very often, I dont think making a script is worth it.
I have to edit cca 10k components so I would rather have script that does this for me
I have to edit cca 10k components so I would rather have script that does this for me
If you select all components at the same time, than it takes the same amount of time to do it than 1 component.
Excluding online DRC and whatnot.
I have to edit cca 10k components so I would rather have script that does this for me
If you select all components at the same time, than it takes the same amount of time to do it than 1 component.
Excluding online DRC and whatnot.
Sorry I wrote a big misleading, I have to add this copy of the layer on pcb library with 10k + components
So you need to specifically duplicate some items?
Then, more than layer change is required. (Layer and other parameter changes can be done across a library, given a suitable query; the operation cannot be undone, so save the library before doing it.)
I'm not familiar with the scripting engine, but I would suspect a copy-all, paste-all is not available on libraries; you'll have to iterate across all parts and do it. So, whatever calls are needed to enumerate or increment the current view, and select, duplicate and change objects in that view.
Tim