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

Creating a form check box

Participant ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Creating a check box anchored in a text frame systematically ends with a crash in ID v16.2.1.

Does anyone here experience the same issue?

 

app.select( app.selection[0].paragraphs[0].insertionPoints[-2] );
app.selection[0].checkBoxes.add();

 

If you change checkBoxes.add() with textBoxes.add(), the script runs perfectly. 

TOPICS
Scripting

Views

548

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 2 Correct answers

Community Expert , Jun 23, 2021 Jun 23, 2021

Confirmed (Windows 10).

Please submit a bug report at UserVoice (https://indesign.uservoice.com)

Votes

Translate

Translate
Community Expert , Jun 23, 2021 Jun 23, 2021

Hi zeRafio,

also confirmed from my side with this code:

var doc = app.documents.add();
var newTextFrame = 
doc.textFrames.add
(
	{
		geometricBounds : [0,0,"100mm","100mm"]
	}
);

newTextFrame.insertionPoints[0].checkBoxes.add();

 

Wheras this one is working:

var doc = app.documents.add();
var newTextFrame = 
doc.textFrames.add
(
	{
		geometricBounds : [0,0,"100mm","100mm"]
	}
);

var newCheckBox = 
newTextFrame.parentPage.checkBoxes.add();

newCheckBox.anchoredObjectSettings.insertAnchoredObjec
...

Votes

Translate

Translate
Community Expert ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Confirmed (Windows 10).

Please submit a bug report at UserVoice (https://indesign.uservoice.com)

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 ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Hi zeRafio,

also confirmed from my side with this code:

var doc = app.documents.add();
var newTextFrame = 
doc.textFrames.add
(
	{
		geometricBounds : [0,0,"100mm","100mm"]
	}
);

newTextFrame.insertionPoints[0].checkBoxes.add();

 

Wheras this one is working:

var doc = app.documents.add();
var newTextFrame = 
doc.textFrames.add
(
	{
		geometricBounds : [0,0,"100mm","100mm"]
	}
);

var newCheckBox = 
newTextFrame.parentPage.checkBoxes.add();

newCheckBox.anchoredObjectSettings.insertAnchoredObject
(
	newTextFrame.insertionPoints[0] ,
	AnchorPosition.INLINE_POSITION
);

 

Regards,

Uwe Laubender

( ACP )

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 ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Very nice workaround, Uwe.

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
Participant ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Bçonjour Uwe,

 

I was on the same pah for the workarround…

 

For those who, like me, are using Applescript, here is the code following your example:

 

 

tell application id "InDn"
	set theDoc to make document
	set theFrame to make text frame at theDoc with properties {geometric bounds:{0, 0, 100, 100}}
	set theSwitch to make check box at parent page of theFrame
	
	insert anchored object anchored object settings of theSwitch story offset insertion point 1 of theFrame anchored position inline position
	
end tell

 

😉

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
Participant ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Bonjour Peter,

Bug report is posted on uservoice.

Thank you to you both.

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 ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Hi Peter,

I also tested and can confirm the crash already with InDesign CS6 version 8.1.

 

FWIW: My workaround is good for InDesign CS5.5 version 7.5 and above.

Method insertAnchoredObject() was introduced with 7.5.

 

Regards,
Uwe Laubender

( ACP )

 

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 ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

LATEST

Method insertAnchoredObject() was introduced with 7.5.

 

I know! After Dave Saunders harassed Adobe staff for months we finally got it.

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