🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
1 messages
1 total messages Started by SuperMacGuy Wed, 14 Jan 2009 16:57
[AS CS3] Place library asset and move it, or group it?
#2038
Author: SuperMacGuy
Date: Wed, 14 Jan 2009 16:57
32 lines
2630 bytes
I'm able to place a library asset object. But then I need to move it to a point on the page.
I can successfully place the asset. But if I move it to page 1 of the document, all the objects in the asset move to the 0,0 point of the page, all un-arranged from their original orientation. I figured I can make a group first.

But my asset that is placed has some confounding aspects- sometimes they can be placed on or off the page (seems like they get placed relative to where the were taken from the original document, so they can be on the page or on the pasteboard); also the asset has some objects already grouped. So making a group, if I am correct, requires that I ungroup the groups first. I can't seem to make a group from a list of individual page items plus group items. I really can't ungroup the grouped objects, they must stay.

So, can I place an asset on a particular page of a document at a particular point?
If not, how do I make a group from objects + groups? (I tried making a list of object references of individual objects, even the one inside a group, but that doesn't seem to work either).

Thanks, Chris

script: 

      tell application "Adobe InDesign CS3" 	set theAsset to asset 1 of library
      1
      	set theObject to place asset theAsset on document 1
      	set theAssetObjectList to {}
      	repeat with B in theObject
      		if class of B is group then
      			repeat with G in (all page items of B )
      				copy object reference of G to end of theAssetObjectList
      			end repeat
      		else
      			copy object reference of B to end of theAssetObjectList
      		end if
      	end repeat
      	set theObjectAsGroup to make group with properties {group items:theAssetObjectList}
      	--above line won't work
      	(* theAssetObjectList is like {rectangle id 7117 of spread id 180 of
      document "Untitled-3", text frame id 7440 of group id 7419 of spread id
      180 of document "Untitled-3"}
      	*)
      end tell
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads