PyTuflow: Difference between revisions

Content deleted Content added
No edit summary
Line 150:
|''int'' Count
|-
|rowspan='1'|<b>[[#rlNames|rlNames]] ()</b>
|rowspan='1'|Returns a list of all the Reporting Location names
|''list'' RL ID
Line 1,239:
# check results were loaded successfully before calling function
if not err:
po_names = res.nodespoNames()
# print to console
print('PO Names:)
Line 1,333:
# print to console
print('{0} RL Line objects in results.format(node_line_count))
else:
# did not load correctly, print error message to console
print(message)
</pre>
 
==rlNames==
<b>rlNames ()</b><br>
Returns a list of all the Reporting Location names<br>
;Parameters:
: -
;Returns:
: '''Out:''' ''list''
:: List of all RL names in results e.g. ['Reporting_Loc_1', 'Reporting_Loc_2', 'Reporting_Loc_3']
'''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_names = res.rlNames()
# print to console
print('RL Names:)
for rl_name in rl_names:
print(rl_name)
else:
# did not load correctly, print error message to console