I have some problems about generating more than one instance elements.
I have 3 distinct instance "input" elements in my model. I want to generate a file and put all instance element's name in it. For example:

Sample.txt:

input1
input2
input3

Unfortunally I see only one of them in my generated files with these codes:

you have the file within the foreachs (the partial template you posted indicates that)
=>
you will call the file foreach output

=> it will not work

you have as i said (3) options

(1) restructure the templates to take a main (root of your dsl) as generation root
(you might have to trick cause it does not have a name - but the solution for that is described 1000 times in the forum - you wíll see if you google for the errror message)