Wednesday, January 2, 2013

Labeling Contours at Given Intervals

I was recently asked by a client what was the best method for quickly labeling contours intermittently.  By intermittently,  I mean labeling every other contour, or every third contour.   The client explained that they go through this process by using the contour single command and manual picking every two or three contours, depending on the interval required.  After giving this process some thought,  I figured there had to be a much more efficient way of doing this using an expression.  As most of you know, Civil 3D allows us to create a mathematical expression from other data residing within the software.  In the case of the random intervals, I can create an expression that will see if the contour is at the appropriate interval, and display it. If it is not, then it will be hidden.  In the screen capture below, here is the expression I have created.


Here is the expression:  IF({Surface Elevation}/2=TRUNC({Surface Elevation})/2), {Surface Elevation}, -1)

The expression starts of with the IF command, which tells the expression to check for given output.  The surface elevation/2 is telling the interval at which we want our contours to be displayed.  In this example, we want to label every other contour, but this could  be set to /3, which would check for every third contour, etc.  By using the TRUNC command, we are checking to see if the contour is divide by 2 evenly.  For example, a surface elevation of 102 would generate a value of 51 and a truncated value of 51, where as a surface elevation of 101 would generate a value of 50.5 and a truncated value of 50.  In the example, the surface elevation 102 would be labeled, while 101 would not.  This portion is taken care of by the last part of the expression which is {Surface Elevation}, -1.  If the statement is true, then it uses the surface elevation, if not it generates a -1 value for a false statement.    


The reason we are having the statement generate a negative value is that the label style composer, as seen above, the Sign option allows us to hide negative values.  Note, in my expression, I'm having a false statement generate a value of -1, but in theory, it could be any number as long as it is negative.  This is ultimately how we can have Civil 3D label contours at a given interval.  



Here is what your new label should look like.  Why spend anymore time then needed to quickly label your contours.

Wednesday, December 5, 2012

AutoCAD Civil 3D Service Pack 1 is Available

Autodesk has released  Civil 3D 2013 Service Pack 1..  Autodesk has released this service pack to address a variety of issues discovered by users and Autodesk personnel.


As always, please take a look at the readme file prior to installation.  It is also important to note that you cannot run an automatic uninstall to remove this update.  You will need to do an uninstall and re install to restore your version of the software.



Wednesday, November 28, 2012

Project Chronicle Updated

Autodesk Labs has released an update for Project Chronicle.  For those of you not familiar with this tool, Project Chronicle is a technology preview that makes it easy for users to share and capture software workflows.  The utility consists of two main components.  The first component is the recording utility.  It allows the user capture worflow from either Revit or AutoCAD based software.  The utility records a continuous video with optional narration.  Some cool features of chronicle are that it is also is recording the timeline and details of the workflow, such as the commands used to create the objects or data.  The second component is the web site.  After capturing the data, it is uploaded to the Project Chronicle website where other users can view the videos, along with the timeline and other recorded components.  It is important to note that viewing can be made public, or can be restricted to a specif user or users.  Your chronicles can also be shared to such public media sites as Facebook or Twitter.


Wednesday, November 14, 2012

Flatten my Linework

This is topic that seems to come up frequently, so I thought I would refresh everyone's memory on this.  Lots of users tend to use their Civil 3D points to manually draw line work  and aren't real happy with lines they have created because they are elevated from the chosen points.




As you can see from the screen capture above, the line is elevated as we would expect.  Now the user has two options.  The first option we will look at is in the point style.




As you can see in the capture above, we can simply set the point display mode to flatten points to elevation, and set the elevation to zero.  It is important to note that this setting will have no impact on the creation of a surface using these points.  The second option is to set the osnapz variable to 1.  By setting the variable to 1, osnap substitutes the z value of the specified point to the value of the current UCS.  It is worth mentioning that Civil 3D does not save this variable, and thus why it defaults back to 0 each time you open the software.  The only way that I can see to permanently change this would be to add the following line of code to the acaddoc.lsp file.




  

Monday, October 29, 2012

Civil 3D Points to GIS

A question that has come up a few times in last month, is how take Civil 3D points and convert them into a shp file that can be viewed in GIS with attributed data.  As you can see from the capture below, I have a drawing with a group of Civil 3D points.


The first thing that we need to do is convert the Civil 3D points to standard blocks with attributes.  To accomplish this, I will use the AeccConvertPointsToSdskPoints command.  As you can see below, we now have point blocks.  Before I convert the data into shp format, I will get rid of the Civil 3D points in the drawing now that we have blocks.


To convert the block data into a usable shp format, we can use the mapexport command.


After selecting the file name and shp file format, we will select point for object type.


We will next flip to the data tab, and choose the select attributes option.


Here is where we can select what attributes we want to be stored in the shp file.  In our case, we will select elev, point, and desc.


Now that the file has been created, we can send this to our client our local municipality for their use.  To give an idea of what you will be sending, I will bring the file into Civil 3D using the data connect to bring in the shp file. As you see in the capture below, I have chosen to add the shp connection and selected the shp file previously created.


After connecting and adding to map the shp file, you can see the following.


I will then choose the table option to display the data that was generated in the shp file.



Here is the table with the corresponding data we chose to export with the shp file.  This is what others who plan on using this shp file in other programs should see.






Monday, September 17, 2012

Level of Detail

Over the last few weeks, I have had a few clients that have voiced concerns over performance issues when editing large surfaces.  One way to deal with this issue is by the Level of Detail command.


The command give the user the ability to change the level of detail on a surface based on the zoom distance. What this means is that the more zoomed out, the more simplified the surface will be, and conversely the closer you are, the more detailed.  


When you start the command the first time, the capture above will let you know that you have entered detail mode.  The image below show the icon that will appear in the top left corner of model space once the command has been invoked.


This command, which was added into the 2012 product, will make dealing with large surfaces much improved.

Wednesday, September 5, 2012

Creating a Spillway

A common practice when creating a detention basin is to create a spillway or a similar channel to control the location and release of water.  In the following, I will show how to add a spillway to the basin design.


As you can see from the screen capture above, here is a detention basin with a high water elevation of 176.  Now we need to create a feature line that represent the location of our spillway.  It is important that this feature line is in a different site from the detention basin, that way it will not react with the pond grading.


In the capture above, you can see that an elevated feature line representing the spillway has been created.  We will then create a grading group for the spillway, and use the grade to surface method and target the proposed detention basin.



In the two screen captures above, you can feature line has created the spillway,  The bottom capture shows the spillway in a 3d perspective.  It is important to note, that the infill option needs to be used to close the bottom of the spillway.  Also, if for some reason the spillway needs to change location, we simply move it to its new area, and the spillway will be updated.

Finally, now that the spillway and detention basin are created, we simply need to make a new surface and paste both surfaces together.