Illustrator Scripting :: Apply Blur To Script-generated Path?
Apr 10, 2013
I'm working on a scrpit for Illustrator which generates cycloidal curves (hypocycloid, epicycloid, rhodonea) and would like to explore my options for creating a blur across the path. The generated images will be saved as a PNG and then used in another program for an optical research application. So far, I have learned that it is not possible to access any of the effects through javascript. I also looked into applying a graphic style (as found in several other posts), however I need to have control over the amount of blur applied.
As an alternative, I've been working with applying a radial gradient across the path (whcih is possible using javascript). This achieves an effect which is 'close enough' however. Here is an image of the result generated using a 'rhodonea' curve:
My issue is: How do I blend the path at the intersections to get something like this (generated with the 'gaussian blur' effect):
View 3 Replies
ADVERTISEMENT
Oct 1, 2012
I'm trying to write a script that applies a single swatch to a single path item and repeat for every swatch that is currently contained in the swatch library. This script that I have written is only applying the last swatch in the swatch library to every path item on the page. Currently I'm more concered with getting each swatch that is currently in the swatch library to be applied at least once before worrying about applying the same patch to any extra number of patch items compared to the swatches.length.
// Apply every swatch library color to path items on a page
if ( app.documents.length > 0 && app.activeDocument.pathItems.length > 0 ) {
doc = app.activeDocument;
[Code]....
View 11 Replies
View Related
Apr 18, 2013
I was wondering if it's possible to do what Effect > Distort & Transform > Transform does from JS. I had a look at the documentation and found nothing in that direction.
The closest thing I found was PageItem.applyEffect(effectXML) looking at the Object Model Viewer in Extend Script Toolkit, but couldn't find documentation for it and I suspect it might have something to do with SVG filters perhaps ?
In conclusion: Is it possible to apply a Transform effect from JS (and if so, how )?How can applyEffect be used ?
View 4 Replies
View Related
Sep 21, 2012
How to write a script which can duplicate objects and apply colours. I have a full break down of the project together with a Illustrator Action that demonstrates the functionality of the required script.
View 3 Replies
View Related
Dec 19, 2011
How to make the following script for adding serial numbers apply to multiple files in a selected folder?
var docRef = app.activeDocument;
with (docRef) {
var docName = name.substring(0, name.lastIndexOf('.'));
var artRight = visibleBounds[2];
[Code] .....
View 6 Replies
View Related
Feb 11, 2014
I'm trying to select a portion of a path by using the direct selection tool and shift clicking on the anchor points. But when I click and drag the brush over onto the path, the brush stroke is applied to the entire path..... which I dont want to happen. I only want it applied to the section of the path.
View 2 Replies
View Related
Dec 26, 2013
It seems that gradient stroke only works as 'within stroke' for calligraphic brushes... and it's frustrating. I'm using CS6.
View 1 Replies
View Related
Sep 7, 2012
Have searched but i cant find a good way of retrieving the source path of the current .AI file. Is it possible?
IE: If i am working with a file in C:adobeIllustratoreautifulfile.ai i want a function that retrieve C:adobeIllustrator
// Clint
View 6 Replies
View Related
Jan 26, 2012
I have a dynamic path for mac osx:
var progressbaricon = File(app.path+'/Presets.localized/' + app.locale + '/Scripts/idatabase/Images/For_the_birds/progressbar.png');
Now i want to create the same path for windows
View 3 Replies
View Related
Apr 14, 2012
I have a collection of circles and rectangles in my document. Is there any way to sort out circles from rectagles using JavaScript? Say i want to make my circles red and the rectangles blue.
View 8 Replies
View Related
Sep 22, 2012
Is there any way to find a specific point on a path, that is not necessarily an anchor point?
What I'd like to be able to do is tell Illustrator "Give me the coordinates of the point that's exactly at half of this path's length" or "... exactly 25% ...". And if that's possible, can I somehow add an anchor point to that point, or cut the path at that point?
View 4 Replies
View Related
Jul 13, 2012
I want to create an illustration with black outlines. Within these outlines I want to have some spots without outlines that stay clean within the lines. I have tried 3 options so far and have found a solution but it's far from ideal.
1. Create clipping masks for each element that has a spot on it and assign a stroke to the clipping path again after. However by creating the clipping path, the path styles dissapear. In this case I want to keep the pointed ends to the open path outlines (see top image).
2. Draw in the lines where the spots are and create a live paint object of the entire illustration. Then paint in the spots and other areas. However when I create this live paint object the lines again lose their applied styles and even 'end' at each intersection, creating nasty edges where the lines should go 'underneath' smoothly (see bottom image).
3. The option Im using now. Duplicate the path outlines and create clipping masks for the spots without strokes. Then put the stroked outline with the desired styles on top. The problem with this is that I have almost twice as much elements in my illustration now than I actually 'need'. And the styled outlines are not connected with the color underneath, so its very easy to accidentally move something around...
Any easier way to create this effect without all the hassle?
View 3 Replies
View Related
Jun 21, 2013
All I am trying to do is move an anchor from one location to another using vbscript. I have searched everywhere and scoured the scripting references but I have not been able to figure this out as of yet.
I am able to select anchor points without an issue....moving those points seems to be a problem.
View 5 Replies
View Related
Feb 6, 2014
I need an Illustrator script for distribute a collection of diferent symbols along a path. The symbols should be distributed from the beginning to end of path and separated a proportional space each other. Additionally each symbol should be rotated pointing to a "look at" object.
Please look at the attached image for further info.
View 14 Replies
View Related
Jan 14, 2014
So I deal with a lot of files each day that need to be saved according to their lead code, meaning that there is a folder that holds thousands of sub folders that have the same name as this lead code on a server.
So since I have the lead code in the file name I'm trying to use that in conjunction with the file path to tell illustrator where to save it with Javascript. Also the idea of a dynamic save path is useful.
Here's what I've got so far, it's not working yet but I feel like I'm close.
/*/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Dynamic Save Path////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////*/
#target illustrator
[Code] ......
View 1 Replies
View Related
Nov 26, 2013
I'm trying to change the colors of a pathItem corresponding to the string value of several text fields in my document. I've been successful in changing the fill and stroke color of the pathItem, but I can not find any reference in the Illustrator Javascript Guide for accessing additional strokes and/or fills that have been applied to the object in the Appearance panel.
View 1 Replies
View Related
Sep 17, 2013
is there a way to determine the biggest item in a document using javascript?
View 4 Replies
View Related
Dec 5, 2013
I have a very simple javascript for Illustrator that is intended to render all filled objects semi-transparent. It works nicely but for large documents with many objects this takes ages, even beyond the time it would take to do it manually.
I'm wondering if there is any way to improve this script so it works in a reasonable time for large files? I'm running Illustrator CS5 on a Windows 7 64-bit Intel Quadcore i5-2400 @ 3.10 GHz System with 12 GB of RAM and an AMD Radeon HD 6350 graphics. Would upgrading to CS6 significantly improve the speed? CPU load is only at 25%, but I guess javascript cannot be run in multiple threads with the Illustrator engine? Is there another scripting language that would allow me faster processing of that task in illustrator or is my code just poorly optimized?
with (app.activeDocument) {
if (pathItems.length > 0)
{
for (var g = 0 ; g < pathItems.length; g++)
{
if (pathItems[g].filled == true)
{
pathItems[g].opacity = 50;
}
}
}
}
View 5 Replies
View Related
Sep 19, 2012
The first loop grabs the geometries drawn in the current document and rotates it around itself creating duplicates. The second loop is supposed to circumvent more geometries around the newly created geometries.
But instead of creating a radiant pattern, this code builds a tower: for the second loop everytime it grabs the last drawn geometry instead of what is in the "Original"
for NumPaths = 1 to frontDocument.PathItems.count
set myPath = frontDocument.PathItems.item(NumPaths)
For index = 0 To 30
set newPath = myPath.Duplicate
call newPath.translate(100*sin(6.14* index/30),100*cos(6.14* index/30))
[Code] .......
View 17 Replies
View Related
Jan 23, 2012
Is there a way in javascript for AI to access the pathfinder tools?
If I were using the actions it would be SELECT ALL - PATHFINDER/MERGE.
I am using Javascript for a good amount of other batch processing and it would be great to just have one process.
View 3 Replies
View Related
Feb 12, 2014
I'm working on a script for my company that sets up templates for internal use. I've been able to get most of it completed by drawing basic pathItems and textFrames. The problem I face now is adding our company logo. In the scripting reference I've found examples of duplicating art from one document to another, but that isn't what I need here.
I've approached this by trying to select our company logo in an existing document and in some way capturing the pathPoints so I can use them in the the script that is setting up the templates.However I've not had much luck with this. Ideally everything will be self contained in the one script, so that external files aren't required.
View 3 Replies
View Related
Feb 7, 2012
how the Photoshop DOM works with this snippet but I can't get it to select a pathItem correctly. When testing in ESTK I sometime have to run a line to that sets the path Item selected property to true several times before the path is selected in the GUI.Here is the script I am working on.
copyPathsToPhotoshop()
function copyPathsToPhotoshop(){
var currentLayer = app.activeDocument.activeLayer;
var count = currentLayer.pathItems.length;
var shapeNumber = 105
for( var p=1;p<count;p++){
[code]....
View 12 Replies
View Related
Apr 10, 2012
How do I set a folder as a relative path to where the script is running?
is there any easy way like in unix, starting without / ?or for example
"~/Desktop/"
"/users/<login>/desktop/"
seems that path to me is the only way...
is there an easy way to change posix paths to applescript??
I have this code:
tell application "Finder" to set templateFile to (container of (path to me) as string) & "Graficas FINAL ADQAT.ai"
with this error: error "No se ha encontrado el archivo Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai." number -43 from "Macintosh HD:Users:Vibra:Desktop:Graficas FINAL ADQAT.ai"
the file is there how I change the filepath to be compatible with applescript?
View 3 Replies
View Related
Apr 14, 2010
changing the file path for links in an Illustrator document?
For example, let's say my Illustrator document is stored at: /Volumes/Storage/Projects/Client/AAA001/designs/concept1.ai
and I have placed 2 linked visuals:
/Volumes/Storage/Projects/Client/AAA001/visuals/big_retouch.psd
/Volumes/Storage/Projects/Client/AAA001/visuals/flattened.jpg
When I open the .AI I noticed that the reference to the visuals is under a %DocumentFiles section:
%%DocumentFiles:/Volumes/Storage/Projects/Client/AAA001/visuals/retouc hed.psd
%%+/Volumes/Storage/Projects/Client/AAA001/visuals/flattened.jpg
I need to replace "/Volumes/Storage/Projects" with "/Volumes/Projects". (There are some more complex replacements I need, but let's start here.)
View 11 Replies
View Related
Jul 24, 2013
I'm trying to set up a script that will grab a group of objects and turn them into a compound path, then apply a clipping mask to the compound path and the next group in the layer.
View 5 Replies
View Related
Apr 22, 2013
I'm using Illustrator CS 6 / ExtendScript Toolkit CS 6.
Is there any way to add arrowheads to a path with script (JavaScript or VBScript)? I don't want to make triangle or V-shaped path but add one of the built-in start and end arrowheads, scale them and set arrowhead alignment, all with script. There is no information about this topic in the Illustrator scripting references.
View 1 Replies
View Related
Mar 24, 2013
I have created a path with multiple strokes, which differ in weight and color. I can save that as a profile but it's really tedious if I want to alter the different colors and stroke weights.
I can't seem to do record an action which will automatically alter those parameters (f.ex. raise each strokeweight by 10pt.). All I get is just an action that will recreate the altered state during recording (f.ex. stroke weights 20, 10 >--Action--> 15, 5). I cannot start the action and raise or lower my stroke weights at once based on the current parameters.
View 1 Replies
View Related
Oct 8, 2012
I want to open a "Save File Dialog " with some default path.Like when user run that script I want to open a "Save As" dialog box with default path "/Volumes/<shared name>/<folder name>/.. ."I am using File.SaveDialog(prompt, filter);
but it doesn't open to the location by default that I want to open.
View 2 Replies
View Related
Dec 1, 2013
I've devised this script that "kind of" works.This script takes your selection, copies appearance attributes, and pastes them to the top object after clipping.It's currently limited in a few ways:
• It does not accept compound paths as clipping object (and I don't know how to test for it, nor how to iterate down said compound clipping object to set each path object to clipping separately)
• It only works with a single stroke or fill
• It does not understand "no fill" it will fill your object with white instead *FIXED*
• I'm hoping to use the "graphicStyle" property to copy the appearance, since that sounds way cleaner. But I don't understand how to.
Even with these limitations, I bound this to CMD+7 using fastscripts - I'm *already* used to it working this way!
#target Illustrator
// script.name = Clip Retaining Color.jsx;
// script.required = at least two paths selected, top most path is the clipping mask;
// script.parent = Herman van Boeijen, www.nimbling.com // 30/11/13;
// *** LIMITED TO A SINGLE STROKE AND/OR FILL OF THE CLIPPING OBJECT***
// Here's hoping to use the "graphicStyles" property to copy over the appearance.
[code]....
View 6 Replies
View Related
Sep 21, 2011
Is there a way with JavaScript to place an image with a calculated path and file name? I have 30+ artboards per document, each artboard named by product number. The actual file name of the master AI file is also already established (meaning every document I use this new script on will have already been saved).
Here's the scenario I'm hoping to create in the context of the documents mentioned above:
Run a script to "Place" a linked image based on the following calculated path:
["S:SAPCurrent Images in SAPStock Schools"] + [current ai filename minus the .ai extension]+[a hyphen like this "-"]+[currently selected artboard name]+[".jpg"]
This image link can be placed on a new top layer called "Images" or if necessary on the currently selected layer. Dimensions of the placed image should be a pre-determined size 8"x8".
Error if the ai document has not been saved yet.
View 11 Replies
View Related
Dec 28, 2012
Is it possible to script the menu item Object/Path/Outline Stroke?I need to cycle through all the Path items in the document and convert them to Outlines.
View 2 Replies
View Related