Copy link to clipboard
Copied
Hello the Community,
I got a headache as I tried to find the correct way of scripting to apply a colour change to a Plugitem !
Anyone can help me ? (in VBScript).
In case of Groupitems I can do with such a script:
Set mycolor = docref.swatches(10)
set mygroup = docref.groupitems("MyGroup")
for each piece in mygroup.pathitems
piece.fillcolor = mycolor.color
next
So I expected to apply the same approach with Pluginitems but it doesn't work.
And even I use, for example, 2 pathitems to create the Pluginitem I don't find how to access these included elements after its creation...
In the "Scripting Reference Document" there is no Property keyword designing the "item" contained in the Pluginitem...
Thanks for your help
Bruno
pluginItems can be any number of objects ie tracing object, compound Shapes, paths from Photoshop, Envelopes, etc.
what kind of object is your plugin item? if it's a compound shape, you need to expand it to convert it to a compoundPath, then you can access it's path items.
to expand the compound Shape, make sure it's selected before running
app.executeMenuCommand ('expandStyle'); // convert to compound paths
that's javascript, you should have something similar in vbs
Copy link to clipboard
Copied
@bruno5CDC wrote:
… for example, 2 pathitems to create the
Pluginitem…
IMHO - 2 pathItems will give you a compoundPathItem
Copy link to clipboard
Copied
pluginItems can be any number of objects ie tracing object, compound Shapes, paths from Photoshop, Envelopes, etc.
what kind of object is your plugin item? if it's a compound shape, you need to expand it to convert it to a compoundPath, then you can access it's path items.
to expand the compound Shape, make sure it's selected before running
app.executeMenuCommand ('expandStyle'); // convert to compound paths
that's javascript, you should have something similar in vbs
Copy link to clipboard
Copied
how can we find out by script what the pluginItems is. If it's build from pathItems from m pathfinder subtract using alt. It is still editable be t returns pluginItem for its typename