.NET

Reply
*GPaolo
Message 1 of 4 (181 Views)

How to import a dxf file

181 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 (181 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 (181 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 (181 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
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.