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

Overset Tables in Textframe Appear in Reverse Order

Engaged ,
Mar 23, 2014 Mar 23, 2014

Copy link to clipboard

Copied

Hi Folks,

I have a script that generates a textframe, then a bunch of tables are essentially laid on top of each other within the TextFrame. Something like this (please pardon the html notation – it's not really like that but you'll get the drift)

<Textframe>

<Table1>

<Table2>

<Table3>

<Table4>

<Table5>

<Table6>

<Table7>

<Table8>

<Table9>

</Textframe>

Everything works fine as long as the column length is deep enough to accomodate the textframe info. However, if the info exceeds the column height, forcing the Textframe to go into Overset, that's where the trouble begins. Once the overset occurs, and I try to cut and paste (Autoflow or manual) the text the tables come out like this:

<Textframe>

<Table1>

<Table2>

<Table3>

<Table4>

<Table5>

            <Table6>      <--     This is the last table that started in the column before

<Table9>                going into overset.

<Table8>

<Table7>

</Textframe>

What IS consistent is that the table AFTER the last table that starts before the overset winds up being at the bottom of the heap, with basically everything after the last "good" table (the last table that started in the column before going "overset") being in reverse order.

I've been at this all day, trying idLocationOptions.idAfter – just about anything and everything I could think to throw at it, all to no avail.  I am using ID CS6, Win7 and scripting in VB.Net. If you can think of anything to try in VB or Javascript (I am not too good with Applescript although I'll try) PLEASE let me know your thoughts.

Thank you very much for any help,

TT

TOPICS
Scripting

Views

560

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

Engaged , Mar 23, 2014 Mar 23, 2014

Hi Folks,

Seems that I have found an answer. I thought that I tried this, but I forgot that I had a DIFFERENT routine putting a graphic inbetween two of the tables and the graphic should have been the last table -- and, so, everytime that I saw the graphic in between the two tables, I thought that I had the same problem since the table content all looks pretty much the same. So I may have fixed the problem hours ago and just kept on trying to solve it again... Aarrgg...

So while I still really do

...

Votes

Translate

Translate
Engaged ,
Mar 23, 2014 Mar 23, 2014

Copy link to clipboard

Copied

Hi Folks,

Seems that I have found an answer. I thought that I tried this, but I forgot that I had a DIFFERENT routine putting a graphic inbetween two of the tables and the graphic should have been the last table -- and, so, everytime that I saw the graphic in between the two tables, I thought that I had the same problem since the table content all looks pretty much the same. So I may have fixed the problem hours ago and just kept on trying to solve it again... Aarrgg...

So while I still really don't understand WHY any tables go whacko after the overset, here's what fixed it for me when adding another table:

tf.Tables.Add(idLocationOptions.idAfter, tf.Paragraphs.LastItem)

  (where tf = a TextFrame)

Hope this helps someone.

Thanks,

TT

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
Community Expert ,
Mar 24, 2014 Mar 24, 2014

Copy link to clipboard

Copied

There is actually a valid reason, AND a good solution that will always work.

The tables are inserted at the "end" of the frame. If you add one below the last visible table, then (logically) it will appear *before* all overset items.

The trick is not to rely on your textframe size. Add your items at the end of textframe.parentStory, and it will no longer matter how much you have in a single text frame.

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 ,
Mar 24, 2014 Mar 24, 2014

Copy link to clipboard

Copied

LATEST

Hi Jongware,

Thanks for your reply. I'm honored! 🙂 Sorry for the delay in getting back to you (posting on other forums as you know! ;-))

So I had an "AHA!" moment upon reading your reply..

EXCELLENT point making perfect sense -- so I tried it -- but I think that I must be doing something whacky as I am referencing the ParentStory but getting an error message -- something like "expecting ..(misc objects)...'Story'.... but received 'Story'. I was getting this last night too before I gave up and went to sleep. 🙂

I will try to get back to you with some MUCH clearer info shortly. Just didn't want you to think of me as inappreciative.

Thanks!

-TT

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