List managment... again

Hi all,

I am having troubles with some list management.

See attached: I am reading some parameters in a certain exact order (red box). Then I need to maintain the same list structure, because these values will be fed into one string for each element whose parameters are listed in the red box (I am simply reading windows parameters and writing a type name for the element, based on its parameters).

The problem is that I need to process “Element.Type” and “Double”, but keep them in the same list structure… I have developed a way to process both data separately (getting the strings I need, like “FH” and “24”), but I need them in the same list structure, and keeping the same original order…

I hope this is clear enough, my head hurts, I need to stop working on this…

Thank you so much…

Thenks, but that is not quite what I need to do.

I had it partially work, but now Dynamo its crashing… I think it is the “” node that is producing an error…

See attached graph.

So, on the left a partial list of the parameters I am reading from the windows types.

The two list in the center right show you what I need to put together, string for the family types (yes, I am reading parameters which are Family Types names, like Labels in the family editor), and numbers for the lengths.

I just cant process them together…

The graph reads the type names and extracts the first letter of the last word. So, “One Panel Fixed” would be “Fixed” = “F”.

However, when I ask for the value of the parameter, Dynamo returns the name of the type, and then the name of the family, so this does not work…

So I am using FamilyType.Name, which gives me the name of the type, but it produces an error, and I think its crashing Dynamo now…


This is all free work, of course: I can’t charge the client thousands $$$ for a script that puts together 3 characters and 2 numbers in a string, its ridiculous…


this is the final (really?) product. It appears to be working.

I removed all Dynamo cores, and re-installed, no more crashes.

I am posting it to share, and because I am sure it is such a mess that people will be horrified, and show me how it could have been done using half the nodes… :frowning:

Again, the script finds all the types of the selected windows, reads their parameters (width, height, and other custom parameters) and it composes the proper name for the type itself.

It took me almost a week, part time…

Thank you



very specific question: how to add a dash in the final string of this graph… It works as is, but I need a dash where indicated, see screenshot, and can’t really figure it out…

thank you!

can you try a code block where your string.join node is.
in the code block type a+b

Seems like a lot of back and fourth to achieve the family type name?


Thank you guys…

I think I am getting closer.

Can anyone telling me what is going on with replacing at bi-dimensional indexes?
Why index -1 is replacing a value at index 4??

thank you


That node doesn’t use negative indexes, as the error will show you. So it returns a nullnegativeindexerror

I should have been more clear, the node List.GetItemAtIndex does not take negative indices, but a codeblock will:

Okay, so the -1 index does nothing and the result is the last item of the list? In my case it replaces the last item with the Null?

So how do I pass along the list which have no changes (red arrow) without any modification, that is, it needs to keep the “H”…?

In other words, I need to replace the item with indexes 10 (in the example) but other sub-lists without indexes (null) need to go though unchanged…

The green arrow works as I need it…

Thank you!

Sorry for the late reply, I never got a notification. I think this is what you want:

The top group shows how to do using if statement in a codeblock and the bottom is using nodes if it makes it easier for you.

Note the lacing on the List.GetItemAtIndex and List.ReplaceItemAtIndex is set to longest. I am using Dynamo 2.0 so not sure how it works on earlier versions.

Basically since the negative value cannot be used as the index, I used an if statement to determine if the index is negative and then a count - 1 to find the last item.

If you are using more negative values than -1, you can set the code from List.Count(j<1>)-1 to List.Count(j<1>)+x and connect the index list to the x input.