Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Importing attributes from DBF file (geodata) to AutoCAD

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
p.piszcz
2579 Views, 12 Replies

Importing attributes from DBF file (geodata) to AutoCAD

Hello everyone,


I've recently encountered some problems concerning the import of information from the attribute table - as available to see and edit in ArcGIS or QGIS - to AutoCAD.


I have been provided with a set of geodata that stores information about trees in various attributes. As a good geodataset should, these information are linked to their visual representation via the coordinates. What proves to be challenging is cloning the QGIS functionality and usability of the dataset so that it could be accessed in AutoCAD in a usable way.


I am aware of the method involving the conversion of .shp file into .dxf, but that does not quite do the trick for me, as it only converts a geometry into some other sort of geometry, while all the information linked to the original geometry (stored in a separate .dbf file) is lost. 


I have also tried to export the .dxf in QGIS, but the result is similar.


The way I intend for this to work would be to have the original features from the .shp as the blocks in the .dxf/.dwg file, so that the attributes from the .dbf could then be linked to the attribute definitions within these blocks. I expect it to be possible to link both sets of data via the common piece of information, which is a set of X an Y coordinates in this case. While I can see the path to make it work, I yet lack the technical skills to implement the solution.


Please note that the software used in this process can be limited to QGIS and AutoCAD 2023 (that sadly does not support "map capable" utilities) and potentially Civil 3D. However, if there is a simple solution involving some other software or perhaps a LISP routine that does exactly the expected thing, feel free to share it as well.

 

I attach a sample dataset in case it was of any use.

12 REPLIES 12
Message 2 of 13
ed57gmc
in reply to: p.piszcz

You need to use AutoCAD Map 3D. It is Autodesk's GIS app. It can read gis data (shp, dbf) directly. You can get access to all the metadata. Go to magage.autodesk.com/products and install Map 3D.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 3 of 13
p.piszcz
in reply to: ed57gmc

Hi Ed,
thanks for your reply. Using another GIS software does not solve my problem, because it is not the matter of accessing and reading the data, which I can already do in QGIS, but importing them to AutoCAD, so that they can be used there in a similar manner.
The primary focus is on working with the shapefile data, but in a .dwg file within AutoCAD.
Message 4 of 13
ed57gmc
in reply to: p.piszcz

That's what I'm trying to tell you. That's exactly what Map 3D does...in a dwg. Map 3D is a free toolset add-on to AutoCAD. And if you choose, once you read the data into the dwg, you can convert the map geography (lines, points, polygons) into AutoCAD objects.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 5 of 13
pendean
in reply to: p.piszcz

Greetings @p.piszcz

You are using the wrong variant of AutoCAD: instead of plain AutoCAD, you need to be using AutoCAdMAP3D, a free installation for everyone with an active AutoCAD subscription (if you are using 2023, that's you for sure).

It is still AutoCAD, all AutoCAD commands work, but it has added features that include everything you want to do with it.

It is NOT different, it is just MORE. AutoCAD on "MAP" steroids!!!!!!!!

You get that variant here like we all can https://manage.autodesk.com/products/MAP?version=2023&platform=WIN64&language=EINT
Message 6 of 13
pendean
in reply to: ed57gmc


@ed57gmc wrote:

Map 3D is a free toolset add-on to AutoCAD...


Not quite true, it adds nothing to your existing plain AutoCAD interface as you know.

Message 7 of 13
jggerth
in reply to: p.piszcz

If for some reason you cannot upgrade to AutoCAD Map3D, DotSoft has an add-on that will add the capabilities you seek to vanilla AutoCAD

 

https://www.dotsoft.com/mapworks.htm

Message 8 of 13
p.piszcz
in reply to: ed57gmc

Hi again,
I took your advice and tested out opening the file in AutoCAD Map. It is indeed as you say, and maybe even a bit better than in QGIS, because of the similarities in interface there is more control over the final look of the symbology. But although I was able to convert the geometry (which was not the primary focus), the main point of my problem still eludes me - after conversion all the information from the attribute table are lost. I would like to open the .dwg in regular AutoCAD (not Map 3D) and still be able to have these attributes linked to the geometry. Is there something else I am missing in the process?
Message 9 of 13
Pointdump
in reply to: p.piszcz

Hi Przemysław,
Did you click "Create Object Data" when you used MAPIMPORT?
Dave

 

OD_1.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 10 of 13
p.piszcz
in reply to: Pointdump

Hi Dave,
thanks for your advice. I will be sure to test it out as soon as I can.
The way I did it up to now was via Connect Data and then Output tab -> Map Data Transfer panel -> Save Current Map To AutoCAD. That resulted in geometry being accessible in AutoCAD, but not the attributes.
I will keep you posted about the results of your method.
Message 11 of 13
p.piszcz
in reply to: Pointdump

Hi again, 

 

I tried your solution and although I almost see what I would like to see, I am not quite satisfied yet. 

 

ppiszcz_0-1675065318975.png

In AutoCAD Map 3D I have been able to attach data to objects, and that data has then been displayed in the properties as Object Data. However, when I tried outputting it to DWG and then opened it in regular AutoCAD, the OD column disappeared. I suppose that the link between geometry and the data is still managed by Map 3D and is lost once opened in another context.  

 

What I am after is the way to cement that link, so that each piece of data is hard-assigned to a piece of geometry and is still there when I open it in AutoCAD. I sifted through several threads in the Forum and the Knowledge Centre and I am beginning to doubt that my objective is even achievable. That said, I am deeply grateful for your input so far. If you still have some ideas, be sure to share it nevertheless.

 

 

Message 12 of 13
Pointdump
in reply to: p.piszcz

Przemysław,
"...opened it in regular AutoCAD, the OD column disappeared."
Yes. Object Data only happens in Map 3D and Civil 3D.
"...is still there when I open it in AutoCAD."
The only way I can think of to do this in Vanilla AutoCAD, without 3rd party add-ons like DotSoft MapWorks, is to add the OD as attributes to blocks. Like >>>This<<<.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 13 of 13
p.piszcz
in reply to: p.piszcz

Thanks again for all the replies. I seem to have found the working solution for my problems, so I thought I should summarise the thread.

 

The solution posted by Dave is a very creative one and utilises little resources. I imagine it being very universal, and by that I mean only AutoCAD is required and even with no access to Excel, some online spreadsheet editors can be used instead.

 

During my search I also found the following thread which involves a bit of a workaround solution. Note that even the original question there was concerning Civil 3D, both the problem and its solution can be applied also to AutoCAD Map 3D, as they both offer the same set of commands that are used here.

 

Finally, by following the solution above I stumbled upon yet another youtube video with a solution that I find really elegant, with a potential of standardising the blocks and their labels.

 

Cheers everyone!

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report