How Replace Empty list?

Hello freind. How can Replace Empty list with another list in dynamo?

Pretty sure there is ReplaceItemAtIndex node.

1 Like

yeah guess clockwork and archilabe have nodes for that could probably help

image

I do it but return null

:point_up:that

The node from Archilab works for me.

NB
I was in 2023. You are in 2022 i guess.

Thanx. I do but emply still is hear

image

That’s because your list levels need adjusting.

It works without the Levels :smile:.

He wired the wrong node / List in to replacement.
I didn’t notice that at first :see_no_evil:.

1 Like

Too early in the morning. :rofl:

Was thinking you could probably do it with design script too…

Something like this… but my designscript absolutely sucks and I can’t make it work. :laughing:

I guess we need @Vikram_Subbaiah for that :face_with_hand_over_mouth:.

1 Like

Super easy with Python tho:

1 Like

and an alternative way maybe :wink:

1 Like

I have problem hear

The indents are important in Python.
Use the Tab key or use 4 spaces.

Each indent must be the same. So either use tabs or 4 spaces.

Thanx a lot its work

1 Like

Actualy I want to use this script for list beleow but it still is empty

You’d have to use nested loops for that… or maybe some recursive function.

With your particular problem I’d suggest you use a ready made node because you can set the list levels easily.

1 Like

@f.saeedian
Out of curiosity. Why use Python and not the nodes?
Do you know what you did wrong in your original graph?

1 Like