05 Sep

Dynamo: Copy values between Revit parameters

To copy values between different Revit parameters quickly, use Dynamo script. Let’s say that we entered information (parameters values) into many Revit family instances in our project just to realize that it should be on another place (in another parameter). Or we change our minds during the project (it happens).
So, in order to do the boring task of copying parameter values to another place quickly, let’s use the power of Dynamo.

The script is simple, it just uses Element.GetParameterValueByName and Element.SetParameterByName methods to get and set the values.
All you need to do is:

  1. Adjust selection method (example gets all instances of a category or select the elements manually),
  2. Type in the parameters names,
  3. Set if the parameters are type or instance,
  4. Run the script!

Make sure you are copying values of the same type. If not, make sure to cast into appropriate value type (integer, string, etc.)
Also, this script will not work on system families (see solution below).
Dynamo script for copying values between instace or type parameters in Revit family instances

 

For system families we will tweak the script a little bit:

Replace FamilyInstance.GetType node with two additional nodes: FamilyType.Name and FloorType.ByName (or WallType.ByName, or RoofType.ByName etc.)

Dynamo script that copies values between type and instance parameters in Revit System FamiliesDownload the scripts from the Warehouse

Dynamo: Copy Parameters Values

Additional tip: if you have multiple lacing going from one point, use Watch node as an intermediate knot holder.

Leave a Reply

Your email address will not be published. Required fields are marked *