Set Rim Depth Pipe Rule

A reader contacted me a few weeks ago looking from a Set Rim Depth Pipe Rule for a structure. I never heard if he got it to work, but this is how I got the custom rule to work. Check the code after the jump.

First we need to create the custom macro to perform the rule. In this case we will copy the existing SetSumpDepth module. To do this right click on the SetSumpDepth and choose Export File.

image

Repeat the step, only this time use the Import File… option and select the file you just exported. Change the name of the module from SetSumpDepth1 to SetRimDepth (change the name in the Properties window). Now we need to replace all of the instances of SetSumpDepth to SetRimDepth, an easy way to do this is to use the Replace command under the Edit Menu. You should be able to replace all instances in the SetRimDepth module.

Now we are ready to code for the rule. In the SetRimDepth module go down the where the code matches the lines below in the pictures and make the changes indicated:

image

image

Now we need to modify the C3DPiperules.xml file to get Civil 3D to recognize the rule. Most of the steps are presented in my AU paper, so you can find the steps there (you may have to log in to see the download). The easiest rule to copy as a starting point should be the SetSumpDepthRule. My finished added XML lines are below:

image

Once you have made and saved all of the changes, close and open Civil 3D and you should have a working custom rule to set the surface adjustment value when you layout your pipe system, after adding it to your rule set of course.

3 comments

  1. Jeremy Roberts says:

    I am having a problem with RIMs referencing a surface but sticking out of that surface. It seems like there is some kind of rule that the RIM has to be 2′ above the crown of the pipe. The local requirement is 1′ minimum cover. Any suggestions?

  2. Scott Brown says:

    The rims above the surface I have found to be caused by the structure being used. With a concentric cone manhole there is a fixed length for the cone. This cone can’t be placed within the pipe. You might try using a different structure like a simple cylinder to avoid this problem.

  3. Mario Trujillo says:

    It seems as when I want to do a change in the Rim elevation the invert elevation automatically changes to 6′ under the rim. Any suggestions where there would be a problem?