4 Replies Latest reply on May 21, 2013 7:17 AM by StanStill

    Measuring Distance Between Objects

    StanStill Level 1

      I'll start off by saying I'm new to scripting. I've tinkered with a script I found for measuring the length and width of a selected object and placing those values in a specs portion of the file. It works great, I'm very excited about how much better my life could be if I conquered scripting, and now I'm struggiling to get another one working but I'm a little stuck.


      What I need to do now is measure and print the distance from the right edge of a selected object to the left edge of another object named "repeat" in a designated "specs" area of the page. The idea is to show the distance between a print impression and when it will print again (repeat), because it is printed using a print cylinder that rotates to print over and over on a continuous film.


      I'm a little fuzzy on how I call the value of the left side x value of an object, but basically what I want is to use that value and then subtract from it the width of the selected object. The difference is the distance between impressions.


      Thanks in advance for any help you can give.