| Product(s): | WaterGEMS, WaterCAD, HAMMER, StormCAD, SewerCAD, SewerGEMS, CivilStorm |
| Version(s): | All |
| Area: | Modeling |
How can I create custom fields (attributes), in addition to the default properties and results seen for each element?
Sometimes a need arises to add custom fields (metadata) to your model elements, either input for reference purposes, or new output/results. Examples:
For this purpose, User Data Extensions (UDX) can be created with data type of either text, Boolean, date/time or "real" (number with units). Once created, User Data Extensions work in the properties, Flextables and other places just like other default element attributes. For example you can annotate and color code on User Data Extensions.
Note: when adding UDX fields to a Flextable, consider adding them to a Hydraulic Model Flextable (View > Flextables > "Tables - Hydraulic Model"), since the predefined tables (from the Flextable dropdown menu) will be available in all models, whereas your UDX fields may only be available in one particular model. See more here.
The following are the available Data Types that you can use when creating a UDX and typical applications:
To create your UDX, first close any open Flextables, then go to Tools > User Data Extensions.
Select the desired element type, then click the New button to create the UDX.
Lastly, click OK to create the User Data Extension.
Note: once the UDX is created, the Label and Data Type cannot be changed.
As an example, let's take the example of distinguishing new vs. existing network.
You can create a custom "text" type user data extension for pipes and create prototypes for pipes with the default values of pipe diameter, roughness coefficient and text UDX - NEW PIPE etc.
So, you can specify the old water network by creating a selection set of that and specify user defined field as 'OLD PIPES' for example or simply 'E' for existing network and then create prototypes for new pipes to be laid out. So, whenever you will lay out any new pipes it will automatically be categorized under new water pipe network.
Once custom UDX field is created, you can edit that field through pipe properties or pipe flex table to differentiate between new and existing network.
Then, a prototype can be created which will assign this custom field of NEW for new pipes, whenever you lay out any new pipe in the network which will save your time and confusion to differentiate between new and existing pipes.
Also you can then color code the pipe network to distinguish existing and new network visually for reporting purpose as shown below.
When adding UDX fields to a Flextable, consider adding them to a Hydraulic Model Flextable (View > Flextables > "Tables - Hydraulic Model"), since the predefined tables (from the Flextable dropdown menu) will be available in all models, whereas your UDX fields may only be available in one particular model. See more here.
If you want your UDX to appear in a new custom-named Category in the Property Grid, simply type the desired category name next to the Category field in the UDX properties:
Once you click OK/Apply, the new category will be created and will appear in alphabetical order in the Properties.
If you want to change the order of the Category, consider adding an underscore prefix.
The answer is 'No'. Formula-based UDX cannot be shared, since they will reference properties or results that are only available for a given element. The other types can be shared across elements. As for added value, it can help with duplication of effort, if there is some user-defined property that you want to include for multiple elements. This allows a user to create a UDX once and share it, rather than create the same UDX over and over again. UDX is created for certain element types for eg. a text field for a Pipe can be shared for use in other elements. Please note that I will share filed definition only and not the actual value it holds in the UDX.
UDX are stored inside the model file.
There is the option to export an XML file, and that XML file can be manually imported into another model in order to have the UDX fields available:
You may consider setting up a seed file with all of the Company standards like UDX, symbology, catalogs, Flextables, etc.
Creating Formula-Based User Data Extensions
How do you create an IF / THEN / ELSE statements using Formula derived user data extensions?
Changing the default property values for newly created elements