Renaming Sublayers/Text Objects
I'm running into a problem and I thought the best place to ask would be here. The project I'm working on is a plot/plat map, so there are tiny boxes where a home etc would go. I have to make several layers of just numbers (for the elevation, or the lot number) and sometimes those lots number into the 100s. I've been looking for a script that would take the layers/objects I've selected and append whatever text I need.
In the case of the screenshot below, I need to append "number-" before everything. On another layer I need to put "elevation-" before everything.

I CAN do it by hand, but this can take hours doing it on three different layers, especially when something goes from 360 to 620.
A script I've tried messing with is below which Illustrator decidingly does not like.
var idoc = app.activeDocument;
for (var l=0; l<idoc.layers.length; l++) {
var ilayer = idoc.layers
for (i=0; i<ilayer.layers.length; i++) {
var sublayer = ilayer.layers;
sublayer.name = 'num-' + ilayer;
}
}