PyTuflow: Difference between revisions

Content deleted Content added
No edit summary
Line 142:
|''list'' Result Types
|-
|rowspan='1'|<b>[[#rlCount|rlCount]] ()</b>
|rowspan='1'|Returns the total number of Reporting Locations (of all geometry type) in the results
|''int'' Count
Line 1,275:
for result_type in result_types:
print(result_type)
else:
# did not load correctly, print error message to console
print(message)
</pre>
 
==rlCount==
<b>rlCount ()</b><br>
Returns the total number of Reporting Locations (of all geometry type) in the results<br>
;Parameters:
: -
;Returns:
: '''Count:''' ''int''
:: Number of RL objects
'''Example'''<br>
<pre>
import pytuflow as tu
 
# Initialise result class
res = tu.ResData()
 
# load .tpc result file
path = r'C:\TUFLOW\results\M04_5m_001.tpc'
err, message = res.load(path)
 
# check results were loaded successfully before calling function
if not err:
rl_count = res.rlCount()
# print to console
print('{0} RL objects in results.format(node_count))
else:
# did not load correctly, print error message to console