Creating roof with curves those are created completely in dynamo!

hi !

my question is how can i use the curves those are created in dynamo (not selected from revit by select model element) as Outline input of Roof.ByOutlineTypeAndLevel node? it returned this error for me :

I managed to solve this problem with this solution and I also want to share this with you :