.NET

.NET

Reply
New Member
VinsentVega
Posts: 2
Registered: ‎12-19-2013
Message 1 of 5 (502 Views)

Importing a DWG file inside Visual Studio with Visual Basic .NET

502 Views, 4 Replies
12-19-2013 11:56 PM

Hello, anybody knows what I should have to do to import a DWG file in Visual Studio? I will need to move it, rotate it and make zoom in and out and set points and areas. It's possible?

 

 

 

Thanks very much

Board Manager
StephenPreston
Posts: 373
Registered: ‎05-22-2006
Message 2 of 5 (470 Views)

Re: Importing a DWG file inside Visual Studio with Visual Basic .NET

12-20-2013 09:59 AM in reply to: VinsentVega

Sorry Vinsent, but your question isn't clear to me. Do you mean you want to insert the contents of one DWG file into another one? If so, take a look at the Database.Insert() method. Here's a blog post on a slightly different topic that uses the Insert() function.

 

http://adndevblog.typepad.com/autocad/2012/05/redefining-a-block.html

 

If that doesn't answer your question, then please would you explain in more detail what you need.

 

BTW If you're new to the AutoCAD .NET API, make sure you check the learning resources available on www.autodesk.com/developautocad.

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
New Member
VinsentVega
Posts: 2
Registered: ‎12-19-2013
Message 3 of 5 (428 Views)

Re: Importing a DWG file inside Visual Studio with Visual Basic .NET

12-23-2013 08:16 AM in reply to: StephenPreston

Hello Stephen, thanks for your answer, but in your link, I can draw some blocks above a dwg file, but I want to do it in Visual Studio, not in Autocad

 

My question was no good, so I'm going to explain it better...

 

I need to import a file/image DWG into a form in Visual Studio. So I want to take the DWG file, rotate it, zoom in and out, and possibily to draw some points and areas inside Visual Studio, not in Autocad. It is possible? How can I do this?

 

Will I need some libraries of Autocad for using in VS? Which ones?

 

Thanks for your answer

Active Contributor
DouceDeux
Posts: 46
Registered: ‎09-04-2012
Message 4 of 5 (404 Views)

Re: Importing a DWG file inside Visual Studio with Visual Basic .NET

12-25-2013 07:57 PM in reply to: VinsentVega
You need to use the ObjectARX (Unmanaged) to create an ACAD object for the dwg outside of Autocad. The exposed methods and properties have limited documentation but it comes with the full reference. Someone complete this information or correct me if I'm wrong.
Board Manager
StephenPreston
Posts: 373
Registered: ‎05-22-2006
Message 5 of 5 (350 Views)

Re: Importing a DWG file inside Visual Studio with Visual Basic .NET

01-02-2014 10:05 AM in reply to: VinsentVega

It sounds like you want to write a standalone application that allows viewing and editing of an AutoCAD DWG that can run without AutoCAD being installed on the same computer. If so, then Autodesk don't currently provide a technology that would be a solution for you. If you just want to view the DWG geometry, then you might look at plotting the DWG to DWF format and looking at Autodesk Design Review (www.autodesk.com/developdwf) or Project Freewheel (http://freewheel.autodesk.com/).

Cheers,

Stephen Preston
Autodesk Developer Network
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.