Copy link to clipboard
Copied
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."
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
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
...Copy link to clipboard
Copied
These numbers are generated on the fly, as part of composition.
Have a look at the wax.
Dirk
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
It is a bad idea to modify kComposeStyleBoss unless you implement a text attribute.
Dirk
Copy link to clipboard
Copied
I implement a text attribute so it works out.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now