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

object dimensions to text

Advisor ,
Jul 27, 2009 Jul 27, 2009

I would like to find a script which will take the dimensions of an object or several grouped objects and make a line of text in the illustrator file with the dimensions. Anyone know how this could be done?

TOPICS
Scripting
5.6K
Translate
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 , May 11, 2011 May 11, 2011

here you go

#target Illustrator

// script by grizzlyburr?

myDoc = app.activeDocument;

findDims(app.selection);

function findDims(objs) {

    for (i=objs.length-1; i>=0; i--) { //loop through your collection of objects
  
        var vb = objs.geometricBounds; // left, top, right, bottom // * changed to geometricBounds

        var w = (vb[2] - vb[0]);
        var h = (vb[1] - vb[3]);

        if (objs.parent.typename != "GroupItem") { // Check if parent is a groupItem

            descFrame = myDoc.tex

...
Translate
Adobe
Community Expert ,
May 13, 2011 May 13, 2011
LATEST

This may give you some more information of what's happening with using a script in an action.

http://forums.adobe.com/message/3674845?tstart=0#3674845

Translate
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