Illustrator Scripting :: Replicate Shape Programmatically (JS)?
Oct 1, 2012Any way to replicate an path object programmatically in a script? I'm searching for something like JavaScript's .toSource equivalent...
View 4 RepliesAny way to replicate an path object programmatically in a script? I'm searching for something like JavaScript's .toSource equivalent...
View 4 RepliesIs there any way to programmatically call up the print dialog? Or is there some sort of "send keys" function similar to the corel vba?
View 4 Replies View RelatedHow i can align vertical center and horizontal center a single line text to a shape (in vbs) ?
View 1 Replies View Relatedso I came up with this script, and it worked fine until I tried it on a different file. I have moved the artboard around all over the "main" canvas (if that is what it is called) and on the one that it works on, seems to only work when artboard(top, left) is positive values. however on the new file it doesn't seem to matter where it is on the artboard, it wont work anywhere. it should find the textpath relative to the shapes position.
Â
I thought it was the coordinateSystem, but that doesn't seem to fix it. How the canvas works (maybe the math.abs();
Â
threw it up on gist because it was pretty big: [URL]
I'd like to fill a shape with instances of a symbol. The sybmols should vary in size but never touch each other or the outer edges of my shape. Is there a script that can do this?
[URL]
I would like to create a trapezoid shape and be able to color it in, just like I'm able to do with the PathItems (e.g. rectangle, ellipse). I would like to be able to do this in Javascript.
Â
I was thinking it might have to do with PathPoints, but Adobe's Scripting Reference Guide does not make it clear.
I'm using the variables panel in Illustrator to pull a data set I've got.
Â
For example there's 2 text variables and 1 number going from 0-359. I'm looking for a script which looks at the variable name and pulls the number, then uses that number to rotate a shape by that many degrees.
I am wondering if there is a way to add/remove/redistribute anchor points on a compound shape so that there are evenly spaced anchors along the outline of that shape.I am aware of the "add anchor points" command. But that adds a new anchor at EVERY midpoint between two anchors. It doesn't smartly calculate where to add and where to avoid adding anchors.
View 1 Replies View RelatedI'm trying to replicate the type effect (upper arc and lower arc combined) that's shown in the example below in Illustrator. So far, my attempts haven't been fruitful. The example might be hand-drawn and there might not be a way to do it in illustrator.
View 1 Replies View RelatedI would want to use AI to convert PDF containing image and vectors to SVG. Using interface, it is working very well.
Â
So now I want to include this operation in an existing application developed in .NET so that I can automate this transformation.
Â
I have written this piece of code:
 Â
Illustrator.Application aiApp = new Illustrator.Application();
Document aiDoc = aiApp.Open(pdfFileName);
ExportOptionsSVG options = new ExportOptionsSVG();
Is there a way to programatically convert CS5 and CS6 illustrator files to lower versions (CS4, CS3 etc) programatically. Are there any third party tools to do it.
View 5 Replies View RelatedI'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?
Can you access graph data through the scripting DOM?
View 3 Replies View RelatedI'm using CS3 on a Mac.
Â
I outlined my text and subtracted it (and the tree image) from the black background. When I did this both appear thinner - particularly the tree.
Â
If I then take the original version and the new subtracted version, and view them both overlayed one on top of the other in wire frame (outline) mode, there is no difference in the actual lines.
Â
It seems to be a problem with the way illustrator previews the images. This wouldn't concern me, but when I export the file as a jpeg, the lines also appear thinner in the export.Â
Â
I can create a manual solution by offsetting the path before subtracting, but this isn't ideal.
What does it mean when Illustrator v.15.1.0 ceases to contract a shape using offset paths and will only expand a shape? Seems like only yesterday I could render both ways. Wait a minute, it was only yesterday! Why would it suddenly stop funtioning?
View 3 Replies View RelatedI have two layers on the bottom I have text, and on the top I have a shape.
Â
How do I make the shape transparent so the shape may be filled with the background color?
What I would like to do is to get the stroke shape, pressure and maybe velocity after a `Brush Tool' drawing action is triggered by the user, i.e. after a simple drawing operation.
I have been using the ScriptListener plugin, but it does not record this type of operation: changing the brush parameters (e.g. size and opacity), yes, but the actual drawing action, no.
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies View RelatedI'm trying to repurpose some artwork and am running into an issue. In the image below, I simply want to delete the bottom right corner of the blue box so that the orange background is visible along the right edge of the curved shape and the blue box is visible along the left edge of the curved shape. But I cannot figure out how to do this. I've tried all the Pathfinder choices and none work. How can I do this? CS6, Windows 7.
View 12 Replies View RelatedI'm trying to cover a section of letters that have been outlines with a red box over a serif for a homework project. HOWEVER. Everytime I do this, it looks like I have it all lined up and when I make another point, the points move on its own to be off and not cover the object Say I complete the box and try to cover the object by just dragging and dropping, it will avoid that area and move it off to one side or the other but never align with the actual object I'm trying to cover for a smooth and even coverage. Trying to get the red box to cover the black serif and it won't do it.
View 6 Replies View RelatedIn PS i can Magic wand selection shape from one layer, drop to sub layer and copy that selected shape from that sub layer. How do I do this in illistrator, and moreover, from multiple layer at the same time.
Â
For instance, in PS = Import an image of gold - select a text phrse with wand - drop to gold - copy paste = gold text.
I'm new to Adobe Illustrator (CS5) and, as the topic says, have an very basic question: how to hide a shape behind another shape? (say a star shape behind a rectangle)
Â
I've looked up on tutorials and such and from what I've seen, the layers order containing each of the objects decides how the occlusion should occur, however I've tried doing that but with no luck, am I missing something here?
I scanned a photo I have of an Elvis impersonator and made this image, but I need to have the image at 300 dpi instead of the 72 dpi that I originally saved. So, I rescanned the image at the desired resolution and size, but I can't seem to remember how I got it to look like this.
View 4 Replies View RelatedI been trying to get the outline as in the above image, but i just cant get it right. I tried adding a Stroke, but every time i get smooth edges, instead of getting them like the above image. Is there a way how to get the outline around the numbers to look exactly the same?
View 4 Replies View RelatedWhen I select text in photoshop cs4, it seems to invert just the luminance (forgive me if my terminology is incorrect). That is to say, it doesn't change the color of stuff in the background, but it does invert whether it's light or dark. I've added an example to this post, the top text is selected and the bottom is not. I like the way the top selection looks and frequently would like to be able to do exactly this, and apply it to whole images. What's happening when you select text, is there a specific name for this effect, and how can I replicate it?
View 1 Replies View RelatedI've been trying to get this effect for this image but not such luck used high contrast and messed with the hue but nothing.
View 1 Replies View RelatedI have been trying to figure out the best way to replicate lane striping in 3ds Max. I am using survey data, so I would like the striping to match exactly.
Can this be done using viewport canvas? I've tried some tests, but the texture seems to "shift", and is also lower in quality/resolution than I care for.
I am looking to use this on stretches of roadway that are between 500ft-1500ft in length...
I drew a part that has a 1/4" male npt on it. How do i replicate the npt in inventor. Its not a hole so i have tried that, is there an external thread generator other then "thread" ?
View 3 Replies View RelatedQuite new to Ai's scripting stuff.
Â
I'm having a complicate time with Ai's save to jpg options vs artboard sizes and units conversions.
Â
Say, i have a doc (from my client), which they inherited and enhanced for 10 years may be.
Â
It's "supposed" to be in millimeters, but artboardRect gives me those values :
-0.27880000000005
436.191388980878
646.457
-0.20900000000074
Â
which sound like weird points or pixels.
Â
I need to export a jpg (or gif, or png), that will be X pixels wide. For the purpose of the test i set it at 1200.
Â
var maxLargeurPx = 1200;
Â
First thing, getting the artboard's width :
Â
largeurArtboard = Math.abs(thisArtboardRect[2]-thisArtboardRect[0]);
// 646.7358
Â
Then i try to have a multiply factor to use
Â
coefExport = /*Math.round*/ (100 * maxLargeurPx / largeurArtboard);
// 185.54717397738
Â
and then set my ExportFile jpg to this value (i can't give it a number)
Â
    // exportOptions.horizontalScale = coefExport
Â
That's when it's getting fun : my images are 1204 px wide with or without clipping.
Â
Of course, i "can't" resize the doc for each export, especially expecting to have dozens of those, with different values, dimensions, etc.
I wrote the following AppleScript to open a PDF file and export is as PNG. I am using Illustrator CS5.
Â
The export command gets an error: Adobe Illustrator got an error: Can't get current document.
when it encounters the export command.
Â
set inputFile to (choose file with prompt "Open PDF file to convert to PNG:") as text
set exportFile to inputFile & ".png"
tell application "Adobe Illustrator"
if not frontmost then activate
open inputFile as alias without dialogs
export current document to exportFile as PNG24 ¬
with options {class:PNG24 export options ¬
, resolution:300 ¬
, matte color:{red:0, green:0, blue:0}}
close current document saving no
end tell
Im trying to add a pdf on top of an existing PDF in illustrator using a script. This is supposed to be done by anyone at my firm so that is why I want it in a script. I also have a lot of other functions that works that will do some other stuff with this document.
Â
Created this from the scripting guide but it doesnt work. Im pretty sure its the embedDoc var thats empty and i dont understand why. Im not sure if the File "points" to the directory of the script or the original file but Ive tried both ofcoarse.
Â
This is the masterpiece
Â
var embedDoc = new File("/temp/testfile1.pdf");
if ( app.documents.length > 0 && embedDoc.exists ) {
var doc = app.activeDocument;
var placed = doc.groupItems.createFromFile( embedDoc );
}else {alert("suck")}