Create wall section with dynamo

Hello everyone !

I’m trying to create a section view of a selected wall but whatever the solution i try it doesn’t work or doesn’t work as expected.
here is what i tried until now :

  • i found this one on a similar topic but it doesn’t seem to work because of this part :
    image
    it tells me “The ‘Flatten’ method has been aborted, use the ‘DSCore.List.Flatten’ method instead
    List.Flatten the operation failed.” and i have absolutely no clue of how to fix it.

  • i tried using these nodes :


    but none of them works as i expected : the localCoordinateSystem node doesn’ t give me the X and Y vector that i need to use the Create Element View node, whenever i use the bounding box the view is created but it doesn’t give me the expected view (like it gives me a view of the wall from the top), and i can’t figure how to make the node New Section Box View By Element as i expect it to work.

Do you have any ideas of how i can do this ?
Many thanks in advance !

PS : i’m using dynamo and revit for my internship so i’m very new to this

Since 2.0 the Flatten method was removed and the Flatten by amount remains. To completely Flatten a List you need to use something like this in your design script now:
DSCore.List.Flatten(listvariablehere, -1);

Thank you for your answers !
after changing the Flatten to DSCore.List.Flatten i got a new error : “suppression of the reference of a non-pointer element”

Also, @m.rijsmus because of the issue with the node Element.LocalCoordinateSystem i don’t even have an X, Y and Z vector so my Section can’t be created
image
(i followed the instructions on the link you gave me)

Did you include the additional argument in the new Flatten method?

i did ! but maybe it’s because of the viewPlane.Intersect but i don’t know why

Post your graph and I’ll try and have a look between AU stuff

hello !
2 things :


the first is that i don’t understand why most of my walls (3012 out of 3017) are considered as invalid elements by the LocalCoordinateSystem node



the second thing is this one, i have my wall with it’s parameters but the first code block returns nothing and that may be the main problem (and problem the same case as for the LocalCoordinateSystem node

do you have an idea of what can be the issue ?
thank you in advance !