Add fields to Shapefile Attributes

Add fields to Shapefile Attributes

Anonymous
Not applicable
5,644 Views
11 Replies
Message 1 of 12

Add fields to Shapefile Attributes

Anonymous
Not applicable

I am trying to mapexport A Shapefile from autocad civil 3d 2019, and I would like to add fields to the attribute properties. Is there any way to add a custom property field to the attributes, such that these fields will show up in the attribute table when I open the file in ArcGis pro? I know I can add fields in Arcgis pro, but in this case there is an issue with adding new fields, and if its possible id like to add these new custom fields for text before i export the a shapefile.

0 Likes
Accepted solutions (1)
5,645 Views
11 Replies
Replies (11)
Message 2 of 12

Pointdump
Consultant
Consultant

Joshua,
What attributes would you like to add?

 

Atts_1.png

 


Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 3 of 12

ChicagoLooper
Mentor
Mentor

There are different ways to add attributes to AutoCad entities. The esteemed Mr @Pointdump  has shown one. The choice you make, you have more than one choice, is dependent upon the type of AutoCad objects you wish to export.

 

Civil 3D entities are not considered to be exportable entities and are not good candidates for shapefile or Gdb. Don't get me wrong, C3D is excellent for purposes such as, but not limited to, civil infrastructure design, surface creation and volume analysis. Exporting them to ESRI feature data objects could present issues to GIS users. Many civil users resort to the EXPLODE command to make civil objects exportable simply because they want to get job done. Exploding, however, creates disjointed entities from objects that were once whole and separates the disjointed  pieces from their data.

 

If you wish to export to shapefile, then adding attribute data or fields means you are populating the shapefile's database file or dbf. There are two basic sources from which to gather data that can be added to the dbf.

 

SOURCE 1:

This source gathers the Properties of AutoCad entities. The properties of AutoCad objects, as you already know, can be displayed in the Properties palette. For example, if you select a closed polyline, the properties palette will dispaly the area, length, and layer. These inherent propeties can be added, or harvested, when exporting closed polylines to shapefile.

 

If your closed polylines are parcels, then area and the length of the outline is likely to be harvested while linetype and line weight properties wouldn't be helpful so those properties will be ignored. If residential parcels are on a layer named RESI and commercial parcels are on a layer named COMM then harvesting the AutoCad layer property would be a benefit to the shapefile's dbf due to the layer's descriptive nature pf the layer's name.

 

Your creativity and foresight into how you organize your drawing can play a huge role in harvesting inherent data for your shapefile's dbf. As you can see, drawing organization with the intent to export to shapefile is not always consistent with the way we draw in AutoCad, especially when drawing civil entities in C3D. 

 

SOURCE 2:

This source taps into an Object Data table. This table is created by you. You determine the fields you want then you add those fileds to your table. A single drawing can have multiple tables. The fields can be integer, character, point (coordinates) or real. Once your table is established, you add the table to your objects (these objects will become your feature class) and once they're added, you can fill-in, or add attribute data to the fields. Populating the fields will create 'smart' AutoCad entities because unlike vanilla AutoCad entities, smart entities hold data--they have object data attached to them. This object data is in addition to the object's properties, not a replacement of the porperties. When smart objects are exported to shapefile, the object data that's attached to them can be exported along with the AutoCad entities--the objects become the shp and the object data is added into the dbf.

 

When exporting AutoCad entities, you may harvest both the inherent properties and object data. Adding attribute data is not a one step process. There's no single mouse click that can create, write, store, gather and export attribure fields that'll be viewable in Arc Pro. If you can describe in detail, what kind and type of AutoCad entities you with to use in Arc Pro and what you expect to see once your data table in Arc Pro is opened, then a suitable workflow can be given that will accomplish your goal. 

Chicagolooper

EESignature

0 Likes
Message 4 of 12

TerryDotson
Mentor
Mentor

One interesting approach assuming you were going to type them in would be to open the .DBF file (from the ShapeFile collection) in a database editor capable of reading and writing dBase III files (Microsoft Access may do this, as well as LibreOffice from what I remember).  Keep in mind that DBF column names must be 10 characters or less.

 

The other files in a ShapeFile collection do not know what fields are contained in the .DBF file.  Just be sure to backup your existing DBF file before trying this !!!

0 Likes
Message 5 of 12

Anonymous
Not applicable

Yes these are the fields I am talking about! I need to create my own property field that wont collect any data from the drawing, but instead I need these fields to be able to be populated with text. For example, I need a field that is titled "WQMP" or Water Quality management Area then the "data" that goes in this field would be me typing in text that would be the name of this area.

0 Likes
Message 6 of 12

neilyj666
Mentor
Mentor

Whilst Civil 3D is built on Map 3D, the expectation is that it would be easy to add attribute date and also export civil data but as pointed out it is not easy to do this without jumping through several hoops. Property Set data is a step forward but I don't think this gets exported via shp files

neilyj (No connection with Autodesk other than using the products in the real world)
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.

EESignature


AEC Collection 2026 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
0 Likes
Message 7 of 12

ChicagoLooper
Mentor
Mentor
Accepted solution

You glossed over the type of objects that will hold the attributes. The type of objects will be your feature class.

A feature class can be points. Or lines. Or polygons. I'm guessing you have WQMP polygons to hold the data attributes. If you already have the WQMPs drawn and you want to export the polygons to shapefile, then you can do this.

 

  1. Map Setup Tab=>Attribute Data Panel=>Define Object Data. See image-1.
  2. New Table=>Table Name =>Enter a Name <<Name your TABLE WaterQuality>>
  3. In the next window, name your field WQMP_ID then set the  field TYPE e.g. integer, character, point, real <<If ID is a number, select integer. If ID has a character(s) select character.>> Then click ADD. Repeat for next field making sure to choose the correct field type. Click ADD before entering a new field.
  4. Once all fields have been created=>OK. Next click CLOSE to exit the 'Define Object Data' window.
  5. Back in modelspace go to Create Tab=>Drawing Object Panel=>Attach/Detach Object Data Icon.
  6. In the next window, click the Attach to Objects button=>Using your mouse, draw a window to select all the WQMP polygons=>ENTER <<You may need to turn OFF or FREEZE certain layers to make your selections easier.> >
  7. Next, select an individual WQMP=>Scroll to bottom of Properties Palette=>OD:WateQuality=>fill in the WQMP data in the OD section of the Properties Palette.
  8. Repeat for all WQMP polygons so you can fill in all field(s) for all polygons.
  9. Once all WQMPs have their fields properly filled in, you may export all WQMPs to shapefile using MAPEXPORT command. For simplicy purposes, name your shapefile WaterQuality.shp, the same name you gave to your Table.
  10. On SELECTION TAB, select your WQMP polygons using the selction method of your choice.. Make sure you click POLYGON for Object Type. You are selecting polygon because your WQMPs are AutoCAD polygons.
  11. On the DATA TAB=>Select Attributes button=>Expand Object Data in the tree=>Select all fields listed in your Object Data Table named WaterQuality=.OK See image-2.
  12. On OPTION TAB=>Check the box Treat closed polylines as polygons so your WQMP polygons are WHOLE and do not look like they have been exploded when you bring them into ArcGIS. Do not modify the current coordinate system. See image-3.
  13. Click OK to complete the MAPEXPORT procedure.
  14. Test your shapefile. From the Windows folder containing your new shapefile, click-and-drag it to modelspace. Open the Table View of your new shapefile and review the data attributes.

 

Image-1.Image-1.

 

Image-2.Image-2.

 

Image-3.Image-3.

 

 

Chicagolooper

EESignature

Message 8 of 12

ChicagoLooper
Mentor
Mentor

@Anonymous wrote:

<<I need to create my own property field that wont collect any data from the drawing, but instead I need these fields to be able to be populated with text.>>


You'll need to switch your workspace from Civil3D to Planning & Analysis where the Map3D toolsets are accessible. AutoCAD separates the GIS tools from the civil tools. For shapefile and data creation you'll need the Planning & Analysis workspace.

 

On command line enter WSSETTINGS=>My Workspace = Planning and Analysis

 

4.jpg

Chicagolooper

EESignature

Message 9 of 12

Kelly.Hafner
Explorer
Explorer

On a similar issue, I have been trying out the export cogo points and export feature lines to shp under toolbox and noticed the export fields that should be floating point are all integers in the subsequent shapefiles.  Is anyone else having this issue and can it be corrected?  No point in having points elevations as integers.  Hoping this has been seen before and has an easy fix.  This looked like the best place to add on to the conversation related to shapefiles. The polygon exports have always been relatively smooth.  Sometimes an intermediate quick check can be done with SSA.  That program has its flaws but can at least import/export shapefiles that are not too complex.         

KellyHafner_0-1626835185631.png

 

0 Likes
Message 10 of 12

OsideGoose
Explorer
Explorer

@ChicagoLooper 

 

I am working with Civil3D, is there way to work with AutoCad objects that can export AutoCad entities, properties and object data? that can then be exported to ArcGis for use in their dbf? I'd like to add attributes to Autocad entities that can be used as exportable entities for Gdb to be exported to ESRI for GIS users without exploding Autocad objects. In Civil3D is there a way too add fields to attribute properites, where these fields will show in the ArcGis attribute table?

0 Likes
Message 11 of 12

ChicagoLooper
Mentor
Mentor

Hello @OsideGoose 

Yes, there is a workflow to export plain vanilla  ‘AutoCAD’ entities to shapefile with an accompanying database file (dbf) and this dbf can be viewed by GIS users. 

 

<<NOTE: Civil3D objects, e.g. alignments and Tinn surfaces are not considered to be AutoCAD objects, they are ‘civil’ objects. Although you can export vanilla objects, i.e points OR lines OR polygons to shapefile, you cannot export civil objects to shapefile.>>


Your workflow depends on many factors:

  1. The type of AutoCAD entities you wish to export. Are your objects points? Or lines? Or polygons? Something else? Your object ‘type’ determines the shapefile feature class
  2. What kind of data do you want to include in the database? Alpha such as text? Or numbers? Whole numbers? Or decimals? Will any cells in your data table have both alpha and numeric such as A9531QX?
  3. Will you ‘capture’ any object ‘info’ from the Properties Palette such as a circle’s radius? The area of a polygon? The object’s layer? A line’s length? Or an attribute of a block?
  4. Do you plan on creating data from scratch that will be added to the data table? For example, a serial number, a street name, a manhole ID#, an item’s description, etc?

I highly suggest you start a brand new thread with a descriptive title. Future readers who read your question will benefit when they follow your workflow. Trust me, they will appreciate this. 

 

<<Adding your question to an existing thread buries your solution under someone else’s conversation and that makes it hard for other users (possibly even you too) who frequently search the forum for answers.>>

 

Your post should answer the items listed 1 thru 4 above. For a fast and step-by-step solution include screen shots of your monitor with your objects selected and the Properties Palette visible. You’ll need to select the objects so the Prop Palette can display their properties and relieve you from having to explain and describe the objects you want to export. Better yet upload a your dwg file (or a sample of it). Thoroughly describe any new fields you wish to include in the dbf. 

Chicagolooper

EESignature

Message 12 of 12

OsideGoose
Explorer
Explorer

Hello@ChicagoLooper 

Thank you for your response. Creating a new thread on this topic is a good idea.

0 Likes