I’m placing families with Dynamo. The next step is to duplicate these placed elements and give every instance a new name.
The script I made places lettels in linked elements. Now I would like to duplicate every instance and rename it. I think it’s possible to start the duplicate at the FamilyInstance.ByLine node?
I’d start at the nodes right before that, and use a List.OfDuplicateItems to duplicate the list of lines you used to create the first instance. Set your list levels and lacing (@L2 for the lines and longest lacing if I am not mistaken) and see if that gets instances atop instances. You may want to use a different family type as well, in which case build a list there and use @L1 (might be wrong here so test it out) for that input for the FamilyInstances.ByLine node.
Duplicate all the inputs into the node which created the family instances.
This will not only give you the duplicate elements but make your graph faster due to less ‘trips to the well’. What I mean by that is it reduces the number of interactions with the Revit model, to only creating things once, rather than creating things, getting things, then creating things a second time.
So, this is the node that I’m using to create the family instances. What should I do from here on?
Error is saying: Warning: List.OfRepeatedItem expects argument type(s) (var…, int), but was called with (archilab.Revit.Elements.FamilyInstances, string).
you want two families - the one you were already placing and a second one, so it follows that you’d use 2 as the numerical input (0 returns an empty list, and 1 returns the list as it is with an extra list level if I’m not mistaken).
Hmm I’m trying to duplicate the existing family that is placed. Do you think you get that? Because I think it will place two families at at the same place.
To confirm: you have a graph that places a family, then you want another copy of the family with a new name in the exact same spot.
Do you want a new family type or is there an instance parameter? If the later than Element.SetParameterByName after your FamilyInstances are created should work. If the former than duplicate your type first, set the parameter values, then feed a list of both types when you create the instances.
Please post a workable rvt and your current dyn with your next reply so we can be on the same page.