• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

VBscript : how to change the colour of a Pluginitem

New Here ,
Dec 09, 2020 Dec 09, 2020

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

TOPICS
Scripting

Views

211

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 09, 2020 Dec 09, 2020

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

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 09, 2020 Dec 09, 2020

Copy link to clipboard

Copied

 

@bruno5CDC  wrote:

 

… for example, 2 pathitems to create the Pluginitem


IMHO - 2 pathItems will give you a compoundPathItem

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 09, 2020 Dec 09, 2020

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 13, 2023 Jul 13, 2023

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines