Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Script to label selection with height and width #14390479
    giuliano bocchi
    Participant

    Hello there and thanks David for revamping this thread.
    I am relatively new to this but I came up with a script based on the one that was originally shared on jongware’s site.

    I have added a few things:
    the script works with multiple objects and with grouped objects,
    it automatically identifies the measurement units in the rulers and outputs measurements accordingly
    it defaults the layer to “printable”
    it aligns the labels centered
    it automatically adapts the text frames to the length of the text

    and a few minor things that I thought were useful.

    You can find the script here: https://drive.google.com/file/d/13M8hMTa21ZHLRfzTx_DRybLWRg6VVmdK/view?usp=sharing

    DISCLAIMER
    The script works fine, but it has a bug that I cant’ seem to fix:
    it messes up the placement of labels and lines on the first item it runs on. If you delete the labels (not the layer and not the paragraph style) and rerun the script it works fine.
    If you run it on a selection of multiple objects it only messes up the first one (which is the first created, not the first displayed)

    I honestly have no clue as to what generates this and how to fix it.
    It might be the order in which it runs through certain tasks but it really make no sense to me…
    still, I’m pretty sure I simply overlooked something silly, but if any of you would like to have a look and see if you can make sense of it it would be awesome!

    PS. I tried to make sensible annotations in the code, and I apologise should you find it messy.

    Thanks everyone

Viewing 1 post (of 1 total)