1

I'm working on creating an action with line extensions in a project, where I need to extend both ends of a line by a predetermined length. However, I'm encountering an issue where recording the action while extending the line does not produce the desired result.

Here's the step-by-step process I'm following:

  1. Select the line segment I want to extend.
  2. Select one end anchor.
  3. Move the anchor a predetermined length for the extension (following the pink line extension).
  4. Repeat the process for the other end of the line.

During the recording of the action, I expect the extended line segments to be captured, allowing me to apply the action to other lines later. However, when I play back the recorded action, the line does not extend at all.

Has anyone encountered a similar issue while creating line extensions in an action? Is there a workaround or a specific setting I might be missing? Is there any way to speed up this process, as I will need to extend hundreds of lines in this and future projects. Any guidance or suggestions would be greatly appreciated. Thank you!

2
  • You can not record this. Theres no such feature in recording, only absolute in paper coordinates or percentage based movement/scaling is available. You could script this though
    – joojaa
    Jun 5, 2023 at 17:03
  • Although youy can frequently just use transform each to extend lines
    – joojaa
    Jun 5, 2023 at 18:44

1 Answer 1

1

For action automation, one needs to think about automation. A great deal of manual editing can't be recorded because it would be too complex for actions. (Note scripting is a bit different and offers more.)

It is not possible to record an action which merely selects an anchor and moves it based upon dragging. In fact, it's not possible to record anything being moved merely by the user dragging an object. Nothing will record.

What will work is using dialogs...

So....

  • Select anchor
  • Start recording
  • Choose Object > Transform > Move... and enter the desired distance to move
    (and angle, etc.)
  • Stop recording

Now you just need to select an anchor and run the action, it'll then move the same distance in the same direction. And the action will work if multiple anchors are selected. Basically, it just records "move selection by x distance".


If the distance to move is different each time, you may be out of luck, or need scripting. Illustrator actions can not do anything such as "Move anchor to here." You need to know the actual distance to move (or scale percentage). Actions don't have any sort of "collision detection". In fact Illustrator, as a whole, has very rudimentary collision detection and only related to guides.

One option may be if you want all paths to be the same length. You can record an action that unifies all path lengths based on a fixed origin. So you could make all selected paths 300pts long without moving the left anchor point - something along those lines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.