By installing ArcGIS Pro and InfoWater Pro, your machine is equipped to access multiple python packages to perform analysis and results sharing.
The easiest way to begin running Python as an InfoWater Pro user is to create a Python Notebook within ArcGIS Pro. You can create Python notebooks from the Analysis tab and begin scripting alongside the model.
Python notebooks can be saved and shared between projects as .ipynb files. The ArcGIS Pro Catalog provides support for loading .ipynb files and managing their metadata associated with the project.
Refer to ESRI's documentation on Python notebooks for additional information.
To get started reading InfoWater Pro results, you will need to import the Manager class and call it on an output file path to instantiate an output object for scripting.
Here is a simple example to import the class and call it on an output file. A new output manager object called "outman" is created for the specified model output data with all of the behaviors inherited from the class. The script can then call any of the available methods to extract results.
>>> from infowater.output.manager import Manager
>>> outman = Manager("C:\\Users\\Public\\Documents\\InfoWater Pro\\Examples\\Net1.OUT\\SCENARIO\\BASE\\HYDQUA.OUT")
>>> outman.get_range_data("Junction","Pressure","Avg")
[288.8804931640625, 276.3491516113281, 276.96966552734375, 280.3660888671875, 276.39874267578125, 279.9580078125, 284.6310729980469, 272.4742736816406, 261.0697937011719]
The following example dumps the metadata into json format for easy viewing:
>>> import json >>> metadata = outman.get_metadata() >>> print(json.dumps(vars(metadata), indent=4))
The Autodesk customer success team maintain a library of sample scripts on GitHub where users are welcome to find ideas and borrow code. Everyone is encouraged to join the community, ask questions, and submit ideas and improvements.
https://github.com/innovyze/Open-Source-Support
Sample .IPYNB files can be downloaded, added to your model project through the Catalog, and adapted to suit your needs.