Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all 12845 articles
Browse latest View live

Unembed All Images?

$
0
0

Hi everyone,

 

I was just wondering if there could be a "unembed all images" script out there. I have a pdf previously created in Word that I've imported into AI CC 2015 and need to create links out of all the embedded images in the doc.

 

Any help or reply is greatly appreciated,

 

Thanks!

 

 

Andy


Illustrator VBA scripting 101 - via Excel

$
0
0

This post will attempt to introduce newcomers to Illustrator Visual Basic Scripting (well, not actually vbs, but rather tru VBA, Visual Basic for Applications). I personally prefer vba over bvs for a number of reasons. First, I always have Excel and Illustrator open, so it makes sense for me use it to drive Ai. Second, I usually need to transfer data between the two programs. Third...I love the Excel IDE...ok, let's get right into it.

 

 

- Open Excel

- hit Alt+F11, to bring up the editor

- in the Tools menu, click on References...

- add a reference to "Adobe Illustrator CS5 Type Library"

- in the Personal.xls (or in any other book) add a Module. Personal is a global workbook that is always available. If you don't see it, go back to Excel and record a macro, anything will do. That will create the Personal file.

- and type the following in that module

- we have to continue the tradition and do the "HelloWorld" script

 

Sub helloWorld()    Dim iapp As New Illustrator.Application    Dim idoc As Illustrator.Document    Dim iframe As Illustrator.TextFrame        Set idoc = iapp.ActiveDocument    Set iframe = idoc.TextFrames.Add        iframe.Contents = "Hello World from Excel VBA!!"        Set iframe = Nothing    Set idoc = Nothing    Set iapp = Nothing
End Sub

 

- save Personal book

- open Illustrator and create a new document first

- to run, move the cursor anywhere inside the Sub...End Sub and hit F5

 

that's it for now...in the following posts we'll move the text to the middle of the page, create new documents, get data from an Excel Range to Illustrator, get data from Illustrator text frame to an Excel Range...and more, hopefully.

 

questions? comments?

Assigning Text Fields Variables via VBScript

$
0
0

I'm looking to complete the first challenge of my project of repopulating text fields with translated text automatically.  To do this I need to pull the text down from an Ai file.  However, each text field must be identifiable so that it can be recorded into an excel spreadsheet.  So the spreadsheet would essentially contain the following data:

 

Column 1

 

File Name + Text1(this being variable name)

 

Column 2

 

English text pulled from that variable text field

 

Column 3

 

Translated text

 

So I need to code a script to batch through a folder of Ai files and assign each text field in the drawing a unique identifier or variable, i.e. "Text1", "Text2", etc...

 

I know that I can convert a text field to dynamic flash text which allows me to manually name a field, however doing this through script is less obvious to me, any help would be apreciated!

 

Furthermore, if there is already a unique identifier on textfields by default that I can tap into, that would be nice as well.  Otherwise I'd like to write a script that in the beignning of the code it steps through the number of fields and assigns each a unique identifier, copies that identifier to a spreadsheet, then next to that, copies in the text from the field into the spreadsheet as well.

 

Thanks,

-Chris

Change a font using extendscript in illustrator

$
0
0

I have a script that loops through text items on an illustrator page and when it encounters one of a certain size it changes it to a different point size. I would also like to alter the font. The code I have is

 

     if (roundedSize== 7.2) {

                item.textRange.characterAttributes.size=9.6;

                $.writeln(item.textRange.characterAttributes.textFont)

                item.textRange.characterAttributes.textFont="Metric-Semibold"

                };

 

It work fine without the fourth line, but as soon as I try and set a typeface the loop bails. Could someone tell me what I am doing wrong here

 

Many thanks

How to get the start and end points of a line using javascript?

$
0
0

Hi,
I had a line selected in the active document. All I need is to get the starting and ending points of the line.  I had tried with 'geometricBounds', but, it couldn't satisfy me. It is just giving coordinates of the rectangular selection.

Am new in this. Thanks in advance.

Illustrator Scripting Panel

$
0
0

Just thought I'd share an extension I've been tinkering with:

 

GitHub - majman/adobe-scripts-panel: Scripting Panel for Adobe Illustrator

 

It's a pretty simple panel that allows you to try snippets of code in the editor, list and run saved scripts from your local files, or even load and run scripts from the web.

 

Hope somebody finds it helpful. Feel free to fork the repo and send pull requests.

 

-Marshall

check variables contents

$
0
0

Hey All,

Since there is not allot of information on variable content out there, how can you check if the variable has any content? Do you have to first have it linked to textObject or can it be checked via if or try?  This does the job but duplicates the variable when not found.  Easier solution??

 

function relinkvariable(){

    var idoc = app.activeDocument; 

    var mainLayer = idoc.layers;

    var textLayer= mainLayer["text layer"];

    var ftext = textLayer.textFrames["Front"];

   

    if (ftext.name = "Front") {

         ftext.selected = true;

    }

 

    var sel = idoc.selection;

 

    for (i=0; i<sel.length; i++) { 

          var itext = sel[i];

          if (itext.typename =="TextFrame") {  

              var frontText = activeDocument.variables.getByName('variable1');

              itext.contentVariable = frontText;

          } 

    }

};

 

        try  {

        relinkvariable();

        }

        catch (e) {

        }

    }

ExportType is now undefined

$
0
0

Hi guys, I was trying to figure out the usage of the exportFile function and tried to use the ExportType in the same way as the SaveAs ... Stupid but there it is...

 

Anyway I think through my fumbling I somehow caused ExportType to now be undefined... And the exportFile function won't accept anything (3, '3', SVG, 'SVG', svg, 'svg', and nearly any other variation...)

Anyone k ow how to fix this? I've checked via writing to console and ExportType is undefined as is the .SVG...


What's New in Illustrator Scripting CC2018

$
0
0

CC2018

New Class

Asset

Adobe Illustrator 22 Type Library

An (exportable) asset.

Properties

Asset.assetID  (Read Only)

Data Type: Int32

Adobe Illustrator 22 Type Library

The UID for the asset which is unique within a document.

Asset.assetName

Data Type: string

Adobe Illustrator 22 Type Library

Name of the asset.

Asset.parent  (Read Only)

Data Type: Object

Adobe Illustrator 22 Type Library

The object's container.

Asset.typename  (Read Only)

Data Type: string

Adobe Illustrator 22 Type Library

The class name of the object.

Methods

Asset.getNormalizedName (): string

Adobe Illustrator 22 Type Library

Gets the normalized name without special characters, such that it can be used as a file name.

Asset.remove ()

Adobe Illustrator 22 Type Library

Deletes this object.

Asset.removeAll ()

Adobe Illustrator 22 Type Library

Deletes all elements.

New Collection

Assets

Adobe Illustrator 22 Type Library

A collection of assets.

Properties

Assets.length  (Read Only)

Data Type: int

Adobe Illustrator 22 Type Library

Number of elements in the collection.

Assets.parent  (Read Only)

Data Type: Object

Adobe Illustrator 22 Type Library

The object's container.

Assets.typename  (Read Only)

Data Type: string

Adobe Illustrator 22 Type Library

The class name of the object.

Methods

Assets.add (sourceArt:any): Asset

Adobe Illustrator 22 Type Library

Creates an asset from the given art(s)

sourceArt: Data Type: any

The page item(s) to apply to.

Assets.addFromSelection (): Asset

Adobe Illustrator 22 Type Library

Creates an asset from the selected arts.

Assets.getByID (assetID: Int32 ): Asset

Adobe Illustrator 22 Type Library

Gets the asset with the specified AssetID.

assetID: Data Type: Int32

The UID of the asset.

Assets.getByName (name: string ): Asset

Adobe Illustrator 22 Type Library

Get the first element in the collection with the provided name.

name: Data Type: string

Assets.getByName (name: string ): Asset

Adobe Illustrator 22 Type Library

Get the first element in the collection with the provided name.

name: Data Type: string

Assets.remove (assetID: Int32 )

Adobe Illustrator 22 Type Library

Deletes the asset with specified id.

assetID: Data Type: Int32

UID of the asset to be deleted.

Assets.removeAll ()

Adobe Illustrator 22 Type Library

Deletes all elements.

Application Class

New Method

Application.getIsFileOpen (filePath: string ): Boolean

Adobe Illustrator 22 Type Library

Returns if the specified filePath is open.

filePath: Data Type: string

The filePath to be checked.

Document Class

New Method

Document.exportForScreens (exportFolder: File , exportFormat: ExportForScreensType , options:any, itemToExport: ExportForScreensItemToExport , fileNamePrefix: string )

Adobe Illustrator 22 Type Library

Export the specified document/asset(s)/artboard(s)

exportFolder: Data Type: File

The folder where the exported documents/assets/artboards are saved.

exportFormat: Data Type: ExportForScreensType

The file type in which the document is exported.

options (optional): Data Type: any

Options for the file type specified.

itemToExport (optional): Data Type: ExportForScreensItemToExport

What to export.

fileNamePrefix (optional): Data Type: string

String prepended to each file name.

DocumentPreset Class

New Properties

DocumentPreset.documentBleedOffset

Data Type: Rect

Adobe Illustrator 22 Type Library

Document bleed offset rect.

DocumentPreset.documentBleedLink

Data Type: Boolean , Default Value: true

Adobe Illustrator 22 Type Library

Document link for bleed values.

TextRange Class

New Properties

TextRange.start

Data Type: Int32

Adobe Illustrator 22 Type Library

Start index of the text range.

TextRange.end

Data Type: Int32

Adobe Illustrator 22 Type Library

End index of the text range.

New Methods

TextRange.getParagraphLength (): Int32

Adobe Illustrator 22 Type Library

Get the length of the first paragraph.

TextRange.getTextRunLength (): Int32

Adobe Illustrator 22 Type Library

Get the length of the first text run.

CharacterAttributes Class

New Properties

CharacterAttributes.kana

Data Type: Boolean

Adobe Illustrator 22 Type Library

Does the Japanese OpenType support kana?

CharacterAttributes.ruby

Data Type: Boolean

Adobe Illustrator 22 Type Library

Does the Japanese OpenType support ruby?

CharacterAttributes.kashidas

Data Type: KashidasType

Adobe Illustrator 22 Type Library

Kashidas attribute.

CharacterAttributes.dirOverride

Data Type: DirOverrideType

Adobe Illustrator 22 Type Library

Direction override attribute.

CharacterAttributes.digitSet

Data Type: DigitSetType

Adobe Illustrator 22 Type Library

Digit set attribute.

CharacterAttributes.diacVPos

Data Type: DiacVPosType

Adobe Illustrator 22 Type Library

Diacritics positioning attribute.

CharacterAttributes.diacXOffset

Data Type: number

Adobe Illustrator 22 Type Library

Diacritics x offset attribute.

CharacterAttributes.diacYOffset

Data Type: number

Adobe Illustrator 22 Type Library

Diacritics y offset attribute.

CharacterAttributes.justificationAlternates

Data Type: Boolean

Adobe Illustrator 22 Type Library

Justification alternates attribute.

CharacterAttributes.overlapSwash

Data Type: Boolean

Adobe Illustrator 22 Type Library

OpenType overlap swash attribute.

CharacterAttributes.stretchedAlternates

Data Type: Boolean

Adobe Illustrator 22 Type Library

Stretched alternates attribute.

ParagraphAttributes Class

New Properties

ParagraphAttributes.composerEngine

Data Type: ComposerEngineType

Adobe Illustrator 22 Type Library

Composer engine attribute.

ParagraphAttributes.defaultTabWidth

Data Type: number

Adobe Illustrator 22 Type Library

Default tab width attribute.

ParagraphAttributes.kashidaWidth

Data Type: KashidaWidthType

Adobe Illustrator 22 Type Library

The Kashida Width attribute.

ParagraphAttributes.paragraphDirection

Data Type: ParagraphDirectionType

Adobe Illustrator 22 Type Library

Main writing direction attribute.

 

 

 

 

 

 

Here's the xml including all Enumerations, please note it might have missing closing tags.

 

 

<map title="Adobe Illustrator 22 Type Library" time="Thu Feb 2 12:20:30 UTC+5 2017">      <topicref navtitle="JPEGCompressionMethodType" href="#/JPEGCompressionMethodType" />      <topicref navtitle="KashidasType" href="#/KashidasType" />      <topicref navtitle="DirOverrideType" href="#/DirOverrideType" />      <topicref navtitle="DigitSetType" href="#/DigitSetType" />      <topicref navtitle="DiacVPosType" href="#/DiacVPosType" />      <topicref navtitle="KashidaWidthType" href="#/KashidaWidthType" />      <topicref navtitle="ComposerEngineType" href="#/ComposerEngineType" />      <topicref navtitle="ParagraphDirectionType" href="#/ParagraphDirectionType" />      <topicref navtitle="ExportForScreensScaleType" href="#/ExportForScreensScaleType" />      <topicref navtitle="ExportForScreensType" href="#/ExportForScreensType" />      <topicref navtitle="ExportForScreensItemToExport" href="#/ExportForScreensItemToExport" />      <topicref navtitle="ExportForScreensOptionsJPEG" href="#/ExportForScreensOptionsJPEG" />      <topicref navtitle="ExportForScreensOptionsPNG8" href="#/ExportForScreensOptionsPNG8" />      <topicref navtitle="ExportForScreensOptionsPNG24" href="#/ExportForScreensOptionsPNG24" />      <topicref navtitle="ExportForScreensOptionsWebOptimizedSVG" href="#/ExportForScreensOptionsWebOptimizedSVG" />      <topicref navtitle="ExportForScreensPDFOptions" href="#/ExportForScreensPDFOptions" />    <topicref navtitle="Classes used for working with (exportable) assets in Adobe Illustrator">      <topicref navtitle="Asset" href="#/Asset" />    </topicref>      <topicref navtitle="Assets" href="#/Assets" />  </map>  <package>    <classdef name="ExportForScreensScaleType" enumeration="true">      <shortdesc>Export for screens scale type.</shortdesc>      <elements type="class">        <property name="SCALEBYFACTOR" rwaccess="readonly">          <shortdesc>Scale artwork by factors like 1x, 2x, 3x and so on, where 1x means 72 ppi.</shortdesc>          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="SCALEBYWIDTH" rwaccess="readonly">          <shortdesc>Scale artwork by specifying artwork width in pixels like 100px, 124px etc. Height of the artwork is adjusted automatically to maintain the aspect ratio.</shortdesc>          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="SCALEBYHEIGHT" rwaccess="readonly">          <shortdesc>Scale artwork by specifying artwork height in pixels like 100px, 124px etc. Width of the artwork is adjusted automatically to maintain the aspect ratio.</shortdesc>          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>        <property name="SCALEBYRESOLUTION" rwaccess="readonly">          <shortdesc>Scale artwork by specifying resolution in ppi like 72 ppi, 100 ppi, 144 ppi etc.</shortdesc>          <datatype>            <type>int</type>            <value>3</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ExportForScreensType" enumeration="true">      <shortdesc>Export for screens type.</shortdesc>      <elements type="class">        <property name="SE_JPEG100" rwaccess="readonly">          <shortdesc>Export file in JPEG (100% quality) format.</shortdesc>          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="SE_JPEG80" rwaccess="readonly">          <shortdesc>Export file in JPEG (80% quality) format.</shortdesc>          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>        <property name="SE_JPEG50" rwaccess="readonly">          <shortdesc>Export file in JPEG (50% quality) format.</shortdesc>          <datatype>            <type>int</type>            <value>3</value>          </datatype>        </property>        <property name="SE_JPEG20" rwaccess="readonly">          <shortdesc>Export file in JPEG (20% quality) format.</shortdesc>          <datatype>            <type>int</type>            <value>4</value>          </datatype>        </property>        <property name="SE_SVG" rwaccess="readonly">          <shortdesc>Export file in SVG format.</shortdesc>          <datatype>            <type>int</type>            <value>5</value>          </datatype>        </property>        <property name="SE_PNG8" rwaccess="readonly">          <shortdesc>Export file in PNG 8-bit format.</shortdesc>          <datatype>            <type>int</type>            <value>6</value>          </datatype>        </property>        <property name="SE_PNG24" rwaccess="readonly">          <shortdesc>Export file in PNG 24-bit format.</shortdesc>          <datatype>            <type>int</type>            <value>7</value>          </datatype>        </property>        <property name="SE_PDF" rwaccess="readonly">          <shortdesc>Export file in Acrobat PDF format.</shortdesc>          <datatype>            <type>int</type>            <value>8</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="KashidasType" enumeration="true">      <shortdesc>The kashida type constants.</shortdesc>      <elements type="class">        <property name="kashidaDefault" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="kashidaOn" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="kashidaOff" rwaccess="readonly">          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="DirOverrideType" enumeration="true">      <shortdesc>Direction override type constants.</shortdesc>      <elements type="class">        <property name="dirOverrideDefault" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="dirOverrideLTR" rwaccess="readonly">          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="dirOverrideRTL" rwaccess="readonly">          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="DigitSetType" enumeration="true">      <shortdesc>Digit set type constants.</shortdesc>      <elements type="class">        <property name="defaultDigits" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="arabicDigits" rwaccess="readonly">          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="hindiDigits" rwaccess="readonly">          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>        <property name="farsiDigits" rwaccess="readonly">          <datatype>            <type>int</type>            <value>3</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="DiacVPosType" enumeration="true">      <shortdesc>Diacritic vertical position type constants.</shortdesc>      <elements type="class">        <property name="diacVPosOff" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="diacVPosLoose" rwaccess="readonly">          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="diacVPosMedium" rwaccess="readonly">          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>        <property name="diacVPosTight" rwaccess="readonly">          <datatype>            <type>int</type>            <value>3</value>          </datatype>        </property>        <property name="diacVPosOpenType" rwaccess="readonly">          <datatype>            <type>int</type>            <value>4</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="KashidaWidthType" enumeration="true">      <shortdesc>The kashida width type constants.</shortdesc>      <elements type="class">        <property name="kashidaNone" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="kashidaSmall" rwaccess="readonly">          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="kashidaMedium" rwaccess="readonly">          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>        <property name="kashidaLong" rwaccess="readonly">          <datatype>            <type>int</type>            <value>3</value>          </datatype>        </property>        <property name="kashidaStylistic" rwaccess="readonly">          <datatype>            <type>int</type>            <value>4</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ComposerEngineType" enumeration="true">      <shortdesc>The composer type constants.</shortdesc>      <elements type="class">        <property name="latinCJKComposer" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="pptycaComposer" rwaccess="readonly">          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="adornment" rwaccess="readonly">          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ParagraphDirectionType" enumeration="true">      <shortdesc>The composer type constants.</shortdesc>      <elements type="class">        <property name="leftToRight" rwaccess="readonly">          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="rightToLeft" rwaccess="readonly">          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="JPEGCompressionMethodType" enumeration="true">      <shortdesc>JPEG Compression Method type.</shortdesc>      <elements type="class">        <property name="BASELINESTANDARD" rwaccess="readonly">          <shortdesc>Select Baseline (Standard) to use a format recognized by most web browsers.</shortdesc>          <datatype>            <type>int</type>            <value>0</value>          </datatype>        </property>        <property name="BASELINEOPTIMIZED" rwaccess="readonly">          <shortdesc>Select Baseline Optimized for optimized color and a slightly smaller file size. Not supported by all web browsers.</shortdesc>          <datatype>            <type>int</type>            <value>1</value>          </datatype>        </property>        <property name="PROGRESSIVE" rwaccess="readonly">          <shortdesc>Select Progressive to display a series of increasingly detailed scans (you specify how many in ProgressiveScan) as the image downloads. Not supported by all web browsers.</shortdesc>          <datatype>            <type>int</type>            <value>2</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="Assets" dynamic="true">      <shortdesc>A collection of assets.</shortdesc>      <elements type="class">        <method name="addFromSelection">          <shortdesc>Creates an asset from the selected arts.</shortdesc>          <datatype>            <type>Asset</type>          </datatype>        </method>        <method name="add">          <shortdesc>Creates an asset from the given art(s)</shortdesc>          <parameters>            <parameter name="sourceArt">              <shortdesc>The page item(s) to apply to.</shortdesc>              <datatype>                <type>any</type>              </datatype>            </parameter>          </parameters>          <datatype>            <type>Asset</type>          </datatype>        </method>      </elements>      <elements type="instance">        <property name="parent" rwaccess="readonly">          <shortdesc>The object's container.</shortdesc>          <datatype>            <type>Object</type>          </datatype>        </property>        <property name="typename" rwaccess="readonly">          <shortdesc>The class name of the object.</shortdesc>          <datatype>            <type>string</type>          </datatype>        </property>        <property name="length" rwaccess="readonly">          <shortdesc>Number of elements in the collection.</shortdesc>          <datatype>            <type>int</type>          </datatype>        </property>        <method name="removeAll">          <shortdesc>Deletes all elements.</shortdesc>        </method>        <method name="getByName">          <shortdesc>Get the first element in the collection with the provided name.</shortdesc>          <parameters>            <parameter name="name">              <datatype>                <type>string</type>              </datatype>            </parameter>          </parameters>          <datatype>            <type href="#/Asset">Asset</type>          </datatype>        </method>        <method name="remove">          <shortdesc>Deletes the asset with specified id.</shortdesc>          <parameters>            <parameter name="assetID">              <shortdesc>UID of the asset to be deleted.</shortdesc>              <datatype>                <type href="#/Int32">Int32</type>              </datatype>            </parameter>          </parameters>        </method>        <method name="getByName">          <shortdesc>Gets the first asset with specified name.</shortdesc>          <parameters>            <parameter name="assetName">              <shortdesc>Name of the asset.</shortdesc>              <datatype>                <type>string</type>              </datatype>            </parameter>          </parameters>          <datatype>            <type href="#/Asset">Asset</type>          </datatype>        </method>        <method name="getByID">          <shortdesc>Gets the asset with the specified AssetID.</shortdesc>          <parameters>            <parameter name="assetID">              <shortdesc>The UID of the asset.</shortdesc>              <datatype>                <type href="#/Int32">Int32</type>              </datatype>            </parameter>          </parameters>          <datatype>            <type href="#/Asset">Asset</type>          </datatype>        </method>      </elements>    </classdef>    <classdef name="ExportForScreensItemToExport" dynamic="true">      <shortdesc>An item that needs to be exported; for example, a document, artboard, or asset.</shortdesc>      <elements type="class">        <property name="artboards">          <shortdesc>Range of artboards to export [possible values: '', 'all'(default), range]</shortdesc>          <datatype>            <type>string</type>            <value>all</value>          </datatype>        </property>        <property name="assets">          <shortdesc>Array of asset id to export (default:empty)</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>            <array />          </datatype>        </property>        <property name="document">          <shortdesc>Whether to export the document or not.</shortdesc>          <datatype>            <type>bool</type>            <value>false</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ExportForScreensOptionsJPEG" dynamic="true">      <shortdesc>Options which may be provided when exporting a document as a JPEG100 file.</shortdesc>      <elements type="class">        <property name="compressionMethod">          <shortdesc>Should the image be compressed.</shortdesc>          <datatype>            <type href="#/JPEGCompressionMethodType">JPEGCompressionMethodType</type>            <value>JPEGCompressionMethodType.BASELINESTANDARD</value>          </datatype>        </property>        <property name="progressiveScan">          <shortdesc>Specify the number of detailed scans when downloading a JPEG file using the Progressive option as the CompressionMethod.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>            <min>3</min>            <max>5</max>            <value>3</value>          </datatype>        </property>        <property name="antiAliasing">          <shortdesc>Should the resulting image be antialiased.</shortdesc>          <datatype>            <type href="#/AntiAliasingMethod">AntiAliasingMethod</type>            <value>AntiAliasingMethod.ARTOPTIMIZED</value>          </datatype>        </property>        <property name="embedICCProfile">          <shortdesc>Embed an ICC profile when exporting.</shortdesc>          <datatype>            <type>bool</type>            <value>false</value>          </datatype>        </property>        <property name="scaleType">          <shortdesc>How should the resulting image be scaled.</shortdesc>          <datatype>            <type href="#/ExportForScreensScaleType">ExportForScreensScaleType</type>            <value>ExportForScreensScaleType.SCALEBYFACTOR</value>          </datatype>        </property>        <property name="scaleTypeValue">          <shortdesc>The value by which the resulting image should be scaled.</shortdesc>          <datatype>            <type>number</type>            <value>1</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ExportForScreensOptionsPNG8" dynamic="true">      <shortdesc>Options which may be provided when exporting a document as an 8 bit PNG file.</shortdesc>      <elements type="class">        <property name="colorCount">          <shortdesc>Number of colors in exported color table.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>            <min>2</min>            <max>256</max>            <value>128</value>          </datatype>        </property>        <property name="transparency">          <shortdesc>Should the resulting image use transparency.</shortdesc>          <datatype>            <type>bool</type>            <value>true</value>          </datatype>        </property>        <property name="interlaced">          <shortdesc>Should the resulting image be interlaced.</shortdesc>          <datatype>            <type>bool</type>            <value>false</value>          </datatype>        </property>        <property name="matte">          <shortdesc>Should the artboard be matted with a color.</shortdesc>          <datatype>            <type>bool</type>            <value>true</value>          </datatype>        </property>        <property name="matteColor">          <shortdesc>The color to use when matting the artboard (default: white)</shortdesc>          <datatype>            <type href="#/RGBColor">RGBColor</type>          </datatype>        </property>        <property name="antiAliasing">          <shortdesc>Should the resulting image be antialiased.</shortdesc>          <datatype>            <type href="#/AntiAliasingMethod">AntiAliasingMethod</type>            <value>AntiAliasingMethod.ARTOPTIMIZED</value>          </datatype>        </property>        <property name="scaleType">          <shortdesc>How should the resulting image be scaled.</shortdesc>          <datatype>            <type href="#/ExportForScreensScaleType">ExportForScreensScaleType</type>            <value>ExportForScreensScaleType.SCALEBYFACTOR</value>          </datatype>        </property>        <property name="scaleTypeValue">          <shortdesc>The value by which the resulting image should be scaled.</shortdesc>          <datatype>            <type>number</type>            <value>1</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ExportForScreensOptionsPNG24" dynamic="true">      <shortdesc>Options which may be provided when exporting a document as an 24 bit PNG file.</shortdesc>      <elements type="class">        <property name="transparency">          <shortdesc>Should the resulting image use transparency.</shortdesc>          <datatype>            <type>bool</type>            <value>true</value>          </datatype>        </property>        <property name="antiAliasing">          <shortdesc>Should the resulting image be antialiased.</shortdesc>          <datatype>            <type href="#/AntiAliasingMethod">AntiAliasingMethod</type>            <value>AntiAliasingMethod.ARTOPTIMIZED</value>          </datatype>        </property>        <property name="backgroundBlack">          <shortdesc>Should the resulting image rasterize against a black background (with value true) or white background(with value false) if it doesn't use transparency.</shortdesc>          <datatype>            <type>bool</type>            <value>false</value>          </datatype>        </property>        <property name="interlaced">          <shortdesc>Should the resulting image be interlaced.</shortdesc>          <datatype>            <type>bool</type>            <value>false</value>          </datatype>        </property>        <property name="scaleType">          <shortdesc>How should the resulting image be scaled.</shortdesc>          <datatype>            <type href="#/ExportForScreensScaleType">ExportForScreensScaleType</type>            <value>ExportForScreensScaleType.SCALEBYFACTOR</value>          </datatype>        </property>        <property name="scaleTypeValue">          <shortdesc>The value by which the resulting image should be scaled.</shortdesc>          <datatype>            <type>number</type>            <value>1</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ExportForScreensOptionsWebOptimizedSVG" dynamic="true">      <shortdesc>Options which may be provided when exporting a document as a web optimized SVG file.</shortdesc>      <elements type="class">        <property name="fontType">          <shortdesc>The type of font that should be included in the exported file.</shortdesc>          <datatype>            <type href="#/SVGFontType">SVGFontType</type>            <value>SVGFontType.SVGFONT</value>          </datatype>        </property>        <property name="coordinatePrecision">          <shortdesc>Decimal precision for element coordinate values.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>            <min>1</min>            <max>7</max>            <value>3</value>          </datatype>        </property>        <property name="cssProperties">          <shortdesc>How should the CSS properties of the document be included in the document.</shortdesc>          <datatype>            <type href="#/SVGCSSPropertyLocation">SVGCSSPropertyLocation</type>            <value>SVGCSSPropertyLocation.STYLEATTRIBUTES</value>          </datatype>        </property>        <property name="svgId">          <shortdesc>How object names (IDs) are generated in exported SVG.</shortdesc>          <datatype>            <type href="#/SVGIdType">SVGIdType</type>            <value>SVGIdType.SVGIDREGULAR</value>          </datatype>        </property>        <property name="svgMinify">          <shortdesc>Reduces the size of the svg.</shortdesc>          <datatype>            <type>bool</type>            <value>false</value>          </datatype>        </property>        <property name="svgResponsive">          <shortdesc>Makes the SVG Responsive.</shortdesc>          <datatype>            <type>bool</type>            <value>true</value>          </datatype>        </property>        <property name="rasterImageLocation">          <shortdesc>Should the raster images in the exported file be included.</shortdesc>          <datatype>            <type href="#/RasterImageLocation">RasterImageLocation</type>            <value>RasterImageLocation.PRESERVE</value>          </datatype>        </property>      </elements>    </classdef>    <classdef name="ExportForScreensPDFOptions" dynamic="true">      <shortdesc>Options which may be provided when exporting a document as a PDF file.</shortdesc>      <elements type="class">        <property name="pdfPreset">          <shortdesc>The max string length is 255 bytes. Name of PDF preset to use.</shortdesc>          <datatype>            <type>string</type>            <value>[Smallest File Size]</value>          </datatype>        </property>      </elements>    </classdef>        <property name="documentBleedOffset">          <shortdesc>Document bleed offset rect.</shortdesc>          <datatype>            <type href="#/Rect">Rect</type>          </datatype>        </property>        <property name="documentBleedLink">          <shortdesc>Document link for bleed values.</shortdesc>          <datatype>            <type>bool</type>            <value>true</value>          </datatype>        </property>        <method name="getIsFileOpen">          <shortdesc>Returns if the specified filePath is open.</shortdesc>          <parameters>            <parameter name="filePath">              <shortdesc>The filePath to be checked.</shortdesc>              <datatype>                <type>string</type>              </datatype>            </parameter>          </parameters>          <datatype>            <type>bool</type>          </datatype>        </method>            <parameter name="assetType">              <shortdesc>For internal use.</shortdesc>              <datatype>                <type>string</type>              </datatype>            </parameter>        <property name="assets" rwaccess="readonly">          <shortdesc>All assets in the document.</shortdesc>          <datatype>            <type href="#/Assets">Assets</type>          </datatype>        </property>        <method name="exportForScreens">          <shortdesc>Export the specified document/asset(s)/artboard(s)</shortdesc>          <parameters>            <parameter name="exportFolder">              <shortdesc>The folder where the exported documents/assets/artboards are saved.</shortdesc>              <datatype>                <type href="#/File">File</type>              </datatype>            </parameter>            <parameter name="exportFormat">              <shortdesc>The file type in which the document is exported.</shortdesc>              <datatype>                <type href="#/ExportForScreensType">ExportForScreensType</type>              </datatype>            </parameter>            <parameter name="options" optional="true">              <shortdesc>Options for the file type specified.</shortdesc>              <datatype>                <type>any</type>              </datatype>            </parameter>            <parameter name="itemToExport" optional="true">              <shortdesc>What to export.</shortdesc>              <datatype>                <type href="#/ExportForScreensItemToExport">ExportForScreensItemToExport</type>              </datatype>            </parameter>            <parameter name="fileNamePrefix" optional="true">              <shortdesc>String prepended to each file name.</shortdesc>              <datatype>                <type>string</type>              </datatype>            </parameter>          </parameters>        </method>        <property name="start">          <shortdesc>Start index of the text range.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>          </datatype>        </property>        <property name="end">          <shortdesc>End index of the text range.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>          </datatype>        </property>        <method name="getTextRunLength">          <shortdesc>Get the length of the first text run.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>          </datatype>        </method>        <method name="getParagraphLength">          <shortdesc>Get the length of the first paragraph.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>          </datatype>        </method>        <property name="kana">          <shortdesc>Does the Japanese OpenType support kana?</shortdesc>          <datatype>            <type>bool</type>          </datatype>        </property>        <property name="ruby">          <shortdesc>Does the Japanese OpenType support ruby?</shortdesc>          <datatype>            <type>bool</type>          </datatype>        </property>        <property name="kashidas">          <shortdesc>Kashidas attribute.</shortdesc>          <datatype>            <type href="#/KashidasType">KashidasType</type>          </datatype>        </property>        <property name="dirOverride">          <shortdesc>Direction override attribute.</shortdesc>          <datatype>            <type href="#/DirOverrideType">DirOverrideType</type>          </datatype>        </property>        <property name="digitSet">          <shortdesc>Digit set attribute.</shortdesc>          <datatype>            <type href="#/DigitSetType">DigitSetType</type>          </datatype>        </property>        <property name="diacVPos">          <shortdesc>Diacritics positioning attribute.</shortdesc>          <datatype>            <type href="#/DiacVPosType">DiacVPosType</type>          </datatype>        </property>        <property name="diacXOffset">          <shortdesc>Diacritics x offset attribute.</shortdesc>          <datatype>            <type>number</type>          </datatype>        </property>        <property name="diacYOffset">          <shortdesc>Diacritics y offset attribute.</shortdesc>          <datatype>            <type>number</type>          </datatype>        </property>        <property name="overlapSwash">          <shortdesc>OpenType overlap swash attribute.</shortdesc>          <datatype>            <type>bool</type>          </datatype>        </property>        <property name="justificationAlternates">          <shortdesc>Justification alternates attribute.</shortdesc>          <datatype>            <type>bool</type>          </datatype>        </property>        <property name="stretchedAlternates">          <shortdesc>Stretched alternates attribute.</shortdesc>          <datatype>            <type>bool</type>          </datatype>        </property>        <property name="defaultTabWidth">          <shortdesc>Default tab width attribute.</shortdesc>          <datatype>            <type>number</type>          </datatype>        </property>        <property name="paragraphDirection">          <shortdesc>Main writing direction attribute.</shortdesc>          <datatype>            <type href="#/ParagraphDirectionType">ParagraphDirectionType</type>          </datatype>        </property>        <property name="kashidaWidth">          <shortdesc>The Kashida Width attribute.</shortdesc>          <datatype>            <type href="#/KashidaWidthType">KashidaWidthType</type>          </datatype>        </property>        <property name="composerEngine">          <shortdesc>Composer engine attribute.</shortdesc>          <datatype>            <type href="#/ComposerEngineType">ComposerEngineType</type>          </datatype>        </property>          </datatype>        </method>      </elements>    </classdef>    <classdef name="Asset" dynamic="true">      <shortdesc>An (exportable) asset.</shortdesc>      <elements type="instance">        <property name="parent" rwaccess="readonly">          <shortdesc>The object's container.</shortdesc>          <datatype>            <type>Object</type>          </datatype>        </property>        <property name="typename" rwaccess="readonly">          <shortdesc>The class name of the object.</shortdesc>          <datatype>            <type>string</type>          </datatype>        </property>        <property name="assetID" rwaccess="readonly">          <shortdesc>The UID for the asset which is unique within a document.</shortdesc>          <datatype>            <type href="#/Int32">Int32</type>          </datatype>        </property>        <property name="assetName">          <shortdesc>Name of the asset.</shortdesc>          <datatype>            <type>string</type>          </datatype>        </property>        <method name="remove">          <shortdesc>Deletes this object.</shortdesc>        </method>        <method name="removeAll">          <shortdesc>Deletes all elements.</shortdesc>        </method>        <method name="getNormalizedName">          <shortdesc>Gets the normalized name without special characters, such that it can be used as a file name.</shortdesc>          <datatype>            <type>string</type>          </datatype>        </method>      </elements>    </classdef>  </package>

Math.cos Math.sin = Math.HELP

$
0
0

Hello Everyone,

 

I was hoping to create a JS script to move objects away from common center based upon their current position. I was thinking to use a single selected path item as the center based on its position x/y and width/height. Using this reference point the script would then move away all other path items from this center point based on a desired amount and with uniform increments given their current location from this center. I was thinking cos and sin would be my friend in this case, however they seem to have become my foe instead. ;-)

 

Does this sound doable? What am I missing, doing wrong, misinterpreting? Below is a non-working attempt, I can't seem to sort things out, perhaps I was close and missed it or maybe I am super way off and its more complex than I thought. However at this point I am confused across my various failed attempts this only being one of them.

 

Thanks in advance for any assistance and sanity anyone can provide.

 

 

// Example failed code, nonworking concept
var docID = app.activeDocument;
var s0 = docID.selection[0];
pID = docID.pathItems;
var xn, yn;
var stepNum = 20;
for (var i = 0; i < pID.length; i++) {    var p = pID[i];    var dx = ((s0.position[0] + s0.width) / 2 - (p.position[0] + p.width) / 2);    var dy = ((s0.position[1] + s0.height) / 2 - (p.position[1] + p.height) / 2);    xn = Math.cos(Number(dx) * Math.PI / 180)+stepNum;    yn = Math.sin(Number(dy) * Math.PI / 180)+stepNum;    var moveMatrix = app.getTranslationMatrix(xn, yn);    p.transform(moveMatrix);    stepNum+=stepNum;
}

Recolor Engine v2 by S.H.

$
0
0

DropMeFiles – free one-click file sharing service

Here's my bunch of scripts I coded a year ago(April 2017) to get CMY colors from CMYK - similar to photoshop profile convresion without black.

There is no real conversion actually, the script steps the values of CMYK to get the closest match - just as u do manually.

Scripts can be used to get any of CMYK variotions in 3 colors - CMY, CMK, MYK, CYK - but with extra edit of basic scripts.

Works only with fill color. No strokes, groups, gradients, etc availablae at this moment, needs more coding to get there.

CMYK to CMY conversion often used in flexography.

 

By the way, im working on Channel Mixer for Adobe Illustrator at the moment.

Transform Each

$
0
0

Hi all,

 

i'm working on a script and final step is missing, i just want to know Transform each function code on JavaScript, or at least i want to create a code can do a shortcut like (Alt+Ctrl+Shift+D)

 

 

Object > Transform > Transform Each with Reflect X and Center point position

 

image.png

 

 

7.png

 

 

is it possible??

 

 

Thanks a lot

 

Changing character at a position

$
0
0

Hi, I need to change the character at zeroth position. But it is not changing anything.

 

var finalContentcheck=Number(finalContent.indexOf("-"));

  if(finalContentcheck>=0){

       finalContent[0]="–";

  }

ii.contents=(finalContent); 

 

 

Thanks in advance.

Can not install ESTK on High Sierra.

$
0
0

I can not install ESTK on High Sierra.

I can not debug like a pro.

Please Help~~~~

Script for placed text on linked item position

$
0
0

I now have this script installed and working. Is there a way to set the text directly below the placed item, rather than by pts? I have many objects sized differently, and would just like the text to sit below the placed item every time.

 

Thanks all for the assistance in this previous thread: https://forums.adobe.com/message/10275599#10275599

 

function test()

{

    //var Sel_itemPlaced = app.activeDocument.placedItems[0]; // if nothing is selected - use the first linked file item 

    var sel_itemPlaced = app.activeDocument.selection[0]; // be sure that a linked item (and not an embedded) is selected 

    var selPos = sel_itemPlaced.position;

    var aTF = app.activeDocument.textFrames.add();

    var fileName = sel_itemPlaced.file.name;

    var textContents = fileName.replace(/\%20/g," "); //change %20 to spaces

    textContents = textContents.replace(/\.[^\.]*$/,""); //remove extension

 

    //set the text frame position to 50pt right of left edge of the placed item

    //and 50pt below the top of the placed item

    aTF.position = [selPos[0] + 50,selPos[1] - 50];

    aTF.contents = textContents; //add the textContents to the textFrame.

    }

test();


Read bleed settings for document

$
0
0

I know this question has been asked before and that there is an answer here (Read Bleed Settings in AI CS4 ) that works, but I am just baffled that there isn't a way to get this information from the document object. Am I missing something obvious? I'm using AI CC 2018.

Using JavaScript to create a 'database' of sorts from Illustrator

$
0
0

Happy Friday, fellow scripters!

 

I just had a thought regarding time tracking of orders within my department that I'd love to get your thoughts on. Up until now, my staff has used an excel template to log their time in/out for any particular job they're working on. In addition, for more colorful data, the excel spreadsheet includes columns regarding quantities of uniforms, art applications, and other variable data related to the job.

 

It's very time consuming for the artists to fill this out 20-30 times per day, and even more time consuming for me to combine everybody's separate spreadsheets into something that I can use to generate useful department wide data for the big boss.

 

The data I'd like to track:

User name

Start time

Order number

Customer name

Number of applications per garment (ie, front logo, player name, player number)

Type of garment (specific style number)

Finish time

 

All of this data with the exception of the user's name and start/finish time are built into the files they'll be using, so I can pull that info straight from the file itself without the need of prompting the artist for the information, and I'm hoping i can grab the user name from the system somehow, and start/finish times are easy enough to do with timestamps at runtime.

 

My question:

Is it possible (or even advisable) to get all of this information and write it to some sort of centralized JSON database file? Is it possible to use ESTK to write a .js file that I can then access and rewrite at a later time? If not, could I just write the JSON as a .txt file, then simply eval() when i want to read/rewrite info?

 

 

Has anyone done anything like this? Should i quit this foolish venture now because I'm young and naive? Any advice?

 

Thanks, all.

Script periodically crashes AI CC 2015.3. How can I fix it?

$
0
0

The script, below, is a compilation of several snippets I've gathered from this and other forums. If I used (abused) your script I truly thank you.

 

My question is; how can I improve it? I am running it as part of a Keyboard Maestro macro and calling it through an AppleScript (which seems to be the accepted method in Keyboard Maestro). It usually works fine, but sometimes causes AI CC 2015.3 (Mac) to crash. It also fails to perform the "AutoTrace" sequence the first time it runs after a System reboot, simply saving the bitmap image as a PDF instead.

 

Any suggestions for improving the script would be greatly appreciated. I'd also be very willing to hire someone to fix this and other possible scripts I need to develop.

 

The goal of the script is to take a Finder selection (PNG or JPG), open it in AI, perform a tracing and save a Vector PDF to the same folder as the original file.

 

Thanks,

Ray

 

var doc = app.activeDocument;

var pItems = doc.pathItems;
var Selected = doc.selection[0]
var Tracing_Preset = '[Default]';  
var doc = app.activeDocument;  
var sel = doc.selection;  
var f =15; //percent of current size


//~ Trace Fingerprint


for(var i = 0; i<sel.length; i++){    if(sel[i] == '[RasterItem ]'){        var pic = sel[i].trace();        pic.tracing.tracingOptions.loadFromPreset(Tracing_Preset);        pic.tracing.expandTracing().selected = true;        }  
}  
//Scale Fingerprint
for ( var i = 0; i < pItems.length; i++ ) {    pItems[i].resize( f,f,true,true,true,true,f,Transformation.DOCUMENTORIGIN );
};


//~ Fit Artboard to Fingerprint
function fitArtboards() {
     if (app.documents.length == 0) {          alert('Open a document before running this script');               return;     } else {          for (var i = 0; i < documents.length; i++ ) {               app.activeDocument = documents[i];               app.activeDocument.artboards[0].artboardRect = app.activeDocument.geometricBounds;               redraw();          }     }
}


fitArtboards();


//Save PDF
function test(){    var doc = app.activeDocument;    var parentPath = Folder(File(doc.fullName).parent);    var opts = new PDFSaveOptions();  
//~   opts.pDFPreset = "[Smallest File Size]";    opts.pDFPreset = "[Illustrator Default]";    doc.saveAs(File(parentPath + "/" + doc.name.replace(/\.\w+$/, "_Vector.pdf")), opts);  
};  
test();  


// Close file
if ( app.documents.length > 0 ) {
aiDocument = app.activeDocument;
aiDocument.close( SaveOptions.DONOTSAVECHANGES );
aiDocument = null;
}

Calling functions from UI palette

$
0
0

Hello,

From what I understand, you can't call complex functions from a scripted UI palette, only from "dialog" windows (which are usless in my case) because I need the persistance of a palette.

 

I have a series of scripts in use now that are  accessed from the usual "file-scripts folder" within Illustrator itself (about 27 of them).  I want to script a palette window so users can acces them without the usual mouse clicks down the menu system.

 

I'm able to call a simple "Hello World" type function using the "onClick()" method from a button of a scripted palette window, but I cannot use my regular working scripts inside a function that's called from the button.  In X-Code, I was able to write my scripts individually, then just add them to a main floating window via a separate function when they were completed.  But, I'm finding Javascript a little more tricky.

 

If I copy my other's script code into the function in the palette window script, it runs, but it runs before I click the button! --  After in runs, then the palette window is displayed(?).  If I try to use the execute() method with "onClick", the script just opens in the SDK, it will not and does run in Illustrator.

 

I take both of these as clear indications that I have no clue what I'm doing (or that I'm trying to do the impossible).

 

I did find someone with a similar problem, but they were scripting After Effects and were offered this solution:

 

system.callSystem ('afterfx -r "/C/Program Files/Adobe/Adobe After Effects CS3/Support Files/Scripts/GlobalVars.jsx"');

 

 

Is there anything I can do in Illustrator that will allow me to call (or execute) my other scripts/functions and have them execute within Illustrator?

 

Thanks for any and all help!

xmp meta data changed

$
0
0

Hi,

I have added the property into the metadata of illustrator document using following code,

 

if(xmpLib==undefined) var xmpLib = new ExternalObject('lib:AdobeXMPScript');

var xmpFile = new XMPFile(doc.fullName.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);

var xmp = xmpFile.getXMP();

var mt = new XMPMeta(xmp.serialize());

mt.setProperty(XMPConst.NS_XMP, sampleproperty, samplecontent);

if (xmpFile.canPutXMP(xmp)) xmpFile.putXMP(mt);

xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY)

 

its worked fine.. but if I save the document  after changes in document(such as replace contents..) through script.. this property is not  in document.

 

pls help,

 

Thankyou.

 

 

[This post moved from Illustrator to Illustrator Scripting by Mod]

Viewing all 12845 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>