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

transform > reflect objects in illustrator via javascript

Explorer ,
Dec 30, 2014 Dec 30, 2014

Copy link to clipboard

Copied

Hi all,

are there any way to transform > reflect Vertical axis in illustrator but via JavaScript not apple and i mean reflect not scale H or V

thanks in advance.

TOPICS
Scripting

Views

1.4K

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 , Dec 30, 2014 Dec 30, 2014

Hi Muhammad.eloc,

you can try something like this:

var totalMatrix = app.getScaleMatrix(-100,100);

app.activeDocument.activeLayer.pathItems[0].transform(totalMatrix);

e.g. for the first path item in the active layer

Have fun

Votes

Translate

Translate
Adobe
Community Expert ,
Dec 30, 2014 Dec 30, 2014

Copy link to clipboard

Copied

Hi Muhammad.eloc,

you can try something like this:

var totalMatrix = app.getScaleMatrix(-100,100);

app.activeDocument.activeLayer.pathItems[0].transform(totalMatrix);

e.g. for the first path item in the active layer

Have fun

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
Engaged ,
Feb 03, 2016 Feb 03, 2016

Copy link to clipboard

Copied

Pixxxel Schubser's answer should be marked as the correct answer

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 26, 2023 Oct 26, 2023

Copy link to clipboard

Copied

LATEST

var totalMatrix = app.getScaleMatrix(-100, 100); // Create the scale matrix

 

var layer = app.activeDocument.activeLayer; // Get the active layer

 

for (var i = 0; i < layer.pageItems.length; i++) {
        // Iterate through all items in the layer
        var currentItem = layer.pageItems[i];

 

        // Check if the item's name is "verso" before applying the scale matrix
        if (currentItem.name === "verso") {
                currentItem.transform(totalMatrix);
        }
}

But u got change the name of the object to "verso" and the layers to "Camada 1"

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