Save .ai file as .svg without save as prompt


hi all,

 

i have scenario want save .ai document .svg silently(without save dialog) in background. i'm using following code this. giving save dialog.

 

 

  saiactionmanager->aiactionsetstringus(paramvalue, kaiexportdocumentnamekey,ai::unicodestring("test.svg"));

  saiactionmanager->aiactionsetstring(paramvalue, kaiexportdocumentextensionkey,kaisvgfileformatextension);

  saiactionmanager->playactionevent(kaiexportdocumentaction,kdialogoff,paramvalue);

 

is there i'm doing wrong?

if knows how kindly post code snippet or technique on how it.

thank help

i have snippet exact thing want. though uses extend-script , not c++.

this not give save dialogue.

 

// exports current document dest svg file specified // options, dest contains full path including file name function exportfiletosvg (dest) { if ( app.documents.length > 0 ) { var exportoptions = new exportoptionssvg(); var type = exporttype.svg; var filespec = new file(dest); exportoptions.embedrasterimages = true; exportoptions.embedallfonts = false; exportoptions.fontsubsetting = svgfontsubsetting.glyphsused; app.activedocument.exportfile( filespec, type, exportoptions ); } } 

 

i hope helps.



More discussions in Illustrator SDK


adobe

Comments

Popular posts from this blog

Adobe Refresh Managerについて

Error during signature verification. Signature contains incorrect, unrecognized, corrupted or suspicious data. Support Information: SigDict /Contents illegal data