Tapping Into Civil 3D

Monday, June 26, 2006

Adding LDT commands in C3D

If you have visited the discussions groups at all, you've heard that complaint/comment more than once. Well, there is simply no way to bring forward those commands. However, one can easily transfer over the toolbars and drop down menus from LDT into C3D. Once there, a quick modification of the macro inside of the CUI will have your menus and toolbars looking like LDT and working with the power of C3D. Follow along to see how.

As an example I've chosen the "Terrain: Edit Surface" toolbar. Why? Because almost every button on this toolbar has an equivalent command in C3D. Not every toolbar or pull down menu will work as nice, but if some of these basic commands can be brought over, it just might be that crutch that some of the more "hardened" end users need to make the transition.

Start by firing up LDT and going to the CUI. Click on the transfer tab. On the right hand side open up the civil.cui located in ?:\Documents and Settings\USERNAME\Application Data\Autodesk\C3D 2007\enu\Support. Once the civil.cui file is open its a matter of drag and drop from one cui (land) to the other (civil).



Now that we have the toolbar transferred from LDT to C3D, we can close down LDT and open up the CUI in C3D. Once in the CUI, browse in the toolbars until you find the "Terrain: Edit Surface" toolbar and expand it. By clicking on one of the commands under the toolbar you will populate the properties display pane. Here you will see the various fields we will need to edit.


The first button on the toolbar is "Import 3D lines". In LDT, it was necessary for one to import the 3d lines prior to editing the surface. In C3D it is only necessary for the current surface style to be displaying the triangles and/or points. I have chosen to populate this button with the EditSurfaceStyle command. This will allow the user to quickly access the surface style dialog box and turn on the triangles. EditSurfaceProperties would also be an acceptable command, so long as a surface style for editing has already been created. Wondering where I'm coming up will all these commands? Open up help and type in "Surfaces Command Reference", you will be given a result that contains a majority of the surface commands in C3D.

To edit the macro click on the contents of the macro in the display pane, then click on the ellipse.

Which will bring up the Long String Editor Dialog Box


The macro should be composed as:

Notice how I've renamed the button and changed it's description.

The only thing we are missing now are the icon .BMPs. This is easier said than done, since all the .bmps are contained in a .dll instead of "free floating" .bmps like in years past. That's where Resource HackerTM comes into play. " Resource HackerTM is a freeware utility to view, modify, rename, add, delete and extract resources in 32bit Windows executables and resource files (*.res)." What that means to us, is the ability to extract all the nested bmps out of the .dll for use in our new toolbar and upcoming drop-down menu.

After downloading and extracting Resource HackerTM, start the program and open up the land.dll. You can find it here, ?:\Documents and Settings\USERNAME\Application Data\Autodesk\Autodesk Land Desktop 2007\R17.0\enu\Support. If your worried about messing up LDT, just make a copy for your use on the desktop. Once the file is open go to the Action drop down menu and Save All resources...


Choose a destination folder for all the soon-to-be extracted .bmps and the ".rc" file. Upon browsing to the chosen folder, you will find ~ 1630 bitmaps. They will be named "bitmap_1.bmp, bitmap_2.bmp, bitmap_3.bmp, etc." Decoding all these bitmaps is what the .rc file is for. Open up the .rc file with notpad and you will see something like this...


If we go back to the CUI, we can see which icons we are looking for. In this case "tred3dl" for the small image, "tred3dl2" for the large image. A quick search inside the notepad document will help you locate the various images. "tred3dl" happens to be "Bitmap_570.bmp". Edit the "Bitmap_570.bmp" file and rename it"tred3dl.bmp". You will need to repeat this process for every icon on the toolbar...I never said it was going to be fun or easy ;-)

After renaming the bmp, you will need to remap the icon location thru the cui. To keep things well organized, put all the renamed .bmps in the Icons folder located ?:\Documents and Settings\USERNAME\Application Data\Autodesk\C3D 2007\enu\Support\Icons


At this point, we have completed the process for the first button on the "Terrain: Edit Surface" toolbar. You will need to repeat this process for the remainder of the buttons.

Here is the list of macros I used to finish up the transfer:

Add Surface Line...........................^c^c^cAddSurfaceLine

Delete Surface Line......................^c^c^cDeleteSurfaceLine

Flip Face.........................................^c^c^cEditSurfaceSwapEdge

Add Surface Point.........................^c^c^cAddSurfacePoint

Delete Surface Point......................^c^c^cDeleteSurfacePoint

Edit Surface Point..........................^c^c^cEditSurfacePoint

Add Breaklines...............................^c^c^cAddSurfaceBreaklines
(^org. name of Nondestructive Breaklines)

Minimize Flat Surface Faces........^c^c^cMinimizeSurfaceFlatAreas

Raise/Lower Surface.....................^c^c^cRaiseLowerSurface

Paste Surface..................................^c^c^cEditSurfacePaste

Surface Boundaries.........................^c^c^cAddSurfaceBoundaries

And when everything is said and done...


Enjoy!

As always, comments are welcome.

Wednesday, June 14, 2006

Critical Labels

Picking up were I left off yesterday, let's label all these critical points. Before I do though, I'd like to thank Angel for posting about my new blog. Thanks!

Labeling Critical Points
None of the out of the box labels really work the way I would like them to, but that doesn't mean that AutoDesk didn't provided the tools to make a label like I want!

Let's start by making some new expressions. No, it's not a mistake, I am making the expressions under the Depth label category, even though I will eventually be labeling a station and elevation. Why? Because I like the look and feel of the depth label, it just doesn't label what I want it to...out of the box.


Two expressions need to be created. One for the station of the selected point and one for the elevation of said point. Pay close attention to the format that the results will displayed as. Now is a good time to extend your cad standards and naming convention to expressions.

Station Expression:


Elevation Expression:


Now that we have the expressions built, let's combine then into a label that we can use.

First, create a new label:


Now, let's format the label to take advantage of the new expressions:


After creating the new label style, it's time to label the critical points on our subject profile.
Profiles>Add Profile View Labels...

Now select the newly composed label:


Adding the labels to the profile view is a breeze now that we have nodes to snap to (if you don't remember putting nodes on the profile, re-read yesterday's post). Simply snap onto the node of the various points and drag in the direction you want the label.


As a final cleanup, change the marker style of the "CR" point group to "none"


Now we have labeled all the curb returns, intersections, and any other critical stations without offseting or drawing any line in our profile view. Also, there was no need to label a single critical station in plan view for future reference!

Enjoy!

Tuesday, June 13, 2006

Marking Critical Points

Currently in C3D there is no way to label the elevation of a profile by simply selecting a station or keying one in. Instead, you must enter in both the station and the elevation in order for the station and elevation label to work. This becomes even more problematic, as osnaps like intersection to not work on a profile. So, that leaves you with a couple of options; 1.) trace over the FG profile with a line or polyline, 2.) copy the profile and explode it twice. I'm sure that there are other ways to label the finished ground at a specific station; VBA comes to mind, but nothing really "out of the box".

Here in Texas our roads are parabolic and we design off the top of curb, so this step-by-step guide might need to be tweaked for the roads in your region.

This will be a 2 part write up. Today's guide is a walk-thru in marking critical points in your profile view.


Marking The Profile

Start with laying out your finished ground profile












Next, create the assembly of your liking. Notice how I have left the curb subassembly in the assembly that is used to model the intersection. This can be removed later for final modeling, but must remain present for the time being.











Create a corridor from the FG profile and assemblies, but make sure you create a surface from the curb link.










It is probally a good idea to throw a boundary on the surface too.









Next, we will add points to the profile view to mark the various critical points. I went ahead and created a point group called "CR" (curb return/critical points) and assigned the point group a marker style consisting of a custom marker, a line in this case.

Points>Create points>Miscellaneous:manual


Place points with the transparent command: Profile Station and Elevation from Plan



After selecting the transparent command you will be prompted to select a profile view. Select the subject profile view. Next, C3D will want to know what surface to pull elevations from. This is where you will select the corridor surface composed of the curb links. Finally, C3D will prompt you to select a point. This is where you can select every curb return, intersection, or critical station along the corridor alignment. No need to "pre-label" the critical stations inorder to manually key them in.


Next, update the point group, CR in this Case.


After updating, you will notice that your profile view has been marked with points at the critical stations you have choosen and they are at the correct elevation!!


Enjoy!!

p.s. Being as this is my first attempt at a blog or a write up, any and all comments and suggestions are welcome.