Modifying Revit object's coordinates based on script in Dynamo

Hi,
This is a problem relevant to the precasting of bridge segments at casting yard.
Problem Background
The designer gives a 3D model of a Box girder segmental bridge which has to be manufactured at casting yard. But very often in casting yard, there will be errors and movement of formwork due to which the precision as expected is not obtained. However, in the succeeding segments if these errors are not nullified or reduced the whole alignment of the bridge would change.

What I have done so far…
I have developed a logic based on the Least squares method to calculate the corrected coordinates of the succeeding segments (Geometric correction script attached). For the script attached, I have taken inputs from an Excel file which would contain the corner and midpoint coordinates of the segments, the user has to select the segment which he would like to cast and also input the as-cast coordinates(actual measurements from casting yard) of the previous segment.
After this, the script will compute the corrected coordinates of the succeeding segment and output it.

What I need to do next…
As a next step in my project, I need to select the coordinates of the bridge directly from the 3D model which the designer has provided,(instead of an Excel file). and modify the model based on the corrected coordinates as calculated by the script.

What I seek from Dynamo-Revit Gurus here…

  1. For extracting the coordinates from the model and later modifying it…Should I ask for a parametric model with coordinates as parameters or ask the designers to use some adaptive points which can be extracted and modified?
  2. Or is there any other simpler way in which I can modify the model ( a sample model is attached).

Since I am not very well versed with Revit families and Dynamo, I seek this advice from the Dynamo Gurus over here…
Please advice on what can be done, If the problem is not clear please revert back.

Thanks in advance!!

data.xlsx (11.3 KB)
Extracting coordinates.rvt (1.4 MB)
geometric correction script.dyn (158.0 KB)

Likely adjusting an adaptive component is the way to go here. Assuming the designer provided one, you could set up a Revit model using a new Dynamo graph to place the adaptive components via data in a spreadsheet or other source. Be sure to save the dyn and that element ownership is maintained by the Dynamo graph. On subsequent runs with modified data (the shifting of the endpoints of segment A let’s say), segment B should update (not overwrite it would move), to make the alignment work, while maintaining its prior endpoints. See this post on Element Binding for a more detailed review of that topic: Element Binding in Revit

1 Like