Skip to main content
Inspiring
August 16, 2024
Question

How to Iterate Through Nested Tables in InDesign Using C++

  • August 16, 2024
  • 3 replies
  • 303 views

I am an InDesign plugin developer, and my primary programming language is C++. How can I iterate through tables nested within table cells?

 

<Title renamed by MOD>

This topic has been closed for replies.

3 replies

Inspiring
August 20, 2024

There is no direct way to iterate nested tables. You need to write your own business logic for the same.

 

- Rahul Rastogi

Legend
August 19, 2024

IID_ITABLEMODELLIST on kTextStoryBoss sounds promising to find all tables of the story (should be by far fewer than walking all cells) .

For more details about nested tables I'd have a deeper look at ITextStoryThreadDictHier (the header comment even mentions the case) and walk around from there.

 

Robert at ID-Tasker
Legend
August 16, 2024

Can't tell you how to do this in C++ - but through scripting - you need to check every single Cell for Tables.