Wednesday, 15 December 2010

How can you go 3D when you still get 2D

How many times have you wanted to use Civil3d and all its tools only to be served up some dxf or dwg thats 2D typically out of SDR Map, CivilCad or 12D with nothing but mtext heights and crosses. No blocks with attributes to extract the height data nothing.  Track down the original surveyor if still in business? Yeah right. Enter the points manually? No thanks.
Well maybe here is some code to help you get 80% of the way there in no time at all. Some of you may of seen it before as I originally posted it on the Autodesk Civil Community site a few years ago which has since been taken down. The code was pulled together from a couple of the VBA examples that shipped with Autocad and does not work with any Civil3d objects but could be extended to do the Civil3d point creation automatically.
Basically all you have do is :-
  1. Download the code
  2. Figure out the typical x and y offset for the majority objects from the insertion point of the mtext containing the spot height text to the insertion point of the object marking the actual position of the spot height.
  3. Run the code.
  4. Enter the x and y offset.
  5. Enter the text used to represent the decimal character.
  6. Select the mtexts representing the heights and press enter.
  7. Bang Basic Autocad points at the correct height are entered at all the spot height insertion points.
  8. Use Civil3d built in tools to create Civil3d points, add them to your surface and we are in 3d and cooking with gas.
A couple of issues to note are if the survey is of reasonable complexity there will be a small percentage of points where the x and y offset has been changed most likely to stop text overlapping so manually drag the odd few points to the correct position once created with osnapz set to 1 so the z does not change. If a point can not be created as the text is something different the object colour is changed and you will have figure it out and enter it manually. Here is a demo video. 
Unable to display content. Adobe Flash is required.


  1. Dude you've spent 2 fking minutes for one point. If you get a survey around 5000 2d Points you are fked up. This method is broken.

  2. There are other ways of working with large data sets with Map or using the Data extraction command in autocad to create a points files. This method came about to solve a particular problem on a particular job so it may not work for everyone.


Related Posts Plugin for WordPress, Blogger...