How to reference a sublayer by name in an Illustrator script?

How can one reference a sublayer in functions like setLayerVisibility, that accept layer names as arguments? I tried setLayerVisibility(“MyLayerName.MySublayerName”, true) , but that was ineffective. Answer the function may not be set up to look for sublayers, even if you pass the correct sublayer name. If it is, you can do something like… var myLayer … Read more

Illustrator Scripting – Preference Strings – How to obtain?

This is a followup question to the answer in script-to-automatically-snap-all-points-to-grid-in-adobe-illustrator. In the answer getIntegerPreference is used to find the grid setting. But the question is: How does one know what keys to query? So how are we to know what keys to use like in the example below (keys in bold): var ticks = prf.getIntegerPreference(‘Grid/Horizontal/Ticks’); … Read more

Paste at Mouse Cursor Position (“stamping”) in Illustrator (just like in Inkscape)

I have a large number of icons that I need to place at specific points throughout my document and as far as I can tell the paste function in Illustrator only places the point in either i) the center of the view or ii) at the same position as the original object that was copied … Read more

Script to get x,y positions from a path in a vector image

In the old days, if someone had a scientific graph, then readers would only have access to the rastered image. So if you wanted to get the raw data from the plot, you could use something like DataThief or Webplotdigitizer on a rastered image like the one below. These days, scientific publications usually require authors … Read more

Connecting dots on Illustrator

Is that possible to connect dots in Adobe Illustrator, automatically? To do something like this: Answer All Points v.1.3 This script simply draws a line from every point to every other point of your selected pathitem. Handy for making Mandalas. Try on polygons, stars or even freehand shapes. From: http://www.wundes.com/JS4AI/ AttributionSource : Link , Question … Read more

What is the best way to export an artwork in Illustrator?

I have 18 artworks in an .eps file. I wonder what is the best way to extract/export one of those artwork into a .png/.jpg ? Example I’m not sure if this possible, but is there a way to export all of them into individual .png files. Any helps / suggestions on this will be much … Read more

Merge Point Text Objects Into One Text Area In Illustrator

After importing from PDF I have several single line point text objects which I want to convert to one multiline text area object. Currently I have several lines of text represented as separate point text objects: I want to have one text area for the whole paragraph: Also I would like to automate this somehow, … Read more