I have script that change tags - I could make more than 20 groups like this below and filter elements by BooleanMask with corresponding tag, but I would like to have one group like this with maybe a loop it around - how to do that? If only the node Element.SetParameterByName could take a list and not only a string, it would solve my problem, but it’s not.
It does - you just have to feed it one.
I believe you want longest lacing, and list levels @L2, @L1, and @L2.
Likely you want a group by key not a boolean mask as well.
Thank you for your answer, it was a great puzzle …but sadly I’ve tried everything I can think off and cannot figure it out.
I’ve used group by key. Also experiment with lacing.
When I have a list with Types Names as strings (python script just modified Rebar Shape Names by adding some string to match the Tag Name) - it doesn’t work, as I think it want “element” as input (number 1 on print screen below).
Then I tried Family.ByName - but it doesn’t work cause it’s a list of Family Names and not a Family Types (number 2 on print screen).
Next attempt was with FamilyTypes.ByName, but it only takes first and additionally on current view so it doesn’t work for me.
Finally I wanted to get Family Types from Family Names elements by using Element.GetParameterValueByName - but there’re no Type Names in parameters (number 3 on print screen).
Could you give me another hint to make it work?
To set a tag here by type you need to retrieve a family type (not family). Tags are always a type of the overall type family (even if only one type).
See below a method to retrieve by type name and family name. In the above case you have the family available, so would also need to query type name and use the different node. I believe this should then support the workflow you’re trying to achieve. You might need to set the lacing to @L1, nil and @L1 respectively to get the list to work across the list structures irrespectively.
Thank you for FamilyType.ByFamilyNameAndTypeName node - that’s what I need With automatic lacing everything looks fine, but I’ve started to learn about lacing on levels. Now it looks like this:
Do you think that I should do something with lacing in this case? - the result looks just fine.
If the result is there and what you want, why go another direction with it?
You’re right. I just thought that maybe in different scenario it can go wrong.
I mainly said levels might be needed as I was afk and couldn’t test if it would line up. Levels/sublists tend to be a bit of a case by case scenario I find, but it looks like parallel data structures can line up in these types of workflows. In this case, I’d say all good!