I was hoping to find a quick way in my ULP code to copy items from layer 21 or 22 (tPlace, bPlace) to a different layer.
But the code snippet below will only paste onto the layer it copied from i.e. layer 21, where it appears as a duplicate item.
I have tried CUT instead of COPY.
I was hoping it would paste to e.g. layer 47 (or any other layer), where it should show as green, but it doesn't work. It only pastes back onto layer 21.
I am unsure if I have missed a command, or whether it's simply impossible.
Thanks for any clues,
Bob.
#usage " copy & paste test ";
// Problem: it doesn't want to paste onto a different layer, only pastes
// onto the original layer it copied from
//
// Q. How to copy and paste onto a different layer ?
//
// put some wires or polygon shape onto layer 21
string s = "";
s = "DISPLAY 21;"; "\n";
s = s + "GROUP ALL;"; "\n";
s = s + "COPY;"; "\n";
s = s + "LAYER 47;"; "\n";
s = s + "PASTE;"; "\n";
s = s + "DISPLAY 21 47;"; "\n";
exit(s);