Rahul
Rahul

Reputation: 1110

How to export a DWG format file into a SAT file using C# Autocad API's?

How to export a DWG format file into a SAT file using C# Autocad API's. Selection set is to be in SelectAll mode in SAT file. I am using VS 2010 and Autocad 2012. Code will be very helpful.

Upvotes: 2

Views: 2437

Answers (2)

Rahul
Rahul

Reputation: 1110

Ok friends instead of going through c# code using Autocad API's I have gone through following alternative i.e creating an acaddoc.lsp file

and writting the following code into it. As my requirements are to be used inside a single folder this things that helped me out is.

(defun S::STARTUP()
(command "ACISOUT" "ALL" "" "")
)

For C#

 String progID = "AutoCAD.Application.18";
 AcadApplication acApp = (AcadApplication)Marshal.GetActiveObject(progID);
 acApp.ActiveDocument.SendCommand("ACISOUT ALL  ");

spaces inside the send command works as an enter.

Upvotes: 0

Trae Moore
Trae Moore

Reputation: 1787

Out of curiosity, what are you doing with the sat file? And why

http://forums.autodesk.com/t5/AutoCAD-2013-2014-DWG-Format/Exporting-to-SAT-does-not-save-files/td-p/3944406

Upvotes: 1

Related Questions