List compare if statement to map desc to new layer

Hi Guys,

Does any one have a sample that tests a list or if list 1 = certain name, then make new layer from list 2 .
I tried many samples but just don’t see how to test one valve to another in a list and get result.
these lists are kicking my ##.
It much like a layer merge or translate, that’s what I’m trying to do.

Thank you

Layer from list1 map to list2 .dyn (30.5 KB)
layer list 1 and layer list 2.xlsx (9.6 KB)

Hi @jcoon,

A simple, yet elegant solution would be to use some nodes from the Clockwork Package:

First you would need to replace all the values with “0” in your original list if they do not occur in your specified search strings, for this I suggest using the List.ReplaceItemsAtIndex+ node from the Clockwork Package with some filtering in front.

After that use the String.ReplaceMultiple to replace each string by it’s corresponding new (layer) name:

PS: Next time please add some screenshots :slight_smile:

2021-12-21 ReplaceMultipleStrings.dyn (26.3 KB)

1 Like

Daan,

Thank you. Still very new at this. So I’ll need to download the Clockwork.

This was to be a test for a must larger list that would insert block references based on the descriptions
in the spreadsheet, and place a block on the new layer. I just couldn’t see how to test for the text values. This looks great. I never would looked outside the civil package. If this was vb I’d be able to do it, but this dynamo is a whole new beast.

Thank you.

I get and error unresolved on list.anyFalse, but it appears that it’s not uninstalling the older package yet.
I get the same thing with civil, not sure why.

will test as soon as I get resolved

Thank you