Ad

Tuesday, June 28, 2011

Civil 3D Applications

I’ve added some applications to my Civil 3D Apps page. The first one is a report for alignments and profiles developed in collaboration with Planvia, Portugal. The report is currently written in Portuguese, but can be translated into other languages.

The other App is for extracting all of the boundaries from Civil 3D surfaces in a drawing. It currently is written for Civil 3D 2011.

Check out the App Page for more information: http://www.CivilReminders.com/applications

Got an idea for an App? Then leave a comment and I might add create it and add it to the page.

Monday, June 27, 2011

Upgrading .NET Projects

I’ve been a little remise in upgrading some of my older projects from Civil 3D 2011 to 2012. If you don’t want to wait for me to do it, then you can follow these steps to update your projects. Now some of these steps are done for my benefit so I can use the same code from version to version and go back and upgrade all of my code base at once, but you can go straight to the updating of the references if you want.

There may be an easier way than this, but the first thing I do is create a new copy of the Microsoft Visual Studio project for the current year. I do this by copying the .vbproj files and pasting them in a safe place. image
I then copy the current solution file and give it a name that includes this year’s product date.

image

I then open the rename solution file in Microsoft Visual Studio. Once in there I then rename the solution and project file.

image

No I go back and paste the original .vbproj files back into the original folder because they are now named with the 2012.

Now that the solution house cleaning is done the references can by updated.

image

Once the references are opened I then click the Reference Paths… button and change it from the 2011 Civil 3D folder to the 2012 Civil 3D folder.

image

In this case I’ve referenced two folders, so I update both of them to the current version of the program. Next update the appropriate references.

image

image

If you’ve done everything correctly (and there are no API changes) then there should be no errors in the error window.

Now compile the code by pressing the play button at the top of the screen and try out the reports.

AutoCAD Civil 3D 2012–Essentials

It’s about two months after the release of Civil 3D 2012 and that means is about time for the Autodesk Official Training Guides to come out. As with last year Sybex, through Wiley Publishing, is providing this service for Autodesk. This year Eric Chappell is the author for the introductory book for Civil 3D.

The Essentials book provides for a good introductory overview of the product and the terminology used in land development projects. The book does this by taking the reader through a generic subdivision design. While not all of the steps are covered, the book does cover the major steps required in modeling a project in Civil 3D. The prose of the book is easy to read and nearly all of the steps required to do the basics are included.

If you are a seasoned user of Civil 3D then this book may not be for you, but if you are just getting out of college or high school and are looking to start a career in land development as an engineer or designer then this book would be a great starting point. It provides enough of the basics to not look totally clueless and many of the gaps in knowledge will probably be picked up with work experience of those around you. I see the book as a great way to get some preliminary knowledge before going on to more formalized training. If I was just starting out I’d read this book, get some on the job experience and then go for a three day Civil 3D training course. That way you’d have knowledge on knowing what questions to ask to fill in the gaps in your knowledge. (I received a free copy of the book from the publisher).

Friday, June 24, 2011

3 Concepts = 1 eIDEA to Share

Do you have some free time on your hands? Do you want to earn a free trip to Barcelona AND Autodesk University 2011? Do you want to prove that an engineer/designer/draftsman can come up with better ideas than an architect?

If so check out the 3 CONCEPTS = 1 eIDEA TO SHARE competition being held by HP and Autodesk. There also are four architecture firms involved, who are going to help pick the winning submission. It looks like you can submit as many times as you like.

Now the competition is great and all, but if you aren’t going to submit at least take a look at why HP is having the competition and check out HP ePrint & Share. Now if you use outside help or work in a remote office without network connectivity this might be a way to get prints from your printer at where you are at. Now I’ve only seen a demo of the work flow at Autodesk University 2010, but it did look promising.

By participating in the competition not only do you get the chance to win a great prize you get the chance to try out the HP ePrint & Share.

Wednesday, June 22, 2011

Label Precision Blues

I was recently asked to create a label that was capable of showing either one decimal precision or zero. The label was for cross sections, and there are a lot of them so I didn't want to have to go through manually and change the label or code set style to get the correct precision. In order to get the desired results I used two expressions.

The first expression checks to see if the number is not a whole number. In order to do this I used some multiplication, subtraction and if then statements.




IF((ROUND(({Link Length}-TRUNC({Link Length}))*10)/10=1)+(ROUND(({Link
Length}-TRUNC({Link Length}))*10)/10=0),-1,{Link Length})



There are two evaluations evaluated in the above drawing. The first checks to see if the rounded value is 1, the second checks to see if it's 0. Each evaluation returns either a 1 for true or a 0 for false. Adding them the evaluations we can see if one of the cases is true. Since Civil 3D will evaluate a result of 1 as true and 0 as false.
The second expression is the same, except the return values are switched.


IF((ROUND(({Link Length}-TRUNC({Link Length}))*10)/10=1)+(ROUND(({Link
Length}-TRUNC({Link Length}))*10)/10=0),{Link Length},-1)


Then I added both expressions to the label to making sure that I hide any negative values.



I then am able to use one label style to show two precisions since if one is true the other won't be shown and vice versa.




So this label:





Is the same as this one:


Tuesday, June 14, 2011

This is What

In the last post I provided two expressions. The expressions enable you to show two different precisions in a slope label for a section link from a corridor.

The conditional part of the IF statement checks to see if the Slope value is a single value, for instance 2:1, 3:1, etc. If it the first expression is true it will return the absolute value of the slope. If not the value returned is –1. The second one does the exact opposite and would be used when the slope value needs to be shown to one or more places, for instance 2.5:1, 1.5:1, etc.

Add a label component for the link and add both expressions to it, making sure to hide negative values and use the appropriate precision values. This will ensure only one slope value is shown. You can then have the labels show 3:1 and 2.5:1 in the same label without having multiple code set styles. It also eliminates the steps of assigning the correct ones.

As mentioned in the previous post you will lose the ability to have a – sign in the value. It would be really nice if Civil 3D included the option to hide positive values so we could have the ability to include it.

If you ever do get to provide input regarding labels, make sure to ask that decimal, station character outputs honor the hide negative value. There’s a bunch of other cool things that could be accomplished if it did.

Friday, June 10, 2011

What?!?!

Can you guess what these expressions are good for?

IF(ROUND(TRUNC(1/{Link Grade})*10)=ROUND((1/{Link Grade})*10),ABS({Link Grade}),-1)

IF(ROUND(TRUNC(1/{Link Grade})*10)=ROUND((1/{Link Grade})*10),-1,ABS({Link Grade}))

Of course they only work if you don’t need to show negative signs on the grades.

Thursday, June 09, 2011

Extract All Surface Boundaries

Ever want to extract a bunch of surface boundaries? I have, but I don't really want to select each and every surface. Here is some code for VBA that will automate the process.

Sub ExtractBoundaries()
Dim oAcadObject As AcadObject
For Each oAcadObject In ThisDrawing.ModelSpace
If (TypeOf oAcadObject Is AeccTinSurface) Then
Dim oSurf As AeccTinSurface
Set oSurf = oAcadObject

oSurf.ExtractBorder aeccDisplayOrientationPlan

End If
Next

End Sub


It's similar code for vb.NET.

LinkWithin

Blog Widget by LinkWithin