you are overthinking stuff..
imgFrameGCL[index] = addFrame(101, 230, 25, 6, '123'); var img=imgFrameGCL[index].place(File("/Projects/IDD Templates/icons/gcl.ai"), false); img.fillColor=thatSwatch; imgFrameGCL[index].name = "imgFrameGCL["+index+"]"; imgFrameGCL[index].fit(FitOptions.proportionally); imgFrameGCL[index].fit(FitOptions.centerContent);
Thanks for the reply, That was the first thing I tried, however that only seems to effect the text frame itself and isn't changing the color of the image within.
infact the following line wasn't have any change at present strangely.
img.fillColor = myDocument.swatches.item("test");
you cannot color placed ai graphics in InDesign. That's not a feature with InDesign.
You can only color gray scale or 1bit pixel images without transparency.
( And that includes PhotoShop pixel images in gray scale stored with a Background layer only! The one where the name is in italics in the Layers Panel of PhotoShop. )
To work around this problem with vector paths, you could cross-scripting InDesign with Adobe Illustrator to copy/paste vector paths. Just like the designer is doing right now.
But that's no safe bet either. A lot of things can go wrong by pasting Illustrator paths to InDesign. Missing paths. Too complex paths. Changes in stroke alignment. Etc.pp.
Best would be to script Adobe Illustrator to open a placed ai graphic, do the color work in Illustrator by scripting, save a new ai file and replace the old one placed in InDesign.
If it is possible to script Illustrator to the extend you want to, I cannot tell.
Thanks for the reply,
I wasn't aware cross-scripting was an option, I will look into that one.