Automated Linework – an Alternative

If you’ve ever had to connect a bunch of survey points you know this is sometimes a chore, especially with a very long project.  You’ve taken a look at Civil 3D’s survey tools because you want to use Figures and Figure Prefixes to make you life a little easier.  You tried to convince your surveyor to add all those “BEG, CONT, and END” codes to his FBK file, but he won’t budge.  He surveys in the “ZORRO” method (cross sections as opposed to all down one side and then back).  “That’ll take way too long to code in the field.”, he says.

Well, there may be an answer.  Take a look after the jump.

If you’re like me, you’re always looking for a faster, easier way to do things.  I’m lazy by nature and I think that’s why I like Civil 3D so much.  I can get a lot done without too much effort.

There’s no rocket science to this technique.  It’s very easy and just a few steps.

Here’s my situation, I have several kilometres of survey along the edge of a river.  A dyke to be exact.  Here’s what the surveyor picked up every 20 metres or so.  I know, I know, the elevations are all the same.

image

 Notice that in each of the surveyed sections the points have different descriptors.  A very common situation for many different projects.  This is where you need to communicate with your surveyor a little.  There needs to be different descriptors for left/right 1/2 whatever.  You can have just Top and Toe shots.

Using the transparent command ‘PN, we can use the PLINE command and connect points sequentially by point number.  Obviously, connecting points sequentially with these points is out of the question.  You’d get a bunch of Z’s.  (Zorro…get it?)  You just can’t make this stuff up.

Find your original point file, or export these to a new point file and open it in MS Excel.  it’s going to look something like this.

image

Here’s where you have to remember just a few steps.  We want to have all of the “toe-l” points next to each other, all of the “top-r” points and so on.  And we need those points also kinda sorted by point number.  What we want is to sort the points by description FIRST then by point number.  No problem, highlight all the cells, click Data-> Sort,   Choose the first column to sort by (descriptors) then the seconds (numbers).  See the result below.

image 

image image

Notice how all of the toe-l points are in line AND the points numbers are increasing.

We can’t use these numbers because they already exist in our drawing.  In fact, we don’t need the numbers at all right now.  Our points are in the order we want, so delete the entire point number column.  We’ll have Civil 3D number them when we import the in the next step.  Just remember to save this adjusted file to a new name, maybe CSV format.

Back in Civil 3D we’re ready to import our new file.  My original file was PNEZD.  Since I removed the point numbers it is now NEZD.  You might need to create a new Point Import Format.  Import the points and allow Civil 3D to do the numbering, making sure to add them to a temp point group.  Oh, by the way, now would be a good time to make our original point group a no-show.  Otherwise we’ll have overlapping points and that might be a little distracting.

Here are our new temporary points   With each side of the dyke nicely numbered in order. 

This is one end

image

 This is the other.

image

All we do now is issue the PLINE command.

‘PN (transparent command)

387-462 is the point number range.

Voila!  Your toe-r points are all connected.  Do this three more times and all 4 plines will have been created.

image

Last step I promise.  We are left with a bunch of duplicate points now.  Just delete the temporary points we created for this exercise and you’re done.

Thanks,
Matt

10 comments

  1. Anthony Rhodes says:

    I have done this in the past with great success. I have noticed my polylines end up with the same elevation at all of the vertices reguardless of the point elevations. I have not had the chance to figure out how the program “picks” the elevation for the polyline being drawn. I am guessing it uses the elevation from the first point used to develope the PL. Is this something that happens for everyone or is it just me?

    Thanks,
    Anthony

  2. MAnderson says:

    Why not use the point groups to sort the Toe-L from the Toe-R? The resultant group will create the string of point numbers that you can copy and paste into the ‘PN range list.

  3. Matt Kolberg says:

    Anthony, it’s not you. When you draw a regular polyline, yes, it snaps to the first elevations and stays there. If you used a 3dpolyline, it would snap to all elevations. Of course, if the point style supports that.

    Mike, that may be a good idea. I never thought that might work. If a point group is defined by desc, how can you copy the point numbers?

    Matt

  4. MAnderson says:

    Matt –

    Fidley sticks, I probably should have opened Civil 3d 2008. I may be recalling Land Desktop functionality on Groups. After selecting description keys, the summary tab would return a numberical list of points.

    I don’t see it in 2008.

    Matt Anderson

  5. Jeff Mishler says:

    Thanks, Matt! Just thought you should know, if you haven’t seen it yet, this article jogged my memory banks. I had started writing a lisp to do this last year and got sidetracked. I finished it up today and have posted it to the Adesk C3D customization group, the C3D community site and theSwamp.

    Thanks again, without this article that routine would probably never have seen the light of day.

    Jeff

  6. Matt Kolberg says:

    Jeff, you need to have a (vl-load-com) in the beginning. We could get away without this in 2007, but not in 2008 apparently.

    It failed when it got to (vlax-product-key) without it.

    Matt

  7. Jeff Mishler says:

    Sorry about that! My setup autoruns that line so I forget that 2008 doesn’t by default.

  8. Jason Hickey says:

    Matt K – before I followed the link, I thought you had found some magical breakthrough on how to collect field data…this is a workaround that I wasn’t expecting…I like it, and have done a bit of further testing based on yours and Matt A’s comments…

    True, if you go to the point group properties, you can’t get the point list – however…..If you pick the first point number in the point group “spreadsheet” style view, hold down shift, and select the last one, right click and select copy to clipboard, you can start the polyline command, then invoke the ‘PN transparent command and paste them in order. If you select them as they are (not comma separated) then they paste in with a space (enter) after each one – but as long as you’re in the ‘PN transparent command, it still works. So, Mr. Anderson’s comment will still work, you’re just not picking the points as you think you should. (I got tired of typing “Matt”)

    Try it – I’m going to try a bit more testing before I roll with it.

  9. Joe McManemin says:

    I inserted (VL-LOAD-COM) on a line immediately before (setq vrsn (vlax-product-key)). But I get: Unknown command “CONNECTPTS”. We could use this routine.

  10. gREG Wagstaff says:

    Jason Hickey:

    We are trying to make this procedure work. We are apparently not pasting the right info to the clipboard. Can you advise:

    Thanks,

    Greg