Illustrator Scripting :: How To Get Contents Of A Specific TextFrame Within First Group On Layer

Sep 11, 2012

I think I might be doing this wrong, I am trying to get contents of a specific textFrame within first group on layer called "page numbers"
 
It seems to work, but is a bit sketchy, the documentation indicates textFrame is all the text frames in a document, and that textFrameItem should be the specific one within collections of groups etc, maybe I am misunderstanding. this is what I am using:
 
var existingPageNumbers = app.activeDocument.layers.getByName('page numbers').groupItems[0].textFrames[0].contents;
 
is this correct approach...?

View 1 Replies


ADVERTISEMENT

Illustrator Scripting :: JavaScript To Send Selected TextFrame To Current Layer?

Feb 20, 2013

Is there a way to send a selected textFrame item to a layer using javascript?
 
I don't mind if it is send to current layer or some other way to accomplish the task.
 
(Using Adobe Illustrator CS4)

View 5 Replies View Related

Illustrator Scripting :: Write A Script That Renames A Layer And Group Within The Layer?

Jul 25, 2013

I'm trying to write a script that renames a layer, and group within the layer, then an object within the layer (but not a part of the group) and have it run in a loop.
 
Here's what I've got so far, the group rename doesn't work.
 
 #target Illustrator 
var doc = app.activeDocument;
 idLayers(doc)//IRename layers
idGroups(doc)//Rename groups
 function idLayers(doc){

[code]....
 
I haven't put in anthing to rename the single object yet since I cant even get the group rename to work. I suspect that the group re-name section isn't working because I'm either using bad syntax or an invalid command.

View 3 Replies View Related

Illustrator Scripting :: Test Whether A Layer With A Specific Name Exists?

Dec 27, 2010

Is there a simple way to test whether a layer with a specific name exists?

View 9 Replies View Related

Illustrator Scripting :: How To Fill Gradient Color In Textframe

Sep 3, 2013

I am working with scripting in Ai, fill gradient color in TextFrame. I search in this forum but the other topics fill color to path or line. For now, I can make a gradient color, but I don't know how to apply it to textframe.

View 6 Replies View Related

Illustrator Scripting :: How To Read Text File Into TextFrame

Feb 23, 2012

I'm trying to read a text file into a textFrame.  It reads in but is not including linefeeds so it's just one big long line of text.  I'm using the following code to read the file.  I attempted to insert a character after each readln() but that didn't work.  I also tried creating a variable that the readln() was stuffed into before setting the textFrame.contents to the variable, but that didn't work either. I'm stumped.
 
while (! notesDoc.eof) {
noteTextRef.contents += notesDoc.readln();}

View 2 Replies View Related

Illustrator Scripting :: How To Place Textframe Central To Artboard

Apr 15, 2012

This is my very first attempt at a script: 
 
* this script will prompt  the user for a file name and location and then save the current file as a .pdf with secure save options*/
var curDoc = app.activeDocument;
var destName = prompt ("Enter a Filename Daniel", "", "Save With  Security");
var destFolder = Folder.selectDialog('Select which folder to save to :');
saveFileToPDF(destFolder+ '/' + destName); // not sure if i need this here ?

[Code] .......
 
i can do the math of (artboard width)-(text width) / 2 is start point of text but how do i find out the text width and the artboard width?

View 11 Replies View Related

Illustrator Scripting :: Divide All TextFrames In One Character Per TextFrame?

Jan 24, 2011

How to divide all textFrames in one-character-per-textFrame?
 
Example: the textFrame "Letters" will be divided in 7 textFrames: "L", "e", "t", "t", "e", "r", "s".

View 30 Replies View Related

Illustrator Scripting :: How To Resize TextFrame While Also Resizing Its Parent (a Groupitem)

Oct 27, 2013

I'm trying to find the smallest textframe within a group and then matching that textframe font size to the minimum size allowed for printing. Everything else works, except I can't figure out how to resize the textframe while also resizing its parent, the group.
  
#target illustrator
docRef = app.activeDocument;
gpRef = docRef.groupItems[0];
var gpHeight = gpRef.height;

[Code]....

I'm not even sure if I'm going about this the right way. Hoping a fresh set of eyes can take a look

View 3 Replies View Related

Illustrator Scripting :: How To Find Out Textframe Contains Stroke Color (or) Fillcolor

Jul 5, 2011

How to find out the textframe contains "stroke color" (or) "fillcolor" via javascript. Any sample.

View 5 Replies View Related

Photoshop :: Create Layer / Group-specific Guides?

May 21, 2013

I have a quite large Photoshop document where I've drafted up a number of pages for a website, and I require guides which are specific to certain layers or groups, and not just to the whole document. Is this possible? Any plugins which serve this purpose, or functionality I'm missing?
 
I'm using Photoship CS6 on a Mac OSX 10.8.3

View 4 Replies View Related

AutoCad :: Why 2009 Not Allow To Select New Layers To Specific Group Layer Filter

Jul 27, 2012

Why my AutoCad 2009 will not let me select new layers to a specific group layer filter. It was working just fine and yesterday all of sudden it will not let me add new layers to a specific filter. Is there a button or command that maybe would have changed that function. Everything else seems to be working on the Layer Manager.

View 3 Replies View Related

Illustrator Scripting :: Group Objects On Artboard

May 27, 2013

When i call the method selectObjectsOnActiveArtboard on an artboard, is there a way to easily group all items in the selection? Like in the menu found under "right click > group"

View 4 Replies View Related

Illustrator Scripting :: How To Move / Translate / Reposition The Group

Jul 10, 2013

I have a document with a single layer and a single group (GroupItem) in that layer.

Unfortunately, I didn't create the .ai file, so I don't know exactly what is in the group; however, there appears to be a bunch of complex clipping masks and gradient effects, etc. deeply nested within it.

I've successfully scripted a few tasks like resizing the group with no ill effect... in other words, this works as expected:
 
app.activeDocument.activeLayer.pathItems[0].resize(50,50);
 
However, as soon as I try to move/translate/reposition the group, all the effects/masks seem to go wonky, I've tried all of the below with no success (200 is just arbitrary as a test):
 
app.activeDocument.activeLayer.pathItems[0].left = 200;
app.activeDocument.activeLayer.pathItems[0].translate(200,0);
 
I have no problem moving the group around on the document with my mouse... all the effects/masks are still nice and clean, so I'm confused as to why I can't do the same thing via JavaScript.

View 3 Replies View Related

Illustrator Scripting :: Group Items Are Returning As Layers

Apr 5, 2012

I have a layer that contains two clipping groups (groups with a clip mask and other art).  When I call layer.groupItems it returns an empty array.  When I call layer.layers it returns the two clipping groups.  I need to know if these layers are clipping groups, but if they are coming back as layers how can I figure that out?

View 8 Replies View Related

Illustrator Scripting :: How To Ungroup Or Unmask Imported Group (VBS)

Sep 3, 2012

In vbs, I import a illustrator file with this way

Set importedGroup = appRef.ActiveDocument.GroupItems.CreateFromFile(dest)

after i duplicate them

Set dupItem = importedGroup.Duplicate(newGroup, aiPlaceAfter)

but i don't know how to "ungroup" or "unmask" the importedGroup?
 
I have looking to use clipped but it seems to not working.

View 6 Replies View Related

Illustrator Scripting :: Selecting Objects By Group Names?

Feb 17, 2012

How to select objects by their group names?
 
I'm working with imported graphics, and the objects appear in the AI layer hierarchy grouped and named according to their object types in the native program (see the attached image). The problem lies with the annotation objects: they are made of different parts for which different graphic styles are needed; however, they all come in one layer and are difficult to access for global operations. I need to do different things with the different object types (delete the POINT's, move the LINE's and LWPOLYLINE's to different layers, etc...). The option of selecting objects individually is ok for small data sets, but you can imagine this becomes untenable in a hurry.
 
Two possible solutions I've considered:

(1) change the output parameters in the source program such that the objects come into illustrator with different graphics allowing them to be accessed through the "Select same ..." tools; it would work, but is problematic for the source program

(2) print the annotation graphics with their desired graphic appearance to pdf rather than importing the source file directly in AI, then open in AI to render the remaining graphics; again, this works but introduces inefficiency in the process. Also, the print process tends to explode closed paths requiring more inefficient path tinkering in AI.
 
I would like to tell AI to select all objects named "POINT" or "LINE" etc... but have found nothing in the documentation or forums on whether this is possible.

View 1 Replies View Related

Illustrator Scripting :: How To Make JavaScript Recognize a Group

May 1, 2012

All the graphics in my document is selected. I want to deselect groups and leave standalone items selected. How can i make JavaScript recognize  a group?

View 2 Replies View Related

Illustrator Scripting :: Center Group On Artboard Using JavaScript?

Aug 14, 2013

I have a group that I want centered on the artboard. 

View 9 Replies View Related

Illustrator Scripting :: (JavaScript) Want To Group In Existing Pathitem?

May 8, 2013

<ai cs5><javascript>

I creat 5 pathitem in the K_layer, i want to group them.

code:
        var myDoc =  app.activeDocument;       
        var K_layer = myDoc.layers.add();
        var k01 = K_layer.pathItems.add();  k01.name='01';[code].....

View 3 Replies View Related

Illustrator Scripting :: Ungroup All Groups Then Create A Single Group?

Jul 30, 2013

I'm having trouble getting a script together where I can ungroup all groups in a document, then put everything under a single group. Everyhting I'm working with has a single layer, but for some of the arts I'm importing have groups within groups ect. To run certain actions I've made properly after I need eveything to be in one, single group.
 
I searched for an answer and found this (wirtten by Carlos Canto)
 
function ungroup(whereToUngroup, group) // where to ungroup? layer, document, other group?
{
for (i=group.pageItems.length-1; i>=0; i--)
group.pageItems[i].move(whereToUngroup, ElementPlacement.PLACEATBEGINNING);
}
 
But I'm having trouble getting it to work.

View 5 Replies View Related

Illustrator Scripting :: Run A Script Automatically Once A Day At Specific Time

Jul 9, 2013

I should run a script in Illustrator once a day, automatically at 23 p.m.

View 7 Replies View Related

Illustrator Scripting :: Scale Objects Proportionately To A Specific Height

Nov 5, 2012

I have multiple icons placed in a document, from several different sources (all are vector objects) -- see the included image. They vary in size and what I would like to do is find a less onerous method of resizing all the heights to a specific size, while scaling the width proportionately. I have found several scripts that come close to a solution (see links below), but none that allow me to input a height (or width) in inches and have all the objects resize to that height proportionately.
 
Change Width to the Width of the narrowest object --> Script01
Change Height to the Height of the shortest object -->  Script02
Change Multiple Attributes (JohnWundes) --> Script03
 
icon image (couldn't place via Adobe Forum) --> click

View 2 Replies View Related

Illustrator Scripting :: Select All Paths Of Specific Color In One Document

Jan 7, 2009

I'm on Illy CS2, windows xp.

I want to open a doc, run a script that selects all paths of a color, say 255,0,0 or 50,0,20,4 and changes that color to black or another color I specify and also changes the stroke. Is this possible? I can't see how i would do it?

View 6 Replies View Related

Illustrator Scripting :: Block Specific Error Message In JavaScript?

Mar 5, 2012

Is it possible to block this message with javascript?
 
I've already tried the following:
 
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
 
This won't work.

View 3 Replies View Related

Illustrator Scripting :: How To Copy Specific Area (Artboard) And Paste It To New Document

Apr 2, 2013

Is it possible to copy a specific area (Artboard area) and paste it to new document by using JSX.

View 1 Replies View Related

Illustrator Scripting :: Sending Excel Cell Data To Specific Points In VBA

Oct 27, 2013

I want to send the contents of A1 to an Illustrator document at 135, 172 and B1 to 135,190, same with A2/B2 will be at different coordinates as will A3/B3 and so on... I want to do this 6 times and save the document as a PDF. Then, it should clear and do it again. The columns will ALWAYS be A and B.

View 5 Replies View Related

Photoshop :: Contents Of Group Not Showing In Layers Palette Sometimes?

Aug 21, 2013

I have a group called "grey button" with a text layer ("ok, got it") and a shape layer ("large grey") within in it. Sometimes the two elements within the group show up in the layers palette, sometimes they don't. Sometimes when I click the drop down for the group folder, it looks to be open but nothing shows beneath it. Sometimes when I can get the items within the group folder to show beneath the folder, then close the dropdown, the folder looks closed but the elements are still showing beneath it. 

View 5 Replies View Related

Illustrator :: How To Navigate To Specific Location And Collapse Layer By Layer

Apr 25, 2009

Every time that I open a file, almost all the layers in the first level appears expanded, even when the file was saved with these layers colapsed.
 
So, as I have a lot of layers and sublayers/groups, it is difficult to navigate to a specific location and I need to collapse layer by layer.
 
Are there some trick to force Illustrator to remember the layer status?

View 4 Replies View Related

AutoCAD 2010 :: How To Lock Specific Attributes Contents

Mar 19, 2013

I was curious if there is a way to lock a specific attributes contents in autocad 2012. I have an attribute with a field inserted that I don't want people to be able to change. If this is possible

View 2 Replies View Related

Illustrator :: Convert Layer Into Group?

Jun 3, 2013

I've many layers with sub-layers in it. The problem: All layers (containing sub-layers) are shown opened in the layer pallette on document opening. How can I convert a layer into a simple group preserving the name? Are there a (semi-)automatic approach to convert all sub-layers into groups?

View 9 Replies View Related







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