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

Do default strokes all have a UID=0

Engaged ,
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

123

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
...

Votes

Translate

Translate
Community Expert ,
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.

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
Engaged ,
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).

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
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. 
*/

 

 

 

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

Copy link to clipboard

Copied

LATEST

Thank you very much.

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