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

Numbered list

New Here ,
Apr 20, 2010 Apr 20, 2010

Hey all,

I am trying to output numbered lists and not having much luck. IBNDrawingStyle and ITextAttNumberingStyle are the interfaces that I have been using to get info about numbered lists, but they don't seem to provide any information on the current numerical value of the list. They give me the starting value and separator values but these don't seem to be of much help.

If my list is:

1. one

2. two

3.three

and I am processing the second bullet how do I ask "Indesign SDK give me the current bullet value!." and have it answer "alright that value is two."

TOPICS
SDK
1.1K
Translate
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

Mentor , Apr 21, 2010 Apr 21, 2010

Use a wax iterator, you'll end up somewhere below.

kWaxLineBoss / IID_IWAXLINE => runs

kWaxTextRunBoss / IID_IWAXRUN => adornments

kBNTextAdornmentDataBoss / IID_IWAXGLYPHS has the glyphs. Unfortunately

  • the text in IID_IWAXRUN is empty
  • IID_IBNADORNMENTDATA is missing from the SDK

So you have to fight your way thru IWaxGlyphs.

I don't know how to translate the glyphs back to characters. Anybody else?

If that fails:

Maybe we could use the composer, it has to produce that wax from somewhere.

Take the Compose

...
Translate
Mentor ,
Apr 20, 2010 Apr 20, 2010

These numbers are generated on the fly, as part of composition.

Have a look at the wax.

Dirk

Translate
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
New Here ,
Apr 21, 2010 Apr 21, 2010

Thanks Dirk,

Could you point me towards which interfaces contain this data? I've been looking through the IWax interfaces, but it isn't clear to me which of these

would be associated with the data I want.

Translate
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
Mentor ,
Apr 21, 2010 Apr 21, 2010

Use a wax iterator, you'll end up somewhere below.

kWaxLineBoss / IID_IWAXLINE => runs

kWaxTextRunBoss / IID_IWAXRUN => adornments

kBNTextAdornmentDataBoss / IID_IWAXGLYPHS has the glyphs. Unfortunately

  • the text in IID_IWAXRUN is empty
  • IID_IBNADORNMENTDATA is missing from the SDK

So you have to fight your way thru IWaxGlyphs.

I don't know how to translate the glyphs back to characters. Anybody else?

If that fails:

Maybe we could use the composer, it has to produce that wax from somewhere.

Take the ComposeScanner to your text position, and have a look at IBNDrawingStyle of your kComposeStyleBoss.

Is the GetNumberStartAt() value incremented per use?

Edit: I re-read your original post, so IBNDrawingStyle is ruled out.

Beyond that my only suggestion is to file a support case. There are too many undocumented interfaces behind B&N.

Dirk

Translate
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
Mentor ,
Apr 21, 2010 Apr 21, 2010

Replying to myself:

Export to IDML, have a look there. If the numbers show up (or was that only for text variables?) you might have a chance to ask the responsible script provider. Some things are only visible thru IDML, missing from general scripting e.g. JavaScript!

Dirk

Translate
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
New Here ,
Apr 22, 2010 Apr 22, 2010

Thanks Dirk, It turned out that what I needed to do was to use IBNDrawingStyle GetNumberStartAt() and then increment the value by one using SetNumberStartAt(). This is working for me.

Translate
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
Mentor ,
Apr 22, 2010 Apr 22, 2010

It is a bad idea to modify kComposeStyleBoss unless you implement a text attribute.

Dirk

Translate
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
New Here ,
Apr 22, 2010 Apr 22, 2010
LATEST

I implement a text attribute so it works out.

Translate
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