.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AcadDocument.SaveAs

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
3334 Views, 6 Replies

AcadDocument.SaveAs

Hi All,
I have to create a .dwf file and save it programmatically using C#, here's my code regarding this, but it's not working

app = new AcadApplicationClass();
AcadDocument doc = app.ActiveDocument;
doc.SaveAs(@"c:\Sam.dwg",AcSaveAsType.acR15_dwg,new Autodesk.AutoCAD.DatabaseServices.SecurityParameters());

can anyone solve my problem, thank's

Prakash.C
6 REPLIES 6
Message 2 of 7
RonnieWilkins
in reply to: Anonymous

You do not save as a dwf. You print to the DWF plotter.
Ronnie Wilkins, Jr.
Message 3 of 7
Anonymous
in reply to: Anonymous

Sorry rwilkins,

by mistake i mentioned as .dwf actually i have to create a .dwg with some basic entities programmatically, that's it, do U have any solution for it....?

Prakash.C
Message 4 of 7
RonnieWilkins
in reply to: Anonymous

might try not supplying the new security object instead only supply filepath and version info.
Ronnie Wilkins, Jr.
Message 5 of 7
Anonymous
in reply to: Anonymous

Hi rwilkins,

Now it's working i changed it as

doc.SaveAs("d:\\Sam.dwg",AcSaveAsType.acR15_dwg,new Autodesk.AutoCAD.DatabaseServices.SecurityParameters());

Prakash.C
Message 6 of 7
lbayas
in reply to: Anonymous

This was really helpful Prakash. I do get an error with the last parameter:

new Autodesk.AutoCAD.DatabaseServices.SecurityParameters()

It states that this is obsolete. I think this may be because I am using AutoCAD 2008. Are there any suggestions?
Message 7 of 7
ronixjdiaz
in reply to: lbayas

If you want, you can use only  two  parameters.

doc.SaveAs("d:\\Sam.dwg",AcSaveAsType.acR15_dwg)

In my case I have used it for save my file like a *.dxf

doc.SaveAs("d:\\Sam.dwg",AcSaveAsType.acR15_dxf)

It continues works in Autocad 2013

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost