RPLS_Forums

Intelligent survey points in Vanilla ACAD.

  • Posts: 202
  • Joined: 07/02/10

Intelligent survey points in Vanilla ACAD.

Posted by Ryan McGowan on Aug 6, 2010 5:41 am

This was a question in this thread but figured I should post this as a new subject in any case because the possibilities of using attributes and fields is something new to ACAD and has the potential for a lot more than just survey data.

ls7454 asked how difficult it is to export points to an ASCII file with plain ACAD.  There is a command called DATAEXTRACTION that does just that.  Coupled with Attributes, there's actually quite a bit that can be done now.  It's also possible to link data intelligently from Excel such as cost data, metadata, hyperlinks, and things I can't even imagine.  In a sense, you can xref to Excel for custom attributes to objects.  Here, I'm just going to show how you can make a block with custom attributes including ENZ and Code attributes, and export it to a CSV file.


To export points to a file, you first need to create a block with attributes for your nodes.  It can be any kind of object actually, but with attributes you can add descriptions or any other data you want associated with the block (i.e. cost, timestamps, cut/fill, etc.)  Theortically, you could just use points, or even extract XYZ data from the linework itself, however with a block, you can add attributes to it.

Make a node for the point. 

PO makes a node.  Alternately, you can draw linework for your node, or even a 3D block representing the object, such as a fire hydrant, or a 2D representation for plotting.  You could even do a block with all three, but if you do, put them on unique layers so you can control the visibility of each.  Note, however that if you change the drawing scale and must scale up your blocks for plotting, the 3D block would scale with it.  In any case, I would recommend using a node in conjuction with any linework or objects you make.  You can use the node for the exact placement of the survey point.

DDPTYPE will change what nodes looks like.  Pick the style you want.  This change will be global, however, and if you use nodes for anything else, they will change too.

Make attributes for your blocks.

ATTDEF creates attributes.  Invisible attributes won't show as text but will be associted with the block instance.  This is great for price, phase, category, and other such information.

Under Tag, type a system name for the atribute such as "NORTH".  For Prompt, type something that will label the attribute in properties and dialog boxes, such as "Northing"  For Default, this is where you create intelligent data.  Click the Insert Field button next to the Default box.  Under "Field names", scroll down to "Object" and click it.  Under "Object type" click the Select Object button.  Select your node.  On the "Property" list, select "Position".  For the format, select "Decimal".  Select the Precision you want (Typically 0.000 or 0.00).  For Northing, uncheck the "X" and "Z" boxes and leave the "Y" box checked.  Make sure "Display Value for block reference." is checked.  Click OK.

Adjust the text options to your liking and place the attribute near the node by checking "Specify on-screen" and clicking OK.  I recommend if you use ENZ format, you put E on top, and for NEZ you put N on top.  This way if you are typing in coords off of a printout, you don't get it backwards.

Repeat ATTDEF for Easting, Elevation, Code, and any other attributes you want.  "Comments" is a good backup attribute.  You can also add "Number", however I usally add this in Excel as I haven't yet found a way to make a unique point number automatically.

Make layers for the nodes and each Attribute, such as "PNT-Nodes", "PNT-N", PNT-E", and so on.  This will allow you to adjust color, plot options, and turn on and off attributes globally with ease.

Create the Block.


B creates blocks.  Type the name of the block such as "PNT" then click "Select objects".  First click the node, then select each attribute in the order you want them to show up in the attribute dialog box when you edit the attributes for each node.  Then, click "Pick Point" and snap to the middle of the node.  Click OK.

The "Edit Attributes" dialog box will appear.  Just click OK.

Now, copy the block (CO) to various parts of the drawing.  The values won't update automatically.  You have to go to "View > Update Fields" and select them all.  There is a way to make them update on the fly, but you need to get into some light programming to do that, but it is possible.  You now have blocks that will display coordinates and contain attributes that you can use for cut sheets and to export to your machine.

Placing Nodes along a 3D Polyline.


Let's assume you have your alignment in 3D with a 3DPOLY.  This is where the limitation of ACAD is really sad.  3DPOLYs cannot do true curves, and cannot offset in 3D.  However, there is add-ons that are free that can at least do the latter, albeit with some limitations.  We can place the nodes along the 3DPOLY at even intervals, however, because the 3DPOLY can't do curves, the stationing won't be perfect and the offsets will be off of straight-line segments of the arc.  A coarse curve with few segments can be really far off.  Also, the 3DPOLY is, well... 3D, so placing the nodes would be in Slope distnace, not horizontal.  There is a longer, but more tedious way to get them perfect and but first the easy, less perfect way:

Create a new block consisting of a line equal to the offset you want.  Draw the line with positive stationing going right.  Put it on the "defpoints" layer so it doesn't print.  A left offset would be up, a right offset would be down.  Insert your point block at the offset side, snapping to the line.  Create a new block.  I named mine "OS5" for 'Offset 5 feet".  Select both the line and the point block.  Snap the insetion point to your line where your alignment would be.  Click OK.

Now go to your 3DPOLY select it.  Open the properties and look at the length.  Let's say you want the staking at 25 foot intervals.  You want to make the length divisible by 25.  If the length is 213.83', you'll want to add a temporary segment of 11.17' to the end.  Make a line (L) or POLYLINE (PL) of the appropriate length, and snap it to the end of the 3DPOLY.  Enter the command PEDIT and enter E to edit vertex.  Hit Enter until you get to the last point on the 3DPOLY.  Enter I to Insert a point.  Click on the end of the temporary line.  Hit Esc to exit PEDIT.  Click on the 3DPOLY and check the properties for length.  Make sure it is now at the proper legnth.

Use the command DIV to insert the blocks along the 3DPOLY.  Select the 3DPOLY.  It now asks you to enter the number of segments.  First, enter B for Block.  Type in the name of the offset block (OS5) and hit enter.  Hit Y Enter.  Now it asks for the number of segments again.  Dividing the legnth of the line by the stationing between stakes, I get 9 for my 225' line and 25' staking.  I enter 9.  Now I can insert my blocks on the offsets.  You'll have to add offsets at the begining and end.

Alternate method with perfect stationing:

Do the same DIV command on the 2DPOLY representing the offset of the alignment.  However, you will need to move the blocks to the appropriate Z after insertion.  This can be tedious if you have too many points, but you get them all exact.

Select all your placed blocks, and explode them (X) back into the block and line entites.  Select all your points and in properties, you can change all the field code attributes at once.

Export to ENZ format.

Type the command DATAEXTRACTION.  With the "Create a new data extraction" radio button selected, click "Next".  Save a new file, calling it whatever you want.  Like Bob. =]  In the next window, select the "Drawings/Sheet set" radio button and check "Include current drawing" and click "Next".

The table you now see is a list of all the objects in your drawing.  On the bottom of the dialog box, uncheck "Display all object types" select "Disply blocks only".  Check "Display blocks with attributes only".  Look for your point block in the table.  Chances are it will be the only one listed.  Click Next.

On the right side is a short list.  Clear all boxes except "Attribute".  Check the attributes you want to export into your file.  Click "Next".

Uncheck "Show count column" and "Show name column."  You can drag columns left and right until they are in the order you want, like Easting, Northing, Elevation, Code.  Click "Next".

Now you can either export into a CSV file, or into a table in autocad.  A CSV file is really a comma-delimited text file.  Select "Output data to external file" and choose your save location.  Click "Finish".

If you need to have point numbers, go into Excel (or any free CSV editor) and open the CSV file.  Insert a column and put 1 in the top box.  In the box below it, type =A1+1 (assuming it's in column A).  Copy that cell into the rest of the column.  You now have point numbers.  Save as CSV again and you should be able to upload into any machine that can read ENZ/NEZ format.
Sort: