?? A Saga of Input Data: SWMM's Input SW Tables ???  and InfoWorks HW Hydroworks Tables ??? ?? with Ruby and SQL
A Tale of SW and HW Tables in ICM

?? A Saga of Input Data: SWMM's Input SW Tables ??? and InfoWorks HW Hydroworks Tables ??? ?? with Ruby and SQL


This article shows how to see the complexity differences between ICM InfoWorks and SWMM networks with Ruby code for showing all of the input parameters in both ICM InfoWorks and ICM SWMM Networks. All of these parameters can be used with SQL and Ruby scripts for customization. It's noteworthy that ICM InfoWorks networks are more complex than SWMM networks. This is evident in the comparison of their underlying data structures: ICM InfoWorks networks are based on 93 tables and approximately 7300 lines of input parameters, whereas SWMM networks are simpler with 47 tables and about 3180 lines of input parameters. This complexity indicates a higher level of detail and customization possible in ICM InfoWorks networks compared to SWMM networks.

  1. InfoWorks SIM and SWMM SWMMSim Engines: This section compares the simulation engines of InfoWorks SIM and SWMM SWMMSim, highlighting their functionalities and differences.
  2. InfoWorks Parameters for Table hw_subcatchment: Focused on the parameters used in the InfoWorks software, specifically for the 'hw_subcatchment' table. It details the various settings and options available within InfoWorks for modeling subcatchments.
  3. ICM SWMM Parameters for Table sw_subcatchment: Similar to Section 2, this section is dedicated to the parameters used in the ICM SWMM model for the'sw_subcatchment' table, outlining the specific configurations for SWMM networks within the ICM framework.
  4. Readme.md File for the Ruby Code: This section provides documentation and instructions for the Ruby code used in the context of these network models. It's likely a guide or a manual for users to understand how to implement or interact with the Ruby code in their projects.
  5. Where to Find Code for ICM InfoWorks and SWMM Networks?: addresses the common question of where users can locate or access the Ruby code and other relevant scripts or software for both ICM InfoWorks and SWMM networks.
  6. Copy of Ruby Code for SWMM and InfoWorks Networks in ICM—Short but Effective: Offers a direct look at the Ruby code used for both SWMM and InfoWorks networks within ICM. This section likely showcases concise yet powerful coding examples, demonstrating how the Ruby code is implemented.

Section 1: InfoWorks SIM and SWMM SWMMSim Engines
?? Tables are the very foundation of ICM, acting as the structural backbone that supports the entire system. ?? For InfoWorks, each table is distinctively marked with an 'hw_' prefix, while SWMM tables are easily identified by their'sw_' prefix.
Section 2: InfoWorks parameters for Table hw_subcatchment
****Subcatchment, hw_subcatchment
	Subcatchment ID, subcatchment_id, String
	Subcatchment ID Flag, subcatchment_id_flag, Flag
	System type, system_type, String
	System type Flag, system_type_flag, Flag
	Lateral links, lateral_links, WSStructure
		Node ID, node_id, String
		Link suffix, link_suffix, String
		Weight, weight, Single
	Lateral links Flag, lateral_links_flag, Flag
	ReFH/ReFH2 Parameters, refh_descriptors, WSStructure
		BFIHOST, bfihost, Double
		PROPWET, propwet, Double
		DPLBAR, dplbar, Double
		DPSBAR, dpsbar, Double
		URBEXT1990, urbext1990, Double
		URBEXT2000, urbext2000, Double
		Urban extent choice, urbext_choice, Long
		cmax method, cmax_method, Long
		cmax factor, cmax_factor, Double
		tp method, tp_method, Long
		tp factor, tp_factor, Double
		up method, up_method, Long
		up factor, up_factor, Double
		uk method, uk_method, Long
		uk factor, uk_factor, Double
		bl method, bl_method, Long
		bl factor, bl_factor, Double
		br method, br_method, Long
		br factor, br_factor, Double
		Model type, model_type, String
		IsDirty, IsDirty, Boolean
		Country, country, String
		Scale, scale, String
		SAAR, saar, Double
		ReFH2 version, refh2_version, String
		cmax value, cmax_value, Double
		cmax flag, cmax_flag, String
		tp value, tp_value, Double
		tp flag, tp_flag, String
		uk value, uk_value, Double
		uk flag, uk_flag, String
		upvalue, up_value, Double
		up flag, up_flag, String
		bl value, bl_value, Double
		bl flag, bl_flag, String
		br value, br_value, Double
		br flag, br_flag, String
	ReFH/ReFH2 Parameters Flag, refh_descriptors_flag, Flag
	Drains to, drains_to, String
	Drains to Flag, drains_to_flag, Flag
	Node ID, node_id, String
	Node ID Flag, node_id_flag, Flag
	Link suffix, link_suffix, String
	Link suffix Flag, link_suffix_flag, Flag
	To subcatchment ID, to_subcatchment_id, String
	To subcatchment ID Flag, to_subcatchment_id_flag, Flag
	2D point ID, 2d_pt_id, String
	2D point ID Flag, 2d_pt_id_flag, Flag
	Lateral weights, lateral_weights, String
	Lateral weights Flag, lateral_weights_flag, Flag
	Points, boundary_array, Array:Double
	SUDS controls, suds_controls, WSStructure
		SUDS structure ID, id, String
		SUDS control ID, suds_structure, String
		Control type, control_type, String
		Area, area, Double
		Number of units, num_units, Long
		Area of subcatchment (%), area_subcatchment_pct, Double
		Unit surface width, unit_surface_width, Double
		Initial saturation (%), initial_saturation_pct, Double
		Impervious area treated (%), impervious_area_treated_pct, Double
		Outflow to, outflow_to, String
		Drain to subcatchment, drain_to_subcatchment, String
		Drain to node, drain_to_node, String
		Surface, surface, String
		Pervious area treated (%), pervious_area_treated_pct, Double
	SUDS controls Flag, suds_controls_flag, Flag
	Build-up/washoff land uses, swmm_coverage, WSStructure
		Build-up/washoff land use, land_use, String
		Area (%), area, Double
	Capacity limit, capacity_limit, Double
	Capacity limit Flag, capacity_limit_flag, Flag
	Exceedance flow type, exceed_flow_type, String
	Exceedance flow type Flag, exceed_flow_type_flag, Flag
	Total area, total_area, Double
	Total area Flag, total_area_flag, Flag
	Contributing area, contributing_area, Double
	Contributing area Flag, contributing_area_flag, Flag
	x, x, Double
	x Flag, x_flag, Flag
	y, y, Double
	y Flag, y_flag, Flag
	Slope, catchment_slope, Double
	Slope Flag, catchment_slope_flag, Flag
	Standard percentage runoff, ukwir_soil_runoff, Double
	Standard percentage runoff Flag, ukwir_soil_runoff_flag, Flag
	SPR calculation, soil_class_type, String
	SPR calculation Flag, soil_class_type_flag, Flag
	WRAP soil type, soil_class, Long
	WRAP soil type Flag, soil_class_flag, Flag
	HOST soil class, soil_class_host, Long
	HOST soil class Flag, soil_class_host_flag, Flag
	Maximum soil moisture capacity, max_soil_moisture_capacity, Double
	Maximum soil moisture capacity Flag, max_soil_moisture_capacity_flag, Flag
	Curve number, curve_number, Double
	Curve number Flag, curve_number_flag, Flag
	Drying time, drying_time, Double
	Drying time Flag, drying_time_flag, Flag
	Rainfall profile, rainfall_profile, String
	Rainfall profile Flag, rainfall_profile_flag, Flag
	Evaporation profile, evaporation_profile, String
	Evaporation profile Flag, evaporation_profile_flag, Flag
	Use area-averaged rain, area_average_rain, Boolean
	Use area-averaged rain Flag, area_average_rain_flag, Flag
	Dimension, catchment_dimension, Double
	Dimension Flag, catchment_dimension_flag, Flag
	RTK hydrograph, unit_hydrograph_id, String
	RTK hydrograph Flag, unit_hydrograph_id_flag, Flag
	Snow pack, snow_pack_id, String
	Snow pack Flag, snow_pack_id_flag, Flag
	Baseflow calculation, baseflow_calc, String
	Baseflow calculation Flag, baseflow_calc_flag, Flag
	Soil moisture deficit, soil_moist_def, String
	Soil moisture deficit Flag, soil_moist_def_flag, Flag
	SRM runoff coefficient, srm_runoff_coeff, Double
	SRM runoff coefficient Flag, srm_runoff_coeff_flag, Flag
	SRM linear time constant 1, srm_k1, Double
	SRM linear time constant 1 Flag, srm_k1_flag, Flag
	SRM linear time constant 2, srm_k2, Double
	SRM linear time constant 2 Flag, srm_k2_flag, Flag
	SRM time delay, srm_tdly, Double
	SRM time delay Flag, srm_tdly_flag, Flag
	ARMA ID, arma_id, String
	ARMA ID Flag, arma_id_flag, Flag
	Output lag, output_lag, Double
	Output lag Flag, output_lag_flag, Flag
	Bypass runoff, bypass_runoff, Boolean
	Bypass runoff Flag, bypass_runoff_flag, Flag
	Unit hydrograph definition, uh_definition, String
	Unit hydrograph definition Flag, uh_definition_flag, Flag
	Time of concentration method, tc_method, String
	Time of concentration method Flag, tc_method_flag, Flag
	Overland flow time, overland_flow_time, Double
	Overland flow time Flag, overland_flow_time_flag, Flag
	Flood wave celerity, flood_wave_celerity, Double
	Flood wave celerity Flag, flood_wave_celerity_flag, Flag
	Equivalent Manning's n, equivalent_roughness, Double
	Equivalent Manning's n Flag, equivalent_roughness_flag, Flag
	Hydraulic radius, hydraulic_radius, Double
	Hydraulic radius Flag, hydraulic_radius_flag, Flag
	PWRI coefficient, pwri_coefficient, Double
	PWRI coefficient Flag, pwri_coefficient_flag, Flag
	Time of concentration, tc, time_of_concentration, Double
	Time of concentration, tc Flag, time_of_concentration_flag, Flag
	Timestep factor, tc_timestep_factor, Double
	Timestep factor Flag, tc_timestep_factor_flag, Flag
	Time to peak factor, tc_time_to_peak_factor, Double
	Time to peak factor Flag, tc_time_to_peak_factor_flag, Flag
	Time to peak, tp, time_to_peak, Double
	Time to peak, tp Flag, time_to_peak_flag, Flag
	Base time, tb, base_time, Double
	Base time, tb Flag, base_time_flag, Flag
	Lag time, tl, lag_time, Double
	Lag time, tl Flag, lag_time_flag, Flag
	Peaking coefficient, cp, peaking_coeff, Double
	Peaking coefficient, cp Flag, peaking_coeff_flag, Flag
	Unit hydrograph peak, uh_peak, Double
	Unit hydrograph peak Flag, uh_peak_flag, Flag
	Degree of kink, uh_kink, Double
	Degree of kink Flag, uh_kink_flag, Flag
	Non-linear routing method, non-linear_routing_method, String
	Non-linear routing method Flag, non-linear_routing_method_flag, Flag
	Lag time method, lag_time_method, String
	Lag time method Flag, lag_time_method_flag, Flag
	Storage factor K, storage_factor, Double
	Storage factor K Flag, storage_factor_flag, Flag
	Exponent p, storage_exponent, Double
	Exponent p Flag, storage_exponent_flag, Flag
	Internal routing, internal_routing, String
	Internal routing Flag, internal_routing_flag, Flag
	Runoff routed internally (%), percent_routed, Double
	Runoff routed internally (%) Flag, percent_routed_flag, Flag
	Per-surface RAFTS B, rafts_per_surface, Boolean
	Degree urbanisation, degree_urbanisation, Double
	Degree urbanisation Flag, degree_urbanisation_flag, Flag
	RAFTS adapt factor, rafts_adapt_factor, Double
	RAFTS adapt factor Flag, rafts_adapt_factor_flag, Flag
	RAFTS B, rafts_b, Double
	RAFTS B Flag, rafts_b_flag, Flag
	RAFTS n, rafts_n, Double
	RAFTS n Flag, rafts_n_flag, Flag
	Connectivity (%), connectivity, Long
	Connectivity (%) Flag, connectivity_flag, Flag
	Wastewater profile, wastewater_profile, Long
	Wastewater profile Flag, wastewater_profile_flag, Flag
	Population, population, Double
	Population Flag, population_flag, Flag
	Trade flow, trade_flow, Double
	Trade flow Flag, trade_flow_flag, Flag
	Additional foul flow, additional_foul_flow, Double
	Additional foul flow Flag, additional_foul_flow_flag, Flag
	Base flow, base_flow, Double
	Base flow Flag, base_flow_flag, Flag
	Trade profile, trade_profile, Long
	Trade profile Flag, trade_profile_flag, Flag
	Ground infiltration ID, ground_id, String
	Ground infiltration ID Flag, ground_id_flag, Flag
	Ground infiltration node, ground_node, String
	Ground infiltration node Flag, ground_node_flag, Flag
	Baseflow lag, baseflow_lag, Double
	Baseflow lag Flag, baseflow_lag_flag, Flag
	Baseflow recharge, baseflow_recharge, Double
	Baseflow recharge Flag, baseflow_recharge_flag, Flag
	Land use ID, land_use_id, String
	Land use ID Flag, land_use_id_flag, Flag
	PDM Descriptor, pdm_descriptor_id, String
	PDM Descriptor Flag, pdm_descriptor_id_flag, Flag
	Area measurement type, area_measurement_type, String
	Area measurement type Flag, area_measurement_type_flag, Flag
	Runoff area 1 absolute, area_absolute_1, Double
	Runoff area 1 absolute Flag, area_absolute_1_flag, Flag
	Runoff area 2 absolute, area_absolute_2, Double
	Runoff area 2 absolute Flag, area_absolute_2_flag, Flag
	Runoff area 3 absolute, area_absolute_3, Double
	Runoff area 3 absolute Flag, area_absolute_3_flag, Flag
	Runoff area 4 absolute, area_absolute_4, Double
	Runoff area 4 absolute Flag, area_absolute_4_flag, Flag
	Runoff area 5 absolute, area_absolute_5, Double
	Runoff area 5 absolute Flag, area_absolute_5_flag, Flag
	Runoff area 6 absolute, area_absolute_6, Double
	Runoff area 6 absolute Flag, area_absolute_6_flag, Flag
	Runoff area 7 absolute, area_absolute_7, Double
	Runoff area 7 absolute Flag, area_absolute_7_flag, Flag
	Runoff area 8 absolute, area_absolute_8, Double
	Runoff area 8 absolute Flag, area_absolute_8_flag, Flag
	Runoff area 9 absolute, area_absolute_9, Double
	Runoff area 9 absolute Flag, area_absolute_9_flag, Flag
	Runoff area 10 absolute, area_absolute_10, Double
	Runoff area 10 absolute Flag, area_absolute_10_flag, Flag
	Runoff area 11 absolute, area_absolute_11, Double
	Runoff area 11 absolute Flag, area_absolute_11_flag, Flag
	Runoff area 12 absolute, area_absolute_12, Double
	Runoff area 12 absolute Flag, area_absolute_12_flag, Flag
	Runoff area 1 (%), area_percent_1, Double
	Runoff area 1 (%) Flag, area_percent_1_flag, Flag
	Runoff area 2 (%), area_percent_2, Double
	Runoff area 2 (%) Flag, area_percent_2_flag, Flag
	Runoff area 3 (%), area_percent_3, Double
	Runoff area 3 (%) Flag, area_percent_3_flag, Flag
	Runoff area 4 (%), area_percent_4, Double
	Runoff area 4 (%) Flag, area_percent_4_flag, Flag
	Runoff area 5 (%), area_percent_5, Double
	Runoff area 5 (%) Flag, area_percent_5_flag, Flag
	Runoff area 6 (%), area_percent_6, Double
	Runoff area 6 (%) Flag, area_percent_6_flag, Flag
	Runoff area 7 (%), area_percent_7, Double
	Runoff area 7 (%) Flag, area_percent_7_flag, Flag
	Runoff area 8 (%), area_percent_8, Double
	Runoff area 8 (%) Flag, area_percent_8_flag, Flag
	Runoff area 9 (%), area_percent_9, Double
	Runoff area 9 (%) Flag, area_percent_9_flag, Flag
	Runoff area 10 (%), area_percent_10, Double
	Runoff area 10 (%) Flag, area_percent_10_flag, Flag
	Runoff area 11 (%), area_percent_11, Double
	Runoff area 11 (%) Flag, area_percent_11_flag, Flag
	Runoff area 12 (%), area_percent_12, Double
	Runoff area 12 (%) Flag, area_percent_12_flag, Flag
	Notes, notes, String
	Notes Flag, notes_flag, Flag
	Hyperlinks, hyperlinks, WSStructure
		Description, description, String
		URL, url, String
	Hyperlinks Flag, hyperlinks_flag, Flag
	User number 1, user_number_1, Double
	User number 1 Flag, user_number_1_flag, Flag
	User number 2, user_number_2, Double
	User number 2 Flag, user_number_2_flag, Flag
	User number 3, user_number_3, Double
	User number 3 Flag, user_number_3_flag, Flag
	User number 4, user_number_4, Double
	User number 4 Flag, user_number_4_flag, Flag
	User number 5, user_number_5, Double
	User number 5 Flag, user_number_5_flag, Flag
	User number 6, user_number_6, Double
	User number 6 Flag, user_number_6_flag, Flag
	User number 7, user_number_7, Double
	User number 7 Flag, user_number_7_flag, Flag
	User number 8, user_number_8, Double
	User number 8 Flag, user_number_8_flag, Flag
	User number 9, user_number_9, Double
	User number 9 Flag, user_number_9_flag, Flag
	User number 10, user_number_10, Double
	User number 10 Flag, user_number_10_flag, Flag
	User text 1, user_text_1, String
	User text 1 Flag, user_text_1_flag, Flag
	User text 2, user_text_2, String
	User text 2 Flag, user_text_2_flag, Flag
	User text 3, user_text_3, String
	User text 3 Flag, user_text_3_flag, Flag
	User text 4, user_text_4, String
	User text 4 Flag, user_text_4_flag, Flag
	User text 5, user_text_5, String
	User text 5 Flag, user_text_5_flag, Flag
	User text 6, user_text_6, String
	User text 6 Flag, user_text_6_flag, Flag
	User text 7, user_text_7, String
	User text 7 Flag, user_text_7_flag, Flag
	User text 8, user_text_8, String
	User text 8 Flag, user_text_8_flag, Flag
	User text 9, user_text_9, String
	User text 9 Flag, user_text_9_flag, Flag
	User text 10, user_text_10, String
	User text 10 Flag, user_text_10_flag, Flag        
Section 3: ICM SWMM parameters for Table sw_subcatchment
****Subcatchment, sw_subcatchment
	Subcatchment ID, subcatchment_id, String
	Subcatchment ID Flag, subcatchment_id_flag, Flag
	Land uses, coverages, WSStructure
		Land use, land_use, String
		Area (%), area, Double
	Land uses Flag, coverages_flag, Flag
	Initial buildup, loadings, WSStructure
		Pollutant, pollutant, String
		Initial buildup, build_up, Double
	Initial buildup Flag, loadings_flag, Flag
	Soils, soil, WSStructure
		Soil, soil, String
		Area (%), area, Double
	Soils Flag, soil_flag, Flag
	Rain gage ID, raingauge_id, String
	Rain gage ID Flag, raingauge_id_flag, Flag
	Drains to, sw_drains_to, String
	Drains to Flag, sw_drains_to_flag, Flag
	Outlet, outlet_id, String
	Outlet Flag, outlet_id_flag, Flag
	Area, area, Double
	Area Flag, area_flag, Flag
	Hydraulic length, hydraulic_length, Double
	Hydraulic length Flag, hydraulic_length_flag, Flag
	x, x, Double
	x Flag, x_flag, Flag
	y, y, Double
	y Flag, y_flag, Flag
	Subcatchment width, width, Double
	Subcatchment width Flag, width_flag, Flag
	Slope, catchment_slope, Double
	Slope Flag, catchment_slope_flag, Flag
	Use area-averaged rain, area_average_rain, Boolean
	Use area-averaged rain Flag, area_average_rain_flag, Flag
	Imperviousness (%), percent_impervious, Double
	Imperviousness (%) Flag, percent_impervious_flag, Flag
	Impervious roughness, roughness_impervious, Double
	Impervious roughness Flag, roughness_impervious_flag, Flag
	Pervious roughness, roughness_pervious, Double
	Pervious roughness Flag, roughness_pervious_flag, Flag
	Impervious storage depth, storage_impervious, Double
	Impervious storage depth Flag, storage_impervious_flag, Flag
	Points, boundary_array, Array:Double
	Pervious storage depth, storage_pervious, Double
	Pervious storage depth Flag, storage_pervious_flag, Flag
	Percent no storage, percent_no_storage, Double
	Percent no storage Flag, percent_no_storage_flag, Flag
	Routing, route_to, String
	Routing Flag, route_to_flag, Flag
	Infiltration model, infiltration, String
	Infiltration model Flag, infiltration_flag, Flag
	Percent routed, percent_routed, Double
	Percent routed Flag, percent_routed_flag, Flag
	Initial infiltration, initial_infiltration, Double
	Initial infiltration Flag, initial_infiltration_flag, Flag
	Limiting infiltration, limiting_infiltration, Double
	Limiting infiltration Flag, limiting_infiltration_flag, Flag
	Decay factor, decay_factor, Double
	Decay factor Flag, decay_factor_flag, Flag
	Initial abstraction factor, initial_abstraction_factor, Double
	Initial abstraction factor Flag, initial_abstraction_factor_flag, Flag
	Drying time, drying_time, Double
	Drying time Flag, drying_time_flag, Flag
	Maximum infiltration volume, max_infiltration_volume, Double
	Maximum infiltration volume Flag, max_infiltration_volume_flag, Flag
	Aquifer ID, aquifer_id, String
	Aquifer ID Flag, aquifer_id_flag, Flag
	Aquifer node ID, aquifer_node_id, String
	Aquifer node ID Flag, aquifer_node_id_flag, Flag
	Aquifer elevation, aquifer_elevation, Double
	Aquifer elevation Flag, aquifer_elevation_flag, Flag
	Aquifer Initial ground water elevation, aquifer_initial_groundwater, Double
	Aquifer Initial ground water elevation Flag, aquifer_initial_groundwater_flag, Flag
	Aquifer Initial ground water moisture content, aquifer_initial_moisture_content, Double
	Aquifer Initial ground water moisture content Flag, aquifer_initial_moisture_content_flag, Flag
	Elevation, elevation, Double
	Elevation Flag, elevation_flag, Flag
	Groundwater coefficient, groundwater_coefficient, Double
	Groundwater coefficient Flag, groundwater_coefficient_flag, Flag
	Groundwater exponent, groundwater_exponent, Double
	Groundwater exponent Flag, groundwater_exponent_flag, Flag
	Groundwater threshold, groundwater_threshold, Double
	Groundwater threshold Flag, groundwater_threshold_flag, Flag
	Initial moisture deficit, initial_moisture_deficit, Double
	Initial moisture deficit Flag, initial_moisture_deficit_flag, Flag
	Lateral groundwater flow equation, lateral_gwf_equation, String
	Lateral groundwater flow equation Flag, lateral_gwf_equation_flag, Flag
	Deep groundwater flow equation, deep_gwf_equation, String
	Deep groundwater flow equation Flag, deep_gwf_equation_flag, Flag
	Surface coefficient, surface_coefficient, Double
	Surface coefficient Flag, surface_coefficient_flag, Flag
	Surface depth, surface_depth, Double
	Surface depth Flag, surface_depth_flag, Flag
	Surface exponent, surface_exponent, Double
	Surface exponent Flag, surface_exponent_flag, Flag
	Surface groundwater coefficient, surface_groundwater_coefficient, Double
	Surface groundwater coefficient Flag, surface_groundwater_coefficient_flag, Flag
	Curve number, curve_number, Double
	Curve number Flag, curve_number_flag, Flag
	Average capillary suction, average_capillary_suction, Double
	Average capillary suction Flag, average_capillary_suction_flag, Flag
	Saturated hydraulic conductivity, saturated_hydraulic_conductivity, Double
	Saturated hydraulic conductivity Flag, saturated_hydraulic_conductivity_flag, Flag
	Initial abstraction type, initial_abstraction_type, String
	Initial abstraction type Flag, initial_abstraction_type_flag, Flag
	Runoff model type, runoff_model_type, String
	Runoff model type Flag, runoff_model_type_flag, Flag
	Shape factor, shape_factor, Double
	Shape factor Flag, shape_factor_flag, Flag
	Initial abstraction, initial_abstraction, Double
	Initial abstraction Flag, initial_abstraction_flag, Flag
	Time of concentration, time_of_concentration, Double
	Time of concentration Flag, time_of_concentration_flag, Flag
	Snow pack ID, snow_pack_id, String
	Snow pack ID Flag, snow_pack_id_flag, Flag
	Curb length, curb_length, Double
	Curb length Flag, curb_length_flag, Flag
	LID controls, suds_controls, WSStructure
		LIDS structure ID, id, String
		LIDS control ID, suds_structure, String
		Control type, control_type, String
		Area, area, Double
		Number of units, num_units, Long
		Area of subcatchment (%), area_subcatchment_pct, Double
		Unit surface width, unit_surface_width, Double
		Initial saturation (%), initial_saturation_pct, Double
		Impervious area treated (%), impervious_area_treated_pct, Double
		Outflow to, outflow_to, String
		Drain to subcatchment, drain_to_subcatchment, String
		Drain to node, drain_to_node, String
		Pervious area treated (%), pervious_area_treated_pct, Double
	LID controls Flag, suds_controls_flag, Flag
	Pervious surface roughness pattern, n_perv_pattern, String
	Pervious surface roughness pattern Flag, n_perv_pattern_flag, Flag
	Depression storage pattern, dstore_pattern, String
	Depression storage pattern Flag, dstore_pattern_flag, Flag
	Infiltration capacity pattern, infil_pattern, String
	Infiltration capacity pattern Flag, infil_pattern_flag, Flag
	Hyperlinks, hyperlinks, WSStructure
		Description, description, String
		URL, url, String
	Hyperlinks Flag, hyperlinks_flag, Flag
	Notes, notes, String
	Notes Flag, notes_flag, Flag
	User number 1, user_number_1, Double
	User number 1 Flag, user_number_1_flag, Flag
	User number 2, user_number_2, Double
	User number 2 Flag, user_number_2_flag, Flag
	User number 3, user_number_3, Double
	User number 3 Flag, user_number_3_flag, Flag
	User number 4, user_number_4, Double
	User number 4 Flag, user_number_4_flag, Flag
	User number 5, user_number_5, Double
	User number 5 Flag, user_number_5_flag, Flag
	User number 6, user_number_6, Double
	User number 6 Flag, user_number_6_flag, Flag
	User number 7, user_number_7, Double
	User number 7 Flag, user_number_7_flag, Flag
	User number 8, user_number_8, Double
	User number 8 Flag, user_number_8_flag, Flag
	User number 9, user_number_9, Double
	User number 9 Flag, user_number_9_flag, Flag
	User number 10, user_number_10, Double
	User number 10 Flag, user_number_10_flag, Flag
	User text 1, user_text_1, String
	User text 1 Flag, user_text_1_flag, Flag
	User text 2, user_text_2, String
	User text 2 Flag, user_text_2_flag, Flag
	User text 3, user_text_3, String
	User text 3 Flag, user_text_3_flag, Flag
	User text 4, user_text_4, String
	User text 4 Flag, user_text_4_flag, Flag
	User text 5, user_text_5, String
	User text 5 Flag, user_text_5_flag, Flag
	User text 6, user_text_6, String
	User text 6 Flag, user_text_6_flag, Flag
	User text 7, user_text_7, String
	User text 7 Flag, user_text_7_flag, Flag
	User text 8, user_text_8, String
	User text 8 Flag, user_text_8_flag, Flag
	User text 9, user_text_9, String
	User text 9 Flag, user_text_9_flag, Flag
	User text 10, user_text_10, String
	User text 10 Flag, user_text_10_flag, Flag        

Section 4: Readme.md file for the Ruby Code

# InfoWorks ICM Network Field List Printer applies to both SWMM and Infoworks Networks

This Ruby script prints the names of all fields for each table in an InfoWorks ICM model network.

## How it Works

The script operates in several steps:

1. **Table Iteration**: The script iterates over each table in the network.

2. **Field Collection and Printing**: For each table, the script iterates over each field. It prints the field name, and if the field's data type is 'WSStructure', it also prints the names of the subfields.

3. **Error Handling**: If a 'WSStructure' field does not have any subfields (i.e., `j.fields` is `nil`), the script prints "***badger***" to indicate a potential issue.

## Usage

To use this script, you need to have an active network in InfoWorks ICM. The script will automatically print the names of all fields for each table in the network.

```ruby
# Usage example
net = WSApplication.current_network
print_table_fields(net)

        
Section 5: Where do I find this code for ICM InfoWorks and SWMM Networks?

You can find the Ruby code for both the ICM InfoWorks and SWMM Networks from the InfoWorks ICM Technical Information Hub for InfoWorks and SWMM Networks in the subfolder 01 InfoWorks ICM\02 SQL\0032 - List Network Fields-Structure (SWMM or ICM)

Section 6: Copy of Ruby Code for SWMM and InfoWorks Networks in ICM - Short but Effective In our demonstration, we showcase a Ruby script specifically crafted for reading the IWR output file in ICM. ????

??? The script cleverly extracts and displays result variables directly in the script window, offering a clear and immediate view of the data. These variable names, which are also meticulously listed in the ICM Online Help File, serve as crucial references. ????

?? Using these names, you can craft custom output scripts tailored to your specific needs. This flexibility enhances the already wide array of graphs and grids that ICM provides, allowing for personalized data visualization and analysis. ???? Whether it's for detailed reporting or comprehensive data study, these tables and scripts empower users to maximize the potential of ICM's robust functionalities. ???????

Section 1: InfoWorks SIM and SWMM SWMMSim Engines
InfoWorks SIM and SWMM SWMMSim Engines and Table Names


Section 2: InfoWorks parameters for Table hw_subcatchment
****Subcatchment, hw_subcatchment
	Subcatchment ID, subcatchment_id, String
	Subcatchment ID Flag, subcatchment_id_flag, Flag
	System type, system_type, String
	System type Flag, system_type_flag, Flag
	Lateral links, lateral_links, WSStructure
		Node ID, node_id, String
		Link suffix, link_suffix, String
		Weight, weight, Single
	Lateral links Flag, lateral_links_flag, Flag
	ReFH/ReFH2 Parameters, refh_descriptors, WSStructure
		BFIHOST, bfihost, Double
		PROPWET, propwet, Double
		DPLBAR, dplbar, Double
		DPSBAR, dpsbar, Double
		URBEXT1990, urbext1990, Double
		URBEXT2000, urbext2000, Double
		Urban extent choice, urbext_choice, Long
		cmax method, cmax_method, Long
		cmax factor, cmax_factor, Double
		tp method, tp_method, Long
		tp factor, tp_factor, Double
		up method, up_method, Long
		up factor, up_factor, Double
		uk method, uk_method, Long
		uk factor, uk_factor, Double
		bl method, bl_method, Long
		bl factor, bl_factor, Double
		br method, br_method, Long
		br factor, br_factor, Double
		Model type, model_type, String
		IsDirty, IsDirty, Boolean
		Country, country, String
		Scale, scale, String
		SAAR, saar, Double
		ReFH2 version, refh2_version, String
		cmax value, cmax_value, Double
		cmax flag, cmax_flag, String
		tp value, tp_value, Double
		tp flag, tp_flag, String
		uk value, uk_value, Double
		uk flag, uk_flag, String
		upvalue, up_value, Double
		up flag, up_flag, String
		bl value, bl_value, Double
		bl flag, bl_flag, String
		br value, br_value, Double
		br flag, br_flag, String
	ReFH/ReFH2 Parameters Flag, refh_descriptors_flag, Flag
	Drains to, drains_to, String
	Drains to Flag, drains_to_flag, Flag
	Node ID, node_id, String
	Node ID Flag, node_id_flag, Flag
	Link suffix, link_suffix, String
	Link suffix Flag, link_suffix_flag, Flag
	To subcatchment ID, to_subcatchment_id, String
	To subcatchment ID Flag, to_subcatchment_id_flag, Flag
	2D point ID, 2d_pt_id, String
	2D point ID Flag, 2d_pt_id_flag, Flag
	Lateral weights, lateral_weights, String
	Lateral weights Flag, lateral_weights_flag, Flag
	Points, boundary_array, Array:Double
	SUDS controls, suds_controls, WSStructure
		SUDS structure ID, id, String
		SUDS control ID, suds_structure, String
		Control type, control_type, String
		Area, area, Double
		Number of units, num_units, Long
		Area of subcatchment (%), area_subcatchment_pct, Double
		Unit surface width, unit_surface_width, Double
		Initial saturation (%), initial_saturation_pct, Double
		Impervious area treated (%), impervious_area_treated_pct, Double
		Outflow to, outflow_to, String
		Drain to subcatchment, drain_to_subcatchment, String
		Drain to node, drain_to_node, String
		Surface, surface, String
		Pervious area treated (%), pervious_area_treated_pct, Double
	SUDS controls Flag, suds_controls_flag, Flag
	Build-up/washoff land uses, swmm_coverage, WSStructure
		Build-up/washoff land use, land_use, String
		Area (%), area, Double
	Capacity limit, capacity_limit, Double
	Capacity limit Flag, capacity_limit_flag, Flag
	Exceedance flow type, exceed_flow_type, String
	Exceedance flow type Flag, exceed_flow_type_flag, Flag
	Total area, total_area, Double
	Total area Flag, total_area_flag, Flag
	Contributing area, contributing_area, Double
	Contributing area Flag, contributing_area_flag, Flag
	x, x, Double
	x Flag, x_flag, Flag
	y, y, Double
	y Flag, y_flag, Flag
	Slope, catchment_slope, Double
	Slope Flag, catchment_slope_flag, Flag
	Standard percentage runoff, ukwir_soil_runoff, Double
	Standard percentage runoff Flag, ukwir_soil_runoff_flag, Flag
	SPR calculation, soil_class_type, String
	SPR calculation Flag, soil_class_type_flag, Flag
	WRAP soil type, soil_class, Long
	WRAP soil type Flag, soil_class_flag, Flag
	HOST soil class, soil_class_host, Long
	HOST soil class Flag, soil_class_host_flag, Flag
	Maximum soil moisture capacity, max_soil_moisture_capacity, Double
	Maximum soil moisture capacity Flag, max_soil_moisture_capacity_flag, Flag
	Curve number, curve_number, Double
	Curve number Flag, curve_number_flag, Flag
	Drying time, drying_time, Double
	Drying time Flag, drying_time_flag, Flag
	Rainfall profile, rainfall_profile, String
	Rainfall profile Flag, rainfall_profile_flag, Flag
	Evaporation profile, evaporation_profile, String
	Evaporation profile Flag, evaporation_profile_flag, Flag
	Use area-averaged rain, area_average_rain, Boolean
	Use area-averaged rain Flag, area_average_rain_flag, Flag
	Dimension, catchment_dimension, Double
	Dimension Flag, catchment_dimension_flag, Flag
	RTK hydrograph, unit_hydrograph_id, String
	RTK hydrograph Flag, unit_hydrograph_id_flag, Flag
	Snow pack, snow_pack_id, String
	Snow pack Flag, snow_pack_id_flag, Flag
	Baseflow calculation, baseflow_calc, String
	Baseflow calculation Flag, baseflow_calc_flag, Flag
	Soil moisture deficit, soil_moist_def, String
	Soil moisture deficit Flag, soil_moist_def_flag, Flag
	SRM runoff coefficient, srm_runoff_coeff, Double
	SRM runoff coefficient Flag, srm_runoff_coeff_flag, Flag
	SRM linear time constant 1, srm_k1, Double
	SRM linear time constant 1 Flag, srm_k1_flag, Flag
	SRM linear time constant 2, srm_k2, Double
	SRM linear time constant 2 Flag, srm_k2_flag, Flag
	SRM time delay, srm_tdly, Double
	SRM time delay Flag, srm_tdly_flag, Flag
	ARMA ID, arma_id, String
	ARMA ID Flag, arma_id_flag, Flag
	Output lag, output_lag, Double
	Output lag Flag, output_lag_flag, Flag
	Bypass runoff, bypass_runoff, Boolean
	Bypass runoff Flag, bypass_runoff_flag, Flag
	Unit hydrograph definition, uh_definition, String
	Unit hydrograph definition Flag, uh_definition_flag, Flag
	Time of concentration method, tc_method, String
	Time of concentration method Flag, tc_method_flag, Flag
	Overland flow time, overland_flow_time, Double
	Overland flow time Flag, overland_flow_time_flag, Flag
	Flood wave celerity, flood_wave_celerity, Double
	Flood wave celerity Flag, flood_wave_celerity_flag, Flag
	Equivalent Manning's n, equivalent_roughness, Double
	Equivalent Manning's n Flag, equivalent_roughness_flag, Flag
	Hydraulic radius, hydraulic_radius, Double
	Hydraulic radius Flag, hydraulic_radius_flag, Flag
	PWRI coefficient, pwri_coefficient, Double
	PWRI coefficient Flag, pwri_coefficient_flag, Flag
	Time of concentration, tc, time_of_concentration, Double
	Time of concentration, tc Flag, time_of_concentration_flag, Flag
	Timestep factor, tc_timestep_factor, Double
	Timestep factor Flag, tc_timestep_factor_flag, Flag
	Time to peak factor, tc_time_to_peak_factor, Double
	Time to peak factor Flag, tc_time_to_peak_factor_flag, Flag
	Time to peak, tp, time_to_peak, Double
	Time to peak, tp Flag, time_to_peak_flag, Flag
	Base time, tb, base_time, Double
	Base time, tb Flag, base_time_flag, Flag
	Lag time, tl, lag_time, Double
	Lag time, tl Flag, lag_time_flag, Flag
	Peaking coefficient, cp, peaking_coeff, Double
	Peaking coefficient, cp Flag, peaking_coeff_flag, Flag
	Unit hydrograph peak, uh_peak, Double
	Unit hydrograph peak Flag, uh_peak_flag, Flag
	Degree of kink, uh_kink, Double
	Degree of kink Flag, uh_kink_flag, Flag
	Non-linear routing method, non-linear_routing_method, String
	Non-linear routing method Flag, non-linear_routing_method_flag, Flag
	Lag time method, lag_time_method, String
	Lag time method Flag, lag_time_method_flag, Flag
	Storage factor K, storage_factor, Double
	Storage factor K Flag, storage_factor_flag, Flag
	Exponent p, storage_exponent, Double
	Exponent p Flag, storage_exponent_flag, Flag
	Internal routing, internal_routing, String
	Internal routing Flag, internal_routing_flag, Flag
	Runoff routed internally (%), percent_routed, Double
	Runoff routed internally (%) Flag, percent_routed_flag, Flag
	Per-surface RAFTS B, rafts_per_surface, Boolean
	Degree urbanisation, degree_urbanisation, Double
	Degree urbanisation Flag, degree_urbanisation_flag, Flag
	RAFTS adapt factor, rafts_adapt_factor, Double
	RAFTS adapt factor Flag, rafts_adapt_factor_flag, Flag
	RAFTS B, rafts_b, Double
	RAFTS B Flag, rafts_b_flag, Flag
	RAFTS n, rafts_n, Double
	RAFTS n Flag, rafts_n_flag, Flag
	Connectivity (%), connectivity, Long
	Connectivity (%) Flag, connectivity_flag, Flag
	Wastewater profile, wastewater_profile, Long
	Wastewater profile Flag, wastewater_profile_flag, Flag
	Population, population, Double
	Population Flag, population_flag, Flag
	Trade flow, trade_flow, Double
	Trade flow Flag, trade_flow_flag, Flag
	Additional foul flow, additional_foul_flow, Double
	Additional foul flow Flag, additional_foul_flow_flag, Flag
	Base flow, base_flow, Double
	Base flow Flag, base_flow_flag, Flag
	Trade profile, trade_profile, Long
	Trade profile Flag, trade_profile_flag, Flag
	Ground infiltration ID, ground_id, String
	Ground infiltration ID Flag, ground_id_flag, Flag
	Ground infiltration node, ground_node, String
	Ground infiltration node Flag, ground_node_flag, Flag
	Baseflow lag, baseflow_lag, Double
	Baseflow lag Flag, baseflow_lag_flag, Flag
	Baseflow recharge, baseflow_recharge, Double
	Baseflow recharge Flag, baseflow_recharge_flag, Flag
	Land use ID, land_use_id, String
	Land use ID Flag, land_use_id_flag, Flag
	PDM Descriptor, pdm_descriptor_id, String
	PDM Descriptor Flag, pdm_descriptor_id_flag, Flag
	Area measurement type, area_measurement_type, String
	Area measurement type Flag, area_measurement_type_flag, Flag
	Runoff area 1 absolute, area_absolute_1, Double
	Runoff area 1 absolute Flag, area_absolute_1_flag, Flag
	Runoff area 2 absolute, area_absolute_2, Double
	Runoff area 2 absolute Flag, area_absolute_2_flag, Flag
	Runoff area 3 absolute, area_absolute_3, Double
	Runoff area 3 absolute Flag, area_absolute_3_flag, Flag
	Runoff area 4 absolute, area_absolute_4, Double
	Runoff area 4 absolute Flag, area_absolute_4_flag, Flag
	Runoff area 5 absolute, area_absolute_5, Double
	Runoff area 5 absolute Flag, area_absolute_5_flag, Flag
	Runoff area 6 absolute, area_absolute_6, Double
	Runoff area 6 absolute Flag, area_absolute_6_flag, Flag
	Runoff area 7 absolute, area_absolute_7, Double
	Runoff area 7 absolute Flag, area_absolute_7_flag, Flag
	Runoff area 8 absolute, area_absolute_8, Double
	Runoff area 8 absolute Flag, area_absolute_8_flag, Flag
	Runoff area 9 absolute, area_absolute_9, Double
	Runoff area 9 absolute Flag, area_absolute_9_flag, Flag
	Runoff area 10 absolute, area_absolute_10, Double
	Runoff area 10 absolute Flag, area_absolute_10_flag, Flag
	Runoff area 11 absolute, area_absolute_11, Double
	Runoff area 11 absolute Flag, area_absolute_11_flag, Flag
	Runoff area 12 absolute, area_absolute_12, Double
	Runoff area 12 absolute Flag, area_absolute_12_flag, Flag
	Runoff area 1 (%), area_percent_1, Double
	Runoff area 1 (%) Flag, area_percent_1_flag, Flag
	Runoff area 2 (%), area_percent_2, Double
	Runoff area 2 (%) Flag, area_percent_2_flag, Flag
	Runoff area 3 (%), area_percent_3, Double
	Runoff area 3 (%) Flag, area_percent_3_flag, Flag
	Runoff area 4 (%), area_percent_4, Double
	Runoff area 4 (%) Flag, area_percent_4_flag, Flag
	Runoff area 5 (%), area_percent_5, Double
	Runoff area 5 (%) Flag, area_percent_5_flag, Flag
	Runoff area 6 (%), area_percent_6, Double
	Runoff area 6 (%) Flag, area_percent_6_flag, Flag
	Runoff area 7 (%), area_percent_7, Double
	Runoff area 7 (%) Flag, area_percent_7_flag, Flag
	Runoff area 8 (%), area_percent_8, Double
	Runoff area 8 (%) Flag, area_percent_8_flag, Flag
	Runoff area 9 (%), area_percent_9, Double
	Runoff area 9 (%) Flag, area_percent_9_flag, Flag
	Runoff area 10 (%), area_percent_10, Double
	Runoff area 10 (%) Flag, area_percent_10_flag, Flag
	Runoff area 11 (%), area_percent_11, Double
	Runoff area 11 (%) Flag, area_percent_11_flag, Flag
	Runoff area 12 (%), area_percent_12, Double
	Runoff area 12 (%) Flag, area_percent_12_flag, Flag
	Notes, notes, String
	Notes Flag, notes_flag, Flag
	Hyperlinks, hyperlinks, WSStructure
		Description, description, String
		URL, url, String
	Hyperlinks Flag, hyperlinks_flag, Flag
	User number 1, user_number_1, Double
	User number 1 Flag, user_number_1_flag, Flag
	User number 2, user_number_2, Double
	User number 2 Flag, user_number_2_flag, Flag
	User number 3, user_number_3, Double
	User number 3 Flag, user_number_3_flag, Flag
	User number 4, user_number_4, Double
	User number 4 Flag, user_number_4_flag, Flag
	User number 5, user_number_5, Double
	User number 5 Flag, user_number_5_flag, Flag
	User number 6, user_number_6, Double
	User number 6 Flag, user_number_6_flag, Flag
	User number 7, user_number_7, Double
	User number 7 Flag, user_number_7_flag, Flag
	User number 8, user_number_8, Double
	User number 8 Flag, user_number_8_flag, Flag
	User number 9, user_number_9, Double
	User number 9 Flag, user_number_9_flag, Flag
	User number 10, user_number_10, Double
	User number 10 Flag, user_number_10_flag, Flag
	User text 1, user_text_1, String
	User text 1 Flag, user_text_1_flag, Flag
	User text 2, user_text_2, String
	User text 2 Flag, user_text_2_flag, Flag
	User text 3, user_text_3, String
	User text 3 Flag, user_text_3_flag, Flag
	User text 4, user_text_4, String
	User text 4 Flag, user_text_4_flag, Flag
	User text 5, user_text_5, String
	User text 5 Flag, user_text_5_flag, Flag
	User text 6, user_text_6, String
	User text 6 Flag, user_text_6_flag, Flag
	User text 7, user_text_7, String
	User text 7 Flag, user_text_7_flag, Flag
	User text 8, user_text_8, String
	User text 8 Flag, user_text_8_flag, Flag
	User text 9, user_text_9, String
	User text 9 Flag, user_text_9_flag, Flag
	User text 10, user_text_10, String
	User text 10 Flag, user_text_10_flag, Flag        
Section 3: ICM SWMM parameters for Table sw_subcatchment
****Subcatchment, sw_subcatchment
	Subcatchment ID, subcatchment_id, String
	Subcatchment ID Flag, subcatchment_id_flag, Flag
	Land uses, coverages, WSStructure
		Land use, land_use, String
		Area (%), area, Double
	Land uses Flag, coverages_flag, Flag
	Initial buildup, loadings, WSStructure
		Pollutant, pollutant, String
		Initial buildup, build_up, Double
	Initial buildup Flag, loadings_flag, Flag
	Soils, soil, WSStructure
		Soil, soil, String
		Area (%), area, Double
	Soils Flag, soil_flag, Flag
	Rain gage ID, raingauge_id, String
	Rain gage ID Flag, raingauge_id_flag, Flag
	Drains to, sw_drains_to, String
	Drains to Flag, sw_drains_to_flag, Flag
	Outlet, outlet_id, String
	Outlet Flag, outlet_id_flag, Flag
	Area, area, Double
	Area Flag, area_flag, Flag
	Hydraulic length, hydraulic_length, Double
	Hydraulic length Flag, hydraulic_length_flag, Flag
	x, x, Double
	x Flag, x_flag, Flag
	y, y, Double
	y Flag, y_flag, Flag
	Subcatchment width, width, Double
	Subcatchment width Flag, width_flag, Flag
	Slope, catchment_slope, Double
	Slope Flag, catchment_slope_flag, Flag
	Use area-averaged rain, area_average_rain, Boolean
	Use area-averaged rain Flag, area_average_rain_flag, Flag
	Imperviousness (%), percent_impervious, Double
	Imperviousness (%) Flag, percent_impervious_flag, Flag
	Impervious roughness, roughness_impervious, Double
	Impervious roughness Flag, roughness_impervious_flag, Flag
	Pervious roughness, roughness_pervious, Double
	Pervious roughness Flag, roughness_pervious_flag, Flag
	Impervious storage depth, storage_impervious, Double
	Impervious storage depth Flag, storage_impervious_flag, Flag
	Points, boundary_array, Array:Double
	Pervious storage depth, storage_pervious, Double
	Pervious storage depth Flag, storage_pervious_flag, Flag
	Percent no storage, percent_no_storage, Double
	Percent no storage Flag, percent_no_storage_flag, Flag
	Routing, route_to, String
	Routing Flag, route_to_flag, Flag
	Infiltration model, infiltration, String
	Infiltration model Flag, infiltration_flag, Flag
	Percent routed, percent_routed, Double
	Percent routed Flag, percent_routed_flag, Flag
	Initial infiltration, initial_infiltration, Double
	Initial infiltration Flag, initial_infiltration_flag, Flag
	Limiting infiltration, limiting_infiltration, Double
	Limiting infiltration Flag, limiting_infiltration_flag, Flag
	Decay factor, decay_factor, Double
	Decay factor Flag, decay_factor_flag, Flag
	Initial abstraction factor, initial_abstraction_factor, Double
	Initial abstraction factor Flag, initial_abstraction_factor_flag, Flag
	Drying time, drying_time, Double
	Drying time Flag, drying_time_flag, Flag
	Maximum infiltration volume, max_infiltration_volume, Double
	Maximum infiltration volume Flag, max_infiltration_volume_flag, Flag
	Aquifer ID, aquifer_id, String
	Aquifer ID Flag, aquifer_id_flag, Flag
	Aquifer node ID, aquifer_node_id, String
	Aquifer node ID Flag, aquifer_node_id_flag, Flag
	Aquifer elevation, aquifer_elevation, Double
	Aquifer elevation Flag, aquifer_elevation_flag, Flag
	Aquifer Initial ground water elevation, aquifer_initial_groundwater, Double
	Aquifer Initial ground water elevation Flag, aquifer_initial_groundwater_flag, Flag
	Aquifer Initial ground water moisture content, aquifer_initial_moisture_content, Double
	Aquifer Initial ground water moisture content Flag, aquifer_initial_moisture_content_flag, Flag
	Elevation, elevation, Double
	Elevation Flag, elevation_flag, Flag
	Groundwater coefficient, groundwater_coefficient, Double
	Groundwater coefficient Flag, groundwater_coefficient_flag, Flag
	Groundwater exponent, groundwater_exponent, Double
	Groundwater exponent Flag, groundwater_exponent_flag, Flag
	Groundwater threshold, groundwater_threshold, Double
	Groundwater threshold Flag, groundwater_threshold_flag, Flag
	Initial moisture deficit, initial_moisture_deficit, Double
	Initial moisture deficit Flag, initial_moisture_deficit_flag, Flag
	Lateral groundwater flow equation, lateral_gwf_equation, String
	Lateral groundwater flow equation Flag, lateral_gwf_equation_flag, Flag
	Deep groundwater flow equation, deep_gwf_equation, String
	Deep groundwater flow equation Flag, deep_gwf_equation_flag, Flag
	Surface coefficient, surface_coefficient, Double
	Surface coefficient Flag, surface_coefficient_flag, Flag
	Surface depth, surface_depth, Double
	Surface depth Flag, surface_depth_flag, Flag
	Surface exponent, surface_exponent, Double
	Surface exponent Flag, surface_exponent_flag, Flag
	Surface groundwater coefficient, surface_groundwater_coefficient, Double
	Surface groundwater coefficient Flag, surface_groundwater_coefficient_flag, Flag
	Curve number, curve_number, Double
	Curve number Flag, curve_number_flag, Flag
	Average capillary suction, average_capillary_suction, Double
	Average capillary suction Flag, average_capillary_suction_flag, Flag
	Saturated hydraulic conductivity, saturated_hydraulic_conductivity, Double
	Saturated hydraulic conductivity Flag, saturated_hydraulic_conductivity_flag, Flag
	Initial abstraction type, initial_abstraction_type, String
	Initial abstraction type Flag, initial_abstraction_type_flag, Flag
	Runoff model type, runoff_model_type, String
	Runoff model type Flag, runoff_model_type_flag, Flag
	Shape factor, shape_factor, Double
	Shape factor Flag, shape_factor_flag, Flag
	Initial abstraction, initial_abstraction, Double
	Initial abstraction Flag, initial_abstraction_flag, Flag
	Time of concentration, time_of_concentration, Double
	Time of concentration Flag, time_of_concentration_flag, Flag
	Snow pack ID, snow_pack_id, String
	Snow pack ID Flag, snow_pack_id_flag, Flag
	Curb length, curb_length, Double
	Curb length Flag, curb_length_flag, Flag
	LID controls, suds_controls, WSStructure
		LIDS structure ID, id, String
		LIDS control ID, suds_structure, String
		Control type, control_type, String
		Area, area, Double
		Number of units, num_units, Long
		Area of subcatchment (%), area_subcatchment_pct, Double
		Unit surface width, unit_surface_width, Double
		Initial saturation (%), initial_saturation_pct, Double
		Impervious area treated (%), impervious_area_treated_pct, Double
		Outflow to, outflow_to, String
		Drain to subcatchment, drain_to_subcatchment, String
		Drain to node, drain_to_node, String
		Pervious area treated (%), pervious_area_treated_pct, Double
	LID controls Flag, suds_controls_flag, Flag
	Pervious surface roughness pattern, n_perv_pattern, String
	Pervious surface roughness pattern Flag, n_perv_pattern_flag, Flag
	Depression storage pattern, dstore_pattern, String
	Depression storage pattern Flag, dstore_pattern_flag, Flag
	Infiltration capacity pattern, infil_pattern, String
	Infiltration capacity pattern Flag, infil_pattern_flag, Flag
	Hyperlinks, hyperlinks, WSStructure
		Description, description, String
		URL, url, String
	Hyperlinks Flag, hyperlinks_flag, Flag
	Notes, notes, String
	Notes Flag, notes_flag, Flag
	User number 1, user_number_1, Double
	User number 1 Flag, user_number_1_flag, Flag
	User number 2, user_number_2, Double
	User number 2 Flag, user_number_2_flag, Flag
	User number 3, user_number_3, Double
	User number 3 Flag, user_number_3_flag, Flag
	User number 4, user_number_4, Double
	User number 4 Flag, user_number_4_flag, Flag
	User number 5, user_number_5, Double
	User number 5 Flag, user_number_5_flag, Flag
	User number 6, user_number_6, Double
	User number 6 Flag, user_number_6_flag, Flag
	User number 7, user_number_7, Double
	User number 7 Flag, user_number_7_flag, Flag
	User number 8, user_number_8, Double
	User number 8 Flag, user_number_8_flag, Flag
	User number 9, user_number_9, Double
	User number 9 Flag, user_number_9_flag, Flag
	User number 10, user_number_10, Double
	User number 10 Flag, user_number_10_flag, Flag
	User text 1, user_text_1, String
	User text 1 Flag, user_text_1_flag, Flag
	User text 2, user_text_2, String
	User text 2 Flag, user_text_2_flag, Flag
	User text 3, user_text_3, String
	User text 3 Flag, user_text_3_flag, Flag
	User text 4, user_text_4, String
	User text 4 Flag, user_text_4_flag, Flag
	User text 5, user_text_5, String
	User text 5 Flag, user_text_5_flag, Flag
	User text 6, user_text_6, String
	User text 6 Flag, user_text_6_flag, Flag
	User text 7, user_text_7, String
	User text 7 Flag, user_text_7_flag, Flag
	User text 8, user_text_8, String
	User text 8 Flag, user_text_8_flag, Flag
	User text 9, user_text_9, String
	User text 9 Flag, user_text_9_flag, Flag
	User text 10, user_text_10, String
	User text 10 Flag, user_text_10_flag, Flag        

Section 4: Readme.md file for the Ruby Code

# InfoWorks ICM Network Field List Printer applies to both SWMM and Infoworks Networks

This Ruby script prints the names of all fields for each table in an InfoWorks ICM model network.

## How it Works

The script operates in several steps:

1. **Table Iteration**: The script iterates over each table in the network.

2. **Field Collection and Printing**: For each table, the script iterates over each field. It prints the field name, and if the field's data type is 'WSStructure', it also prints the names of the subfields.

3. **Error Handling**: If a 'WSStructure' field does not have any subfields (i.e., `j.fields` is `nil`), the script prints "***badger***" to indicate a potential issue.

## Usage

To use this script, you need to have an active network in InfoWorks ICM. The script will automatically print the names of all fields for each table in the network.

```ruby
# Usage example
net = WSApplication.current_network
print_table_fields(net)
        
Section 5: Where do I find this code for ICM InfoWorks and SWMM Networks?

You can find the Ruby code for both the ICM InfoWorks and SWMM Networks from the InfoWorks ICM Technical Information Hub for InfoWorks and SWMM Networks in the subfolder 01 InfoWorks ICM\02 SQL\0032 - List Network Fields-Structure (SWMM or ICM)

Section 6: Copy of Ruby Code for SWMM and InfoWorks Networks in ICM - Short but Effective
##Lists Object descriptive name & Object table name, followed by Field descriptive name, 
#   Fieldname, & type, followed by blob attributes (where relevant).
on=WSApplication.current_network
on.tables.each do |i|
puts "****#{i.description}, #{i.name}"
	i.fields.each do |j|
	puts  "\t#{j.description}, #{j.name}, #{j.data_type}"
		if j.data_type=='WSStructure'
			if j.fields.nil?
			puts "\t\t***badger***"
			else
			j.fields.each do |bf|
		puts "\t\t#{bf.description}, #{bf.name}, #{bf.data_type}"
		end
		end
		end
	end
end        

Closing Note: Thank you so much for journeying with me through this content. This space is reserved for future updates and insights. Your engagement and time are truly appreciated. Until next time! You can also see my past articles on LinkedIn (91 in 2023).


Robert Dickinson

Autodesk Water Technologist for Storm Sewer and Flood | Expert in ICM InfoWorks/SWMM/Ruby | 18 Years at Innovyze/Autodesk | 51 Years with EPASWMM | Autodesk EBCS | SWMM5+

10 个月
回复
Robert Dickinson

Autodesk Water Technologist for Storm Sewer and Flood | Expert in ICM InfoWorks/SWMM/Ruby | 18 Years at Innovyze/Autodesk | 51 Years with EPASWMM | Autodesk EBCS | SWMM5+

10 个月
回复
Robert Dickinson

Autodesk Water Technologist for Storm Sewer and Flood | Expert in ICM InfoWorks/SWMM/Ruby | 18 Years at Innovyze/Autodesk | 51 Years with EPASWMM | Autodesk EBCS | SWMM5+

10 个月
回复
Robert Dickinson

Autodesk Water Technologist for Storm Sewer and Flood | Expert in ICM InfoWorks/SWMM/Ruby | 18 Years at Innovyze/Autodesk | 51 Years with EPASWMM | Autodesk EBCS | SWMM5+

10 个月
回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了