Widths and sum of Widths in same column

Hi there.

Bare in mind that I’m very new to Dynamo.
Im trying to combine a list of witdhs with a list of the summed widths but I’m just not clever enough to make it work.
This is my script after many hours on this forum and youtube:

This is the curent output to Excel:
Skærmbillede 2023-03-09 183051

I would like theese summed numbers to be added under the widths list.

And I would like for it to look like this. option 2 is better than option1.
Skærmbillede 2023-03-09 183746

Hope you can help.
Thanks.

@kasper try it like this:

@Elie.Trad
Thanks a bunch Elie, that did the job. I just had to flatten the list instead of transpose, then it worked.

Here is the final result if anyboby is curious.

Followup question @Elie.Trad
Can I remove the dublicate name in the script?.
Now it comes out in excel as eks. 1 and I would like it to look like eks. 2.

Hello,
here are 2 similar approaches to clipping your lists


code block:
x[1..DSCore.List.Count(x)-1]

Python script:

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

OUT = IN[0][:1] + ["" for i in range(len(IN[0])-1)]

Cordially
christian.stan

Hello,
Thanks for the empty list tip for the line break :wink:
Cordially
christian.stan

@kasper check the Unique Items node

Hi @christian.stan and thanks for replying.
I’ve tried your Python Script but it doesn’t seem to work in my case.

Here’s the .dyn file if you wanna take a look
Manage-WallStylesLayersExport.dyn (128.3 KB)

Thanks alot.
Kasper

Hi, flute, it comes from the depth of the list, I’m not strong enough to do it from the phone (a loop will have to be added, I think)
i’m doing tonight
i’m on the go
Sorry
Cordially
christian.stan

@christian.stan No worries. It’s just a fun project for me at the moment. I really appreciate the time you put into it,

The Code Block trick didn’t work for me either unfortunately

Hi,
I think I have succeeded, but it is not optimized, and to progress it is not a model of its kind

The script just in case:

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
cont=[]
cont2=[]
for j in range(len(IN[0][0])):
    a=IN[0][0][j][:1] + ["" for i in range(len(IN[0][0][j])-1)]
    cont.append(a)
cont2.append(cont)
cont2.extend(IN[0][1::])
OUT = cont2

Have a good evening
Cordially
christian.stan

You are an absolute wizard @christian.stan. :smiley: It works perfect.

Now maybe for the final question for this script. Any idea why I cant convert the data to Bumbelbee Write Excel?

Thanks alot.
Kasper

Hi @kasper …does it work if you flattern or list map your list as here before input bb data…and be sure excel is closed when you run