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

How to convert a .DWG file into .DXF file.

5 REPLIES 5
Reply
Message 1 of 6
dip_nik
978 Views, 5 Replies

How to convert a .DWG file into .DXF file.

Good afternoon All,

How to convert a .dwg file into .dxf file.
or
How to save as a .dwg file into new .dxf file.

Thanks
5 REPLIES 5
Message 2 of 6
_gile
in reply to: dip_nik

Hi,

Look at the Database.DxfOut() method.


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 6
dip_nik
in reply to: dip_nik

Hi gile,

Thanks for reply,

i tried this but it is not converting to DXf see below code

Database.DxfOut(path, 1, true);

Thanks,
Message 4 of 6
_gile
in reply to: dip_nik

Hi,

Database is a class.
I was meaning the DxfOut() method of the Database class.
You have to create an instance of the the Database class of the Document you want to convert to DXF and call the DxfOut() method for this instance.

Assuming you want to convert the active document:

{code}Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
db.DxfOut(path, 1, true);{code}


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 5 of 6
kviler
in reply to: dip_nik

Hello

Don't forget to put the DxfOut() call inside a transaction otherwise some strange behavior will occur. Also, you might consider using a higher value for precision (second argument).

PK


{code}
Dim doc As Document = Application.DocumentManager.MdiActiveDocument
Dim db As Database = doc.Database

Dim tr As Transaction = db.TransactionManager.StartTransaction()
Using (tr)
db.DxfOut(FileName, 10, True)
End Using
{code} Edited by: kviler on Feb 8, 2010 1:21 PM
Message 6 of 6
dip_nik
in reply to: dip_nik

hi kviler,

i forgot to say thanks a lot it working fine.
sorry to delay
thanks again

Have a nice day.

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