I have used two different listing options, as for some reason, the way it works from ‘List.Join’ and ‘List Create’ is different. If you look, the “PL” does not change with the ‘List Create’ but does with ‘List.Join’ (index 2, 9, 12, 13). I imagine its due to the way the data is handled.
Always a good idea to try a few variations to be sure i guess
Hello @ben.dowling, I tried to follow your advice.
It works, but not the way I want.
In fact, it keeps the family name adding the suffix, and it doesn’t do the substitution with a new name, as I need.
I think the previous script that @AmolShah posted was good for my case. Now I just need to adapt it to a multiple choose (at the place of the boolean which gives a limited choose to two values).
Sorry to hear it didn’t work. Having had another look at your previous image, you have your nodes set to shortest lacing. Change them back to Auto. That might resolve the issue.
I have rebuilt the set up on my end and works perfectly. See below:
Oh
thank you @ben.dowling, this is very nice from you!
I tried it!
Unfortunately, I have still problems
The old family name, the whole name, after launching the script, stays there. (see the picture below)
And this is not what I want.
I would like from the formula to rename the family, creating a new family name beginning from zero.
And I would like that Revit forget about the old family name.
Of course!!!
This is the file,
it works , but when I launch that, Revit keeps in the project browser the original name instead of substitute it completely.
(It adds the new name to the old name creating a combination of both, that is not exactly what I want)
I hope you can figure it out from my dyn file!
This works perfectly!!
Now I have to solve this problem : there is some elements that have been duplicated.
Revit still accept the duplicated name, but I want to differentiate their name.
SO I would like to set a number at the end ( follow an order 1,2,3)
do for example I would like to do this:
Instead of
FF-MUR-BB-300 (x3)
I will have:
FF-MUR-BB-300
FF-MUR-BB-300-1
FF-MUR-BB-300-2
I can see the duplicate families but I can’t add the increasing number at the end.
Does somebody know how to do it?
also, what is very strange is that I can have what I want in Dynamo but not in revit Browser.
The image shows that when I invert the order of the links within the nodes in “Element.SetName” (which is basically incorrect I think, though it works ), dynamo create a list with the good values.
However the new names don’t show up in the family name browser…
SO I would like to set a number at the end ( follow an order 1,2,3)
do for example I would like to do this:
Instead of
FF-MUR-BB-300 (x3)
I will have:
FF-MUR-BB-300
FF-MUR-BB-300-1
FF-MUR-BB-300-2
It’s giving you 1,2,… because you asked for it earlier.
However, you can get the 01,02,… using the nodes in the blue box.
Also, I highly recommend that you watch/read few tutorials to get better understanding about the nodes and working of Dynamo.
Hello @AmolShah, you’re right the List.Create was not the good choose.
However , when I use List.Flatten, it gives error.
Thank you for your suggestion, I think I need to study more about Dynamo.
I’m trying to do something which is complicated for me, but necessary for the project.
Thanks to yours and the other’s answer I hope I will able to do something that it is not easy for my current level!