Script request

 From:  Michael Gibson
8230.17 In reply to 8230.15 
Hi nameless, you can try this for assigning a generic name "object_1", "object_2", etc.. to all current unnamed objects:

script: /* assign names to unnamed objects */ var objs = moi.geometryDatabase.getObjects(); var counter = 0; var current_names = []; for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name ){ current_names[obj.name] = true; } } for ( var i = 0; i < objs.length; ++i ) { var obj = objs.item(i); if ( obj.name ) { continue; } ++counter; var name = 'object_' + counter; while ( current_names[name] === true ) { ++counter; name = 'object_' + counter; } obj.name = name; }

- Michael