Using Dynamo to remove z and y offsets

Hey all,

I am trying to create a dynamo script which removes z and y offsets from the model, to create a ‘cleaner’ model to be exported into Spacegass for an engineers review. I have attached a screenshot below which is what I’ve come up with so far, regarding coordinates.

My intent was to run the excel script to get the original coordinates saved, run the next script which would remove all z and y offsets, and then push the original coordinates back into my model with the translate node (? haven’t got this far yet).

What I am finding though is that the coordinates which are acquired into the excel spreadsheet are the coordinates of the analytical members, and not the offset members. What I am trying to do is move the analytical members back into place of the offset members.

1 - get coordinates
2 - remove offsets
3 - move back into place

Is what I want to achieve.

Is my offset script. had to post twice as I can’t put two images in one post.

Hi, what is the issue?

Hi, thanks for replying.

The issue is I am unable to acquire coordinates relating to the model member, not the analytical member. Screenshot below with both analytical and model on. The coordinates I receive are of the orange line, not the steel member above,

I want to be able to acquire the coordinates of the steel member, not the analytical line.

You could try with Element.GetLocation instead of FamilyInstance.Location.Otherwise you can always get all the offsets and Placement level, and calculate the Z coordinate.

Let me know if the suggested node solved your problem :slight_smile:

1 Like

Hi Jan,

The suggested node didn’t really change much. Regardless of how much I offset my steel members, the coordinates which I receive don’t change which leads me to believe it is still reading the coordinates of the analytical members (orange lines) as they do not move when you do a y and z offset.

Is there another way I can use to acquire the coordinates of the model?

Hi @jmknightVY7X5, can you attach the revit file and dynamo script in here? and state the version of your revit & dynamo.

Hi, files and version attached.dynamo%20version

find xyz, write spreadhseet.dyn (6.4 KB)
Project1.rvt (752 KB)
set offset - visible on screen.dyn (4.3 KB)

I have attached my files.

element set location and geometry translation should work for you. you are dealing with coordinates. not element parameters.

It will be hard for me to rectify the problem as I believe you are using revit 2009. as I only have revit 2018 onward, I can upgrade the file but couldn’t open it.

Hi, file is saved in 2019 revit. 2019

Did not have to upgrade to open.

ok thanks