Illustrator rotate

the first rotation works but I can seem to pas the point of rotation in

set PointOfRotation to "top left"
tell application "Adobe Illustrator"
	activate
	tell document 1
		rotate page item 1 angle 90 about top right
		rotate page item 1 angle 90 about PointOfRotation
	end tell
end tell

I would appreciate any help

thanks
mm

Hi mm

try this:

tell application "Adobe Illustrator"
	activate
	set PointOfRotation to top left
	tell document 1
		rotate page item 1 angle 90 about top right
		rotate page item 1 angle 90 about PointOfRotation
	end tell
end tell

you had “top left” as a string in your variable outside you illustrator tell block
top left is an illustrator constant so you can only use it when speaking to illustrator.

pidge1

thanks I got that, but I need to read the command from a text file and passing it in as a parameter in a sub routine…

mm

Can you wrap in using terms from?

using terms from application "Adobe Illustrator"
	set PointOfRotation to top left
end using terms from

tell application "Adobe Illustrator"
	activate
	tell document 1
		rotate page item 1 angle 90 about top right
		rotate page item 1 angle 90 about PointOfRotation
	end tell
end tell

thats what I ended up doing but I had to make a sub routine to convert the many different options but as it turned out this is not a good method as it rotates the items by there individual dimensions rather than as a whole so now I have to figure out how to set the page origin to the point of origin that I want to rotate the whole group by so if I want to rotate the everything in the group from the bottom left I have to set the ruler orign to the bottom left of the group this should be fun

mm

Sorry I can’t work out what exactly your trying to rotate, is it a group item or selection of items?

all the items on a layer without having to group them

Hi mm

Could you not group them rotate them then ungroup them!

maybe but I would rather not

Hi mm

Does this get you anywhere:

tell application "Illustrator CS"
	activate
	set d to current document
	set theOrigin to ruler origin of d as list
	set properties of d to {ruler origin:{0, 0}}
	set selection to every page item of d
	set f to selection
	set PointOfRotation to document origin
	tell d
		--rotate selection angle 90 about top right
		rotate f angle 90 about PointOfRotation
	end tell
end tell

yes… thank you I got there about the same time