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

How to import a dxf file

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
430 Views, 3 Replies

How to import a dxf file

Which is the instruction to import a dxf file with dot net Api?

Thanks in advance
Gpaolo
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

You will need error checking to test for the dxf and if the block already
exists in the active database.
[code]
Database db = Autodesk.AutoCAD.ApplicationServices.
Application.DocumentManager.MdiActiveDocument.Database;
Database ndb = new Database( false, false );
ndb.DxfIn( @"c:\temp.dxf", @"c:\log.txt" );
db.Insert("test", ndb, false);
ndb.Dispose();
//insert the block
[/code]

"GPaolo" wrote in message
news:5479704@discussion.autodesk.com...
Which is the instruction to import a dxf file with dot net Api?

Thanks in advance
Gpaolo
Message 3 of 4
Anonymous
in reply to: Anonymous

>db.Insert("test", ndb, false);
This should have been the name of the dxf file... "temp"
"Paul Richardson" wrote in message
news:5482476@discussion.autodesk.com...
You will need error checking to test for the dxf and if the block already
exists in the active database.
[code]
Database db = Autodesk.AutoCAD.ApplicationServices.
Application.DocumentManager.MdiActiveDocument.Database;
Database ndb = new Database( false, false );
ndb.DxfIn( @"c:\temp.dxf", @"c:\log.txt" );
db.Insert("test", ndb, false);
ndb.Dispose();
//insert the block
[/code]

"GPaolo" wrote in message
news:5479704@discussion.autodesk.com...
Which is the instruction to import a dxf file with dot net Api?

Thanks in advance
Gpaolo
Message 4 of 4
Anonymous
in reply to: Anonymous

Very well.
Thanks
GPaolo


"Paul Richardson" ha scritto nel messaggio
news:5482710@discussion.autodesk.com...
>db.Insert("test", ndb, false);
This should have been the name of the dxf file... "temp"
"Paul Richardson" wrote in message
news:5482476@discussion.autodesk.com...
You will need error checking to test for the dxf and if the block already
exists in the active database.
[code]
Database db = Autodesk.AutoCAD.ApplicationServices.
Application.DocumentManager.MdiActiveDocument.Database;
Database ndb = new Database( false, false );
ndb.DxfIn( @"c:\temp.dxf", @"c:\log.txt" );
db.Insert("test", ndb, false);
ndb.Dispose();
//insert the block
[/code]

"GPaolo" wrote in message
news:5479704@discussion.autodesk.com...
Which is the instruction to import a dxf file with dot net Api?

Thanks in advance
Gpaolo

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