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.

Download script from Warehouse

Dynamo: Change Family Level Reference

12 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. Pingback: Vizualno programiranje kao pomoć projektiranju  - BIM Hrvatska

Leave a Reply

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