Skip to content

Commit 32a1c94

Browse files
committed
WIP-FIX change cvs exporter input
1 parent 0e91325 commit 32a1c94

File tree

2 files changed

+334
-923
lines changed

2 files changed

+334
-923
lines changed

src/gh/components/DF_cvs_exporter/code.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CsvExporter(component):
1818
def RunScript(self,
1919
i_dump: bool,
2020
i_export_dir: str,
21-
i_values: System.Collections.Generic.IList[float]):
21+
i_results):
2222
"""
2323
The csv-exporter component exports a list of values to a .csv file
2424
@@ -33,17 +33,19 @@ def RunScript(self,
3333
# Define the CSV file path
3434
file_path = os.path.join(i_export_dir, 'exported_values.csv')
3535

36+
print(file_path)
37+
3638
# Write the values to the CSV file
3739
with open(file_path, mode='w', newline='') as file:
3840
writer = csv.writer(file)
39-
for value in i_values:
40-
writer.writerow([value])
41+
for list_of_values in i_results.distances:
42+
writer.writerow([list_of_values])
4143

4244

4345
if __name__ == "__main__":
4446
com = CsvExporter()
4547
o_cvs = com.RunScript(
4648
i_dump,
4749
i_export_dir,
48-
i_values
50+
i_results
4951
)

0 commit comments

Comments
 (0)