File.WriteText, Export a file in .txt in multiple lines

python
dynamo

#1

Hi everyone,
Does Someone know the reason why even though I watch the string organized in stripe then they appear in a single line ?

In other words, I want the following result:
Query 1 (true)
Query 2(false)

Query 6 (true)

and NOT :
Query 1 (true) Query 2(false)…Query6(true)

Thank you for your help in the resolution of this matter


#2

@adammacco What is your end goal?


#3

you must include newline symbols in your string, try using string.join with something like \n
http://dictionary.dynamobim.com/#/Core/String/Action/Join

writing to a csv might be simpler though.


#4

CSV is easiest if you want to use ootb nodes. Otherwise you’ll have to use File.WriteText+ from BattleBIM.


#5

@adammacco it also depends on your initial data:

You could try this if you have a list:

image