Ad

Wednesday, June 24, 2009

Adjust Structure Sump Depth

For some reason Civil 3D occasionally sets the structure sump depth to something other than 0. I don’t come across many structures that have a sump depth of something other than 0, but I find Civil 3D sets it to 2’. Unfortunately I usually catch the wrong sump depth after I’ve placed numerous structures.

Instead of going through each structure and changing the properties or applying rules I’ve written this short VBA macro to quicken the process. I’ve started with the pipe sample that comes with Civil 3D located here:

C:\Program Files (x86)\AutoCAD Civil 3D 2010\Sample\Civil 3D API\COM\Vba\Pipe\PipeSample.dvb

I’ve deleted all of the items I don’t need from the sample. Next I added a prompt for the user to select a sump depth and then another line to set the sump depth. The complete code is below.

image

There may be a need for some for some error catching, the link below has the completed code set up for Civil 3D 2010:

http://style.civil3dreminders.com/SetSumpDepth.dvb

1 comment:

Wes Ashworth said...

Cool work around, Christopher. You can also reset the sump to 0 by using the structure rules. Just create a rule for sump depth = 0 and run on the affected structures.

LinkWithin

Blog Widget by LinkWithin

Ad