ras¶
Cached lookup of installed HEC-RAS versions and their COM ProgIDs.
- rivia.controller.ras.installed_ras_directory(version)[source]¶
Return the installation directory for the given HEC-RAS version.
- Parameters:
version (str or int) – HEC-RAS version string (e.g.
"6.3") or integer code (e.g.6030).- Returns:
Absolute path to the HEC-RAS installation folder, or
Nonewhen the registry entry has no location recorded.- Return type:
str or None
- Raises:
RuntimeError – If the requested HEC-RAS version is not found in the registry.
- rivia.controller.ras.installed_ras_display_name(version)[source]¶
Return the Windows display name for the given HEC-RAS version.
- Parameters:
version (str or int) – HEC-RAS version string (e.g.
"6.3") or integer code (e.g.6030).- Returns:
Display name as recorded in the Windows registry (e.g.
"HEC-RAS 6.3"), orNonewhen the registry entry has no name.- Return type:
str or None
- Raises:
RuntimeError – If the requested HEC-RAS version is not found in the registry.
- rivia.controller.ras.installed_ras_progid(version)[source]¶
Return (version_xxxx, progids) for the requested HEC-RAS version.
- Parameters:
version (
str|int) – Any format accepted by ras_registry_xxx (e.g. “6.4.1”, 641, “RAS63”).- Return type:
- Returns:
version_xxxx – Numeric version code (e.g. 6410).
progids – Dict with keys “controller”, “geometry”, “flow”. Each value is the COM ProgID string if registered, otherwise None.
- Raises:
RuntimeError – If the requested version is not found in the installed HEC-RAS entries.