Select anchor point of group and anchor it to the insertionpoint
Hi all
How to select group's anchor point and anchor it to document's insertion point in indesign cs5.5 using javascript or vb.net
Hi all
How to select group's anchor point and anchor it to document's insertion point in indesign cs5.5 using javascript or vb.net
You can't add a group as an anchored object as you would with, say, a rectangle—with insertionPoint.rectangles.add(); there is no insertionPoint.groups.add(). If you're working with InDesign desktop, you can select the group, cut or copy it, select the insertionPoint, and paste. Then do group.anchoredObjectSettings.properties = {anchoredPosition: AnchorPosition.ANCHORED, pinPosition: false}, then group.move() to your absolute coordinates.
If you're working with InDesign Server and don't have select, copy or paste, you'll have to do some acrobatics with snippets or libraries to get your group anchored. It's been covered here somewhere before...
Jeff
You need to get a reference to your group -- let's call it myGroup -- and another to the insertionPoint where you want it anchored -- let's call it myIP. Given those, you can achieve your objective (in CS5 or later) by:
myGroup.anchoredObjectSettings.insertAnchoredObject(myIP);
You can specify a second parameter if you wish that specifies the anchor position:
myGroup.anchoredObjectSettings.insertAnchoredObject(myIP, AnchorPosition.anchored);
That should get you started.
Dave
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.