2 Replies Latest reply on Jul 29, 2013 8:36 PM by SingingDude

    Why does my trace script give an application error?


      Hi All


      I have written a simple script to to trace a raster image using Illustrator.


      The image can be traced using >Object > Image trace in Illustrator without any problems.


      However, when I run my script I get the following error:  Application error 12321(some long number) 'MARC'.


      Does anyone have any advice on how I could solve this problem?

      Thank you!

      Also, my code is below.


      var jpgFilePath = new File ("/Users/Ellipse8.jpg")




      function createRasterItem(jpgFilePath) {

      var rasterFile = File(jpgFilePath);

      var myDoc = app.documents.add();

      var myPlacedItem = myDoc.placedItems.add();

      myPlacedItem.file = rasterFile;

      myPlacedItem.position = Array( 0, myDoc.height );


      var thisImage = myPlacedItem.trace();

      thisImage.tracing.tracingOptions.ignoreWhite = true;