Hi Uwe, Thank you very much for your direction and help, I have populated all my RGB colours & names into your script framework below. In Illustrator, after changing all my swatches to spot colour, I then ran your script. However, when it's run, I receive this error message? Once I click OK, I find that only the following colours have been renamed. I have checked that all the RGB attributes are correct in Autocad (before saving), then I checked again - when opened in Illustrator too. As I'm VERY new to code, have I missed something? Many thanks Daryl Here is the Illustrator - test file I have used var a = []; a[ "255,0,0" ] = "Cut"; a[ "0,153,0" ] = "Crease"; a[ "0,153,204" ] = "Bleed"; a[ "127,255,0" ] = "Dimensions"; a[ "114,0,153" ] = "Barcode_EAN_13"; a[ "153,0,204" ] = "Barcode_EAN_8"; a[ "255,255,0" ] = "Construction"; a[ "0,255,255" ] = "Corner_Datum"; a[ "127,127,255" ] = "Cut Crease_3x3mm"; a[ "153,102,204" ] = "Cut Crease_10x10mm"; a[ "0,0,0" ] = "Lines_and_points"; a[ "255,191,127" ] = "Perforate_2x2mm"; a[ "200,168,90" ] = "Perforate_10x10mm"; a[ "204,102,0" ] = "Score"; a[ "128,128,128" ] = "text"; a[ "255,0,255" ] = "Unprinted"; var mySpots = app.activeDocument.spots; for( var n=0 ; n<mySpots.length; n++ ) { var internalColorString = mySpots .getInternalColor().toString(); if( internalColorString in a ) { mySpots .name = a[ internalColorString ]; }; };
... View more