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

How To Convert Illustrator's PlacedItem Matrix to Artboard Coordinates ?

Community Beginner ,
Oct 02, 2011 Oct 02, 2011

Copy link to clipboard

Copied

Hi,

How can I convert this matrix to a one that actually transforms a PageItem in the document ? Seems like PlacedItem's matrix is defined in a very mysterious coordinate system that never been mentioned anywhere in the documentation.

regards

TOPICS
Scripting

Views

1.7K

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
Guru ,
Oct 02, 2011 Oct 02, 2011

Copy link to clipboard

Copied

Can you re-phrase your question I don't understand what you want to do here…?

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 Beginner ,
Oct 02, 2011 Oct 02, 2011

Copy link to clipboard

Copied

I want to convert the PlacedItem::matrix to a local transformation matrix relative to the artboards coordinate space.

A typical placed item matrix

(a,b,c,d,tx,ty) = 0.8474169969558716 0.5309280157089233 0.5309280157089233 -0.8474169969558716 -2089.5380859375 10003.640625

but the bounds of the item are: 638.2664184570313,-194.9597625732422,783.7483520507813,-345.822021484375

as you can see the translations are extremely bigger than what it sould be, the matrix is obvously not defined at the same space with bounds(which is defined in artboard space).

My aim is to replace a PlacedItem with the original contents from another AI file(like embedding). To do that I need to transform copied elements to the exact same place of the PlacedItem, what I need is the matrix that I can apply to the elements from original file

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 ,
Oct 04, 2011 Oct 04, 2011

Copy link to clipboard

Copied

you can use "Relink" to replace your PlacedItem with the contents of another Ai file, and it will go to the exact same place the PlacedItem was.

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 Beginner ,
Oct 05, 2011 Oct 05, 2011

Copy link to clipboard

Copied

Hey Carlos,

I need the matrix for other purposes also. If a property is there why it is not even documented. I wonder if purpose of this sdk really is extending the applicaton or just to make developers waste time and come up with pretty limited stuff never can be seen as a new feature. Other applications directly link to their internal libraries, they use their own SDK to develop new features for their won application, they actually FIELD TEST their OWN SDK, OR scripting engine. This Creative suite SDK and Scripting engine looks like just a tool for non-developers to automate some stuff...

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 ,
Oct 05, 2011 Oct 05, 2011

Copy link to clipboard

Copied

I hear you, the AI scripting capabilities are very limited, we have to work with what we have.

what other purposes? describe exactly what you're trying to achive, we might be able to find a solution.

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 Beginner ,
Oct 05, 2011 Oct 05, 2011

Copy link to clipboard

Copied

I want to export that matrix to use on 2d game engine. I am using placeditems as references to my entities, well at least I was hoping to. If I use the exported SVG unfortunately, the placed items are embedded and even the object local coordinates are recalculated, there is not useful matrix there either. It looks like obfuscation, matrix is there and they just want to hide it.

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
Guru ,
Oct 06, 2011 Oct 06, 2011

Copy link to clipboard

Copied

Just a suggestion, the matrix properties A thru D could easily be stored in a variable… TX & TY I have never been able to work out… they don't appear calculated to anything I can find… But don't you just need A thru D and the bounds array to position the item…?

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 Beginner ,
May 31, 2022 May 31, 2022

Copy link to clipboard

Copied

LATEST

I need the TX and TY too.
Did you succeed getting them?

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