Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Do default strokes all have a UID=0

Participant ,
Jun 28, 2021 Jun 28, 2021

Copy link to clipboard

Copied

Hello,

I am trying to extract information about non-default stroke styles

For all indices in the current  path stroker list, the relevant part of my code calls:

ClassID strokeClassID;
UID strokeUID;
PathStrokerList->GetNthStrokerClassAndUID(i, strokeClassID, strokeUID);

By empirical testing I have noticed that the strokeUID is 0 (null) for all default styles, and only no-zero for user-defined styles.

Is this correct ? Can I rely on this ?

Very best regards,

Olivier

TOPICS
SDK

Views

34

Likes

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

Guide , Jun 28, 2021 Jun 28, 2021
Yes, kInvalidUID is a long word for the constant 0. Straight from the header:/** Note: There are two different flavors of path stroker in InDesign 3.0: Static path strokers are implemented as services, and are maintained as holdovers from the InDesign 2.0 and prior stroker architecture. They are identified using their ClassID only (the UID for these strokers will always be kInvalidUID). Custom path strokers are new to InDesign 3.0. They are implemented internally using a stock path s...

Likes

Translate

Translate
Adobe Community Professional ,
Jun 28, 2021 Jun 28, 2021

Copy link to clipboard

Copied

Hi,

 

Is the method returning kTrue? as my reading of the docs it should not be returning 0, unless it is failing in some way.

Likes

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
Participant ,
Jun 28, 2021 Jun 28, 2021

Copy link to clipboard

Copied

Yes, the method is returning true, and I am able to use the strokeClassID and strokeUID to create a stroke boss and apply it to a box and it all works fine.

 

But I was trying to determine if the strokeUID->Get() is alwys 0 for defaults stroke styles (such as solid).

Likes

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
Guide ,
Jun 28, 2021 Jun 28, 2021

Copy link to clipboard

Copied

Yes, kInvalidUID is a long word for the constant 0.

 

Straight from the header:

/**
 Note: There are two different flavors of path stroker in InDesign 3.0:
 
 Static path strokers are implemented as services, and are maintained as 
 holdovers from the InDesign 2.0 and prior stroker architecture. They are
 identified using their ClassID only (the UID for these strokers will 
 always be kInvalidUID).

 Custom path strokers are new to InDesign 3.0. They are implemented internally
 using a stock path stroker - kCustomPathStrokerBoss - that defers to an
 instance of IPathStroker identified as a UID. This allows the old model and
 the new model to co-exist. 
*/

 

 

 

Likes

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
Participant ,
Jun 28, 2021 Jun 28, 2021

Copy link to clipboard

Copied

LATEST

Thank you very much.

Likes

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