Hello everyone!
I am using Civil 3D 2012 and I want to make a change at one Pipe Rule. To be more specific, I want to change the Cover And Slope Rule so that the Slope Increment will be 0.001 instead of 0.01. I’ve found many videos and discussions about this, but all of them refer to earlier versions of Civil 3D, where “ the pipe and structure rules that were included in the product were created using VBA, and maintained in a C3DPipeNetworkRules.dvb file”. So, the suggested solution was to modify that .dvb file. In Civil 3D 2012, though, “pipe network rule sets that are created now point to the .NET dll version of rules, and therefore point to the C3DPipeNetworkRules.dll file”.
I tried to modify the dvb file to see what happens, so I changed the slope increment in the C3DPipeRules.dvb file, I saved the change and then I opened the xml file and made the following modification:
<Resource Module="AeccPipeRuleScriptsRC.dll"/>
<Macro module="%AECCCONTENT_DIR%\C3DPipeRules.dvb">CoverAndSlope.CoverAndSlope</Macro>
<Domain>Pipe</Domain>
Now, when I add the Cover And Slope rule, the path at the upper right corner of the window points to the C3DPipeRules.dvb file (see att.), but unfortunately it doesn’t work properly…I mean that it still applies a slope increment of 1%. It seems like it still uses the .dll file..
Any help would be apreciated
Hi Christos,
Yes, rule sets are changed from VBA-based (C3DPipeNetworkRules.dvb) to .Net-based (C3DPipeNetworkRules.dll) since Civil 3D 2009 version.
The .NET-based rules typically provide optimal performance over VBA-based rules.
For creating a new rule, you'd better use the cunrrent Rule Set UI based on .Net.
For opening a old version drawing with VBA-based rules, Civil 3D 2012 still support VBA-based rules. In drawings, you can convert AutoCAD Civil 3D pipe and structure rules that are VBA-based to .NET. (See attached Screenshot from Civil 3D user's guide.)
Ribbon: Modify tab Design panel Convert VBA Pipe And Structure Rules To .NET
BTW, after set the Pipe Rule, you also need to apply the rule to achieve network modification. (Command Line: APPLYRULES)
Thanks,
Tom
Thank you Tom for your reply,
My problem is that I don’t want to create a new rule or use an old version drawing, but just make a small change (the Slope Increment) on an existing rule, the Cover &Slope Rule.
What I finally did was to go to:
C:\Program Files\Autodesk\AutoCAD Civil 3D 2012\Sample\Civil 3D API\C3DPipeNetworkRules
and open the file: C3DPipeNetworkRules.vbproj with Microsoft Visual Studio 2008.
At Utilities, I found the “ Dim dSlopeIncrement As Double = 0.01” and changed it to “ Dim dSlopeIncrement As Double = 0.001”
This video (@06:00) helped me with the references: acdbmgd.dll, acmgd.dll, AecBaseMgd.dll, AeccDbMgd.dll I had to add:
Finally I built the C3DPipeNetworkRules and a new .dll file was created. I replaced the original C3DPipeNetworkRules.dll with the new one at:
C:\Documents and Settings\All Users\Application Data\Autodesk\C3D 2012\enu\ C3DPipeNetworkRules.dll
and now everything seems to work fine!