Move pageItems from one layer to another
I am working on a script to standardize layers and I need to move all the pageItems from a layer called "PART_NUMBER" to a layer named "STATIC".
Can someone help me straighten out the following code at the arrow please...
I am using "test" to troubleshoot the move.
standardizeLayerNames()
// This function verifies that the Layer names conform to the standard Layer names.
function standardizeLayerNames()
{
var myDoc7=app.activeDocument
var myLayerCount7 = myDoc7.layers.length
for(var myCounter7 = 0; myCounter7 < myLayerCount7; myCounter7++){
var selectLayer7 = myDoc7.layers[myCounter7]
if(selectLayer7.name.substr(0,11) == "PART_NUMBER"){
for(var test = selectLayer7.pageItems.length ; test >= 0 ; test --){
var test1 = selectLayer7.layers.pageItems[test] //<----------------------------------
//selectLayer7.pathItems[myCounter7].move(app.activeDocument.layers["STATIC"], ElementPlacement.PLACEATBEGINNING )
}
}
}
}