Illustrator Scripting :: How To Determine Swatch Pattern Color Width And Height

Dec 31, 2012

I have an AI file containing seamless pattern swatches.I'd like to get each swatch vectors (ie : access the swatch groupItem). It's doable when clicking on the swatch panel and dragging the swatch on the document, or even double clicking the swatch in the swatches panel, I'd like to do it with javascript.
 
how to access swatch patterns properties.

How to access the swatch properties, like when double clicking on the swatch in the swatches panel, how to "simulate" a drag & drop of the swatch to the document, I'll take it too, though I think it is not the most convenient way to do.

View 7 Replies


ADVERTISEMENT

Illustrator Scripting :: Make Objects Same Width Or Height?

Sep 13, 2012

I found this script that makes the selected objects the same width AND height. I am very new to creating scripts. is it possible to modify this to make an object the same width leaving their heights the same?

mySelection = activeDocument.selection;
if (mySelection.length>0){
if (mySelection instanceof Array) {
goal=mySelection[mySelection.length-1];
for (i=0; i<(mySelection.length-1); i++){

[Code] ......

View 2 Replies View Related

Illustrator Scripting :: How To Place A Swatch Pattern On A Layer

Jan 1, 2014

I recently created a script that reads the layer names of an Illustrator file, and uses the name to identify a swatch to use to pattern all elements on that specified layer. The script works well, and is a real time saver for our mapping staff, but it requires duplicate swatches to exist, where the only difference is their colour.

To improve the script I want to duplicate a swatch and modify its' colour before applying it to a specific layer. I think the only way this can be done is via the "placedItems" command. So the code I'm trying to write looks likke this:
 
for(var s=0; s<slib.length; s++){                                // search swatch library
    var pat=slib[s].name;                                             // get swatch name

[Code]...
 
However I'm struggling to find the correct syntax to make this work.

View 2 Replies View Related

Illustrator Scripting :: How To Replace Instances Matching Height Or Width Of Items

Nov 26, 2011

Im struggling with the correct use of symbol / symbol items in applescript. I can successfully list the symbols used on the page, but I cannot select them. How I can select all the items on the page that are Symbol Items of symbols named "Apples" but not oranges? After that I hope to replace the instances matching the height or width of the items whichever is greater with a 3rd item name. Javascript is always an option as well but I had the same difficulty.

View 14 Replies View Related

AutoCAD Inventor :: Determine Length / Width And Height Of Assembly?

Nov 19, 2007

I would like to determine the length, width, and height of a assembly.

Can i use the bounding box method to do this, or the range box?

View 3 Replies View Related

Illustrator Scripting :: Get Active Document  Swatch Color And Its Value?

Aug 13, 2013

i want to get the swatch color of active document . i use 3 to 4 colors both cmyk and pantone which is in swatches now i want to get their values using script.

View 1 Replies View Related

Illustrator Scripting :: Creating Color Swatch Legend

Feb 24, 2012

I've been looking for scripts online that would create a color swatch legend to list the colors used in my illustrator file.  I found this (see below) and tweaked it to place properly on my particular page, but it adds everything in my swatches panel to the legend.  Ideally, I'm looking for a piece of script to add that would only add used swatches to the legend, or a script that would only add spot colors to the legend. 
 
var docRef=app.activeDocument;
var SwatchBoxSize=24;
var swatchBoxSize=parseFloat(SwatchBoxSize);
var swatchBoxTop=swatchBoxSize+314;

[Code] ......

View 2 Replies View Related

Illustrator Scripting :: Batch Change Color Swatch Name In EPS Files

Mar 20, 2012

I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?

View 7 Replies View Related

Illustrator Scripting :: How To Read Swatch Used For Fill Color Of A Page Item

Mar 21, 2012

Is there a way to read the swatch used for fill color of a page item?
 
I can read the fill color but I can't read if the color is a global swatch.

View 2 Replies View Related

Illustrator Scripting :: Importing Color To Swatch Library From Text File

May 19, 2010

I have a large list of custom colors in Excel that has the color name and CMYK breakdown of each color. I'm looking for a way to import this information to create a custom Color Swatch Library. That will have the name of the color and the CMYK breakdown. So that I can easily use in Illustrator and Photoshop. Is there any way or application in doing this with out manually entering the information and creating a new library?

View 7 Replies View Related

Illustrator :: How To Color Pattern With Swatch Color

Feb 14, 2013

I made a pattern in illustrator c6 (lets say simple dots in rows) and I want to color this dots with a swatch (which means a specific color that changes automatically when I change this particular swatch). It does change the color but it also causes a lot of troubles, it makes weird compound paths and illustrator gets very slow...

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

Illustrator Scripting :: How To Get / Determine Visible Bounds

Jun 30, 2013

how to get/determine the visible bounds (top+left coords and width+height or Rect structure) of a group having a clipping mask or several masks? When a script asks for Visible Bounds, Illustrator provides the coords/size of the group like it does not have any clipping mask. So, you see a circle of 10px diameter (and these are the actual visible bounds of this group), but Illustrator says that the visible bounds are 50 px wide and 70 px in height.

And what to do if the group contains multiple clipping masks of different shapes/sizes?

View 3 Replies View Related

Illustrator :: Adjust Width Or Height?

Dec 13, 2013

illustrator cs4. when press on drawing or text, it cannot be adjust on it width or height by mouse! Photo 1 cannot adjust. Photo 2 (sample) can adjust

View 4 Replies View Related

Illustrator Scripting :: How To Determine The Size Of Selected Text

Sep 6, 2012

I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text.  The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position. 

View 6 Replies View Related

Illustrator :: Scripting - How To Remove Swatch In CS5

Oct 10, 2012

Swatches Swatches Read-only. The swatches in this document.
 
Deletes a swatch from the current document
Set appRef = CreateObject("Illustrator.Application")
Set documentSwatches = appRef.ActiveDocument.Swatches
Set swatchToDelete = documentSwatches(5)
swatchToDelete.delete
 
How am I supposed to be able to make changes to the swatches collection - it is read only...
 
Not supprisingly I have failed to implement this in C-sharp

View 5 Replies View Related

Illustrator Scripting :: How To Replace One Swatch With Another

Feb 11, 2014

Is there anyway in JavaScript to replace one swatch with another?
 
I've seen other posts where similar questions have been asked, but the solution seems to involve iterating over all the pageItems, testing and then changing the fillColor.
 
All I want to do is delete/replace a specific color. Say replace Yellow with Green.
 
Is there a way of doing this without recursing through all of the page items?

View 3 Replies View Related

Illustrator Scripting :: Get Swatch Name For Character?

Feb 28, 2012

I'm needing to loop through each character of a text frame and check the color of each character.  Is it possible to get the swatch name of each character?  Or can you only get the red, green, blue values?
 
I've been experimenting with:
 
app.activeDocument.textFrames[0].characters[3].characterAttributes.fil lColor.typename;
// Returns SpotColor
 
But I can't figure out how to get the swatch name of the character this way?

View 2 Replies View Related

Illustrator :: What Is Max Size Of Width And Height In All Measurement

Feb 20, 2013

What is the max size of width and height in all measurement (Points, Picas, Inches, Milimeters, Centimeters, Pixels) when you create a new document? I would like it to use it together with cartesian coordinate system and ruler.

View 1 Replies View Related

Illustrator :: Get Width And Height Box As Resize Object In CS6?

Apr 16, 2013

In a training video on Illustrator cs6 a device is shown as follows, as the instructor manually resizes an Artboard using the Artboard tool: 

Justin, the instructor, calls the little box that immediately shows width/height a "width and height box" but searching on that term is not productive. When I run the program  the device is not available, not does the video explain what option makes it available or what might have changed on my particular copy to obscure or disable the box. While I know I can get the same effect by choosing the Info window, and can even adjust the parameters more precisely using the control panel bar, I would like to have the convenience of this box.
 
I note that in the same video series (from Lynda.com) the same type of display device is shown when the instructor resizes a graphic. After some 30 minutes of Google searches and searching for the identity of this device and how to enable it I come up empty.. An experienced Premiere editor, I'm trying to widen my skill set into more of the Adobe suite and new to Illustrator;

View 2 Replies View Related

Illustrator :: Saving Pattern Swatch ASE

Aug 5, 2013

I wanted to save a pattern swatch and not the whole swatch library so I deleted all the swatches until it was just the one pattern swatch. I saved it as an .ase and then opened it in another document. I noticed however that when I open the pattern in the other document it shows the default swatch library and no pattern swatch. When I save the swatch as an ai. it opens the default library as well as the pattern swatch. Is there a way to save just the pattern swatch?

View 1 Replies View Related

Illustrator Scripting :: How To Call Swatch From The Library

Jul 20, 2012

I'm writing a script to create a new AI document with a restricted swatchbook. The designer is supposed to use only the swatches/inks provided by this script. So far I was able to delete all current swatches and add a CMYK or RGB spotcolor swatch.
 
var inkt02 = app.activeDocument.spots.add();
inkt02.name = 'inkt 2';
inkt02.colorType = ColorModel.SPOT;
var kleur02 = new CMYKColor();
kleur02.black = 10;
kleur02.cyan = 80;
kleur02.magenta = 0;
kleur02.yellow = 90;
inkt02.color = kleur02;
var newSpotColor = new SpotColor();
newSpotColor = inkt02;
newSpotColor.tint = 100;
thePallet.addSpot(newSpotColor);
 
Often we will be dealing with Pantone colors. No need to define these, as they are inside AI already, right? But how to call them from the library? I'm new to ExtendScript.

View 6 Replies View Related

Illustrator Scripting :: Convert CSV To Swatch Library?

Aug 4, 2012

I have a list of 300+ colors that I need to make into a swatch library for Illustrator. The data looks like this:
 
GREEN GRASS,127,187,0
PALE YELLOW,241,235,135
LIGHT YELLOW,238,231,93
DAFFODIL,249,231,21
MOONBEAM,249,223,22
etc.
 
It's RGB I think. In any case, I am just starting with Illustrator and I know NOTHING about scripting. these colors into a swatch library? I am getting a migraine just thinking about putting them in one by one.

I found something here, but that didn't work for me. I get an error on processing on line 75. [URL] ....
 
Error 24: app.doScript is not a function, Line 75 _> app.dpScript(speakThis, 1095978087); //AppleScript.
 
I get as far as choosing the csv file, and then I get the error. I think this outputs as CMYK, but not sure.

View 23 Replies View Related

Illustrator :: Document With 300px Height And Width With PPI Of 300 Is 4.17in?

Sep 1, 2013

I'm totally new to Illustrator and need to make a document that is going to be placed in a magazine ad (it's a free placement, hence why I'm just trying to do it myself). I can get around in PhotoShop, but Illustrator is confusing to me. The ad dimensions are supposed to be:
 
2.33" w x 7.5" h
700 x 2250 pixels
 
When I create a new Illustrator document, leaving the Raster Effects setting in the Advanced section at 300ppi, if I change the Units setting to pixels, put in 300 for width and height, then change the Units back to Inches, it says the width and height are 4.17 in.

View 1 Replies View Related

Illustrator :: Increases Width And Height From Middle Outward?

Jan 15, 2013

I reseted my illustrator settings because it was having some problems, the settings I reset was changed everything back to pixels. I am working with small graphics that need to fit within 20x20 pixels
 
the problem is, when I resize something, example: 1x5, and I up the 1 to 2, it will increase it to 2 pixels from the middle of the object making it's coordinates ?.5 instead of a round number. I do not want to turn on snap anything because it worked just fine before I reseted my settings, it doesn't show it as being off at .5 but when I select multiple objects that the coordinates are at whole numbers, combines they make a number .5.
 
What I want - instead of the object increasing, when I up its size, from the middle of the object, I want it to increase down and to the right, keeping it's coordinates the same.

View 2 Replies View Related

Illustrator :: Create A Repeating Pattern Using A Swatch

May 9, 2013

In Illustrator CS4.  I want to create a repeating pattern, using a swatch.  I've done this before succesfully but not sure why this one isn't working as planned.
 
The small image at the bottom (just the area inside the artboard) is the spacing I want between the characters, but the pattern at the top is what I get. 

View 3 Replies View Related

Illustrator :: CS6 - Rotating Single Pattern Swatch

Mar 11, 2013

I am trying to work out how to rotate a pattern swatch without that rotation affecting all the other pattern swatches on my palette. I don't want the rotation to apply to just one instance of fill, I want to edit the actual swatch so that whenever it is used in the future, that rotation is applied.
 
I have tried the obvious - eg going to object, transform, pattern only... and it works, but it also rotates all my other swatches; and I can't work out if it's rotating it for just that object or if it's actually updating the pattern swatch orientation.
 
Additionally some comprehensive tutorials on making patterns using the updated CS6 software - everything I've found so far just raises further questions for me. I'm talking about, for example, being able to change the width or rotation of a stripe within a pattern and have it still tile seamlessly.
 
I'm using CS6 on a PC.

View 9 Replies View Related

Illustrator :: CS6 Pattern Maker - Swatch Backgrounds?

May 29, 2012

It may be the way I'm using this feature and I've just missed it - it appears to me that you can't have a solid background to your swatch because the way it stacks/overlaps elements means that you will end up cropping some elements on some sides.
 
Try it just by putting a solid shape the exact size of the tile.

View 8 Replies View Related

Illustrator Scripting :: Create A Duplicate Gradient Swatch

Aug 5, 2013

I'm trying to challenge myself here, I want to create a copy of every gradient in the active document and give it an assigned name like "Batman 1" "Batman 2" ect.
 
I can add new gradients and set their stop colors ect but I can't figure out how to create a perfect copy of the gradient in the swatch library.
 
I've been looking and the only thing I found that comes close was an older script that's only compatibale with CS. In this they're copying EVERYTHING I just wanna stick to gradients at the moment. Here's the link: [URL]
 
I looked to this as an example of how to do something like this but since it wont work with CS6 I cant really experiment or tinker to figure out how it works.

View 24 Replies View Related

Illustrator Scripting :: Adding Lab Colors To Swatch - Not Implemented

Jan 14, 2013

I tried to add a LabColor with an Illustrator script.
 
function addLabColorToSwatch(L,a,b,swatchName){
var color = new LabColor();
color.l = L;
color.a = a;
color.b = b;
 var swatchgroup = app.activeDocument.swatchGroups.add();
swatchgroup.name = "test swatchgroup from jsx script";
[code]....
 
The script crashes on the Line  'swatch.color = color;' with "Error 1202: Not implemented"..This seems to a bug. I allready filed it.

View 5 Replies View Related

Illustrator :: How Width / Height Calculated For Shapes And Strokes Converted

Sep 3, 2013

How is width and height calculated in the transform panel for an object? Does it use an average? An example can be seen in the first image. The lines are not a uniformed width.
 
Also, how are strokes converted from pts to pxls? For instance, if I make a stroke that is 2.3 pt, when I expand the object the width in the transform panel will say 2.3px ; however, I thought the point to pixel conversion (even for a 72 dpi screen resolution) was different. An example can be seen in the last two images, where a line was made with a specified stroke width and then expanded.

View 20 Replies View Related







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