Public Function GetPolylinefromFeatureline(ByVal Featureline As Civil.Land.DatabaseServices.FeatureLine) As Object 'Refer to this forum post from some background 'http://forums.autodesk.com/t5/AutoCAD-Civil-3D-Customization/Polylines-from-Featureline/td-p/3313009 'http://msmvps.com/blogs/joacim/archive/2009/08/31/gettype-and-typeof-confusion.aspx Dim cv As Curve = Featureline.BaseCurve Dim oPline As New Object 'The basecurve of a featureline can be a 3dpolyline, 2dpolyline or a curve 'check if the base curve is a 3dPolyline If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Polyline3d) Then 'MsgBox("this is 3dpolyline") oPline = TryCast(cv, Polyline3d) 'oPline.ConvertToPolyType(Poly3dType.SimplePoly) Return oPline Else 'check if the base curve is a Polyline If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Polyline) Then 'MsgBox("this is polyline") 'oPline = TryCast(cv, Polyline3d) oPline = cv Return oPline 'Dim oPline2d As Polyline = cv 'Dim oPline2dx As Polyline2d = oPline2d.ConvertTo(True) 'oPline2dx.ConvertToPolyType(Poly3dType.SimplePoly) Else 'check if the base curve is a 2dPolyline If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Polyline2d) Then 'MsgBox("this is 2dpolyline") oPline = TryCast(cv, Polyline3d) Else 'check if the base curve is a curve If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Curve) Then MsgBox("this is a curve") oPline = TryCast(cv, Polyline3d) Else MsgBox("object of type " & cv.GetType().ToString & "not progammed for yet") End If End If End If End If Return oPline End Function
Saturday, 10 March 2012
Extract Objects/Polylines from Featurelines Part 2
Wednesday, 29 February 2012
Creating Custom Graded Corners in Civil3d
You can use the grading plane routines developed back in 2008 for the "Caffeinated Grading" paper at AU and shipped with Civil3d 2010 and 2011 as a .dvb file. or use the .net version kindly updated here by Jeff Misher .
In the C3D Surface Working Plane.dll you get a number of additional commands
WorkingPlane2Point
WorkingPlane3Point
WorkPLaneMove
WorkPlaneResize
You can use these commands in combination with a temporary cut fill surface to create feature lines to generate a number external and internal corners and daylight lines to do this.
- Download the .net .dll file for your version of Civil3d from here
- Type netload and load the C3D Surface Working Plane.dll
- Now try one of these methods to build a corner.
Extract zero cutfill line,trim and assign existing ground levels
Option Two
Trim up lines, assign surface elevations and add to surface as breaklines , infill grade the corner if you want to avoid having to draw boundary.
Option Three
Trim up and add to surface as per above.
Thursday, 16 February 2012
Extract 3dpolyline from Featureline
It is possible to extract a polyline from a Featureline here is an example
Public Function PolylinefromFeatureline(ByVal Featureline As Civil.Land.DatabaseServices.FeatureLine) As Object
'Refer to this forum post
'http://forums.autodesk.com/t5/AutoCAD-Civil-3D-Customization/Polylines-from-Featureline/td-p/3313009
'http://msmvps.com/blogs/joacim/archive/2009/08/31/gettype-and-typeof-confusion.aspx
Dim cv As Curve = Featureline.BaseCurve
'The basecurve of a featureline can be a 3dpolyline, 2dpolyline or a curve
'check if the base curve is a 3dPolyline
If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Polyline3d) Then
MsgBox("this is 3dpolyline")
End If
'check if the base curve is a Polyline
If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Polyline) Then
MsgBox("this is polyline")
End If
'check if the base curve is a 2dPolyline
If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Polyline2d) Then
MsgBox("this is 2dpolyline")
End If
'check if the base curve is a curve
If cv.GetType() Is GetType(Autodesk.AutoCAD.DatabaseServices.Curve) Then
MsgBox("this is a curve")
End If
Return cv
End Function
Wednesday, 1 February 2012
New Terrain Grading tools to crash and bash at the Lab
Today the Autodesk labs website released civil3d terrain modeller available here http://labs.autodesk.com/utilities/civil3d_terrain/ for download and testing for 64 bit systems only.
I have downloaded the tool and had a play for a couple of hours.
Comments so far would be.
- Wow
- It has not crashed Civil3d yet but a bit slow for some tasks. could be lack of ram or high spec video card on my part.
- Like the over all concept.
- Would still like to get the featurelines of intersections, etc. maybe I have missed it
- Like the 3d view editing tools wish this worked on individual vertices of a featureline as well in 3d.
Sunday, 29 January 2012
Complex Grading Boundary
I have been experimenting on trying to find a quick way to make a boundary around a complex assortment of grading and featurelines as shown below.
Basically the quickest way I have come up with to date is too.
- Select all featurelines in the drawing (using my SF command in a lsp)
- Isolate all the featureline
- Hide all the internal featurelines
- Close of the perimeter with temporary polyline as shown in white above
- Use the Lineworkshrinkwarp command to generate the boundary around the perimeter.
Better yet It would be good if Autodesk could make the interactive corridor boundary tool work with featurelines and polylines objects outside of a corridor to generate a boundary.
Thursday, 26 January 2012
Another couple of good AU papers on Grading by David Garrigues
The reason I was looking at waybackmachine the other day was to track down the code that David Garrigues demoed in his 2008 AU paper for doing temporary work planes surface. Could not download it from the archived community site.
But found an AU site with the 2008 papers. You can download the code and video presentation which are worth a watch for those doing grading. The paper does not download for some reason.
http://test42.dcheetah.com/?nd=class&session_id=2921
Also David’s presentation from 2010 is very good
http://au.autodesk.com/?nd=class&session_id=7215
Just have to upgrade the grading code to vb.net for 2012 unless some else has and wishes to share it.
Wednesday, 25 January 2012
The WayBackMachine
Sometimes websites get taken down for what ever reason and you wish you had a time machine.
Well check out the Waybackmachine remember the old Autodesk Civil Engineering Community site
http://web.archive.org/web/20080412100024/http://civilcommunity.autodesk.com/
and some of the old utilities
http://web.archive.org/web/20081222202015/http://civilcommunity.autodesk.com/content/utilities/
or Tony Tanzillo’s website
Monday, 23 January 2012
Adding Scale and other Fields to Title Block
Been updating the old title block to be a bit more automatic to save sometime I insert fields into the block attributes to give me the data I wanted as follows
Insert Drawing Name
Inserting blanks as per link
Inserted Drawing Scale as per this video
Updated the scale bar values to update based on the scale as well
I did look at using a diesel expression first for the scale calculation but this did not work as the object ID is turned to a number straight away and the link to the viewport is broken here are some links on diesel for future reference anyway
http://civil3d.wordpress.com/2011/08/23/quick-to-the-diesel/
Thursday, 19 January 2012
Another Interesting Grading Example
Been doing another urban infill job today here is a quick picture of the grading so far. Four building platforms in a gully with a driveway down the side and retaining walls all over the place.
Modelled with a corridor for the drive, featurelines break lines for the retaining walls and ETW from the corridor.
Tuesday, 20 December 2011
Breakline Supplementing Distance
For Site grading I generally up the supplementing of the breaklines to add extra triangles to my surface and smooth the contours out a bit. Instead of typing the value each time you can change the default value in the settings this is where you will find it.
More Acronyms
Doing another site grading job with lots of different features building pads,ponds,swales and roads
so I am and using the featureline commands a lot.To access the commands quicker I have added a few more keyboard shortcut acronyms to my PGP file . Round on Christmas
Wednesday, 14 December 2011
Quickly Removing Breaklines from a Surface
I have to credit Bryce at KarelCad with this tip that made my day.
So you have a surface with a ton of breaklines and you want to remove one from the surface but cannot remember what you called it no worries. Zoom to it in the drawing (as you know where it is) select it and press delete now type “oops” the breakline is restored to the drawing but not into the surface.
Alter the breakline as you wish.
The reason I had to do this was I had a number of breaklines from a corridor in a surface that were extracted when the corridor frequency was quite wide to make my surface better I wanted to add a lot more supplementing to the breaklines, as extracted breakline do not up the supplement when you up the corridor frequency.
Tuesday, 13 December 2011
Featureline Priority
I am always referring back to this post on Featureline Priority by Mark to remind myself of what to do so I thought it maybe of interest to others
Tuesday, 8 November 2011
Crash Boom Bang
This drawing seems to crash because a grading object hang off a corridor does not play nice with a grading hang off a separate featureline go figurer.
Monday, 13 December 2010
A little LSP selection Gem for Civil3d that keeps on giving
However these commands have not made this code redundant, it just seems it keeps on giving time and sums up my core philosophy to using Autocad and Civil3d. If I can, I will find a quicker way.
Basically the code was born back in the day thru the frustration of having to use the “qselect” to find those pesky little diamond grading object markers in a drawing and the amount of time and clicks that it took to rebuild the same selectionset over and over again to find the little things and check if you were in the drawing or the grading in the drawing was corrupt.
Here are examples of the commands I use most frequently and how I use them in my workflow to save time.
- SelectGrading = SG , Type SG finds all the grading objects in a drawing. Right Click select Object View and there’s my model
- SelectFeaturelines = SF, Type SF and find and select all featurelines
- SelectAlignments =SA, Type SA select all alignments, Bring Alignments to the front, Make all Alignment Styles the same by pressing Ctrl+1 and changing the style in the property windows.
The code consists of 10 simple lines of code as follows:-
;************************************************************************************* ;this routine selects all the alignment objects is a drawing ;saves having to use the qselect command and clicking three or four times
(defun C:SELALIGNMENT () (ssget "_X" '((0 . "AECC_ALIGNMENT"))) (setq sset (ssget "P")) (if sset (progn (sssetfirst sset sset) ;(command "_.PROPERTIES") ) ) ) (defun c:SA () (C:SELALIGNMENT))
;************************************************************************************** You can create more Civil3d and Autocad object selection commands by copying the block of code above and say if you were wanting to select Parcels select a parcel in a drawing and list it
If you guys like this sort of stuff leave I comment. If not tell me what you wish to know more about or what Civil3d should do you never know I may have been there and done it before.