Change element height to a certain point

revit
mep
dynamo

#1

Hello friends, I’m wondering is there a way to change element height in dynamo to a certain point (x,y,z). For example, in the following figure, manhole are placed on different points now I need to increase its height so each manhole touches the surface of a pipe. I know there is a Height parameter of the manhole that I can use but I don’t know how much height value do I need to enter so every manhole touches the surface of a pipe dynamically. Appreciate any help. Thank you


#2

I’ve found the solution, it was simple. You have to find the ‘Z’ co-ordinate values for both the manholes and the pipes and then minus it. Then use the resulted value to the height (H = Z2-Z1) parameter of the manhole. Hope the solution will help others See the following image: