Sunday, March 28, 2010

AU Proposal: WTH – Sanitary Sewer Musings

My first AU proposal for this year, would you take this class? Would there be anything you’d want added?

Class Title: WTH – Sanitary Sewer Musings

Class Type: Lecture

Class Description:

We’ll look how AutoCAD Civil 3D 2011 may be utilized for sanitary sewer design. We’ll take a look at how pipe and structure labels can be created for sanitary sewer plans. Learn how Pipe Rules work and how they may be modified to design the way you want to work. We’ll take a look at how StormNET can be utilized to analyze sanitary sewer systems.

Class Length: 1 Hour

Primary Track: Civil Infrastructure

Audience Experience Level: Advanced

Key Learning Objectives 1: Learn how to customize Pipe and structure labels

Key Learning Objectives 2: Understand how pipe rules may be used to layout preliminary design

Key Learning Objectives 3: Understand how to use pipe rules to check your design

Key Learning Objectives 4: Learn how to customize pipe rules

Key Learning Objectives 5: Learn how to utilize StormNET within Civil 3D 2011

Target Audience: Civil engineers, designers, and anyone who prepares sewer plans

Primary Autodesk Software: Civil 3D

Class Keyword 1: Sewer

Class Keyword 2: Labels

Class Keyword 3: Pipe Networks

Class Keyword 4: Pipe Rules

Class Keyword 5: StormNET

Prerequisite Knowledge and Skills:

The basics of labels, alignments, profiles and profile views.

Civil 3D, My Elevation is Off by a Factor of 12

Occasionally settings can be different than what we expect in Civil 3D. Sometimes an elevation or distance can me off by a factor of 12 (or some other conversion factor).


To get the correct value go into the Settings tab of Toolspace and either change the feature settings for the entire drawing or the individual object type and change the distance, elevation, etc to the correct units.

You can overrule all child object by double clicking on the down arrow if it exists. If the arrow doesn’t show up that means that all of the children objects are the same units as the drawings.

This Screencast goes over the steps:

Friday, March 26, 2010

Cursor Performance Issues

If you are running Windows 7 and the cursor is jumping as if OSNAP was enable then you may want to check out this Knowledge Base article:

Although I’m not quite sure if I’d want to turn off all Dynamic features.

Thursday, March 25, 2010

AutoCAD 2011 – Polyline Grip Editing

Some cool new grip editing of a polyline.

Blogger’s Day Webcast

I’ll be posting my notes regarding the Civil 3D Blogger’s Day webcast. Right now I’m playing Penguin Swing while waiting for the webcast to begin.

My best score at Penguin Swing, 317.2: Matt Kolberg looks like he gets the highest at 319.8



Drafting productivity and transportation appears to be the main development area for this release. #C3D

Acquisitions in the environmental space to round out Civil 3D #C3D

Existing and new features have been heavily vetted for stability and scalability.



Upgrade to 64-Bit!!!! for scalability


Dana Probert now presents the nuts and bolts.

Subscription Advantage Pack from 2010 included in #C3D 2011

Point Cloud river data set, looks large:


Dana’s showed a good workflow using a large survey and using point cloud to show it in Civil 3D and then either use the point cloud from surface or create a boundary and then import the points from file using the boundary as a data clip boundary.


Superelevation now editable graphically as well as tabularly #C3D, New wizard to help set the appropriate superelevation you want:


You can still add manual superelevation points. Tabular palette:


New superelevation view. Kind of like a profile view, but for superelevation. Grip editing also of the superelevation components. View of what the superelevation view looks like with section views and plan view:


Corridor editing is awesome, its got to be the best improvement since sliced bread.

Corridors rebuild quicker, only update if a change has occurred. No longer reprocess the whole corridor for one change.

Use transparency for a layer that shows corridor hatching for a better output. Transparency for a layer or object is new in AutoCAD 2011.


“I love the interactive corridors, works great on 3D roundabouts, watch out for that soon from me” - Jack Strongitharm

Take a look at this option to get better looking corridors for offset targets when they are available.



Some new locks for profiles. Station equations can be locked to a physical location now. A great improvement for roadway construction. #C3D

Widening criteria for curves. So if you do work in Montana, you’ll be able to add those widenings around curves nearly painlessly.


Widening Output:


Improved DGN XREF capability. #C3D NCOPY now available with the DGN XREF!

New improvements for creating multiple section views for building cross section sheets.


Project objects to multiple section views:


How to control which section view the object gets put on, and they can overlap so the object can be shown on both the forward and back section view:


New button on the Plan Production panel:


Now split and merge pipe networks:


Dana’s best improvement for pipe networks, adjusting what elevation should be used for create pipe network from object.


Check out videos of Civil 3D 2011:

Transparency is a great new AutoCAD feature that can be used in Civil 3D, however it does have some drawbacks on layers showing parts of Civil 3D objects.

Sooner then later for StormNet to be incorporated into Civil 3D as subscription benefit near Civil 3D release date.


Alignments and profile labels able to be created through the API. Although we have to wait for others.

Add commas to label text components, also called digit grouping within the program.

Grading functionality hasn’t changed, but some significant breakthroughs were made in fleshing out problems and issues that have existing for a long time. The bucket of issues should be smaller in using grading.

Available end of April or middle of month for Civil 3D 2011 coming out. #C3D

Post Title Entered

What’s on my mind today? This question: “Should AutoCAD® provide built-in support for dual monitors?”

And wondering why it hasn’t happened yet.

In other news Autodesk is announcing what’s going to ship with their 2011 products today, including AutoCAD Civil 3D 2011. Look back here later for a post with my notes from the blogger’s special event.

Wednesday, March 24, 2010

Alignment Radius Snap

Have you ever wished that you could be able to edit alignment curves manually and have it end up at a whole number? Then you’ve probably overlooked the Design Tab in the Alignment Style. By checking the Enable imageradius snap and setting the value to 0; grip editing an alignment curve will give you a whole number. Changing the value to say 10 will give curve radiuses in increments of 10, ie 10, 20, 30, ect…

This can save you some time and ensure your alignment has a whole number.

Saturday, March 20, 2010

Extract 3DPolyline Vertices to Points

You can extract 3DPolyline vertices to points easily using the points option: Polyline Vertices – Automatic. Select the option from the Home Tab, Points drop down, Create Points – Miscellaneous Polyline Vertices – Automatic. Follow the prompt to select a polyline and then press OK.

You may be prompted for a description for each and every newly created point. For 3DPolylines with numerous vertices it can get a bit tiresome pressing the Enter key repeatedly. To get it to stop use the double arrow dropdown on the Create Points Tools and expand the Points Creation level. Under Prompt for Descriptions change it to Automatic or Automatic – Object. The Automatic option will use the value present in the Default Description and Automatic – Object will use the Default Description. Nothing special is added for 3DPolylines.

Wednesday, March 17, 2010

AU 2010 Proposal Ideas

I’m evidently out of ideas for AU proposals. Do you happen to have one? If you do you can submit it at the AU website or you can leave it in the comments below.

Autodesk is looking for:

  • Fresh topics and content
  • More advanced courses
  • Business management solutions
  • Product specifics
  • Tips & Tricks

If I have the slightest idea of how to run with an idea left in the comments; I’ll go ahead and submit it and you might just see the session at AU. Although based on my past submittal record I don’t think it has much of a chance.

Sunday, March 14, 2010

Flatten Feature Line

In Civil 3D there are several ways to flatten a feature line to 0 elevation. You may find that none of them are very convenient. It may be nice to have the ability to right click a feature line and flatten it. To do it now you have to go into the elevation editor or use the regular AutoCAD FLATTEN command. One can use the API to add a command to the right click menu to flatten a feature line from there. To do it modify the cui and add the command to the right click menu of a feature line. There is a way to programmatically add it, but I didn’t do it here.
The code to do it in is below:

   1:  Option Explicit On
   3:  Imports System.Runtime.InteropServices.Marshal
   4:  Imports Autodesk.AutoCAD.Runtime
   5:  Imports Autodesk.AutoCAD.ApplicationServices
   6:  Imports Autodesk.AutoCAD.DatabaseServices
   7:  Imports Autodesk.AutoCAD.EditorInput
   8:  Imports Autodesk.AutoCAD.Geometry
   9:  Imports Autodesk.Civil.DatabaseServices.Styles
  10:  Imports Autodesk.Civil.ApplicationServices
  11:  Imports Autodesk.Civil.Land.DatabaseServices
  12:  Imports AeccLandLib = Autodesk.AECC.Interop.Land
  13:  Imports AeccLandUi = Autodesk.AECC.Interop.UiLand
  14:  Imports AcadCom = Autodesk.AutoCAD.Interop
  15:  Imports System.Security
  16:  Imports C3DRemindersPack.Utilities
  18:  <Assembly: CommandClass(GetType(FlattenFeatureLine))> 
  20:  Public Class FlattenFeatureLine
  22:      Public Shared g_sName As String
  24:      <CommandMethod("C3DRFlattenFeatureLine", CommandFlags.UsePickSet Or CommandFlags.Redraw Or CommandFlags.Modal)> _
  25:      Public Sub cmdFlattenFeatureLine()
  27:          Try
  28:              'Get Civil 3D application, document and database
  29:              GetCivilObject()
  31:              Dim oDoc As Document = Application.DocumentManager.MdiActiveDocument
  32:              Dim ed As Editor = oDoc.Editor
  34:              Try
  35:                  Dim selectionRes As PromptSelectionResult = ed.SelectImplied()
  36:                  If selectionRes.Status = PromptStatus.Error Then
  37:                      ' Ask the user to select points.
  38:                      Dim selectionOpts As New PromptSelectionOptions()
  39:                      selectionOpts.MessageForAdding = vbLf & "Select feature line to flatten: "
  40:                      selectionRes = ed.GetSelection(selectionOpts)
  41:                  Else
  42:                      ' If there was a pickfirst set, clear it.
  43:                      ed.SetImpliedSelection(New ObjectId(-1) {})
  44:                  End If
  46:                  ' If the user hasn't cancelled.
  47:                  If selectionRes.Status = PromptStatus.OK Then
  48:                      ' Take the objects one by one.
  49:                      Dim tr As Transaction = oDoc.TransactionManager.StartTransaction()
  50:                      Try
  52:                          Dim objIds As ObjectId() = selectionRes.Value.GetObjectIds()
  53:                          For Each objId As ObjectId In objIds
  54:                              Dim ent As Entity = DirectCast(tr.GetObject(objId, OpenMode.ForRead), Entity)
  55:                              ' Check to see if the entity is a point.
  56:                              If TypeOf ent Is FeatureLine Then
  57:                                  Dim oFeatLine As AeccLandLib.AeccLandFeatureLine
  59:                                  Dim entid As ObjectId = ent.ObjectId
  60:                                  Dim obj As Object = g_oCivil3DDoc.ObjectIdToObject(entid.OldIdPtr)
  61:                                  oFeatLine = obj
  62:                                  oFeatLine.ShowToolTip() = False
  63:                                  Dim dPoints() As Double
  64:                                  dPoints = oFeatLine.GetPoints()
  66:                                  Dim i As Integer
  68:                                  For i = 2 To UBound(dPoints)
  69:                                      dPoints(i) = 0
  70:                                      i = i + 2
  71:                                  Next
  73:                                  oFeatLine.SetPointsElevation(dPoints)
  75:                              End If
  76:                          Next
  77:                          tr.Commit()
  78:                      Catch ex As Autodesk.AutoCAD.Runtime.Exception
  79:                          ed.WriteMessage(ex.Message)
  80:                          tr.Abort()
  82:                      End Try
  83:                  End If
  84:              Catch ex As Autodesk.AutoCAD.Runtime.Exception
  85:                  ed.WriteMessage(ex.Message)
  86:              End Try
  90:          Catch ex As Exception
  92:          Finally
  95:          End Try
  98:      End Sub
 100:  End Class

I may have some unneeded items in it, but it should get the job done. Hopefully in a future version the Civil 3D developers will provide the command currently located on the Elevation Editor. I didn’t test it, but the code should take several selected feature lines and flatten all of them. You should be able to take the code from the Civil 3D Reminders Pack and add this class to it and compile the code and use netload to load the dll.

Friday, March 12, 2010

Will it Clear?

Occasionally I’ve been tasked with seeing if a car, truck or aircraft engine cart will make it over a vertical curve without scraping on the pavement. In the past I’ve used a template over a paper set of plans. Today I had some time to see if I could automate the task to not have to create a paper template. I think I came up with a pretty good way of doing it.
The quick method I’m utilizing is drawing a polyline along the profile in a profile view. I’ve hard coded the values I need, but also added the code to prompt the user for the information.

   1:  Sub PerformProfileDemonstration()
   3:      ' Always get the objects again since MDI is supported.
   4:      If (GetBaseCivilObjects() = False) Then
   5:          MsgBox "Error accessing top civil objects."
   6:          Exit Sub
   7:      End If
   9:      Dim oAcadObj As AcadObject
  10:      Dim vPt As Variant
  12:      ThisDrawing.Utility.GetEntity oAcadObj, vPt, "Pick Profile: "
  14:      Dim dAxelHt As Double
  15:      dAxelHt = 1.5 ' ThisDrawing.Utility.GetReal("Enter Axel Height: ")
  17:      Dim dLength As Double
  18:      dLength = 35 ' ThisDrawing.Utility.GetReal("Enter Length between Axels: ")
  20:      If (TypeOf oAcadObj Is AeccProfile) Then
  22:          Dim oProfile As AeccProfile
  23:          Set oProfile = oAcadObj
  25:          ThisDrawing.Utility.GetEntity oAcadObj, vPt, "Pick Profile View: "
  26:          Dim oProfileView As AeccProfileView
  27:          If (TypeOf oAcadObj Is AeccProfileView) Then
  28:              Set oProfileView = oAcadObj
  29:          Else
  30:              Exit Sub
  31:          End If
  33:          Dim dStartSta As Double
  34:          Dim dStaInt As Double
  35:          Dim dEndSta As Double
  37:          dStartSta = 250 ' ThisDrawing.Utility.GetReal("Enter starting Station: ")
  38:          dEndSta = 400 'ThisDrawing.Utility.GetReal("Enter Ending Station: ")
  39:          dStaInt = 2 ' ThisDrawing.Utility.GetReal("Enter Station interval: ")
  41:          Dim oPoly As AcadLWPolyline
  42:          Dim dPoints(0 To 7) As Double
  43:          Dim dStartElev As Double
  44:          Dim dEndElev As Double
  45:          Do Until dStartSta > dEndSta
  47:              dStartElev = oProfile.ElevationAt(dStartSta)
  48:              dEndElev = oProfile.ElevationAt(dStartSta + dLength)
  50:              ' Get the points on the profile view, it will account for vertical exageration.
  51:              oProfileView.FindXYAtStationAndElevation dStartSta, dStartElev, dPoints(0), dPoints(1)
  52:              oProfileView.FindXYAtStationAndElevation dStartSta, dStartElev + dAxelHt, dPoints(2), dPoints(3)
  53:              oProfileView.FindXYAtStationAndElevation dStartSta + dLength, dEndElev + dAxelHt, dPoints(4), dPoints(5)
  54:              oProfileView.FindXYAtStationAndElevation dStartSta + dLength, dEndElev, dPoints(6), dPoints(7)
  56:              ThisDrawing.ModelSpace.AddLightWeightPolyline dPoints
  58:              dStartSta = dStartSta + dStaInt
  59:          Loop
  61:      End If
  63:  End Sub

The output looks something like this:
As you can see my vertical curve is too steep for the vehicle. You’ll also notice that I haven’t written the code for the tires to be perpendicular to the profile. In order to get realistic values I probably should revise the code to account for this. Since I don’t have that much time available to day I might leave that for another post or maybe you can come up with a way to do it. The hard part isn’t getting the first tire to be perpendicular, but finding out where the other other tire should sit and be perpendicular to the surface. Fortunately the difference isn’t that much so this method should give a close enough answer. In the picture above the difference was 0.097’.

Monday, March 08, 2010

Copying Profile from Surface

Once upon a time in a land far, far, away (in Civil 3D 2008) you could easily copy profiles from surface by clicking on the Copy Profile button on the Profile Layout Tools bar. But the nefarious developers, well not really, of the New Hampshire decided to make things hard on the loyal users of Civil 3D 2010 by graying out the Copy Profile button.


“What are we to do?”, the users asked puzzling, "Is this a bug or feature?”

Off from the fair land of the Central Coast of California a shout out came “Fear not for there is another way!”

“For we can create a profile from surface, making sure to set the surface to be static or change an existing profile created from surface to be Static.”


Now the profile may be copied. The profile may even be set to dynamic after creation (though you loose the ability to copy the profile) and set back to static to copy the profile again. You may have close out of the Profile Layout Tools and then open it up again to get the copy button to be un-grayed out.

Copying the profile helps create a visual method to design by, by copying the profile it can be moved up or down  to show a minimum or maximum depth from a surface.

Friday, March 05, 2010

Set Elevation Points on a Feature Line (API)

Sometimes the Civil 3D API can be a bit confusing. Sometimes the API does a similar task in one place and a totally different way in another place. Setting elevation point(s) on a feature line is one such case. It can be a bit confusing on trying to figure out what exactly is required. Below is some sample code that shows how to set elevation points, assuming you already have a feature line created.

        Dim dPointPL(8) As Double
dPointPL(0) = 2010: dPointPL(1) = 2010
dPointPL(3) = 2579: dPointPL(4) = 2579
dPointPL(6) = 3010: dPointPL(7) = 2510

' SetPointElevation Method sets the elevation by input point.
Dim dPointElev(2) As Double
dPointElev(0) = 2010: dPointElev(1) = 2010: dPointElev(2) = 43
oFeatureLine2.SetPointElevation dPointElev

' SetPointsElevation Method sets the elevation by input points.
Dim vPointsPL As Variant
vPointsPL = dPointPL
vPointsPL(2) = 67
vPointsPL(5) = 79
vPointsPL(8) = 109
oFeatureLine2.SetPointsElevation vPointsPL

If I remember correctly you need to make sure the point is on the feature line before setting the point elevation.

Tuesday, March 02, 2010

Field Code Escape

I’m brushing up on my survey coding methods. To add a comment to the codes use a / (forward slash) to indicate a comment. The comments can be embedded into coding by adding another / (forward slash) at the end of the comment.

For instance the field book code below:

EP1 B/parking space line/LN CPN211

is read into Civil 3D as:


since Civil 3D ignores the comment.


Blog Widget by LinkWithin