Adobe Illustrator got an error: Invalid enumeration value" number 1320


I’m trying to save an illustrator file as a dxf. I am getting an enumeration error that I don’t understand how to resolve, or debug.

save theDocument in file fileName as dwg with options {millimeters}

Do I need to add any additional options to get past this, or setup the dartboard differently?

Using Illustrator CC


The first page of this section has already accumulated several requests for help that have not received any response. There are many generous, experienced users willing to help, but when the information is insufficient, the question is vague, or too extensive, your request remains unanswered.

I uninstalled Adobe Illustrator, and I can’t help you, but others who have it installed will help you if you explain what the dwg and millimeters variables in your snippet are. And please, always use the “Applescript” formatter button of site for code snippets:

save theDocument in file fileName as dwg with options {millimeters}

Note: Most likely, the error message tells you that there is no millimeters option known to Illustrator. It should be like this: {ruler units: millimeters}, as I read from Illustrator scripting documentation.

Thank you for the response. DXF/DWG is the auto cad export option from illustrator.

I changed the ruler units and I still get the error.

	save theDocument in file dxfName as dxf with options {ruler units:millimeters}

You say DXF/DWG is the auto cad export option, but you use save command. Try the export command instead.

set destinationFolder to choose folder
set destinationPath to destinationFolder as string
set newFilePath to destinationPath & "Sample.dxf" 

 tell application "Adobe Illustrator"
export current document to newFilePath as AutoCAD with options ¬ 
{class:AutoCAD export options, export file format:dxf, scal unit:autocad millimeters}
end tell 

Wow thanks. It is working now. Not sure what I was misunderstanding about the document, it said to save, but thank you.

One issue I have when exporting a dxf is that it exports the artboard as well so I get the rectangle in my dxf. Do you know how I might prevent this?

I am sorry. At this moment I have not Illustrator to help you with details like this. I will try, but any help from other users would be very appropriate now.