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

Getting data from dwg file to using in c sharp

3 REPLIES 3
Reply
Message 1 of 4
jesus.254
1041 Views, 3 Replies

Getting data from dwg file to using in c sharp

Hello to all

 

This is the first time that I post here, I am a new c sharp developer. I want to create a program in C sharp, which can communicate with autocad, the main idea is that, when I do click in some area of the drawing, I can call to the c sharp program with the information of the object selected, for example I want to know the four utm coordinates of a rectangle,with those coordinates I want to search in a sql server database, which contains information of the object selected, for example if I select a rectangle, the database must contain the name of the owner, location and display to the user the information.

 

Otherwise, I want to open the program in c sharp, doing a searching via name of the owner and I want to open the dwg file that contains the utm coordinates of the name provided.

 

¿Is this possible?

 

I want to know if I am in the right way

 

Thanks in advanced.

 

P.D. All apologies for my english

Tags (3)
3 REPLIES 3
Message 2 of 4
norman.yuan
in reply to: jesus.254

It looks like you are talking abount AutoCAD Map 3D or Civil 3D.

 

Yes, what you want is possible. However, there are quite a few technologies/AutoCAD Map features that you can use to ahieve what you want. You need to really know AutoCAD Map and these technologies very well and understand the business/user's need before jumping onto a technology and off to development.

 

You could use:

 

Block with Attributes

XData/XRecord

DataLink

Object Data

Object Classification

FDO data connection

 

It could combination of these technologies.

 

But from your short description, orgnising your data into FDO and have AutoCAD Map to connect to the FSO might be good candidate as latest technology Autodesk now heavily investing its effort in AutoCAD Map. Again, you really need to know the business need well and know the technologies before you choose one to start your development.

 

 

 

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 4
jesus.254
in reply to: norman.yuan

Hello Norman

First of all, I want to thank you for your answer. I can see that I need to read so much for achieving what I want to do, I am happy to know that is possible and this is a motivation for me. I am going to investigate the technologies you recommended me.

I hope to ask later with a question more advanced, for now I have so much homework to do with this.

Thank you again and have a nice day.

Regards

Jesús Hernández

Message 4 of 4
jesus.254
in reply to: jesus.254

Hello again.

 

I have been trying autocad map 3d, and I realized what can I do with it. I can create sdf files with object data for example and populate distinct objects with data.

 

Besides, I configured a FDO connection to a spatial database in sql server 2008, and I can load polygons with the coordinates provided, coordinates of the parcels in autocad map 3d.

 

My idea now is, to extract the utm coordinates from the original dwg file, and passing those to a sdf or shp file. Then converts this file to a spatial table. 

 

When I select a parcel in the Autocad map 3d, a grid with the data is shown with the details (this inside Map 3d), but my intention is calling a form in c sharp with those data.

 

I haven´t found the way to call the form, and I wonder if someone can help me with a clue for start.

 

I accept that I am still so confused, becase I dont know if I am doing the correct.

 

Thanks in advance and I will appreciate whatever help.

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