The Dgrouped
unit in the EPA SWMM project provides a dialog form that enables users to edit properties of a group of objects within a fenced region on the study area map. This form supports editing various object properties, including subcatchments, infiltration models, junctions, storage units, conduits, and more. The form also supports different edit types, such as replacing, multiplying, and adding values.
Key Features of the Dgrouped
Unit:
-
Object Group Editing:
- This form allows the user to modify properties of multiple objects within a defined region on the study area map.
- It supports editing properties of various object types, including subcatchments, infiltration models, junctions, storage units, and conduits.
-
Edit Types:
- Users can choose from different edit types:
- Replace: Replaces the current value with a new one.
- Multiply: Multiplies the current value by a specified factor.
- Add: Adds a specified value to the current value.
- Users can choose from different edit types:
-
Property Editing:
- Users select the property they want to edit from a list, and based on the property type, the appropriate editing controls are shown (e.g., text input for tags, numerical input for property values).
- The form supports various properties, such as rainfall data, land use, infiltration properties, and more.
-
Custom Edit Functions:
- The form supports special editing functions for certain properties, such as land uses (for subcatchments), groundwater properties, and infiltration models.
- For these special cases, the form launches separate dialog boxes for the user to input or modify data.
-
Selection Criteria:
- Objects are selected based on their location within a specified fence region. The user can specify whether the object must have a specific tag or if it should just lie within the region.
- This allows users to apply changes to specific subsets of objects on the map.
-
Use of Regions:
- The
CreatePolygonRgn
function is used to create a region based on the map's fenceline, and theObjectQualifies
function checks if an object lies within this region before applying any changes.
- The
-
Data Validation:
- The form checks if a new value has been entered and applies the appropriate changes to the object properties based on the selected edit type.
- Special cases include the infiltration method and storage curves, which require more specific editing operations.
-
Utility for Editing:
- The form is particularly useful for users who need to apply changes to many objects at once, such as when modifying the properties of multiple subcatchments or conduits.
Detailed Breakdown of Functions:
-
FormCreate:
- Initializes the form, sets up the
ClassListbox
with the available object classes (subcatchments, infiltration, junctions, etc.), and prepares the region for editing based on the current map's fenceline.
- Initializes the form, sets up the
-
ClassListboxChange:
- Handles the change of the object class in the list box and updates the available properties for editing. Depending on the selected class, it populates the property list and enables or disables certain controls.
-
TagCheckBoxClick:
- Toggles the visibility of the tag edit box based on whether the tag check box is checked.
-
PropertyListBoxChange:
- Updates the UI based on the selected property for editing. It shows the appropriate input controls, such as numeric inputs, text inputs, or combo boxes, depending on the selected property.
-
PropertyEditBtnClick:
- Opens a specialized editor for properties that require more complex editing, such as land uses or infiltration models.
-
EditTypeListBoxChange:
- Changes the behavior of the property editing based on the selected edit type (replace, multiply, or add).
-
OKBtnClick:
- Applies the changes to the selected objects based on the property and edit type, and prompts the user to continue editing if necessary.
-
EditConduits, EditJunctions, EditInfiltration, EditStorage:
- These functions handle the editing of specific properties for conduits, junctions, infiltration models, and storage units. They loop through the objects and apply the changes based on the user’s input.
-
GetNewValue:
- Calculates the new value for a property based on the current value and the specified edit type (replace, multiply, or add).
-
ObjectQualifies:
- Checks if an object lies within the specified region (fence) on the map and optionally matches a given tag.
-
UpdateGroundwater:
- Updates the groundwater properties for a subcatchment based on the user’s input.
-
HelpBtnClick:
- Launches the context-sensitive help for the form.
Use Cases:
-
Batch Editing of Object Properties: The primary use case for this form is batch editing multiple objects within a region. For example, users can modify the properties of all subcatchments in a specific area of the study.
-
Infiltration and Groundwater Modifications: Users can edit infiltration models and groundwater properties for multiple subcatchments or junctions at once.
-
Conduit and Junction Editing: The form allows for efficient editing of properties like conduit length, roughness, and junction depths.
-
Specialized Editing: The form supports specialized editors for land uses, infiltration models, and storage curves, making it highly versatile.
Key Variables:
-
OldClassItemIndex: Tracks the previously selected class in the
ClassListbox
to avoid unnecessary updates when the class has not changed. -
NumObjects: Tracks the number of objects that have been modified by the group editing operation.
-
InfilModel: Tracks the currently selected infiltration model, which can be edited by the user.
-
LandUses: A string list that stores the land use types for a subcatchment.
-
ConduitShape: Stores the shape and geometry parameters of a conduit, which can be edited by the user.
Conclusion:
The Dgrouped
unit in SWMM is a powerful tool for users who need to make bulk modifications to the properties of multiple objects within a defined area on the study area map. It supports different types of edits, including replacing, multiplying, and adding values, and offers specialized editors for complex properties like land use and infiltration models. It integrates well with the map, allowing users to select objects based on their geographic location and modify their properties efficiently.
No comments:
Post a Comment