Copy link to clipboard
Copied
Hello everyone,
I´ll try to open a dxf-file from a specific folder (dxf_pfad: described in the global variables) with a specific name (alte_bezeichnung: also described as a global variable) with some standard import options.
I worked with this solved code from the past: Solved: Open DXF file in Illustrator without dialog box - Adobe Support Community - 10324250 but I end up with an ERROR 8700.
Below you can find my code. Hopefully someone from you can help me.
Thanks in advance. 😃
Greetings
function openDXF(){
var dxf = dxf_pfad + alte_Bezeichnung + '.dxf';
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var options = getOptions();
var dxf_file = app.open(File(dxf), DocumentColorSpace.CMYK);
app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;
};
function getOptions() {
var importOptions = app.preferences.AutoCADFileOptions;
importOptions.centerArtwork = true;
optRef.selectedLayoutName="Model";
importOptions.globalScaleOption = AutoCADGlobalScaleOption.FitArtBoard;
return importOptions;
};
Hello,
this one can be clarified as solved. Took me one and half day to solve it and it was so simple...
I thought the error could be somewhere else and deleted the displayalert-coding to see if there is something wrong with the dxf. Et voilá - it works now...
function openDXF(){
var dxf = dxf_pfad + alte_Bezeichnung + '.dxf';
var options = getOptions();
var dxf_file = app.open(File(dxf), DocumentColorSpace.CMYK);
};
function getOptions() {
var importOptions = app.preferences.AutoCADFileOpti
...
Copy link to clipboard
Copied
Hello,
this one can be clarified as solved. Took me one and half day to solve it and it was so simple...
I thought the error could be somewhere else and deleted the displayalert-coding to see if there is something wrong with the dxf. Et voilá - it works now...
function openDXF(){
var dxf = dxf_pfad + alte_Bezeichnung + '.dxf';
var options = getOptions();
var dxf_file = app.open(File(dxf), DocumentColorSpace.CMYK);
};
function getOptions() {
var importOptions = app.preferences.AutoCADFileOptions;
importOptions.centerArtwork = true;
optRef.selectedLayoutName="Model";
importOptions.globalScaleOption = AutoCADGlobalScaleOption.FitArtBoard;
return importOptions;
};