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

Determine the rotation of a pageItem?

Enthusiast ,
Jul 17, 2020 Jul 17, 2020

Copy link to clipboard

Copied

Hi all, am I right in thinking that in Illustrator, there's no way to determine the rotated angle of a pageItem? Specifically not wanting to rotate this object, but read what rotation a user has done prior to the script running? I thought I might be able to get this from exporting as SVG since it applies the transform  attribute but notice the path vertices seem hard-coded the minute you rotate something and export. Is this always the case or is there some trick to accessing a transform/rotation matrix of a given pageItem or pathItem?

TOPICS
Scripting

Views

369

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 1 Correct answer

Community Expert , Jul 17, 2020 Jul 17, 2020

you are right, it's not possible generally speaking. 

 

For a particular scenario where the user is expected to rotate an object, then there is one or maybe two methods. When a user rotates an object, Illustrator adds a tag to that object with the rotated angle. We can read the value of the tag and use it as needed.

 

Here's a great read about it

https://community.adobe.com/t5/illustrator/how-to-get-the-angle-of-an-object/m-p/8803169?cid=101&cgid=18269&page=1#M36513

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 17, 2020 Jul 17, 2020

Copy link to clipboard

Copied

you are right, it's not possible generally speaking. 

 

For a particular scenario where the user is expected to rotate an object, then there is one or maybe two methods. When a user rotates an object, Illustrator adds a tag to that object with the rotated angle. We can read the value of the tag and use it as needed.

 

Here's a great read about it

https://community.adobe.com/t5/illustrator/how-to-get-the-angle-of-an-object/m-p/8803169?cid=101&cgi...

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
Enthusiast ,
Jul 17, 2020 Jul 17, 2020

Copy link to clipboard

Copied

LATEST

Hmm, definitely some promising code in here. Unfortunately I'm in the same boat as Loic with needing it to be used on PathItems, and the content of this will be dynamic (not created by myself) so I'm unsure if I would be able to account for any given content, especially since the bounding box is always upright and doesn't rotate alongside the object like in a lot of other programs. I'll ask about this though.

 

Thanks regardless Carlos! Always extremely helpful.

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 ,
Jul 17, 2020 Jul 17, 2020

Copy link to clipboard

Copied

In older versions of Illustrator that used to be the case. In the more current versions, it depends. If the object was created in Illustrator, or if it was File > Place in Illustrator, you should be able to select it and see the rotated angle. If it was pasted into Illustrator, then Illustrator doesn't seem to remember rotated angles.

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
Enthusiast ,
Jul 17, 2020 Jul 17, 2020

Copy link to clipboard

Copied

Hi, this has the tag Scripting and is meant to be specifically in terms of the Scripting API. You're not talking about programmatically reading the angle from code, correct? Just in a general user standpoint of using the app, only as a normal user?

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 ,
Jul 17, 2020 Jul 17, 2020

Copy link to clipboard

Copied

I am referring to getting the angle information when the file is open in Illustrator.

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