Thursday, May 24, 2012

Civil 3D Audit Commands

Have you ever run into major errors in your grading files and can't figure out what is wrong? Ever run the Audit command and it says surface error, then you look at the definition of the surface and it create a snapshot and no longer references actual feature lines, grading groups, etc.? What about disappearing feature lines and grading groups?

These are issues my colleagues and myself have ran into over the years. I have been looking for a fix for a while now, and I think I may have found a solution.

Here is a post by the CAD Geek referring to some of these issues, which then forwards you on to the Being Civil Blog post about Undocumented Commands, which then points to the (now documented) Autodesk page referring to these commands.

From what I understand, you would first run the 'AeccFindSiteOverlaps' command on each site. The command will tell you if there are erros and which of the following commands should be run to remove overlapping geometry: 'AeccRemoveDupFeatureLines', 'AeccRemoveAlignmentsFromSite', or 'AeccRemoveDupLotLines'.

Wednesday, May 16, 2012

Publishing Autodesk Civil3D Data into a 3D Web Viewer

I recently ran into a situation where I needed to allow multiple people access to a DWF file. You can easily email the file around to people, then they would need to install the free DWF viewer available on Autodesk website. From there they can open the file and view.

But what if that is just too many steps for the situation? Autodesk has a product called Autodesk Freewheel and can be found here. This allows you to post content to DWF files that are stored out on the web. Below are a couple of examples of these. The first is a 2D drawing package from the Autodesk Freewheel site. The second is an example of a 3D DWF I created from Civil3D with both Civil3D objects and basic AutoCAD objects, then published to a 3D DWF file.

In adding the file to the web, I first attempted using Google Docs which turned out to be unsuccessful. Google Docs which creates a hyperlink that no longer contains the DWF file name and only allows for the file to be downloaded for viewing. My next attempt was through Dropbox, which does work. I placed the file in my public folder and copied the link to the file. Dropbox also creates a separate hyperlink, but keeps the file extension allowing for Autodesk Freewheel to access the file.





Please note on the Autodesk Freewheel page that within the hyperlinks additional code is needed to set the view to start point. For 3D DWFs this can be quite nerve racking trying to set the view where you want it. Here is a good workflow I used to set the starting view.

1. Use Mozilla Firefox for your internet browser.
2. Load the viewer onto your webpage, then go view the webpage through Mozilla Firefox.
3. Set the view using the viewer to how you want it to start.
4. Right click on the view and go to "This Frame, View Frame Info" as shown in the image below.
5. When the window pops up, go to Media and browse through the view links until you find the last full path, as shown in the image below. This will be the settings for your current view.
6. Right click, and copy the path.
7. Update the path on your web page to the copied path. Note be sure that the beginning path first calls up the Autodesk Freewheel web program (ie. Everything before "path=", your model path should follow the "path=").
8. Go and verify that the page loads correctly.


STEP 4


STEP 5

Autodesk Freewheel also allows for a free rendering service that provides a link to your DWF model. Here is a sample of my 3D DWF rendered through the model.




Tuesday, May 15, 2012

Color Specific Cut/FIll Surface Labels

Today I had a project where I needed to designate fill labels and cut labels with different colors and signs (+/-) to add to a volume surface. From what I recall from AU classes and have read online, there isn't a real easy way to do this, so I began doing a little research and found the following link. This page is good and works pretty well, except if you have to put a (+) sign in front of the positive numbers. In doing this you will find that the red cut numbers show up underneath the positive numbers - I thought there has to be a better way.

This began my venture into trying to utilize expressions to perform this same calculation. I created two expressions that check to see if the surface elevation is a positive number, or a negative number. Basically if the findings return a true value, then give me the Surface Elevation, and if it's false give me 0. (Note that expressions are only used for math equations and do not functions with strings). Here is an example of one of these expressions:


Next, since the above expression returns either the surface elevation or 0, I setup my spot elevation label to have a cut component and a fill component. Each component has different colors and references different expressions in the contents field. The image below is an example of the cut component referencing a the above expression within the contents - the difference between this and the link above is that the sign can remain set to a positive or negative based on what the number is. Upon setting both components up, you will see both components over top of one another - this needs to be adjust to make one "not show up" - and I quote this because you have to sort of trick the software into doing this.


Both components also reference a text size expression. The text size expression idea came from an Autodesk University class called "Exploit Expressions to Enhance Your Labels" by Brian Hailey and can be found here. His idea was to basically make the text you don't want to see really small so it does not plot, since there is no way to completely turn these off. I suppose you could take it a step further and change it's position to locate the text somewhere off in lala land as well. Anyways, I setup a separate expression to perform this task and can be seen in the image below. The results of the label style are shown at the bottom - enjoy!!