Sg2.9
Using a text file for pathIte...
Recent RSS
Using a text file for pathItem creation
From:  Davy
Date:  19. February 2012, 02:51

Hi,
Total newbie to illustrator scripting here.
I have an tab delimited output file from another program that looks something like this:
MatchS MatchM

position and length are numeric fields, and in the real file will not have angle brackets. Like this:

CTGF E2F1 -325 8
TGFB NLK -466 9

I would like to get illustrator to draw lines all of a uniform length and then place a shape on that line at a position relative to the position field and the width of the shape determined by the length. All this I can do if I specify the points and stuff directly in the script no problem.

I haven't a clue where to start with file reading for javascript.
Any suggestions would be appreciated.
Thanks for your time,
Davy

Re: Using a text file for pathItem creation
Date:  19. February 2012, 11:40

Hi,
I'm not really sure what you're after but you could start looking at these posts about parsing files within Scriptographer.
Parsing a text file
Read/write array to file using JSON

Also, Graham van de Ruit made a script to extract GPS coordinates from file. Check out Convert GPS .csv files to Illustrator paths.

Hope this helps and good luck!

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Lissajous 10.01.13