Set New Wall Type Names

Hi All,
Using a basic Get.Parameter & Set.Parameter I am getting stuck. I thought I had the answer when I found some similar discussions and used the Element.SetName, but still having problems.

  1. First problem is, I can’t remove nulls from my list. As you can see, I have tried just about every node I can find, so obviously I am misunderstanding the problem because the Object.IsNull node reports false, when it should say “true”
  2. With the Null problem bogging me down, I ran the graph anyway and it didn’t work. So Something is wrong with my Element.SetName too. It’s not yellow, but nothing changes. I even tried the Element.SetParameterByName but that won’t work because I think I am getting the parameter name wrong.

Any help would be appreciated and thanks in advance!

Hi @Damo3
To answer:

  1. Try List.clean & set preserveIndices to be False
    That works in my test…

For Query #2, Sorry couldn’t follow the graph!! Can you explain what is to be achieved?
You are extracting the Type Mark from the Wall Type which is currently not assigned (then why extract it?)
You are getting the name of the Wall’s Type name & then using it where?

1 Like

I think this is what you are after…It was a bit hard to follow the graph to find out exactly what you are trying to do.

I have assumed that you are trying to add the Type Mark to the end of all of the walls that have a Type Mark and do nothing to the walls that don’t have a Type Mark?

Wall Type Mark added to Name.dyn (12.8 KB)

3 Likes

Sorry all, not sure why my image came out like that.
Hopefully this is better. Yes, Scott & Chand, your assumption is correct.
We have a list of wall types, had a request for the type marks to be visible in the type name, but I wasn’t going to do it manually, if I set this up, we can just press play.

Thanks Scott, I will attempt your graph and report back if I have problems.

Ok, first off, thanks to those who had a crack at this when I sent a poor image to work from, really appreciate it.
So, there is bad news, good news & what I thought was funny news.
The bad news was, Chand / Scott, I couldn’t get your suggestions to work. Well, scott, your graph worked by renaming the walls, but when I checked, the names weren’t actually corresponding with the Type Mark values. Reason being, the list.clean changes the list and then jumbles up the lists so they no longer match.
The good news was I did solve the issue, by taking some of mine and some of scott’s (mostly scott’s) and this is the final:

The funny news is the answer was staring me in the face. I don’t even have to remove the null values. You’ll notice that once the lists are combined, they output null, however once you pass these through the Element.SetName node, those with null values are ignored. I triple checked and the names match the type marks. Thank you Clockwork!

Thanks again everyone.

1 Like

@Chandrasekar_Rajaman,

Thanks for your response, to answer your question about the why, some walls won’t be scheduled due to some creative modelling techniques by the team (story for another day). We are leaving the Type Mark blank on these wall types, but the rest of the walls will get a value. I was extracting the blank or null values so the list outputs would align. To be honest, I came across the final graph when I conceded to having the word “null” in brackets. That’s when I discovered the Element.SetName node ignoring “null”.

Hi @Damo3
To be honest, the image was not an issue; it was clear.
The nodes were too loosely placed - so the flow of info was not actually clear.

Yeah - If the indices weren’t preserved, the whole thing would be jumbled up!
Thanks for sharing your findings & also the final working graph! :+1:

1 Like

@Chandrasekar_Rajaman,
ah, I thought it was because the image went black over the wires when i checked it. thanks for the feedback.
Speaking of findings, I thought I would share one more discovery since these nodes appeared in my original graph:
I am referring to the archi-lab String from List node. If you use this to combine your lists instead of scott’s demo of a code block, the results change:


Notice “null” is written in the name now? I can only assume this is due to the String from Object node being used? That’s just a guess, but if someone else has a better explanation, let me know.

@Damo3
The image going balck with “invisible wires” scared me too before!
But it is a like a preview & actually if the image is downloaded (using the link below the preview), then it’s clean.
Just FYI

1 Like

I like this discussion but I’m running into a potential glitch in the clockwork node for Element.SetName: All items return as false. What would prevent this node from working? Is there a version issue when running on top of Revit 2018 with Dynamo 1.3.1?

I think you are feeding in instances (3754 items) instead of types

Inputs are elements and names: List of wall elements, list of intended names. Are you saying that the elements input should be types of walls instead of walls themselves?

1 Like

Derp. That was it! Thanks for correcting me! I appreciate the help!

1 Like