Wednesday, May 23, 2018

#1 2018-05-14 06:27:21 am

ame
Member
Registered: 2011-06-28
Posts: 166

InDesign Override Text frame (don't preserve chain)

Hi, I discovered that if I have two or more text frames on a master page linked (chained) and I have a working page based on this master page and I apply the following command:

Applescript:

tell application "Adobe InDesign CC 2014"
   tell active document
       override (every item of master page items of page 1) destination page page 1
   end tell
end tell

The text frames are not linked (!!!)
If I do the same command by InDesign, InDesign preserves the text chain.
In the dictionary, there are no additional options for the command override.

Anybody has solved the trouble?

InDesign CC 2014.

Stefano

Offline

 

#2 2018-05-14 01:14:58 pm

ame
Member
Registered: 2011-06-28
Posts: 166

Re: InDesign Override Text frame (don't preserve chain)

A possible solution:

Applescript:

tell application "Adobe InDesign CC 2014"
   tell active document
       set boxConcatenati to every item of master page items of page 1 whose content type is text type
       
       set chainedFrames to {}
       repeat with j from 1 to count boxConcatenati
           set originalBox to item j of boxConcatenati
           set linkedBox to next text frame of originalBox
           set newBox to override originalBox destination page page 1
           copy {originalBox, linkedBox, newBox} to end of chainedFrames
       end repeat
       
       repeat with c from 1 to count chainedFrames
           set originalBox to item 1 of item c of chainedFrames
           set linkedBox to item 2 of item c of chainedFrames
           set newBox to item 3 of item c of chainedFrames
           
           if linkedBox is not nothing then
               repeat with sb from 1 to count chainedFrames
                   if linkedBox is (item 1 of item sb of chainedFrames) then
                       set next text frame of newBox to (item 3 of item sb of chainedFrames)
                       exit repeat
                   end if
               end repeat
           end if
           
       end repeat
   end tell
end tell

Stefano - Ame

Offline

 

#3 2018-05-14 03:17:46 pm

ame
Member
Registered: 2011-06-28
Posts: 166

Re: InDesign Override Text frame (don't preserve chain)

Hi,

a second solution is to invoke from AppleScript the "manual" command that preserve the thread:

do script "app.menuActions.itemByName('$ID/Override All Master Page Items').invoke();" language javascript

Stefano - Ame

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)