Same Script, different results

Hello Everybody,

I have a little issue on a script i did :

The purpose of the script is to get the dimensions of the sheet on a key schedule (actually it’s not really de dimensions but the “title block name” named after the dimension of the sheet).

Anyway, here is the script

GetSheetDimensionsOnSchedule.dyn (14.4 KB)

What the script should give me is this :
image
I didn’t touch any of the script and when i ran it again, bam! it gave me this :
image

So i start looking and thought it might be because of the lacing that was set on auto and that gives me this :
image
I changed it to shortest then it gave me back the right output.
I check with longest and crossed product, they all work…
then i try auto again and it gives me the bad output (logically) but then i try again with shortest and bam! Still gives me the bad output.
The only solution is to actually undo in Revit before i did the script with the auto lacing (that gave me the wrong output). Even if I close dynamo and reopen it and set the lacing to shortest or any other, it still will give me the wrong output.

So to sum it up :

Shortest, longest cross product = Right Output

Auto = Wrong Output

If i don’t undo in Revit before i try with another lacing, it will stick to the wrong output.

Bonus : When i created that script, it worked like a charm and was set on auto. (i’m pretty sure about it as i’m new on dynamo, so i don’t really think about lacing and never touch it).

So what did i do wrong?

Also i thought auto and shortest were pretty much the same ( what i read) but apparently not :

Shortest gives me 2 list : 1 of the sheet names and 1 of the Title block name
image

And the auto gives me a list for each sheet with the name and title block name in it
image

Thanks for your help!
Cheers