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

Can I separate all linked text frames from each other in the InDesign document?

Participant ,
Feb 26, 2023 Feb 26, 2023

Split 3.0 is working great for me in a selected story. Can I separate all linked text frames from each other in the InDesign document? Thank you.

TOPICS
Scripting
1.6K
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

Community Expert , Feb 27, 2023 Feb 27, 2023

Hi @uniq1, I've used the functions from SplitStory.jsx sample script to split all stories in active document. - Mark

Thanks @Eugene Tyson, for pointing me to the sample script!

 

/**
 * Split all stories in active document;
 */
function main() {

	var doc = app.activeDocument,
		stories = doc.stories,
		counter = 0;

	for (var i = stories.length - 1; i >= 0; i--) {

		var story = stories[i];

		if (story.textContainers.length == 1)
			continue;

		//Splitting the story is a two-step process: fir
...
Translate
Community Expert ,
Feb 27, 2023 Feb 27, 2023

Hi @uniq1, the answer is yes, but we'd need to see the code for Split 3.0 to do the adjustment. Can you post a link to that script, or post the code itself? Otherwise, we'll have to start from scratch. Or someone may have a script already?

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
Participant ,
Feb 27, 2023 Feb 27, 2023

Hi @m1b 
Hello, the built-in splitStory script in InDesign only separates selected text frames from each other. I want to break the connections of all linked text frames in the document. Thank you

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
Community Expert ,
Feb 27, 2023 Feb 27, 2023

There are 2 in the InDesign scripts folder. I've definitely used it before to split all text frames. 

EugeneTyson_1-1677567330509.png

 

 

 

 

EugeneTyson_0-1677567310892.png

 

 

 

 

 

 

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
Community Expert ,
Feb 27, 2023 Feb 27, 2023

There's one in the InDesign script folder - I don't have Indesign here on this computer - but I think it's in the sample scripts called Break Frames or Split or something.

 

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
Community Expert ,
Feb 27, 2023 Feb 27, 2023

Hi @uniq1, I've used the functions from SplitStory.jsx sample script to split all stories in active document. - Mark

Thanks @Eugene Tyson, for pointing me to the sample script!

 

/**
 * Split all stories in active document;
 */
function main() {

	var doc = app.activeDocument,
		stories = doc.stories,
		counter = 0;

	for (var i = stories.length - 1; i >= 0; i--) {

		var story = stories[i];

		if (story.textContainers.length == 1)
			continue;

		//Splitting the story is a two-step process: first, duplicate
		//the text frames, second, delete the original text frames.
		mySplitStory(story);
		myRemoveFrames(story);

		counter++;

	}

	alert('Split ' + counter + ' stories.');

};

app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Split All Stories');


// from the sample script: SplitStory.jsx
function mySplitStory(myStory) {
	var myTextFrame;
	//Duplicate each text frame in the story.
	for (var myCounter = myStory.textContainers.length - 1; myCounter >= 0; myCounter--) {
		myTextFrame = myStory.textContainers[myCounter];
		myTextFrame.duplicate();
	}
};

// from the sample script: SplitStory.jsx
function myRemoveFrames(myStory) {
	//Remove each text frame in the story. Iterate backwards to avoid invalid references.
	for (var myCounter = myStory.textContainers.length - 1; myCounter >= 0; myCounter--) {
		myStory.textContainers[myCounter].remove();
	}
};

 

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
Participant ,
Feb 28, 2023 Feb 28, 2023

split all the stories in the active document. Thank you very much @m1b.

(Note: It split 150 stories of 2700 pages in 2 minutes.)

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
Community Expert ,
Feb 28, 2023 Feb 28, 2023

You're welcome! 🙂

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
LEGEND ,
Mar 01, 2023 Mar 01, 2023

Wow, 2700 pages in one file ? You are very brave 😉

 

You need to SPLIT your DOCUMENT into smaller chunks and use Book option instead - ASAP.  

 

Are you at least doing Save As with a new name daily? Or only Save? 

 

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
Participant ,
Mar 01, 2023 Mar 01, 2023

NM

 

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
Participant ,
Mar 01, 2023 Mar 01, 2023

NM2

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
Participant ,
Mar 01, 2023 Mar 01, 2023

I don't know why using the "1 Correct Answer" script would be necessary, at least for InD 2023 and maybe earlier. As mentioned, just use the script already installed in the Scripts panel, in the Community folder called "BreakTextThread.jsx" Works great, and with options.

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
Community Expert ,
Mar 02, 2023 Mar 02, 2023
LATEST

@CMcDowall, the OP asked for a script to break every threaded story in the document. The breakTextThread.jsx script performs on one story at a time. - Mark

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