Illustrator Scripting :: Page Item Name Property In UI
Jan 14, 2013
Does name property of a page item appear anywhere in the user interface in Illustratpr CS6? I thought it would be the name you assign to it in the Layers palette, but it does not appear to be.
View 2 Replies
ADVERTISEMENT
Jan 6, 2014
I am working on a script that performs a series of things on all of the artwork in a document. At one point, it needs to compare the fill color of every item to a sample color. The problem is, the artwork is a collection of compound path items and path items. When I look for pathItems[x]. fillColor, it works fine. When I look for compoundPathItem[x].fillColor, it comes back undefined. So, I've moved to looking at page items, but I seem to be unable to get to the internals on the page items. If I have a compound path item, how would I address its properties from its parent page item? I tried:
pageItem[x].compoundPathItem.pathItems[0].fillColor,
pageItems[x].fillColor, &
pageItems[x].compoundPathItem.fillColor.
View 9 Replies
View Related
Aug 9, 2012
What is the Javascript equivalent to this AppleScript?
set xxx to every page item whose note = "John"
After looking at some of the tutorials, I pieced this together. Is there a better way of doing this? With 30,000 path items it took over a minute to execute...
docRef = app.activeDocument;
var pathLength = docRef.pathItems.length;
docRef.pathItems[0].note;
[Code].....
View 4 Replies
View Related
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
Jun 25, 2009
how to get the page count of a multi page PDF file? I know you can then open each page using the PDFFileOptions (pagetoopen). But I need to know up front how many pages there are to loop thru to open each page and process each page.
View 8 Replies
View Related
Feb 6, 2013
When writting scripts to Photoshop I can use the app.runMenuItem() method to acess commands in the menus. For example: app.runMenuItem (charIDToTypeID("ZoomIn")) will run the Zoom In command.
Does Illustrator have any such method (or accepts anything like action description) to enable us to acess it´s menu items? For example acess Expand comnand, or Object > Live Paint > Make..
View 2 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
Mar 22, 2012
I have written a small application in .NET that gives color to Illustrator files.I have a layer with 100 color items (paths with a fillcolor). Each one has a unique name. Through that name my program looks them up, takes the fill color and applies that color to another path.Recently there was a change in Design, the drawings that I had to provide of a Fillcolor were no no longer pathitems but rasteritems (imported from photoshop). I thought ok no problem instead of setting the Fillcolor property I'll use the Colorize method on the rasteritems. It worked fine but now and then I came across a situation where raster-item didn't get the color. After digging in to it I saw that it was because some colors are Pantone colors and the colorize method on rasteritems only takes RGBColor or CMYKcolor objects. How to do it with the pantone colors?
View 1 Replies
View Related
Jul 4, 2012
I have a number of art items on a document, some of them are filled with spot colors and some of them are with process color.Is there any method by which I can find out which color type(spot or process) is applied to the selected art item?
View 4 Replies
View Related
Apr 10, 2012
illustrator scripting but have some knowledge in indesign scripting using javascript.In Indesign we can disable menu item thru menuActions.. Is there any object available like that to disable a existing menu (eg. File>Save).
View 1 Replies
View Related
Feb 4, 2014
It is possible to apply the Convert to Grayscale(Edit->Edit Colors->Convert to Grayscale) for the selected items in illustrator cs3 in script (javascript)?
View 12 Replies
View Related
Sep 23, 2012
I use my script to embeding a placed graphic (MyImage.embed();). Then I always get a group with the correct paths and two clipping paths in a grouped grouped groupItem.
My question is: I want to delete the two clipping paths to get only the correct paths of the graphic.
This is, what I always have:
and this is, what i want:
View 8 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
Jun 21, 2012
if there is a way to open any menu item by script (Javascript) in illustrator CS5/5.1? perhaps something like this:
"app.menuActions.itemByID(0123).invoke()".
I looked at the scripting reference, but i didn't found it.
View 4 Replies
View Related
Jul 11, 2012
I want to get the "file.displayName" property of a RasterItem from a file where links are broken.the script :
myItem = app.activeDocument.selection[0];
myItem.file.displayName;
works fine if the RasterItem source file is where the link points at.In my case, the link points to the local drive of another computer, so the "file" property of the RasterItem doesn't exists !!!I don't understand why, because all the informations are in the Links pannel of illustrator.
View 5 Replies
View Related
Jan 14, 2013
This has been an issue since at least CS4. If you add a script to your actions via "Insert Menu Iitem" (not sure if it's for all items or just scripts) and close Illustrator, those actions disappear. Apparently, in CS6, Adobe has completely ignored improving including scripts to Actions, which really makes automation powerful. As awesome as CS6 is, that part is pretty lame.
View 1 Replies
View Related
Jul 16, 2013
I can't seem to figure out a simple/direct method to identify the index of the selected item in a list box.
I feel like I'm missing something, but I can't seem to figure which (if any) property returns an index number if you use it with the .onChange callback for a ListBox.
The following code accomplishes what I need but isn't particularly efficient or elegant and can get muddled if you introduce multiple lists to check.
Any way to duplicate this same behavior with better code
var res = "palette {text: 'Example List', properties:{resizeable:true}
pnl: Panel{orientation: 'row',preferredSize: [400,600],
list1: ListBox{preferredSize: [400,550], properties:{multiselect:true,numberOfColumns:2, showHeaders:true,columnTitles: ['List 1', 'Subitem 0']}},
}}"
[Code]...
View 4 Replies
View Related
Sep 20, 2012
I have a PDF file with 25 pages that I need to get into the form of an Illustrator file with 25 layers. I found the example of opening a particular page of a PDF file (using CS6), and that works. And I can create layers. But I can't figure out how to place a particular page of a PDF file into the new layer. Where/how do I provide the page info?
(I have a PostScript program that generates artwork for signs that are to be laser etched at the TechShop. The laser interface uses Illustrator and a special Print driver. I notice that opening a page from a PDF file positions the contents slightly differently than placing that page, when I do it manually, so I figured I'd create the multilayered Illustrator file by opening one page (which works) then placing all the pages in their own layers, then deleting the first page. Then the positioning will be consistent. But I'm stuck at placing a PDF page...)
tell application "Adobe Illustrator" to activate
-- This function opens the file passed as
-- a file reference parameter, at page myPage.
-- fileToOpen is a reference to a multi-page PDF file
-- and needs to be set up before calling this function.
on openMultipageFile(fileToOpen, myPage)
tell application "Adobe Illustrator"
set user interaction level to never interact
[Code].....
View 2 Replies
View Related
Jan 26, 2012
I'm trying to remove all hidden page items regardless of how many sublayers they are burried in. I wrote a snippet here that seems to only partly work. It removes all hidden page items unless two hidden items exist right after each other in the stacking order.
for (i=0; i<doc.pageItems.length; i++){
if (doc.pageItems[i].hidden == true){
doc.pageItems[i].remove();
}
}
View 3 Replies
View Related
Apr 19, 2012
in an open PDF File i press 'Ctrl+A' to select all Items in the document, then i choose Edit/Transform/rotate ... 90 degree.now i'd like to do the same with an vbscript.
the best thing i could find is:
rotate(90)
Sub rotate (degree)
Dim appRef, argument, element
Dim changePositions, changeFillPatterns, changeFillGradients, changeStrokePattern, rotateAbout
Set appRef = CreateObject("Illustrator.Application")
[code]....
not all, but all elements i am interested in are rotated - it would be better if really all elements would be rotated the elements are rotated around 'aiTransformDocumentOrigin' ... i would prefer if they are rotated around 'middle of document'.
View 3 Replies
View Related
Jul 5, 2011
Is there a way or a script that will make all the text on a page Dynamic? At the moment we have to select each text box and press 'make text dynamic', which can get tiresome with a lot of text boxes. If we select all the text boxes and do the same we get a lot of variables with the same name which gives an error.
So we need a script that can make it all dynamic with different named variables.
View 3 Replies
View Related
Sep 14, 2013
In the documentation API 2014: for SuperelevationCriticalStationCollection appears the property "Item":
[URL]
but I´m trying to use it and it doesn´t exist.
public static void Breaksegment(Autodesk.AutoCAD.DatabaseServices.ObjectId identificador) { try { Document doc = Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed = doc.Editor; using (DocumentLock docLock = doc.LockDocument()) { using (Transaction trans = db.TransactionManager.StartTransaction()) { Alignment align = trans.GetObject(identificador, OpenMode.ForWrite) as Alignment; SuperelevationCriticalStationCollection criteriaStationColl = align.SuperelevationCriticalStations; criteriaStationColl.Item trans.Commit(); } } } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
I have added the Reference:Assembly: AeccDbMgd (in AeccDbMgd.dll) and I ´m using Autodesk.Civil.DatabaseServices
Autocad Civil 3D 2014 +SP1
Quad Core Intel i7 3770-cpu 3.40Ghz.
ssd samsung 840 pro 512gb+ssd samsung 840 pro 256 gb+1tb hdd
32gb RAM 1600 Mhz.
nVidia Quadro 2000.
Win 7 Pro 64bit
View 3 Replies
View Related
Sep 27, 2012
I have been trying to mess with and target "tints" via javascript but either I am not understanding something or it cant be targeted as I had hoped, so I am looking for direction and guidance. I have a spot color assigned in the color swatches palette, and have drawn a few boxes on the page using this spot swatch. I then try to alter the tint using JS code.
sel[i].tint = // whatever number
alert(sel[i].tint) // This alerts fine
The alert shows a change taking place but it never gets applied to the item, the actual item never gets changed. I know things are properly targeted as I can change other attributes fine. When I look in the JS documentation it just shows for when creating a new spot, not for ones that already exist on items, I cant seem to find an example otherwise.
Can tint be adjusted for items on the page that have a spot color applied?
View 8 Replies
View Related
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
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
Oct 1, 2008
how to hide a master item from a particular page in corel draw x4.
View 12 Replies
View Related
Dec 18, 2012
I'm try to automate the importing of the Varaible and datasets into my graphs via Scripting, but the ImportVaraibles() function doesn't seem to work. Here is my Script, mostly copied from the example script provided with Illustrator (CS5). And, this works manually, using the file names in the script, via Load Variable Library
Set appRef = CreateObject(strIllistratorVersion)
'Open the file and import the datasets
Set docRef = appRef.Open(strTemplate & "200-500.ai")
'docRef.Datasets.RemoveAll
docRef.Variables("Yearbook").Delete
Here is the problem, after I delete the previous library, then this next line, right from the example, does nothing
The script then exits with 'No Datasets in this document'
docRef.ImportVariables (strXMLFolder & "Lumber_200-500.xml")
'appRef.DoJavaScript "alert('Template:" & strTemplate & strRange & ".ai | XML file:" & strXMLFolder & "" & objFile.Name & "^')"
If (appRef.Documents.Count > 0) Then
Set docRef = appRef.Documents(1)
[Code]....
If I remove that delete line, the script runs, but just uses whatever Variables I had last loaded, not the XML file.
It's simply not loading. What do I need to do to get it to load?
View 8 Replies
View Related
May 6, 2012
Can you access graph data through the scripting DOM?
View 3 Replies
View Related
Apr 4, 2013
This was very easy to do in earlier versions of Illustrator, but now it seems like the only option is to make a separate artboard for each page tile!
View 1 Replies
View Related
Feb 12, 2013
Is there a way to control which of two 'Graphic Property definitions' are used via a formula property with a IF, Then, condition statement?
View 3 Replies
View Related