Tuesday, April 07, 2009

Pipe Network - Custom Parameters

Sometimes you want additional information included in a pipe or structure object. Maybe the velocity of the material flowing in the pipe or the quantity of material flowing in the pipe per unit of time. There is a way using programming to add information to a pipe or structure that will show up in labels. Here’s a shot of a structure the way it’s provided.


And here’s a shot showing the custom data added to the structure.


And here’s a screen shot of the label options in the Text Component Editor.


So how do you do this? You add a Pipe Network Catalog Definition to the drawing. The catalog definition is then available to all of the structures or pipes within in the drawing. A code examples are available in Civil 3D Developer’s help or in the Civil 3D 2009 VBA Customization vBook. The name can be anything that you want, it doesn’t have to be Custom Part Data. One could couple this will reactors and store the velocity or Q in the pipe, when the pipe changes the data held in the pipe would also change. I’d do an example, but I haven’t figured out reactors yet.


Wes Ashworth said...

Have you made headway with this? I'd like to add darin area, q's, etc.


Christopher Fugitt said...

Nope, haven't had the need for it. I think in 2010 they added some of the items you mentioned.

Anonymous said...

You don't need VBA to add custom properties that are just annotation.

You can add custom properties by editing the aeccpartparamcfg.xml file in the Pipes Catalog\Aecc Share Content Folder.

Add a line like this to the parameter declaration section replace ( with < :

(AeccDfParameter name="NOTE" desc="Notes" context="Structure_Note" index="0" datatype="String" usage="String_General" unit="" visible="True" internal="True"/)

And then a line like this in the parttypecfg section:

(AeccOptParam context="Structure_Note"/)


Blog Widget by LinkWithin