Skip to main content
Participant
November 11, 2019
Question

Javascript insertionpoint.place fails in Indesign 2020

  • November 11, 2019
  • 4 replies
  • 782 views

Hello,

We have a script importing files in Tagged Text format into a Indesign document, we did it in CS4 and it has been in use since then.

In Indesign CC 2020 it fails, Indesign "runs forever" and needs to be forced to quit.

The script gets the current insertion point and place a file, like this:

 

        var ip = app.selection[0];
        ip.place (File(fileToImport),{ autoflowing: true});

 

The place function never ends. It still does not work if I remove "autoflowing".
What has changed in CC 2020?
Thanks,
Rolf
This topic has been closed for replies.

4 replies

Community Expert
November 12, 2019

Hi Rolf,

interesting to see that a paragraph formatting prevented the placement of the tagged text format.

Is that new to InDesign 2020? Would it work with the same circumstances in InDesign CC 2019 or below? Could that be a bug? I'd report this behavior with a precise description what happened. Together with a sample document of the issue, a sample document of the solved issue and the tagged text file: https://indesign.uservoice.com/

 

Best come back if done that and post the link of the report so that we can vote for fixing this.

 

Regards,
Uwe Laubender

( ACP )

Community Expert
November 11, 2019

Hi Rolf,

yes. I ran this script snippet below on Windows 10 InDesign 2020:

 

var fileToImport = 
File.openDialog
	(
		"Eine Tagged Text-Datei auswählen:" ,
		"All files:*.*", 
		false
	);
	
if( fileToImport == null ){ alert( "Something went wrong!" ); exit() };

var ip = app.selection[0];
ip.place (File(fileToImport),{ autoflowing: true});

 

Regards,
Uwe Laubender

( ACP )

RolfClAuthor
Participant
November 12, 2019

Hi Uwe,

Thanks for the help and thanks for pointing me in the right direction!

After we investigated the problem further, we found it was due to a paragraph format set to Single column in the Indesign template. The paragraph was immediately after a paragraph spanning columns. As soon as we changed the paragraph format from Single column to Span columns, the place function works as in previous Indesign versions.

Thanks again,

Rolf

Community Expert
November 11, 2019

Just tested this by scripting and found no problems placing a tagged text file to an selected insertion point.
I'm on Windows 10. The tagged text file was exported with InDesign CC 2019 on the same machine.

 

Regards,
Uwe Laubender
( ACP )

RolfClAuthor
Participant
November 11, 2019

And you are importing into CC 2020? Strange since we have the same problem on both Windows and macOS after upgrading to CC 2020.

Regards,

Rolf

Community Expert
November 11, 2019

Hi Rolf,

are you able to place the tagged text file using the GUI?

 

Regards,
Uwe Laubender

( ACP )

RolfClAuthor
Participant
November 11, 2019

Yes, no problem to place it using the GUI.