adobe-illustrator

Scripting Adobe Illustrator. How to apply an effect?

守給你的承諾、 提交于 2019-12-08 01:44:31
问题 My script should select some items and apply Effect->3D->Extrude&bevel to them. Which objects and methods should be used? I use JavaScript in AI CS6. Thanks. -- Update: I need to set the values for effect parameters (angles, depth etc.) in script. -- Update 2: Probably it's possible to patch an AI file with needed values for the GraphicStyle, and then open it and apply the style where needed. But I'd like to know if there is less dirty solution. 回答1: Using documents[0].selection[0].reflect

Use Adobe Illustrator to create SVG Path using “move to” commands

一个人想着一个人 提交于 2019-12-07 02:18:24
问题 So when you export an Adobe Illustrator file to SVG format, paths are encoded using the SVG path syntax: http://www.w3.org/TR/SVG/paths.html If you look at the "path data" element, it's possible to have "move to" commands embedded into a path: http://www.w3.org/TR/SVG/paths.html#PathData In other words, you draw a few lines in the path, pick up the pen and move it somewhere else, and continue the same path. I have been trying to figure out how to do this in Illustrator to no avail. You can

Changing Colors in Illustrator with Javascript

我的未来我决定 提交于 2019-12-06 16:09:53
问题 I'm very new to javascript and I am writing a script to find all pathItems of a specified fill color and change them to another fill color. This must be done in RGB or hex without using swatches. So far I've put together bits of other scripts I found but I'm running into a lot of errors. Here is what I have so far: var myDoc =app.activeDocument var fillRGBColor = function (pathItem){ var fillColor = new Array(); fillColor[0] = myDoc.pathItem.fillColor.red; fillColor[1] = myDoc.pathItem

Can Adobe .jsx scripts include other script files?

喜欢而已 提交于 2019-12-06 06:10:03
问题 We're writing a bunch of .jsx scripts and in each I have to mock out some functions so I can use things like Array.map() and String.trim(), but I don't want to have to include that code at the top of every script. Is there a way to "include" other .jsx scripts inside of a .jsx script file? 回答1: Or you can simply use #include and #includepath preprocessor directives at the top of your script. You can find a detailed description in Adobe's "JavaScript Tools Guide". For example, if you want to

Does it make sense to use source control to manage graphics files (e.g. PSDs & AI files)

隐身守侯 提交于 2019-12-05 19:15:29
问题 Of course source control tools like Git, (Mercurial, SVN, etc...) can do a great job at managing source code. But I wonder, do these tools provide the developer with any advantage when used to store copies of files such as PhotoShop PSDs and Illustrator AI files? Does it make sense to use these tools with these kind of files? Would I be storing less in the repository than the sum of the file sizes of all of these files? Even though the file format of these files is only machine readable, I

Use Adobe Illustrator to create SVG Path using “move to” commands

耗尽温柔 提交于 2019-12-05 07:40:39
So when you export an Adobe Illustrator file to SVG format, paths are encoded using the SVG path syntax: http://www.w3.org/TR/SVG/paths.html If you look at the "path data" element, it's possible to have "move to" commands embedded into a path: http://www.w3.org/TR/SVG/paths.html#PathData In other words, you draw a few lines in the path, pick up the pen and move it somewhere else, and continue the same path. I have been trying to figure out how to do this in Illustrator to no avail. You can add on to an existing path but it seems you can only do this by extending the path from one of the

How do I convert an Illustrator file to a path for WPF

最后都变了- 提交于 2019-12-04 19:08:03
问题 Our graphics person uses Adobe Illustrator and we'd like to use her images inside our WPF application as paths. Is there a way to do this? 回答1: We use Expression Design to do this. Unfortunately, there currently is no free beta preview like Blend 2.5, however, you can download a trial copy (which I think you can use for 90 days). If you don't want to go this route, I know that a lot of people also use Mike Swanson's exporter that is pointed to by curtisk above. 回答2: This should fit the bill

Execute external script in ExtendScript for Illustrator

喜你入骨 提交于 2019-12-04 14:40:57
问题 Summary: Is there a way to use the execute() function to pass a parameter to a Python script, and have the Python script use the parameter in its execution, then return the result to ExtendScript? Context: I'm building a script for Illustrator that has to query a web service, process the resultant XML file, and return the results to the user. This would be easy if I were using one of the applications that support the Socket feature, but Illustrator doesn't. My next thought, was that I can

Select all objects with font-size between two sizes in illustrator?

China☆狼群 提交于 2019-12-04 14:39:39
I need to select all text-objects with a size between two values, for example 12 and 14pt (including 12.1, 12.2 etc). Is this at all possible? Loic Aigon This seems to be the candidate for a script. Try this: function selectTextWhosePointSizeIs ( minPointSize, maxPointSize ) { var doc, tfs, i = 0, n = 0, selectionArray = []; if ( !app.documents.length ) { return; } doc = app.activeDocument; tfs = doc.textFrames; n = tfs.length; if ( !n ){ return; } if ( isNaN ( minPointSize ) ) { alert(minPointSize + " is not a valid number" ); return; } else if ( isNaN ( maxPointSize ) ) { alert(maxPointSize

Can Adobe .jsx scripts include other script files?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 12:49:05
We're writing a bunch of .jsx scripts and in each I have to mock out some functions so I can use things like Array.map() and String.trim(), but I don't want to have to include that code at the top of every script. Is there a way to "include" other .jsx scripts inside of a .jsx script file? Armin Or you can simply use #include and #includepath preprocessor directives at the top of your script. You can find a detailed description in Adobe's "JavaScript Tools Guide" . For example, if you want to include scripts/helper.jsx in a .jsx file: #include "scripts/helpers.jsx" // the rest of your code