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
ADVERTISEMENT
Oct 23, 2012
I have a script using the dynamic content plugin from illustrator which takes and XML file and replaces it with a new one. All linked text/symbol/image links have their paths updated or text content updated.
The problem I have is I have background images which are not dynamic so I need to relink these based on their file path.
We have two shares, an OPI & an FPO, because of the size of backgrounf images we keep the FPO links in whilst artworking.
What I'd like to do is relink all images if they contain FPO in their file path, I'm in CS5.1. I had a look and found CS6 has a .relink method but obviosuly this is no use to me in CS5.1
View 4 Replies
View Related
Jul 25, 2013
I'm using Illustrator CS6. I have an artboard with 200 of the same placed file. I now want to use this same layout for 30 other views, they are the same size, but different images. If I relink them I have to click through each one. I tried using a script I found on here by Carlos:
#target Illustrator
// script.name = relinkAllSelected.jsx;
// script.description = relinks all selected placed images at once;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11;
// script.elegant = false;
[code].....
and I get an
error 25: Expected: }.
Line:10
-> p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Times}
I'm on a mac, os x 10.6.8. and I copied the script into the script preset folder so its starting from the drop down menu. Don't think I'm leaving anything out. I'm swapping 1 placed(linked) PDF for another.
View 5 Replies
View Related
Jan 21, 2014
I have been looking for a solution to automate a printing and ordering process. I have a design template with 2 pages both 8.5x11 in size. One page represents the front and other the back for double sided printing. I have 6 different images per sheet so in my links panel I have 12 total links, 2 of each. I was wondering if there is a script to update all the links with the same filename with other image? Currently I have to search through all the images and update each one.
I have 6 artboards dividing the 8.5x11 sheet proportionatly. Each artboard represents a different order. Is there a script to write the linked filename to the bottom corner of each artboard?
View 5 Replies
View Related
Jul 16, 2013
I can't seem to figure out a simple/direct method to identify the index of the selected item in a list box.
I feel like I'm missing something, but I can't seem to figure which (if any) property returns an index number if you use it with the .onChange callback for a ListBox.
The following code accomplishes what I need but isn't particularly efficient or elegant and can get muddled if you introduce multiple lists to check.
Any way to duplicate this same behavior with better code
var res = "palette {text: 'Example List', properties:{resizeable:true}
pnl: Panel{orientation: 'row',preferredSize: [400,600],
list1: ListBox{preferredSize: [400,550], properties:{multiselect:true,numberOfColumns:2, showHeaders:true,columnTitles: ['List 1', 'Subitem 0']}},
}}"
[Code]...
View 4 Replies
View Related
Sep 2, 2011
I have successfully made 20 AVCHD disks in the past 3 months with mp4 format and now have issues. New problem(s):
When I go to create a video file, I choose MPEG4 - HD. I typically have 20-25 minutes of vidoes (720 and 1080), pictures, sound, and crossfade transitions. It renders through the 99% but no new file is created. In addition, I have noticed two other issues/items which could be related. One, the mp3 audio files have a yellow icon and this error appears "Original file [et theme.mp3] doesn't exist.". Two, the video file thumbnails in the Library now have two icons; the normal one identifying it as a video and now a second icon that looks like two.
View 8 Replies
View Related
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
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
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
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
View Related
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
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
Mar 21, 2013
Do you know if you can create a symbol/graphic as a glyph?
I need to create country symbols, oval with UK,F etc in, and put within text?
View 3 Replies
View Related
Aug 21, 2012
In InDesign if i move my folder with images just by re-linking one image of the folder ALL will be linke at once by their names. In Illustrator i have to re-link manually one by one. Am i doing something wrong? Should i have some command selected? Can i do it through a plugin?
View 1 Replies
View Related
Aug 2, 2010
I manage a design department where we're constantly working with documents that have multiple placed and embedded images in each. As an example, we often have 10 instances each of 4 different images in a given document. These links are constantly changing and being updated on a per-client basis. My concern is that my designers waste a lot of time relinking these embedded graphics as the software prompts the user to relink each one individually. If the designer needs to replace 10 of the linked graphics with, say, "Royal Mahogany", they have to select all 10, select the relink option and specify the file they want to replace the graphic with by clicking on and placing the selected file for each instance of the graphic. So if they're replacing the links of 10 images, they have to select and place the desired file 10 times. Is there any way to select multiple placed images and replace them all at once? Note that the images we place into the file are stored in multiple locations on server, subdivided by material, manufacturer, color, finish etc.
My team is using CS3 mac version currently but we'll be upgrading to CS5 soon. This is a huge time-waster for my company.
View 6 Replies
View Related
Aug 8, 2012
I have been working with some illustrator files for a while and all of a sudden I cannot open them anymore. I do not even get an error message. I tried opening them on another computer. They open, but then when I order to re-link the images, the file just shuts down. The files are quite large, but even when I make them smaller (smaller then when they were before this problem started), I still cannot open them. I thought it might be related to the images, but also older files with no new images have the same problem.
View 5 Replies
View Related
Jan 31, 2013
We have thousands of files that contain linked images. These files exist in multiple locations and are kept in sync by dfs replication. Since illustrator uses unc path for links, the links that were created are slow to open for users at other locations and we would like to batch relink these files to a dfs namespace or unc path that better serves more users. I have already tested replacing the path in the files via find and replace using notepad but the link does not change when actually opened.
View 1 Replies
View Related
Jan 8, 2014
The recent Illustrator CC produces pixelated images job when you choose Save for Web. How to fix this or why it just started happening? CS 5 did not have this issue.
Settings:JPEG, Maximum, 100%, Art Optimized
View 8 Replies
View Related
Dec 15, 2011
I know you can in InDesign but doesn't look like it in Illustrator.
View 12 Replies
View Related
Jul 7, 2006
i have a problem in Inventor 10 with the add method, which i didn't have in inventor 8, it's very puzzling. I open an assembly, add some parts (this goes without problems) then i open another assembly, change some stuff,close it again, so i'm back in the first assy and then the next add method fails.
Public Sub AddOccurrence()
' open assy
Set oAssy = ThisApplication.Documents.Open("C:TempAssy.iam", True)
' Set a reference to the assembly component definition.
Dim oAsmCompDef As AssemblyComponentDefinition
Set oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
[code]....
View 6 Replies
View Related
Aug 10, 2012
User received this error after trying to open a 2nd drawing after receiving a fatal error unhandled excpection e0434352h 7c812afbh.
New error messag is: Method not found: "Int64 Autodesk.AutoCAD.DatabaseServices.ObjectId.get_OldId()'
View 2 Replies
View Related
Nov 24, 2013
I am getting Fatal error at the explode method in the following highlighed (red) code.
public class ExplodeDynamicBlocks
{
[CommandMethod("EDB")]
[Code].....
Also, if possible, how to combine two objectidcollection into one?
View 9 Replies
View Related
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
May 6, 2012
Can you access graph data through the scripting DOM?
View 3 Replies
View Related
Sep 13, 2012
My workplace works with both Digital and Print work and I wanted to know if how we're adding Pantone swatches is correct.
I'm using CS6 and I open the Pantone+ Swatchbook and add the Swatch from there. The Swatch is in the LAB Colour mode and I have "Use Lab values..." selected in the Spot Color Options Dialog.
My colleague, using CS5, opens her Swatches panel and selects New Swatch > inputs the CMYK Colour values from the Pantone+ printed book > selects Spot Color from the drop-down.
We're both working on the same documents, so when I open up her file, her colours look off to me. Specifically, Pantone 497 C - my brown is looking a red compared to her brown which is darker. When I open up my Swatch and change my Colour mode to CMYK, the values are completely different.
We'd like to understand which one of us is doing it wrong and which way we should go to streamline the colours to ensure that we're using the correct Pantone?
View 2 Replies
View Related
Mar 25, 2013
I am trying to create list item and SetNotifyProc to a method. In this method, I am trying to get selected list item entry and display the text somewhere else. But AI is crashing when retrieving the entry. What is the proper way to retrieve selected entry?
Here is my code
void ListItemNotifyProc(ADMItemRef inItem, ADMNotifierRef inNotifier)
{
IADMList list = sADMItem->GetList(inItem); // <-- is this correct?
IADMEntry entry=list.GetActiveEntry(); // <-- is this correct?
ADMUnicode *outStr=new ADMUnicode();
sADMEntry6->GetTextW(entry, outStr, 5);
}
View 2 Replies
View Related
Jan 17, 2013
What I want is this:
1)While selecting multiple objects,
2)a certain script is run. it has an option to input the range of the number of objects that are going to be deselected.
3)The number within the range I inputted is chosen, and the same number of objects are deselected randomly.
Is there any script similar to this?
View 2 Replies
View Related
Mar 16, 2013
the Script of creating mirror text and stroke text in Adobe illustrator scripting.
View 4 Replies
View Related
Jun 8, 2012
Is there a quick method for turning a 13 page Ai file into 13 separate Ai files? I need to resave or RIP them as normalized PDF files, and I need to start with single-page ai files.
View 7 Replies
View Related
Feb 20, 2013
When memory errors are occuring, which is the preferred method for repetitive objects: placing linked images or placing symbol instances? I'm using Windows XP and Illustrator CS5. I'm considering whether to create symbols for several of the often recurring placed images.
View 5 Replies
View Related
Jun 12, 2012
So the office server where all the maps were stored has been replaced with a new setup, and different file path..
Now I know how to re-link bitmaps within a max file using the superb 'relink bitmaps' script.. But what about relinking the maps within the material library?
View 6 Replies
View Related