rulururu

post Copying a surface with Civil3D, a better way?

January 30th, 2008

Filed under: C3D, Customization — blogger @ 1:16 am

Reading Pete Kelsey’s post “Copying a Surface with Civil3D” I was amazed at his seven step response. My first thought was couldn’t you right-click on a surface in the prospector and select COPY. So I opened up a drawing in C3D, went to the prospector, right clicked and to my surprise, no copy command.

I am a C3D fan, but I am amazed at basic everyday functionality left out of the software. I know C3D is a new platform and not a Land Desktop clone. However, our work flow has been built around Land Desktop functionality. The right click copy surface has been with us in the LD terrain model explorer for years. Copying a surface is a typical if not daily task in 3D site modeling. Using the vanilla autocad copy command with seven steps is unacceptable. So I started looking for a ‘better way’.

We didn’t have to look too far. the API provides a copy method for the surface object. Writing the code to copy the surface would be easy. Adding the right-click functionality to the prospector isn’t as simple. We can easily add right-click functionality to the surface object in model space. The user would simply select the surface then right click and select ‘copy surface’.

Keep in mind setting this customization up does take more than 7 steps, but once it is implemented it is a nice feature.

This builds on my previous post adding right-click functionality to C3D objects. Another big thanks to David for making these available. If you haven’t downloaded and installed his custom cui, do it now. You will now have the right click functionality for C3D objects.

Open your cui by typing cui at the command prompt.

Once in the cui expand the Shortcut Menus, then expand the AECC_TIN_SURFACE shortcut menu.

Add Separator

Now right click on Check for Contour Problems and select add separator. As shown above.

create command

The next step is to define the copy surface command. Click the create new command button as shown above.

command

Add the following name Copy Surface and command ^C^Ccs; as shown above.

copy surface

Now apply and close your cui. Open a dwg with a surface. Right click on the surface, you’ll see your new right click command as shown above. We’re halfway there.

Next step is to define our command. If you aren’t interested in the details you can skip to the bottom and download the zip file.

Here’s the basic VBA code needed.

Dim AecSurface As AeccTinSurface
Dim AecSurfaceNew As AeccTinSurface
Set AecSurface = ThisDrawing.ActiveSelectionSet.Item(0)
Set AecSurfaceNew = AecSurface.Copy

Four simple lines and we’ve copies the selected surface.

The complete VBA dvb file is included in the zip file below. Code has been added to handle renaming the surface.

The last step is to create a LISP routine to call the VBA. Below is the routine, it is included in the zip file below.

(defun c:cs ()

(vl-vbarun “C:/civil3dblog.com/vba/copysurface.dvb!cs”)

(princ)
)

Download the zip file of the routines here. Save the zip file to your c:/ and right click and select extract all. It should place the files in the proper folders.

Then appload the cs.lsp located in the /lisp folder into your drawing, also add it to your startup suite so it is available in all your drawings.

Now right-click on a surface and select copy surface, your surface is duplicated. Check out the prospector.

This will give you a good starting point for adding other missing functionality to Civil 3D.

If you have any questions or feel additional information should be posted leave a comment and we will update the post.

post Autocad Benchmark Utility already installed on your PC.

January 20th, 2008

Filed under: C3D — blogger @ 11:43 pm

I came across a post about a benchmarking utility that is part of every autocad install.

Check out the original post here.

To load the utility drag and drop the GsTest.arx file into your drawing space (or use the APPLOAD command). Once the arx file has been loaded type

GSTESTBENCHMARK

at the command prompt.

The routine runs quickly and appears to provide valuable results. Here is a sample output.

-------------------------------
Wireframe      : 1370.746771 ms
Wireframe      : 132.774342 fps
Hidden Line    : 1393.239294 ms
Hidden Line    : 130.630826 fps
Flat Shaded    : 1494.107561 ms
Flat Shaded    : 121.811846 fps
Gouraud Shaded : 3411.830554 ms
Gouraud Shaded : 53.343798 fps
-------------------------------

For testing multiple PC configurations select a single drawing file for benchmarking on all PCs. I would recommend a large drawing file. The utility only benchmarks the graphics capability of the PC. This should prove useful for Civil 3D users as it appears the video card is typically the weakest links in Civil 3D work stations.

post Civil 3D Hydraflow Express Available NOW!

January 14th, 2008

Filed under: C3D, Stormwater — blogger @ 7:59 am

Hydraflow Express and Hydraflow Hydrographs are available for download in the subscription center. Log in here.

The Hydraflow Express extension brings a variety of hydraulic calculators to Civil 3D users. Including culverts, weirs, and channels.

Hydraflow Hydrographs brings storm routing and basin design to Civil 3D.

post FILEDIA, the acaddoc.lsp solution

January 4th, 2008

Filed under: Customization, Must Have — blogger @ 1:05 pm

The FILEDIA variable has a tendency of being set to zero when Civil 3D crashes. This results in your file open options being displayed on your command line. A major annoyance. This topic has been posted on the discussion groups several times. One solution is to place the following line in an acaddoc.lsp file in you civil 3d support directory.

(setvar “filedia” 1)

If you don’t have an acaddoc.lsp file you can create your own in notepad and save it in your support directory. Or right-click and save as the file here.

The acaddoc.lsp file is run by autocad when you open a new file. The line you added will set FILEDIA to 1 preventing the dialogs from being disabled.

ruldrurd
© 2007-2009 Civil3Dblog.com, Desinged by Stealth Settings
Entries (RSS) and Comments (RSS)