Create 3Dtext for several alignments create incorrect stationing

Hi
Keep struggle to learn Dynamo and my little project is to create a script that read all alignment in file and select their profile. After this I use @mzjensen node to create 3D text.
It works fine when I use “Select Aligment” node and only select one alignment (See script Station3DLabels_Select_Individual_Alignment.dyn)
but when I let the script select all alignments it create 3dtext but with wrong text as shown in picture below (See Station3DLabels_Select_all_Alignments.dyn) .
I actually can’t understand why and it makes me really frustrated.

TwoAlignments.dwg (3.1 MB)

Station3DLabels_Select_Individual_Alignment.dyn (198.1 KB)
Station3DLabels_Select_all_Alignments.dyn (193.9 KB)

Hi @patrick.ericson,

The problem is here. The last line in the code block is taking a list of two lists (one for each alignment/profile) and flattening it to a single list, so the original list structure is lost.

To get the list structure back to what it was, you can just chop it up again like this.

And then it will work correctly!

3 Likes

@mzjensen
OMG!! What are you made of? Must be some kind of god :wink:
Thank you very much.

No problem :+1: