Dynamo - to relocate placed family in revit file

Hello, is there any scenario of Dynamo which can move instances (e.g. pile caps) to a certain location (with exact XYZ data)?

The problem I’m facing is I have a project file of pile caps (previously designed) and have to update them with the latest design (e.g. to modify the coordinates of those pile caps).

I was trying to solve this using Dynamo but failed: I found that there is no such actions under “Element” that are like “Geometry.Translate”, “Geometry.Rotate”.

So here comes my above question.

Appreciated if any one knows it!!


Hi Ocean,

I don’t believe there is an easy method to translate existing Revit Geometry (someone correct if i’m wrong).

What I would do is, delete the current Pile Caps in the project and use the XYZ point data to place new instances of the Pile Caps at its desired location. To do this you would use the node ‘FamilyInstance.ByPoint’ this will enable you to place the ‘pile caps’ at the location of an XYZ point. Keep in mind, when placing a family this way, the point of insertion is based on the family’s origin.



1 Like

Hi Danny,

Thanks! My idea goes to the same.

But the concern is I can’t make the elements carry any information provided by the user (see parameter “mark”, “comments”,etc.) because every time I re-create the family the information would be wiped out.

Also, when the dynamo-created model being transmitted into navisworks, the elementID won’t be maintained as before, so the clash detection would come to a different result.

I thought dynamo could enhance the efficiency of model update, but now it seems not goes this way. It is just a model producer, not a good reviser…


Hi Ocean,

You can move elements with Dynamo. but you’ll need to know how to access the Revit API.

Here’s a quick example that will move a point based family(like a column) to a new location. The custom node “Element.Location” is from the clockwork package. In most cases, you can simply use the built-in node “FamilyInstance.Location” instead.



Hi Dimitar,

Thanks and your idea has lit my way. Believed it is the most feasible workaround I’ve seen.

I made a similar node following your solution, and tried to not use “element.location” from the clockwork but only extracted the point location I need (you may see my attached pic). The result is good lol.



Hi all,

I know this conversation has been off for a couple of months but I have been trying to use a similar process (similar code) to update grid lines location in the Revit model and haven’t been able to do it so far. All of my attempts have resulted in either creating a new grid line or crashing.

Do you guys have some insights of how to achieve this with grid line ?


Not sure if I’m reading correctly, is this what you want?


Hi thanks for answering !

Sorry if I wasn’t clear. I’m trying t o move a gridline that was already created in Revit to keep its embodied constraints.

Here, for instance in the pictures, I have created a grid line and a wall attached to it (locked). Using the above definition in a “Manual” Dynamo mode, the grid line moves with increments of 5 feet per clicks (cf Picture 1 to 2). Then when I introduce a slider, to “real time” control the position of the grid line, Revit moves the grid line without stopping until it crashes (Picture 3).

Is there a way to re-assign the grid line’s position (by changing its curve property for instance). That way I could input a line that changes “parametrically” given a slider in Dynamo.

Apologies for the poor choices of words,english is not my native language, I’m probably over complicating the sentences.














I’m sorry screwed up the formatting of my last post. Here are the 3 pictures.


Hi Thomas,

Unfortunately, I don’t think there’s a way to run that graph in automatic mode at this moment.This seems to be a Dynamo limitation.
Also the Revit API doesn’t seem to support a method that can set the curve of an existing grid to a new curve. There were some changes with R16 and grids but I haven’t looked into those yet.

Hi Dimitar,

Thanks for coming back at me. I found my way around the issue using several posts here and there. Here’s my definition highly inspired by your previous ones.

To solve the issue with the “Automatic” mode I used the following method: (1) Define your target position, (2) Create the vector between your current position and your target (so far like in the previous posts, yet slightly different for Grids) and (3) plug that vector as my translation vector. That way when your object is correctly positioned, its translation vector is 0. In order to limit computational operations just added a simple if loop based on the length of the vector. That way I can keep working in an “Automatic” mode and real-time change the positions of my grids.

One last question: I also added a for loop to address lists of elments to move, is there a way to use a similar syntax as Element.Id but for a list that would then return a ICollection<ElementId>?

Thanks for your help !



Good job on making it work, Thomas. I’m not sure if there are any direct constructors for an ICollection. It might be easier to directly construct a C# list instead:



Great, thanks for the tip !


Hi Thomas,

Great Job, I want to try also. Can you share your node.

Thanks in advance,


Hi Kulkul,

Sure here is the Dynamo Definition and a Screenshot.




Hi Thomas,

Thanks for sharing, I tried but i am unable to get the result. I get error below is the screenshot.



Hi Thomas,

Any thoughts? Am i missing something.

Hi Kulkul,

One of your inputs for the “Vector.ByTwoPoints” is not a point and the node is failing.

Hi Kulkul,

Sorry for the late response, I didn’t set up “notificaitons” for the posts.

Dimitar is right. My node works if you ar elooking to “send” your object to a certain location (from one specific point to another). That is the entire point of the “if statement” in the Python node. If you put a vector with a “fixed length” and set Dynamo in automatic mode, he will keep moving your object for…ever. :slight_smile:

Hope that helps,


Your shared image is not clearly visible, could you please share it again.