.NET

Reply
*GPaolo
Message 1 of 4 (177 Views)

How to import a dxf file

177 Views, 3 Replies
02-08-2007 07:50 AM
Which is the instruction to import a dxf file with dot net Api?

Thanks in advance
Gpaolo
*Paul Richardson
Message 2 of 4 (177 Views)

Re: How to import a dxf file

02-10-2007 10:06 AM in reply to: *GPaolo
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
*Paul Richardson
Message 3 of 4 (177 Views)

Re: How to import a dxf file

02-10-2007 09:51 PM in reply to: *GPaolo
>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
*GPaolo
Message 4 of 4 (177 Views)

Re: How to import a dxf file

02-11-2007 10:50 PM in reply to: *GPaolo
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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!