Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Creating a form check box

Community Beginner ,
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

243

Likes

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

Adobe Community Professional , Jun 23, 2021 Jun 23, 2021
Confirmed (Windows 10). Please submit a bug report at UserVoice (https://indesign.uservoice.com)

Likes

Translate

Translate
Adobe Community Professional , 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...

Likes

Translate

Translate
Adobe Community Professional ,
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)

Likes

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
Adobe Community Professional ,
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 )

Likes

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

Copy link to clipboard

Copied

Very nice workaround, Uwe.

Likes

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 Beginner ,
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

 

😉

Likes

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

Copy link to clipboard

Copied

Bonjour Peter,

Bug report is posted on uservoice.

Thank you to you both.

Likes

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
Adobe Community Professional ,
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 )

 

Likes

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
Adobe Community Professional ,
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.

Likes

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