I’m a total novice at Dynamo but I think what I want to do must be super simple. I want to number my beams by the Mark parameter, which of course is of the the structural framing category. I only want to number beams and not headers, rafters, joists, etc. so I am assuming that I would use the Assembly Code field to number only the beams. I would also like to label my headers similarly but with a Type Mark. Beams would have a “B” prefix and Headers would have and “H” prefix.
This can be done with Dynamo.
This would be a good problem (case) to start learning Dynamo.
Try put something together first. And then, if you have any questions, post them here.
People won’t do the work for you (in other words; make the graph)
.
But I want someone to do it for me. Lol, kidding. I have a script that works (kind of) for Type Marks, this is one that I made for renumbering windows a while back and used as a starting point for the beams. If I simply type “Mark” in the code block, it breaks the script. I also have no idea how to filter all the elements that I don’t want to renumber. I also tried to change the prefix in the code block in front of list create to numbers instead of letters and that broke the script too. My biggest challenge is that I don’t understand the logic necessarily of what I’m trying to do.
I need to so more of the graph (the output) of all the nodes.
Also; are your lists of equal length?
(Not allways necessary though)
If I simply type “Mark” in the code block, it breaks the script.
You’d also need to remove the Element.ElementType node so you’re getting element instances rather than element types.
I also have no idea how to filter all the elements that I don’t want to renumber
Totally depends how you’ve got things set up. How organised are your family/type names? You could get the family type, get the family, get its name, see if that string starts with or contain “Beam” (or “UB” or whatever) then filter those. Just check for any unintended results, you may have to filter further elements in/out.
I also tried to change the prefix in the code block in front of list create to numbers instead of letters and that broke the script too
You’ll probably have to make the numbers then convert them to strings as the mark/type mark parameters expect a string input.
For starters. Pretty sure you don’t need the Create List and List.Flatten node after the code block (that is already a list).
Look into BooleanMask and GroupByKeys nodes.
That might get you started.
I was just coming back to reply to you and post this screenshot in which I actually disconnected those but left them in case I needed them for some reason. Here is what it looks like now and I renumbering A-Z. I just need to get B1, B2, B3, etc working. If I can get that and filter by assembly code, it should be what I’m looking for. I will look into the BooleanMask and groupByKeyes nodes.
So you want, in example, B1 to B26 instead of A to Z?
Yes, that’s correct. I will have a different family that I will just use as headers and those will be H1, H2, H3, etc. Perhaps duplicate and modify this script to achieve that?
Replace the text in the node with”A”…”Z” with this;
“B”+1…n…1;
Wire the List.UniqueItems into the (a) List.Count node. Wire the List.Count node into the Code Block node (which now should have an input n).
The “B” can also be a variable (which you can get from the Assembly Code parameter).
Put the sequence in parentheses.
"B"+(1..n);
You need to feed that Code Block into Value and the list with your beams should stay wired into Elements.
Unsure if the output of the List.Count needs to be converted too a string or integer first too.
PS
I am doing this from a mobile phone, so i am a bit struggling
.If i was on a PC i would have made a screenshot.
I’m having a heck of a time trying to figure out how to renumber just beams (Or just a group of structural framing members), if anybody could please point me in the direction. I’ve been doing some research on the BooleanMask and GroupByKeys nodes suggested by @bvs1982 but I so far have not been able to get anything to work. I very much appreciate the help so far, it’s driving me nuts that I can’t figure out this last little bit.
You’ve already got all structural framing elements, and you want to filter by the “Assembly Code” parameter.
That’s a type parameter, so you need to get the type of all of those elements. Either Element.ElementTypes or GetParameterValueByName “Type” will work here. Now you’ve got the type, you want to get the Assembly Code parameter, so GetParameterValueByName is what you want. You could then use String.StartsWith and look for “B”. Now you’ve got a list of true/false that you can feed into a FilterByBooleanMask node.






