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

Script for dashed lines in illustrator

New Here ,
Nov 14, 2024 Nov 14, 2024

Hey all, 

 

I have to make a lot of technical drawings of garments at work, and i've been trying to create a script that would allow me to make different types of dashed lines super fast.

 

The script I use (or at least want to use) is supposed to offset the line to a given distance (this part works like a charm), and then transform the new line into a dashed line.

However, whenever I try to script a dashed line (that is not the default setting of 12pt/ 0pt), it just won't work (or kinda work).

What it does, even though I change the settings (to 2pt/2pt), is that it only picks up the first information (making it 2pt/0pt), making the dashed line appear full, since there is no space in between the dashes. 

 

Does anyone know how i could make this work? Or maybe just change the default dashed lines settings so that i don't have to change them when recording the script?

TOPICS
Bug , Draw and design , Tools
516
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
Adobe
Community Expert ,
Nov 14, 2024 Nov 14, 2024

it seems you're trying to record an Action, is that right? not writing a script in Javascript?

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
New Here ,
Nov 14, 2024 Nov 14, 2024

Yes that's right!

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
Community Expert ,
Nov 14, 2024 Nov 14, 2024

How about providing your action set file (.aia) as well as a sample Illustrator document with some further instructions?

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
Community Expert ,
Nov 15, 2024 Nov 15, 2024
LATEST

You can save your dashed line as a Graphic Style - and so therefore crate the action to make the offset path and then apply the correct dashed line graphic style. I've attached a picture as an example.

 

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