Wednesday, December 13, 2006

Converting 2D Text to 3D Points

There are several ways to input data; here in Malaysia, the most common data used are survey points (also known as spot heights) and contour lines. However, before creating a ground surface, you should try to clean the data up as much as possible so that you have less editing work later.

It is common to receive a 2D drawing which only contains the text representing the elevation of each spot height; i.e. there are no points with elevations. In this case, we must create 3D points at each position. Autodesk Civil 3D is able to automatically create 3D points for you based on each text value that represents the elevations for the points.

The conversion process is very simple: first, you need to generate an XYZ file from your drawing, after which you will import the file into Autodesk Civil 3D.

Verify The Drawing Data

  1. Open the drawing containing the spot heights in Autodesk Civil 3D. If you had received the drawing from an external source, copy it to your project’s dwg folder first before opening it.
  2. Check the drawing to see where and how the points and/or text information is stored. They are typically saved in separate layers.
  3. If your drawing already contains 3D points, you don’t have to convert the text into 3D points; you can straightaway use these points to create your existing ground surface. However, be sure to check that these 3D points are placed at the correct elevations.

Note: To check if the points are in 3D or not, use the Properties Window and check the Z value of each point against the relevant text.

  1. If your drawing only contains the text values, note down the layers which contain those text.

Creating The 3D Points

  1. You cannot create the 3D points directly from this drawing, so create a new drawing or open a blank drawing (for example, the survey.dwg created from the previous chapter).
  2. If your Toolspace is not already open, open it from the menu General > Show Toolspace…


  3. In Civil 3D interface, click on Map > Query > Define Query…
  4. In the Define Query window, click on Drawings and click Attach.
  5. You can browse directly to the folder containing your drawing, or you can use aliases.

Note: Using Aliases
Aliases in Autodesk Map is a shortcut to your folder. This is extremely useful when you need to access a folder in Autodesk Map often.

To create an alias:

  1. Click the Create/Edit Aliases icon.
  2. In the Drive Alias field, type in a name to identify the folder you wish to create a shortcut to. The name must not have any spaces in between.’
  3. Click Browse and browse to the folder you wish to create a shortcut to. Click OK.
  4. Click Add. You should see your new alias in the box above.
  5. Click Close when you are done.
  1. In the upper panel, select the drawing which contains the text values which you want to convert into 3D points. Click Add. You should see the file added in the lower panel.
  2. Click OK. The drawing name will be attached in your Toolspace.

Before you start converting your data, first you need to filter out all information to ensure that only the text values containing the relevant elevation data will be converted. You wouldn’t want text containing words like “Tree” or “School” in your point database! To filter out the data, you would be using Queries.

  1. In Civil 3D interface, click on Map > Query > Define Query…
  2. In the query window, filter out the data by using the options under Query Type.
  3. Typically, Property is used as the text values are often placed on a separate layer. Click Property.
  4. In the Property Condition dialog window, click the Layer radio button. In Value, you can type in the layer name, or you can select from a list. Click the Values button. You will see a list of all the layers from your attached drawing, from which you can highlight. To select more than one layer, hold down the Ctrl button while you click on the layer names. Click OK.
  5. Check the information, and click OK.

  6. Before running the conversion, run a quick check to ensure that all the data has been filtered properly. Under Query Mode, click Preview, and then click Execute Query. (Note: If you select OK, nothing will happen as it will merely save the query settings; it does not actually run the query)
  7. You will see a preview of all the data in your drawing. You can still zoom and pan the drawing to view the data, but if you redraw, the data will disappear. Take a look at your drawing to make sure that the data has been properly filtered.
  8. Once you have verified that the data has been filtered properly, you can run the conversion now. Go back to the Query window.
  9. Without modifying the query settings, under Query Mode, select the Report radio button, and click Options.
  10. This is where you specify your report template, i.e. your XYZ file. Click Expression.
  11. In the Report Template Expression window, open the Properties tree. Scroll downwards until you see X1. Highlight it and click OK.
  12. Click Add. You should see .X1 added in the top panel.
  13. Repeat the above steps to add Y1.
  14. For the last column, don’t select Z1! This is because the Z-value in the drawing is 0. Instead, you would be making use of the text value as the elevation. Repeat the above steps to add STRING.
  15. Click the Browse button, and type in the name of the XYZ file you are going to generate.
  16. Click OK, and then click Execute Query. The XYZ file will be generated.
  17. You can check your file by opening it from Windows Explorer.
  18. To import the points, go to the menu Points > Create Points > Import Points.
  19. Under Format, select ENZ (comma delimited) from the drop-down list.
    Note:

The drop-down list contains a list of standard file formats in Autodesk Land Desktop. You can easily create your own format if you need to.

P = Point Number
N = Northing
E = Easting
Z = Elevation
D = Description

Comma delimited means the columns are separated by commas, whereas space delimited means the columns are separated by spaces.

  1. Under Source File, click the open icon, browse to the folder containing your XYZ file, and select the file.
  2. Check the Add Points to Point Group, and click the blue icon on the right. Create a point group named Existing. This is to make it easier for you to create your existing ground surface later. By naming your point group Existing, you will know that all the points in this group are meant for your existing ground surface.
  3. Click OK.
  4. The points will be imported into the drawing.
Original text by Hoo Sze Yen and was originally meant for Land Desktop. She is generous enough to allow me to publish this. Thanks pal. Imagine if you have to manually edit those texts ???? Thank God for technology.. ;-).

8 comments:

Anonymous said...

This is a very good tip clean, instead of fighting with the surveyor for the data damp this is a lot easier and fast.

Thanks

Unknown said...

Its a LOT simpler and quicker and more accurate to use TopoGX.

All you need do is press the 2D to 3D convert toolbar button, then press the big "Convert Now" button. The conversion is done in a few seconds and automatically converts your Text levels to Z levels and inserts them at the visually associated insertion cross, whether it be a Point entity or block insert.

Its also got great features like a really easy 3D Viewer, instant Surface Contours, Surface Height colouring, Flow Arrows, Longsectioning and I think they mentioned that they will be added Voluming soon!

Unknown said...

Sorry, forgot to mention, TopoGX automatically uses your 2D survey lines as constraints so Ditches, roads and any other surveyed features stand out cleanly.

Anonymous said...

bonetiberiu@gmail.com
i managed to create the txt file but i receive the "error parsing value" when importing. do you have any idea what i did wrong?
thanks!

Anonymous said...

hey ive been trying to do this with civil 3d 2010, but i just cant find the comands you mention, can you do an update for the new version?

Anonymous said...

A reply to "bonetiberiu@gmail.com ":

Another reason why the "parsing error occurs" is because of the Text Encoding format. Try so "save as..." the text file using ANSI encoding instead of UNICODE. You can search the options on the "save as..." window. Simple as that. Everything will work just fine.

mandaldyis@yahoo.com

Wendy Lim said...

Reply to Diego Delgado-Elias,
Under Customizations in All Files, scroll to Open > "C:\Documents and Settings\user name\Application Data\Autodesk\C3D 2010\enu\Support\MapClassic.cuix"
Then click APPLY. The map menu should appear and you can follow the same steps as mentioned in the post.

Unknown said...

After reading the reply about the "error passing value"
I still can´t find where to change the text encoding format (UNICODE to ANSI). need some help.

Thanks