Adobe Illustrator using interop Com object in c#

Have used Adobe Illustrator Com object to create a file from various layers

When code export file, it works ;

doc.Export(cExportFilePng, Illustrator.AiExportType.aiPNG24, null);

But when try and do as Save as (trying to save in cs3 version due to legacy issues)
the save 2 arguments the file name for save in and a second argument

Object Option = Type.missing

I used

 doc.SaveAs(cExportFileCs3Ai, Illustrator.AiCompatibility.aiIllustrator13) ;

But this fails

Any ideas on how to do as save as in com Illustrator to a cs3 file in c# please


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jacques Bourgeois (James Burger)PresidentCommented:
I do not know Illustrator, but you have 3 parameters in your first call and only 2 in the second call.

You might have a missing parameter missing in your call for the cs3 format, maybe the null or Option, .

What is the error message that you receive?
stephenwildeAuthor Commented:
Thanks but no the SaveAs() method only takes 2 arguments as opposed to the Export() which takes 3.

Have managed to change to get no errors but it is saving the file as a ccs 6 not a cs3 as required.

Code added ;

 Illustrator.IllustratorSaveOptions varSaveAs = new IllustratorSaveOptions() ;
varSaveAs.Compatibility = Illustrator.AiCompatibility.aiIllustrator13;
doc.SaveAs(cExportLayerAi, varSaveAs); 

Open in new window

So somehow need to save as cs3 file format which is Illustrator 13?
Karrtik IyerSoftware ArchitectCommented:
Just suggestions :
1) if you save as other compatibility options other than 13 and 16, some other version, does it work?
2) keeping COM aside, if you trying the same code using javascript library of illustrator, does that work? This shall help us isolate where the issue is.
Karrtik IyerSoftware ArchitectCommented:
Hi Stephen,
Would it possible for you to attach a sample application for me to try, I want to give it a try and see it for myself so that I can triage this issue further and help you with a solution.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stephenwildeAuthor Commented:
Thanks very much for kind offer but client has decided to upgrade software and sure that I did the code correctly.

Also sorry for the delay in replying.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.