13 Feb

Change Revit® family level reference without moving elements

Changing reference level of Revit family instance can be painful, especially if you do not want to move an element, just change the reference.

For particular object it’s not a big deal, just calculate the offset value, change the level and enter new offset value, the object will go to the same place it were.

But, what if we have several, if not hundreds of such objects. On different heights (offsets) and referenced to different levels? That could take some time to adjust (re-reference). And it’s prone to errors.

Even worst case is with conduits, pipes, cable trays, ducts and similar objects which have point objects (fittings), and linear objects (ducts, pipes etc.) with or without a slope. Re-referencing of such instances is a nightmare. Forget about copy/cut and pasting “aligned to same place/level” it will not work.

So, to make long story short. Use Dynamo script to re-reference selected objects. I created this script which works the following way:

  • Select objects (instances) you want to re-reference and keep in the same place.
  • From list of existing levels in the project, choose a new reference level for the selection to be re-reference to.
  • Script reads current (apsolute) x,y,z coordinates of each object from selection.
  • Script looks into selection and tries to find paremeters “Level” or “Reference Level” (of course, there are “Base Constraint Level”, “Host” and other referencing parameters, so that’s the limitation, it will work on most common uses).
  • Script sets these parameters to the new level.
  • Script writes previous (apsolute) x,y,z coordinates to each object from selection.

You can also see the video on how to use it:

Download script from Warehouse

Dynamo: Change Family Level Reference

30 thoughts on “Change Revit® family level reference without moving elements

  1. Trying to get this to work for pipe with fittings. I am getting an error at the Element.SetParameterByName. Its telling me the “Level” Parameter is read only. All but one fittings reassociated to the correct level. I feel like this has something to do with the multiple Level parameters revit uses but Im not sure how to solve it.

    • Hi Tyler,
      thank you for your comment.
      General problem is in fact that Revit uses several different parameter names for basically the same thing, for example: “Level” and “Reference Level”. And sometimes such parameter can be read only (for hosted elements for example).

      Since I don’t have your model I can only guess that you had in your selection something more than just pipes and pipe fittings.
      You should use this script with portions of the model not the whole model at once, I suggest that you isolate in view or use filter to get only Pipes and Pipe fittings categories, and then change reference level for them.
      Please let me know if this worked for you!

  2. Hello Mirko,

    I am trying to use this for my structural model. I have floors, stuctural columns, foundations, and walls that I would like re-associated to another level but to remain in the current position. I was hoping this script would help, however it does not work for walls or columns and for foundations and slabs it would change the level but the offset would remain the same resulting in the element moving.

    Do you have any advice?

    • Hi!
      I am sure that script won’t work for those elements since script is looking for element’s location (like a point or a line), and those elements have more complex positioning system.

      I completely understand what you want to achieve, since I tried the same few times myself, but I don’t have a solution for that right now, except to select elements of each category, change reference level, then drag it or move to previous position.

  3. Hi Mirko,
    script works well, but seems that it creates a placeholder mesh with line (axis of pipework) and point for fitting (elbows). How can i hide or remove the lines and points?
    many thanks

    • Hi, I assume you are referring to the Dynamo’s temporary (blue) objects. Do not worry about that, they are not real. Yeah, they are temporary only to the current Revit session. If you, for example, close the file (model) and open it again, they will not be there anymore.
      I don’t know if there is other way to turn them off.

  4. Hi Mirko,
    how can i get rid of lines and points it creates for ductwork cable trays and pipework

  5. Pingback: Vizualno programiranje kao pomoć projektiranju  - BIM Hrvatska

  6. is perfect for MEP host component without do the reworks..Thanks Mirko we wanna see more on dynamo

  7. Pingback: Revit Tips & Tricks #2 - engipedia

  8. Pingback: Revit trikovi #2 - engipedia

  9. Hello Mr. Mirko, i got a problem when finished create new column family. After load that family, base level it no same as lower reference? how to get rid this problem? thank you

    • Hi,
      it’s hard to tell without looking at it. Maybe you are placing it on top of structural foundation, in which case Revit will move it above the foundation.
      If you want, send me the family so I can take a look. Contact emails are on the contact page: https://www.engipedia.com/contact/

  10. Hi
    I don’t find the node “Move Element to Level”. Have I an old version (1.3.4.666 for Revit 2019) or have I to download some package? Thank’s!

    • Hi Stefano, sorry if it’s uncler, this is basic Dynamo “Level” node, which I just renamed to “Move Element to Level”.

  11. Hi,
    Fyi: Changing pipe fittings and pipe reference levels no longer move elements from Revit 2021 onward. It might also be so on Revit 2020, but this is not yet confirmed.

    • Hi Pieter, I looked into it on Revit 2020, 2021, 2022 and I don’t have any issues. The script works fine.
      Are you running the script from Dynamo or via Dynamo Player? You should run it from Dynamo.
      Also, try selecting just the pipes and pipe fittings and run the script. As in description, the elements should not move, they will stay in the same place but their reference level will be changed.

  12. Mirko, I wanted to thank you and to let you know that your script helped me immensely. It saved me a ton of time and pain. I really appreciate your work and time. Thank you

  13. Hi Mirko, Can this script be used to replace the “schedule level” or “host” parameter value. The those values are grayed out for the family I would like to reassociate to a different level.

  14. Hey, thank you for such a helpful video. Is this possible for changing the host of multiple elements without changing the location? Also, is it possible to change it from “not associated” to say a reference plane?

    • Hm, I would say no, not with this script.
      But, if you are changing hosts for multiple family instances, and you want them to stay on the same place:
      1. Select the instances,
      2. Cut them (Ctrl+X),
      3. Move or remove the host(s) (delete host for example),
      4. Paste “Aligned to the same place”.
      The instances will pick new hosts if they are there. I often use this trick with doors/windows for example.

      “Not associated” is tricky, if an element needs a new host (reference plane), how to place an element (where exactly to place an element) since reference plane is infinite? And is not always horizontal like level. This is not trivial action if you do it even manually (if reference plane is slanted for example).

Leave a Reply

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