Archive for the 'Tips or Trick' Category

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.


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.


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).


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.


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”.


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. 


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


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.


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.


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.


Using AutoCAD MAP3D Document View

As promised here is a sample of using the Document View functions in Map3D. To set the stage for this we set the scenario as so. We GPSed the utility power line with a handheld GPS unit. As we GPS the pole we also took a picture of the pole, we tag or named the image file the same as the pole number. When we got back into the office we downloaded the images into their own folder on the server alone with the GPS points and data we collected in the field. We then imported the points and created the object data tables from the point data. So now we want to link those images to our points or poles block in the map so as we click on a pole we can view the photo we took in the field.

This is a good example of using the document view tool. The first step is making sure the OD table has the correct information and fields in it and that the images are in a folder that we can get to.



Looking at my example we see the OD table has a field value that matches the image file names.

Once those two steps are complete we have to define the Document View. In order to do this we need to be in the Classic Map workspace. Looks like whoever created the default Ribbons for Map3D forgot these commands or thought we didn’t need them. Using the Map menu pulldown select the Define Document View from the Object Data section.


In the Define Document View Dialog (Yes the old style dialog that you can not resize) We set up the parameters Map3D uses to open/display the images.


1. Give the definition a name and description.

2. For the expression in my example I use the PoleNumber field from my Pole_No_OD Object Data Table. You can use the Expression button to browse and select your expression. (Do not confuse that with the FDO expression builder)

3. Select the folder where your documents are stored, you can use the browse button to get to it.

4. Type in the file extension for the type of document you want to view. In my example its jpg but you can also use word documents or (almost) any type of document to view.

5. Next you need to provide the command line for the application used to open and view the documents. Again use the browse button and browse to the exe file that will open the document. With my example and images as my documents I selected my installed IrfanView application, I could used Paintbrush as well but I like the speed of IrfanView.

6. Click the ADD button to add it to the list at the top.

Now the Update button is nice if you need to go back and change one of the parameter. Nice to have for the first few tries, you do not have to start over if something does work the first time, edit and update.

Now that you have the document view defined, to use it select the View Associated Document from the Map menu Object Data section and select the object with the OD table attached. If everything works you should have that document open up in it’s own application.


The sample in action.

Greek or Nerd (Using links in OD Tables)

To start I’ll say I’m one of those geo-cache hunters that spends my free time looking for Tupperware hidden out in the woods using million dollar satellites. If you don’t know what a geocaching is here is a link. So thinking I would tie it into AutoCAD MAP3D and have a little advance over the next guy, I like viewing those little hidden treasure location in a map and see them all at once and in relation to each other.  As doing so I figured I would share a little solution that many Map3D users have asked over the years. That is how can I open a hyperlink from my data.

To start here’s a look at my map and the object data I have attached to my geocache points.


The points are the standard AutoCAD points with object data attached. The data contains a field with a value to a web site page. So how can I open the web page up to view it with out the old copy from the OD table and open my web browser and paste the value into it. Simple. Just use a little lisp routine that I’ll show you how you can customize to fit your Object Data table and fields names.

Here’s my version of the lisp file;

(defun c:FL (/)
  (setq ent (car (entsel “\nSelect point to follow link”)))
  (setq link (ade_odgetfield ent “waypoints” “url” 0))
  (command “Browser” link)

All you need to do  change the table name and field name to meet your meets. In my sample my table name is WAYPOINTS and field name is URL. Just write your lisp file with those changes after the (ade_odgetfield ent in line 3 of my example. Save the lisp file, load it in your drawing, then use the command FL to Follow your Links.

Now if you need to link to a image file or another file on your network I will post about using the object data document view tools that works for those later.

A quick video of it in action.

AutoCAD Map3D 2011 and Raster Design OE

Anyone that uses MrSID image files in their Map3D or Civil 3D know that you  need to install the Raster Design Object Enabler or Raster Design installed to insert them with the Map image insert command. Problem is right now there is no Raster Design OE for the 2011 versions. However thanks to a geeky customer there is a work around.

The first step is you need a working version of an AutoCAD 2010 installed on your workstation. This can be Map3D, Civil 3D, Standard AutoCAD of the vanilla favor or even the water down application named TrueView. Now if you are running on a 64bit OS I was told you can skip the 2010 products but with a 32 bit OS you need one of those install.

Next download and install the 2010 version of the Raster Design OE. Located here A reminder you need administrator rights to install it and follow the standards to install any of AutoCAD applications, in other words shut down any apps you have running and shut down you anti-virus software for the installs.

The next step is you need to open the windows registry. To do this the simple way is from the START button > Run and type in regedit for the “open”  then click the OK button. Now a disclaimer, if you don’t feel comfortable working with the registry then call some that does. Do not blame the Murph if your PC starts to act up later because you messed up the registry.

With the registry open navigate/browse to the


key. Select it, right click, and select Export. Save the exported registry key to a folder that you can get to, the name for it can be any name of your choice (provide you follow the naming convections enforced by Microsoft).


Now browse to the folder you saved the exported key to and open it in a text editor (Notepad works best). With the file open edit the first line (not the top header line) so it reads as 


Just change the R18.0 to read R18.1. Save the file and close it.


Next step is to double click on the file in Windows Explorer. This will import the registry key into the registry.  If you get the Warning Message / Registry Editor


just click the OK button.

Now if everything worked you should be able to open up Map3D or Civil 3D 2011 and use the Mapiinsert to insert a MrSID format image into you projects like you could before.


First this is a hack to get the SID files in the 2011 versions, it is not supported by Autodesk so if something goes wrong don’t expect help from your support team. Second anyone that knows what all those numbers mean in the registry will see that the imported registry key is for the 2011 version but still points to 2010 Raster Design OE, if you try to install the supported version of Raster Design OE when it gets released you may get the message saying it is already installed. You may have to delete that key for the official supported version to install and work properly .

AutoCAD Menus and stuff….

I got a few questions from users on how to make AutoCAD MAP 3D users interface look like standard AutoCAD. I normally just create a new workspace and set the menus and toolbars that I need or use the Map Classic workspace. But that may not work all the time for all the users as easy as it seems. So thankfully Michael Schlosser, an Autodesk employee came up with a easy way to load the AutoCAD menu in Map3D and blogged about it in his blog GeoExpressions he even links to a video on how to do it. So for the Map 3D user that needs to work as an AutoCAD user take look.

Do you leave your car running all day long?

You do not drive into work every morning, park your car (SUV, truck or Harley) in the parking lot running all day long knowing you may want to drive it to lunch or when it comes quitting time back home. You don’t think that if you leave it running  it saves you a few seconds of having to start it up again and warm up before you put it in drive to drive off do you? OK so it would be nice this time of the year to go out and get in a nice  warm vehicle when we head home for the day. Or for those in the southern hemisphere  a nice air conditioned vehicle this time of the year. No, we do not do that or think about doing that because we know the risk involved of not only wasting fuel and adding to  global warming but we also know we may not have a car sitting there waiting for us when we come out to drive off.

So why would would you do that with your AutoCAD software? I’m talking about users that come in to work and start up their computers start AutoCAD thinking they may need to open a drawing some time during the day. Sure the first time you start up AutoCAD it takes a few minutes to load and you have to wait especially if you do not have an optimized workstation.  But, do you know it is wasting resources sitting there minimized to the taskbar while it is not being used? Just like leaving your car idleing all day long it’s is not only using fuel but the power steering pump is keeping the fluid pressure build up, the oxygen sensors are still sending readings to the on board computer, the fuel gauge, oil pressure gauge are still using resources, the tachometer is still reading the RPMs of the engine. All that and more is happening because you do not want to wait for your vehicle to warm up at quitting time. Sounds a little dumb doesn’t it? Well the same thing is happening to your computer when you have AutoCAD running and minimized. All the functions inside AutoCAD are sitting there running, the operating system is sitting there listening for a mouse click wondering if your are wanting to issue a line command in AutoCAD or read some email. All those support folders on the server are getting pinged making sure they are still connected, all those connections to the printers are still connected, and more.

So what does all this mean? It means when you do get ready to open a dwg file in AutoCAD that it (AutoCAD) already has taken up a lot of those resources and you may get those Fatal Errors or out of memory errors. Prior versions of AutoCAD are know to have memory leaks or hoard memory that it is not using causing errors or other issues when you do try to use the program. The fix for it short of upgrading to a more powerful workstation is do not open AutoCAD until you need to use it, if you have been running AutoCAD for a few hours then close it out and reopen it after a few minutes, give it time to release some of those resources. A few minutes of waiting for AutoCAD to open is better than a few hours of complaining to your IT, boss or your software support team.

Points to Blocks

With the survey tab of the map task pane we can bring points into a map and style them with our blocks to get the look that we may need, or when we import a point type shape file or any other format we can assign a block to the points on the import. (provide block name matches the attributes) But what if you have existing drawings that you have been using for the past few years that have AutoCAD points or they are standard AutoCAD drawing, or from some one else. ? What is the easy and quick way to insert blocks at those points? Well if those points are on there respective layers the Display Manger maybe the quick and easy way. Here is how.

Looking at my sample waterline map we have points that represent wells, both active and abandoned that reside on their own layers. 


First we start by creating a few new “Map Layers” in the display manager. To do this switch to the Display Manager tab, and select ” Add Drawing Data > Drawing Layer”. 


Select one of drawing layers the points reside.


Then click OK, we want to create the map layers separately so when we assign a block to the points we can control what blocks goes to what points. repeat to create all the new map layers as needed.



Once we have the map layers created we style them with a symbol by right clicking on the map layer and select “Add Style > Symbol”.


The symbol used is a default symbol of a square with and X inside it. To change it to the block we want we select the “Symbol Style” element in the display manager under the map layer and select properties.


In the property palette for that element we chose the block to use for that map layer.


You can also set the scale of the block to your scale, leaving the scale at the default of (* 20 (VIEWSCALE)) will scale the block 20 times the view scale. The default scale will scale the block up/down as you zoom in and out of the drawing and regenerate. Change the name of the element to represent the blocks. Repeat the steps for the remaining map layers.

To go a another step further in the display manager we can change the symbol shown in the display manger and for a legend if you decide to create one later on.   Do this by selecting the map layer in the display manager and go to it’s properties in the property palette.



In the property palette, change the Thumbnail Preview to Block and select your block.

Thumbnail LegendBlocks

Repeat for your remaining map layer.

Now your points display as your blocks.


If you need to share the map to standard AutoCAD users you can use the tool icon and Save Current Map to DWG.


Readers Locations

Top Rated posts

Chat room