Illustrator :: JavaScript Save As PDF - Defining Enumerated Values As Variable

May 17, 2013

how I can use a variable as the target for a Save as PDF option in Illustrator javascript. the variables work fine where there is no enumerated value for the property i.e. opts.generateThumbnails but I can figure out how to get it working opts.compatibility or other properties with enumerated values using a variable as the definition.

The code snippet example below will always give an 'Enumerated Value expected' error when run for the opts.colorCompression option even though the string is correct. If I define the opts as opts.colCompression = compressionQuality.AUTOMATICJPEGHIGH then everythings works

how I can define the compressionQuality.AUTOMATICJPEGHIGH as a variable the will work

Code snippet

opts = new PDFSaveOptions();
opts.compatibility = PDFCompatibility.ACROBAT5;
opts.generateThumbnails = thumbnailValue;

[Code]....

View 5 Replies


ADVERTISEMENT

Illustrator Scripting :: Variable Width Tool (JavaScript)

Feb 6, 2013

I am looking for any info on scripting the Variable width tool (Javascript).
 
Background: By adding a gradient to a variable width strock you can create nice 3D looking  Shapes (see example)

this is a straight vertical line with varied widths, then hit with a gradient.
 
Goal: My hope is to write a script that will take a "Profile" or "Shape" and convert it to a Variable width line. (see Example)

The Black line is to have its widths modified
The Red line is how wide the line needs to be.

View 10 Replies View Related

AutoCAD Inventor :: ILogic - Defining Variable In Name

Nov 16, 2011

I'm an Inventor 2011 user and I'm writing a Ilogic script to update an assembly. For this I want to use a variable in a name.

For example d1 till d10 will be given the value 25.

Is it possible to define "d" combined with a variable "n" . The script should be something like this:

n=1

for n<11

dn=25

n=n+1

end

View 3 Replies View Related

Illustrator :: Insert File Save Date As Variable?

Jun 12, 2013

The CS5 online help is pretty tight-lipped about variables … is there an easy way of pulling in the save date as a variable? ID can do it; even Word can do it :-}

View 4 Replies View Related

Illustrator Scripting :: Assign Values To Artboard And Save Within Document?

Oct 14, 2013

Is there any chance to assign values to an artboard?
 
I've experimented with “tags”, but they only work for pageItems. (if the item which includes the stored data is deleted, the data is also deleted)
 
It is simple data like v1=true, v2=false, … I want to assign. And it needs to be saved within the illustrator document.

View 4 Replies View Related

AutoCAD .NET :: How To Use Set System Variable Setting Coordinate Values

Apr 5, 2013

I have a problem setting sysvar like SNAPBASE, which requires 2d point or 3d point. I always get wrong input for the following lines.

double[] point = new double[2] {5,5};            
object value1 = point;
Application.SetSystemVariable("SNAPBASE", value1);

what value should I give a 2d point or 3d point?

View 2 Replies View Related

AutoCad 2D :: System Variable Values Need Changes Each Time Open 2009 File

Jun 12, 2011

in autocad 2010 & 2009 certain commands are not working, but if we change certain system variable values, it will work. but the problem is each time when we open the file, we have to change that system variable.

View 2 Replies View Related

Illustrator :: Defining Seemless Patterns In CS5

Jul 23, 2012

I am attempting to create a seemless pattern in illustrator cs5 with a logo a customer provided. I have looked through several tutorials and read most everything I can about the process but seem to be running into a strange problem. I make the pattern like all the lessons say with a rectangle with no fill or stroke set behind all the elements I want in my pattern. When I deifne the pattern it doesn't just include the objects inside the square but also the parts of the elements that leave the square. If I am understanding everything correctly thats not how its supposed to work. I am using illustrator cs5 on mac os x. Here is a screen shot. Back ground square really has no stroke or fill. I am only coloring it in so you can see the example.

View 2 Replies View Related

Illustrator :: Defining Order Of Objects When Using Distribute?

Dec 6, 2013

VERSION: Illustrator CC Mac
 
I've always assumed that the order of the layers determined the order and position that shapes are moved in the Distribute function.
 
I'm having a wierd problem today and the order seems to be defined by something I can't figure out. I'm trying to vertically distribute a set of the same shape and instead of counting the shapes in order from left to right or vise versa the distribute function seems to be randomly picking the order of the shape, not basing it on location or layer order.
 
In both examples I have used a Vertical Distribute Center and both groups of shapes are ordered from left to right in the layers palette with the left most layer being the first layer and the right most shape being the last.
 
What is causing the shapes to be distributed in this order? How do I specify what the order is if it isn't based on layer or position order?

View 22 Replies View Related

InDesign :: Write JavaScript Code To Open Template / Import XML Save And Export To PDF?

Feb 14, 2014

How do I write a javascript code to open InDesign template, import XML, save and export to pdf?
 
writing the javascript code to open the InDesign file, import some xml that will be randomly coming in and then saving the document.

View 1 Replies View Related

AutoCad :: Variable / Setting For Save As

Nov 22, 2013

Some how the variable for saving the dwg file has changed. So, when I save a dwg, I get the prompt for me to type in the file name. What the setting is to change it back?

View 9 Replies View Related

Edge Animate CC :: Save Value Of A Variable In Database?

Apr 7, 2013

how I can save the value of a variable in a database? I need to keep the # of times you press click animation. to know how many times it has been seen.I connect to msql database, using php, javascript, ajax and jquery, but not how to save the variable counter clicks from adobe edge Animate.so I can connect to the database from adobe edge animate.

View 3 Replies View Related

AutoCAD 2010 :: File Save As Default Variable

Sep 21, 2009

We are getting ready to deploy 2010 and I am writing a script to set some of the system variables on all the installs.
We have some users with 3rd party programs that won't run in 2010 yet so we will have a few people still running 2007 and 2008. I want to set the default File Save As in my script to 2007 format but I can't seem to find a variable to modify this.

In case I wasn't clear this is the setting found in Options, under the Open and Save tab, in the File Save section.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Save Filename As Variable

Oct 20, 2011

how to write a lisp command, or function, that will save my newly created drawing with a file name is that is called up from a variable.

For example:

(setq filename variable)
(command "saveas" "r14" "filename")

and i would want the outcome to be:  variable.dwg, rather than filename.dwg. I have tried numerous different ways of doing this with command prompt and cant seem to get anything to stick.  Everything that works just creates a file named "filename.dwg", which is not what i want to do.

View 9 Replies View Related

Illustrator Scripting :: Call Actions Through JavaScript

May 2, 2012

Currently i'm doing automations for Adobe Illustrator CS4. I have created some actions due to the limitations of scripting in Illustrator. I need to call this actions through javascript.But in applescript i can able to call the actions by using the do script method.

View 5 Replies View Related

Illustrator Scripting :: Convert JavaScript To AppleScript?

Apr 3, 2012

I need to convert javascript to Apple script.
 
try {
app.activeDocument.layers.getByName( '.ARD' ).remove(); } catch (e) {};

View 1 Replies View Related

Illustrator Scripting :: How To Tell With JavaScript That The Text Was Set To Overprint

Feb 24, 2012

If I were to select some text, then checkmark 'Overprint Fill' in the 'Attributes' pane, is there a way to tell with JavaScript that the text was set to overprint?
 
I've been experimenting with this code in ExtendScript, but it keeps returning false:
 
var doc = app.activeDocument;
$.write(doc.textFrames[0].textPath.fillOverprint + '
');

View 3 Replies View Related

Illustrator Scripting :: Set Stroke Alignment From JavaScript

Jan 21, 2013

I'm trying to set the stroke style for a path item I've drawn through JavaScript, however I can't find a way to set the stroke alignment for my path item.

I've checked the Illustrator JavaScript reference but I can't seem to find that option in there.I would expect something like:
 
pathItem.strokeAlignment = StrokeAlignment.OUTSIDE; // This doesn't work, what is the correct way to set the stroke alignment from JavaScript?
 
If I change the option in the Actions Panel it comes up as 'Set Stroke/Alignment: Outside', so there must be an equivalent way of setting it from JavaScript. Is there a way of converting Actions to JavaScript so you can see which properties and attributes are being set on the object? What is the correct way to set the strok alignment from JavaScript?

View 5 Replies View Related

Illustrator SDK :: Convert Artboard To JPEG Using JavaScript?

May 24, 2013

The code below is export artboard to jpeg using javasript.
 
function exportFileToJPEG (dest)
{
if ( app.documents.length > 0 )
{

[Code]....

How do I do this in Illustrator SDK plugin? library that this class ExportOptionsJPEG reside in illustrator api?

View 1 Replies View Related

Illustrator Scripting :: How To Add Spotcolor To Colorgroup In JavaScript

Feb 11, 2012

How to add a spotcolor to a colorgroup in javascript?

View 1 Replies View Related

Illustrator Scripting :: Execute Action From JavaScript In CS6

Jul 10, 2013

I've seen on this forum a lot people saying that in CS6 you can now call an action from JavaScript. However, I haven't been able to find what the syntax is to do that in the reference or the guide. Can you actually do this now with Javascript?

View 2 Replies View Related

Illustrator :: Call JavaScript Through Command Prompt?

Mar 13, 2009

I need to call the .js file through command prompt. And also through programming language like c++, java. This is for "illustrator cs".

View 5 Replies View Related

Illustrator Scripting :: Link To Webpage From AI JavaScript?

Dec 5, 2012

I've written a script with a ScriptUI interface, which other people will be using. I'd like to include a 'help' button in the interface, which ideally would connect to a web page with more details. (The alternative is to create the 'help' window in javascript, but the web page already exists and it would be a shame not to use it.)
 
From what I've read, other Creative Suite programs may be able to connect to the web with javascript, but apparently not Illustrator.

View 22 Replies View Related

Illustrator SDK :: Converting JavaScript To Actionscript For Extension

Apr 14, 2013

Converting some Javascript to Actionscript for an extension.

Have a selection. Need to iterate through selection, and then when finding groups, iterate through groups to get geometricbounds.
 
in Javascript GroupItem.Pageitems[i] will allow me to access properties of items in the group. Actionscript is a big fat 1009 NULL error. Probably some type error since GroupItem is Object?
 
This simple code throws the error. I have two rectangles grouped. That is what is selected.
 
var mySelItem:Array = app.activeDocument.selection as Array;
if (mySelItem[0] is GroupItem){
var myPath:PathItem = mySelItem[0].PageItems[0]
myPath.remove()
 
Line of code that will allow me to access children of GroupItem and get properties?

View 1 Replies View Related

Illustrator Scripting :: Create Files With JavaScript?

May 5, 2012

I would like make a config file for my script that i would like to put in the %appdata%adobe folder.
 
How can i reah the value of %appdata% inside javascript?How do i create and read files? 

I am currently reading the Extendscript javascript toolsguide but i cant figure out how to create a file:
 
Should not this code create a file in C: directory?
 
Fille = new File('C: est.txt');
Fille.write("Testwriting!");
Fille.close();

View 10 Replies View Related

Illustrator Scripting :: Create A Panel With JavaScript?

Jan 26, 2013

As I´m studying JavaScript and the user interface creation...would like to ask (more for curiosity):
 
Is it possible to create a new panel for Illustrator using JavaScript? Or this is only possible using C++?
 
(in the Window Class UI we have the "palette" creation method..so wondering the result of it too)

View 10 Replies View Related

Illustrator Scripting :: Importing Data With JavaScript

Feb 3, 2014

I would like to open a file dialog box seltect a CSV text file saved from Excel and import this into an array/variable/dataset in adobe illustrator using javascript. Have done some work with javascript but not a power user. Can't work out how to get the open dialog to appear.

Long term aim would be to use the data to plot a path which seems straighwforward enough, its the getting the info in bit I'm stuck on.

You do have to be able to select the file to import, this bit quite important.

View 2 Replies View Related

Illustrator Scripting :: Duplicating A Circle With JavaScript

Jan 9, 2013

I'm trying to build something like a bullseye using javascript. I'm new to scripting for Illustrator but I've used javascript before so I thought it would be simple, but maybe I'm missing some basic notions here.
 
I'm using Illustrator CS6. I created a blank document and drew a circle with a 1pt black stroke and no fill. Selecting that circle, I my script to copy and paste it in front and increase its radius by one centimeter. I attempted a simple duplication first:
 
if ( app.documents.length > 0 ) {
var numberOfItems = 3;
var selectedItem = app.activeDocument.selection;
for (i=0; i < numberOfItems; i++) {
newItem = selectedItem.duplicate();
}
}

With my circle selected I get an error message saying "Error 24: selectedItem.duplicate() is not a function".

View 7 Replies View Related

Illustrator Scripting :: Select Objects Outside Artboard Using JavaScript

Aug 10, 2013

I want to select the objects outside artboard using javascript. Their are many objects outside activeartboard i want to select all those object using script.

View 1 Replies View Related

Illustrator Scripting :: Color Change Command In JavaScript

Feb 4, 2013

I managed to write this javascript. It automatically changes the colors from one swatch (byName) to another (byName) in my opened illustrator file. But if this one color doesn't exist as a fill or outline color in a file, I get an error message, because the script can not detect the color. The script stops. I am working on a batch of Illustrator files with 3 colors to change, but some files contain just 1 or 2 of the colors.Is there a command for javascript which says: "Only change the color, if the color appears"?

Here is the script:
 
var docRef = app.activeDocument;
with (docRef) {
var findColor = swatches.getByName('TSB Dark Blue').color;
var replaceColor = swatches.getByName('TSBDB').color;
[code]....

View 2 Replies View Related

Illustrator Scripting :: Possible To Apply Transform Effect From JavaScript?

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







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