Create a – Text Block – out of selected Point Text Items

textBlock

This script creates a “Block” of text out of Selected Point Text Items, that is, it re-sizes each frame so they all have the same width. Back then when I wrote the script I didn’t know this layout style was called “SlabType”, otherwise I would have picked a more suitable name, anyway, here’s my “textBlock” script. Please note that the final Block of Text is converted to Outlines.

textBlock

 

Download textBlock.jsx

9 Comments

  1. This is awesome…. but is there a way to do it without creating a new layer every time. I would like it to simply be placed on the same layer as the source text.

    I tried commenting out the code to add a layer and create a group.
    i.e.
    var dupLayer = idoc.layers.add(); // add a layer to place the new block of text
    dupLayer.name = “Text Block”;
    var blockGrp = dupLayer.groupItems.add(); // add a group to final output
    blockGrp.name = “Text Block”;

    Error 2: dupLayer is undefined.
    Line: 31
    -> var blockGrp = dupLayer.groupItems.add(); // add a group to final output

    and

    Error 2: blockGrp is undefined.
    Line: 38
    -> var itext = tf.duplicate(blockGrp, ElementPlacement.PLACEATEND); // duplicate text

  2. Superb! Exactly what I needed, when I needed it. Thank you.

  3. Thanks so much! Your sripts really are good.

  4. can you create a script that can change the text?

    • Probably, change to what?

      • I think he meant “editable”. Excellent script!

  5. It’s very nice

  6. Simply perfect and useful!
    Thanks!


Add a Comment

Your email address will not be published. Required fields are marked *

Comment *
Name *
Email *
Website