Illustrator Scripting :: Restart Through Script (or Eliminate PARM Error)

Aug 10, 2012

I'm working on a javascript that goes through a folder, rasterizes the paths inside each file, and saves the results as separate files in another folder. My script works fine on individual files as well as for several simple files. However, once it gets going on some of the big ones, it starts to give me PARM errors.
 
Illustrator CS5.1Windows XP, SP3 (work computer)JavascriptThe CAD export that created the pdf and eps files broke any curves into tons of tiny straight lines. As a result, these drawings can have 15-35 thousand paths per image. 

Get the source and destination directoriesOpen a file from the source directoryGo to the first layer of the fileLoop through all text items to move them to their own layerLoop through all path and compound paths to move them to a groupRasterize the group of path itemsRepeat for the next layer and so onSave the file to the destination directoryRepeat the process for the next file and so on.The scripting guide suggests it could be from conflicting functions or global variables overwriting each other. However, my script is now entirely contained within its own function, and all variables are declared locally. Running from a clean illustrator and ESTK startup, it will still produce a PARM error after a few large files.
 
The guide also suggests having the script quit and re-launch Illustrator after working on many files. Since I assume these huge diagrams are probably several "normal" files' worth of objects each, I figured it probably just needs to restart Illustrator after x amount of stuff goes through. So I look in the guide's section on launching Illustrator through javascript. That basically says "Why would you ever need to do that?" I tried looking it up in the tools guide, but that document isn't very clear at all.
 
1. What would I have to do so Illustrator doesn't throw a PARM error on the line marked below? (besides just putting it in a try/catch and pretending it didn't happen) It doesn't consistently happen on the same file or even at the same point in the file, but always at that line.
 
This is just a tiny part of the script. objectClass is a placeholder for PathItems, CompoundPathItems, etc. Looping backwards and setting the group to null at the end were just experiments, neither of which had any effect on the error.
 
if(objectClass.length > 0){
    var objectGroup = myLayer.groupItems.add();
    for(var i = objectClass.length; i > 0; i--){
        objectClass[i-1].move(objectGroup, ElementPlacement.PLACEATBEGINNING); //This one keeps breaking stuff.
    }
    sourceDoc.rasterize(objectGroup, rastBounds, rastOptions);
    objectGroup = null;
}
 
2. Failing that, how can I relaunch Illustrator through javascript? Or a limited amount of VBScript, though my knowledge of that is limited too.

View 16 Replies


ADVERTISEMENT

Illustrator :: CS5 - Receiving PARM Errors On Opening AI File

Dec 21, 2012

Out of the blue I've started receiving the following error when opening any and all Illustrator files out of CS5: The operation cannot complete because of an unknow error. [PARM]
 
I don't use or create scripts. It doesn't matter how big or small the AI file...always with that error. I can click "OK" and the file appears totally in tact.

View 1 Replies View Related

Photoshop Elements :: Got The Error Message 150:30 And Was Told To Restart Computer?

Oct 19, 2012

Recently I downloaded a driver tuner for ATI drivers which have become inactive on my computer or outdated. Don't know if this has anything to do with this recent message in Photoshop Elements.  I tried to manage photos in Elements and got the error message 150:30 and was told to restart my computer.  I've restarted twice and given up.

View 1 Replies View Related

Illustrator Scripting :: Deleting Used Symbol Generates Error

May 31, 2012

I'm having difficulty writing a script that deletes all of the symbols in the document (as opposed to just breaking links or expanding which I apparently cannot do). app.sourceDocument.symbols.removeAll();When it reaches a symbol that's used in the document somewhere it spits out this error: Error 1200: an Illustrator error occurred: 1346458189 ('MRAP')

View 11 Replies View Related

Illustrator Scripting :: Getting Error 1302 - No Such Element Line

Oct 5, 2012

I am getting an error with a script i have used before without any problems.The script updates the only image at the bottom of a single page PDF and saves the changed PDF in another folder.
 
It asks me to locate the folder of PDFs to be modified.It asks me to locate the folder where the modified PDFs will be saved.It asks me to select the new image that will be used.It will then update the image and resizes it and save the PDF in the specified folder.
 
I don't get this error on all PDFs but i get it at least once every 10 PDFs  (and there are over a 1,000 PDFs).The error i get is this:
 
Error 1302:No such elementLine:27->      rip=doc.rasterItems[0].position;
 
I get this error regardless of whether the script is run in CS3 or CS5.

Additional info.I ran this script in CS3 and it worked. At a later date i ran another script on the folder of modified PDFs in CS5 that deleted any unnessesary elements outside the artboard, it selected All on the Artboard - then inversed the selection - and deleted any selected items followed by save and close.I have tried making sure the "new" image has the same name as the image being replaced but this made no difference.I am using Illustrator on Vista.
 
The script is below:
 
#target illustrator
function replaceImage() {

[code]....

View 4 Replies View Related

Edge Animate CC :: Unable To Save Templates - Receive A Restart Error

Dec 13, 2013

As of yesterday I am unable to save templates. At first I thought it may be an error with the project that I was working on, but I've opened up old projects and tried to resave those as a new template and I receive an error.
 
If I create a new project and try to save it as a template, I also receive this error.

View 3 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 :: CS6 PlacedItems Relink Method - Sometimes Producing Error

Mar 21, 2014

I am creating a script on illustrator CS6 that will loop through all the images and relink these images to there current location, it is used to update all of the links in the file. However sometimes when i run this script i will get the error 376('x ') i have searched for the meaning of this and cannot find it anywhere. It is being written in extendscript, the code i am using is shown below:
 
// execute the main function
main();
// Construct the main function
function main() {
        var retVal = "OK";
[code]....       

View 2 Replies View Related

Illustrator Scripting :: Why Does Trace Script Give Application Error

Jul 24, 2013

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'.
 
var jpgFilePath = new File ("/Users/Ellipse8.jpg" 
createRasterItem(jpgFilePath)
function createRasterItem(jpgFilePath) {
var rasterFile = File(jpgFilePath);
var myDoc = app.documents.add();
[code]....

View 2 Replies View Related

Illustrator Scripting :: Open Multiple AI Files Produce Error In Palette (8702 - No Document)

Aug 12, 2013

I try to open mulitple ai files through palette dialog but it fails on Error:8702, there is no document. But if i change to var win = new Window ("dialog", "Batch"); the open file works well. 
 
var txtSourceFolder =  win.add("edittext",undefined);
var btnOk =  win.add("button",undefined,"Run");
btnOk.onClick=function(){
try

[Code] ....

View 2 Replies View Related

Illustrator :: CC Forgets Actions Upon Application Restart?

Jan 31, 2014

Its running on OS 10.9.1 with all Apple and Adobe updates installed.

View 1 Replies View Related

Illustrator :: Restart After Power Failure - AI CS 5 Trying To Open Multiple Files

Nov 26, 2012

I recently had a power failure while working in AICS5 on Mac OS 10.7.5. When I restarted, AI reopened and tried to open every file I've worked on, in the last month or so.

View 6 Replies View Related

Illustrator Scripting :: How To Automate Importing Variable And Datasets Into Graphs Via Scripting

Dec 18, 2012

I'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?

View 8 Replies View Related

Illustrator :: How To Eliminate Twist In Blends

Oct 29, 2012

How do I get rid of this twist in my blend? I've tried to rotate the rectangles to eliminate the twist, but it doesn't seem to fix the issue.

View 2 Replies View Related

Illustrator Scripting :: Access Graph Data Through Scripting DOM?

May 6, 2012

Can you access graph data through the scripting DOM?

View 3 Replies View Related

Illustrator :: How To Join And Eliminate Part Of Path

Jun 24, 2013

Illustrator CS6.

I did the fish body outline. Then I decided I needed to change the path by the head. I want to join the inside line to the body outline and eliminate the path on the head portion. I need the finished outline to e a closed path so I can do a clipping mask. I have tried the "join" cmd but it wants to add a straight line between the bottom and top.
 
Is there a way to accomplish what I am wanting to do?

View 2 Replies View Related

Illustrator :: How To Eliminate Uneven Edges In Fill Color

Jul 25, 2013

I have created a color gradient and the color fill has an uneven edge, which creates a small white space between the edges of the fill and the bounding box.  I have tried using shift+click to try and even the edges, but I guess that only works for using stroke tool or whatever.  You have to look closely because this image is not very large.  There is a slight uneveness on both the top (near the right side) and bottom (slightly left of center).

View 14 Replies View Related

Illustrator :: How To Eliminate Darkened Areas After Applying Flatten Transparency

Jun 13, 2012

I just upgraded by CS to 5.5 here in the last couple of weeks (I had purchased it prior to 6 being launched). Any way, I've noticed on some ads I create, when I save as an EPS and then go to "flatten transparency" that sometimes it is taking elements and darkening the photo/graphic underneath. For example, I have an ad that has three starbursts with drop shadows overlaying some photos. When I select the "flatten transparency" function, it is darkening a portion of the photo underneath.

View 15 Replies View Related

Illustrator :: Eliminate Fine Line In Between Of Tile When Create A Seamless Pattern From Swatch?

Aug 6, 2011

I have created polka dots or even more complicated pattern in previous version illustrator. They are perfect. When i migrated to the CS5, the exactly same pattern always have a fine line in between the pattern swatches. After i export the artwork to jpg in 300dpi, they are still there.

View 16 Replies View Related

Illustrator Scripting :: Create Mirror Text And Stroke Text In AI Scripting

Mar 16, 2013

the Script of creating mirror text and stroke text in Adobe illustrator scripting.

View 4 Replies View Related

Photoshop :: How To Restart CC After It Froze

Aug 31, 2013

Photoshop CC froze while I was duplicating and moving an image. I force quit the app. and tried to open it up again. It froze on the opening logo screen. I am on a I mac, Lion OS System.

View 1 Replies View Related

Photoshop :: Crashing - Can Only Restart Computer?

Jul 25, 2012

I use a program that can consume memory like a dragon can consume humans (had to think of a good metaphor ) When I start up photoshop while this program is in use or when I exit the other program, photoshop will crash, almost instantly.  The only solution is to restart the computer. 

Is there a solution to this without having to restart the computer ? There is plenty of physical RAM, including 20+ gigs of virtual memory incase. Despite all this, photoshop continues to crash. 

View 5 Replies View Related

Photoshop :: Keep Getting Erroneous Restart Request?

Oct 15, 2012

I run CS4 on Windows 7.  Whenever I boot up, I get an error/prompt that says I have to restart the computer for updating to continue. 
 
I know this has been discussed in many different places here, and I have tried everything everything I can find in them.  Sometimes I get a fix, and then the next time updater runs, it's back. 
 
Why can't this well-discussed problem be fixed in an update sometime?  Or, perhaps this is my penance for still using CS4.

View 2 Replies View Related

Photoshop :: Keyboard Becomes Unresponsive When Using CS6 / Have To Restart

Aug 23, 2012

Since I upgraded to Photoshop CS6, I've found that every once in a while the keyboard becomes unresponsive.  I can't tell whether anything specific that I'm doing triggers it, but I'll be editing an image and will press a shortcut key and find it doesn't work. It doesn't happen when I first open up an image, but usually after I've been working for a while. As far as I can tell (it's pretty random) it seems to happen when I'm using a tool to apply an effect to an image, like this last time it happened when I'd been using the Spot Healing Brush repeatedly on a photograph. (Of course that could be correlation without causality, since I'm a big fan of the Spot Healing Brush and tend to use it quite a bit whenever I'm editing photos). Note that the modifier keys still function, but all of the letter and number keys are unresponsive.
 
Sometimes - and lately it seems like it happens always, there's a sound associated with the shut off.  It's possible that the times I didn't hear the sound I had my speakers off.  It's a brief clicking noise - and I don't think it's any of the built-in alert sounds on my Mac, since I just listened to all of them and I recall this sound being different - but the sound is definitely coming from my speakers and is not a mechanical sound from the machine.  The only way I've found to get my keyboard responding again is to shut down Photoshop and restart.
 
I'm on a Macbook Pro, 2.66 GHz Intel Core i7, with 8GB Ram; I'm on OS X 10.7.4 (not quite ready to upgrade to Mountain Lion).

View 3 Replies View Related

3ds Max :: Driver Configuration Gets Lost When Restart

Nov 13, 2011

I have a problem to save my Viewport Settings.I wanted my blueprints to look smooth, so I increased the "Background texture size" to 1024 and checked the "Match Bitmap Size as Closely as Possible". I did the same analog to "Download Texture Size". Everything works fine until I close 3ds Max and open it again. --> The settings are back do default and my blueprint is blurry.

My system:

Windows 7 x64
Intel i5 750 @2,67GHz
6GB DDR3 RAM
ATI Radeon HD5800 Series (new driver!)
3ds Max 2012

View 2 Replies View Related

Illustrator Scripting :: How To Export JPG

Jan 15, 2014

Quite 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.

View 5 Replies View Related

Illustrator Scripting :: Converting PDF To PNG?

Jul 27, 2012

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

View 5 Replies View Related

Illustrator Scripting :: How To Add PDF On Top Of Existing PDF

Jun 20, 2012

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")}

View 4 Replies View Related

Illustrator Scripting :: Get Layers By Name VBA?

Apr 7, 2012

Is it possible to reference layers or groups by their names instead of their index using VBA? If so, what is the sytax? I know you can do it in Extendscript, but I'm not finding info for VBA.

View 7 Replies View Related

Photoshop :: Hand Tool Freeze And Restart

Feb 22, 2013

my photoshop freezes on hand tool.. i have to restart every time it happens. I'm using photoshop cs6

My mac specification: Processor  2.4 GHz Intel Core i7 ,Intel HD Graphics 3000 512 MB,Mac OS X Lion 10.7.5

I need to mention that it is a student master collection

View 1 Replies View Related

Maya :: Shelf Buttons Disappear Upon Restart?

Aug 7, 2013

my buttons in my custom shelf disappears when I restart maya. maya has admin privileges and the prefs folder in my documents is not read only and my user account has the privilege to access/write this folder. I'v tried renaming my prefs folder so that maya creates a new pref folder when it starts. that way the shelf works but in that way my other settings are lost.

View 1 Replies View Related







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