Illustrator Scripting :: How To Define Windows Path

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


ADVERTISEMENT

Illustrator Scripting :: Get Source Path Of AI File?

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

Illustrator Scripting :: Sorting Out Path Items?

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

Illustrator Scripting :: How To Add Anchor Point On A Path

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

Illustrator Scripting :: Move Anchor On Path Item

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

Illustrator Scripting :: Distribute Collection Of Different Symbols Along A Path

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

Illustrator Scripting :: Dynamic Save File Path

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

Illustrator Scripting :: How To Change Colors Of Path Item

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

Illustrator Scripting :: Biggest Path-item In A Document?

Sep 17, 2013

is there a way to determine the biggest item in a document using javascript?

View 4 Replies View Related

Illustrator Scripting :: How To Speed Up JavaScript Looping Through All Path Items

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

Illustrator Scripting :: Looping - How To Create And Lock A Set Of Path Items

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

Illustrator Scripting :: JavaScript To Access Path Finder Tools?

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

Illustrator Scripting :: Drawing Compound Path From Existing Artwork

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

Illustrator Scripting :: How To Select And Copy To Clipboard A Path On Layer

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

Illustrator Scripting :: Set Folder As Relative Path To Where Script Is Running?

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

Illustrator Scripting :: Change File Path For Links In Document?

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

Illustrator Scripting :: Making Objects Into A Compound Path Then Clip?

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

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 View Related

Illustrator Scripting :: How To Add Arrow Heads To A Path With Script (JavaScript Or VBScript)

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

Illustrator Scripting :: Altering Stroke Weights Of Path With Multiple Strokes?

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

Illustrator Scripting :: Open Save File Dialog With Default Path

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

Illustrator Scripting :: Make A Clipping Path While Retaining It's Appearance - Script

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

Illustrator Scripting :: JavaScript To Place Image With Calculated Path And File Name?

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

Illustrator Scripting :: Cycle Through All Path Items In Document And Convert To Outlines

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

Illustrator Scripting :: CS5 - Change Fill Color Of Selected Path Items

Apr 2, 2013

I'm trying to create a script in CS5 mac os10.6.8 that will change the fill color of selected pathItems. I need a simple script that will change a selected pathItem to cmyk values 2,3,15,0. I will then select this script and implement the action in a batch of 600 files.
 
I wish this process could be recorded as an action but when I record the action "add new swatch" I have to manually input the cmyk values, which will take forever for a batch of over 600 files.

View 15 Replies View Related

Illustrator Scripting :: Print All Open Windows In CS5 Then Close Files

Feb 2, 2012

To print all open windows  in Illustrator CS5 (or illustrator files in a folder) then close the files.

View 12 Replies View Related

Illustrator Scripting :: Apply Every Swatch Library Color To Path Items On Page?

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

Photoshop :: Infuritating-trying To Define Custom Shape From Path

Feb 9, 2006

Im trying to define a custom shape from a path but its greyed out on the edit menu, i've read that you simply select the path with the path selection tool and then edit>define custom shape but no luck..

Im using cs

View 6 Replies View Related

AutoCAD Inventor :: Define Path For Motion In Assembly 2012

Apr 18, 2012

way to define a path for a part to move in an assembly?

Find attaced models for valve, pig and assembly.

the final goal is to deturnime the maximum size pig that will travel thru with out interfering.

I believe the path for the leading end will be different than the trailing end.

View 1 Replies View Related

Lightroom :: How To Define Smart Collection To Match Folder Path

May 24, 2012

I was hoping to define a tree of (smart) collections to match my folders tree, but coming up with a search criteria to match the folder path is proving difficult at best, impossible at worst.
 
Ultimately this smart collection criteria is bound for a plugin, but it's the same problem regardless of how ya do it...

View 1 Replies View Related

Illustrator Scripting :: Adding File Name And File Full Path To A Page

Mar 28, 2012

I'm new to scripting What I want to do and don't know how to go about it is to run a script that collects the saved file name and the full path where the file is saved on the network and displays it on my document.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved