Plain Text from Object Data

Have you ever imported ESRI SHP files or other GIS files and need to create some simple text labels for that data? Do you have some object data attached to entities that you now need to display that data in the drawing? One method of displaying or labeling those entities is by using Map Annotation Blocks or use FDO. But what if you need something quick and as plain text?

I see questions on how to do this or can Map3D do this. Yes it can be done. You can use the Map3D display manager to query the current drawing then create a “Map3D” text style in the display manager.  

So lets look at the drawing I have for the example.

OD_Info

It’s a simple parcel map imported from an SHP file and object data was created on the import. What I need is to label each parcel  from that object data with the Watershed1 value.

The first step is opening the Map3D Task Pane and using the Display Manager tab. If the task pane is not open use the command MAPWSPACE and select ON at the command line.

Add_Layer

Now click on the Data icon in the display manager, scroll down to “Add Drawing Data”  then select “Query Current Drawing”

The Define Query dialog will open allowing you to define the query. I want to query on my object data so I select “Data” for the query type. The Data Condition dialog will open allowing me to select the data to query on. I select “Object Data” make sure I have the correct Table listed (Parcels), select the field I want the label to display (Watershed1) then for the Operator and Value I use = (equal sign) and * (the wildcard expression).

query

As soon as I click OK it populates the upper part of the Define Query dialog. Clicking OK in this dialog takes me back to my drawing.

I now have a new object or a Map3D Display Manager Layer listed in the Task Pane.

new_Layer

The next step is to add  a text style to display the text that is being queried in on that new layer. TIP: When we say Layer in Map3D Display Manager it is NOT an AutoCAD layer and has no relationship to the layer manager or any of the AutoCAD layers.

To create our text style for our data labels we right click on the layer name in the Display Manager and select “Add Style” then “Text”.

Add_TextStyle

We now have another object in the Display Manager under the “Current Drawing Element” layer named “Text Style”.  Highlight the “Text Style” in the Display Manager and look at the properties of it in the property palette. (Right Click and select Properties to open the property palette.)  This is where we tell it to display the values from the Object Data table.

Select the Value- Text Label to show the ellipsis icon (the 3 dots) Click on the icon to open the Expression Chooser. 

TextStyle_default

In the Expression Chooser, expand the tree to get to the Object Data field to label from. Select the field and click OK.

expression 

Back it the Property Palette set the Height as needed and any other property you wish. Notice I changed the Height to 10 and provided a better fitting name for the text style.

Text_Final

Notice as you start to make changes in the property palette for the Text Style the labels change instantly allowing you to see the changes as you make them.

Labed_Drawing

Now back in the drawing we have labels for all of the parcels and they are plain AutoCAD text objects. No FDO text style, no Civil3D label and no Map Annotation blocks.

About these ads

5 Responses to “Plain Text from Object Data”


  1. 1 map3d 04/01/2013 at 5:06 AM

    Check the properties of the text style layer in the Display Manager, your text height may be off or not sized for the dwg.
    Aslo in Civil3D 2012 there were a few times it didn’t work right for me but did in 2013 OK.

    • 2 Shravan 04/01/2013 at 2:44 PM

      I tried making the text height a 1000 and even that didn’t help. I am using AutoCad Map3d 2012, I’ll give 2013 a try too. Maybe I will try it in Civil3D and see how it goes as well. For now i found Geotools online which transfers object data to elevation and then labels the contours for me. However it’s only a 30 day trial, and $150 to buy. So this method you have is much better!

      Thanks for your advice!

      • 3 map3d 04/01/2013 at 4:52 PM

        If you have access to Civil3D and are working with contour lines why not create a surface from the data and use the tools there to label? My way is a quick way to create text but as you see it may not work all the time depending on your data/applications and workstation.

      • 4 Shravan 04/05/2013 at 2:39 AM

        Hi,

        Initially my contours only had the elevation as object data. So could not create a surface. But after transferring the data I took your tip and tried Civil3D for the first time and realized how easy it was to do it!

        Your method could be very useful for municipalities who store their elevations from GIS (.shx files) only in the object data, and not in the actual z value. Which was what the case was for me.

        I appreciate all your help!

  2. 5 Shravan 03/31/2013 at 6:24 PM

    Is there any reason why this wouldn’t work. I have done all your steps and no text annotations appear. This is for contour elevations. I would appreciate any help at all! Thanks!


Comments are currently closed.



Archives

Readers Locations

Top Rated posts

Chat room


Follow

Get every new post delivered to your Inbox.

Join 30 other followers

%d bloggers like this: