Unable to import AI files with layers

Issue
In Animate 2 and Animate Pro 2 you are unable to import AI files with layers because of a flag that was turned off for the Pdfimport utility.

Solution
To import your AI Files with Layers, do the following:

  1. Run the script shown below.
  2. A dialog will prompt where you can browse to the AI file that you want to import.
  3. The script will be created in the directory where the illustrator file is located.
    This is the same directory that you browsed to when you selected the illustrator file.
  4. After the script has been run, in the left side of the library, right-click and select "Open Library".
  5. Now browse to the same location where the original illustrator file was.
    This should now contain a .tpl file with the same name as the illustrator file.
  6. Drag and drop this into your scene. You should now have your illustrator file with layers.

THE SCRIPT:

Running the following script will allow you to import AI files with layers

function importIllustrator(){
	var filename = FileDialog.getOpenFileName( "*.ai;*.pdf" );
	
	if (filename) {
		System.println("importing " + filename);
		
		var arguments = new Array;
		var pdfImport = Application.specialFolders.bin + "/Pdfimport"
		
		arguments.push(pdfImport);
		arguments.push("-PDF_SUPPORT_CMYK");
		arguments.push("-PDF_SEPARATE_LAYERS");
		
		var folderPos = filename.findRev("/");

		if (folderPos != -1){
			var folder = filename.left(folderPos);
			System.println("folder = " + folder);
			
			if (!folder.isEmpty()){
				arguments.push("-outdir");
				arguments.push(folder);
			}
		}
		
		arguments.push(filename);
		
		var ret = Process.execute(arguments, "");
		
		System.println("returned " + ret);
	}
}

Publish date: June 7, 2012

Reference number: B-03099

Category: Software Issues

Operating system:

  • Windows (all)
  • Mac OS X (all)

Software:

  • Animate 2
  • Animate Pro 2