Find Area of Shape in Adobe Illustrator | Script Guide

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 26

  • @francisrufino2402
    @francisrufino2402 Рік тому +1

    Alternative script works great for me. Thank you so much!

  • @cesargoso
    @cesargoso Рік тому +1

    Thank you so much, this is extremely usefull and so easy to install. Thank you!

  • @realuser-notbot
    @realuser-notbot 19 днів тому

    Perfect! Thanks

  • @biohzrd8164
    @biohzrd8164 4 місяці тому

    Thank you! It helped immensely!

  • @larissaschneider9214
    @larissaschneider9214 Рік тому +1

    This is absolutely helpful, thank you!!!!

  • @ImolaS3
    @ImolaS3 9 місяців тому

    That worked perfectly, thanks! I used it on Illustrator 2024 on Mac and no issues at all - of course the location of the script is in the contents of the illustrator app, but that is easy to navigate to in Finder

    • @seckyusca6355
      @seckyusca6355 Місяць тому

      Amigo, no encuentro la opción en Mac, tú crees que me puedas ayudar compartiendo la ruta😢?.

  • @reshmaup
    @reshmaup 2 місяці тому

    This worked beautifully.. just 1 question.. does length here mean like the perimeter of the shape?

  • @DanielPerez-iy8ug
    @DanielPerez-iy8ug 2 роки тому +1

    Simplemente Genial!!! mil gracias!!

  • @rustyshackleford7014
    @rustyshackleford7014 2 роки тому +7

    Any tips to make this work on Mac IOS? Followed everything but im getting a syntax error

    • @DarrenBRea
      @DarrenBRea 2 роки тому +3

      same

    • @jayati.design
      @jayati.design 2 роки тому +3

      same!

    • @scu11ey
      @scu11ey Рік тому +3

      same

    • @jkvaalee
      @jkvaalee Рік тому

      1. Copy one of the existing files from the Scripts-folder to Desktop
      2. Open in TextEdit and replace all the text with the script in the description
      3. Save and change the file name to area.jsx
      4. Copy the file from desktop to the Scripts-folder
      5. In Illustrator select object and go to File > Scripts > Other script and select area.jsx

  • @jarlysteinsamseth4592
    @jarlysteinsamseth4592 Рік тому

    Nice presentation! Easy to follow. PS: there seem to be a square missing: Area is in mm^2, not mm.

  • @mistercarlberg
    @mistercarlberg 2 роки тому

    Always astounded by the myriad things I don't know how to do that I can pass along to other people and have them think I'm somehow smarter than the average bear. This one is going top of list tho.

  • @abdullahbarfed2952
    @abdullahbarfed2952 4 місяці тому

    How can I get this script?

  • @Adlais_welsh_cobs
    @Adlais_welsh_cobs 8 місяців тому

    Thank you so much

  • @matteomorando3861
    @matteomorando3861 3 місяці тому

    how it's possible that the area is in mm and not in a square mesure

  • @moh_design
    @moh_design Рік тому

    I need this script , how to download ??

  • @Troublechutes_Wife
    @Troublechutes_Wife 2 роки тому

    My nerd ❤️❤️

  • @ahmedmoh6632
    @ahmedmoh6632 Місяць тому

    Below is a script that loops through all selected items in Adobe Illustrator, displays each item’s area and length in mm/inches, and then adds a total for all selected items at the end.
    /**
    * Show the area/length of each selected path item in a table-like format,
    * plus a total row at the bottom.
    */
    if (app.activeDocument.selection.length === 0) {
    alert("No objects selected.");
    } else {
    var sel = app.activeDocument.selection;
    // For basic alignment in the ASCII table
    // (ExtendScript doesn't support String.padEnd() by default)
    function padRight(str, length) {
    while (str.length < length) {
    str += " ";
    }
    return str;
    }
    // Track the sum of area (in points^2) and length (in points) for all items
    var totalAreaPoints = 0;
    var totalLengthPoints = 0;
    // Header row
    var message = "";
    message += "Item | Area (mm²) | Area (in²) | Length (mm) | Length (in)
    ";
    message += "-----------------------------------------------------------------------------------------
    ";
    // Process each selected item
    for (var i = 0; i < sel.length; i++) {
    var currentItem = sel[i];
    // If area or length are undefined (e.g., if it's not a PathItem), skip
    if (typeof currentItem.area === "undefined" || typeof currentItem.length === "undefined") {
    continue;
    }
    // Use Math.abs for area to avoid negative values
    var areaPoints = Math.abs(currentItem.area);
    var lengthPoints = currentItem.length;
    // Convert to mm and inches
    var areaMM = (areaPoints / 8.03521617).toFixed(4);
    var areaIN = (areaPoints / 5184).toFixed(4);
    var lengthMM = (lengthPoints / 2.8346567).toFixed(4);
    var lengthIN = (lengthPoints / 72).toFixed(4);
    // Add to totals
    totalAreaPoints += areaPoints;
    totalLengthPoints += lengthPoints;
    // Build table row
    // Adjust widths to keep columns nicely aligned
    var row = "";
    row += padRight(String(i + 1), 4) + " | ";
    row += padRight(areaMM, 22) + " | "; // " 12345.6789"
    row += padRight(areaIN, 19) + " | "; // " 12345.6789"
    row += padRight(lengthMM, 17) + " | "; // " 12345.6789"
    row += padRight(lengthIN, 13) + "
    "; // " 12345.6789"
    message += row;
    }
    // Totals
    var totalAreaMM = (totalAreaPoints / 8.03521617).toFixed(4);
    var totalAreaIN = (totalAreaPoints / 5184).toFixed(4);
    var totalLengthMM = (totalLengthPoints / 2.8346567).toFixed(4);
    var totalLengthIN = (totalLengthPoints / 72).toFixed(4);
    message += "-----------------------------------------------------------------------------------------
    ";
    message += "TOTAL | "
    + padRight(totalAreaMM, 22) + " | "
    + padRight(totalAreaIN, 19) + " | "
    + padRight(totalLengthMM, 17) + " | "
    + padRight(totalLengthIN, 13) + "
    ";
    alert(message);
    }

  • @StxjavieerUC
    @StxjavieerUC 11 місяців тому

    Gracias

  • @martin-krzywinski
    @martin-krzywinski 2 роки тому

    The units of area are length^2.