Attach/Move element to nearest wall

revit
dynamo
#1

Hi,
I dont know is there any possible solution for it? I want to move these elements in X-Y plane. These elements must be attached to nearest wall. anyhow but it must stick to wall.

This is what i did in dynamo. im sure something is wrong. because im giving just one axis. ( either x or y)

please reply with any logic you think. Appreciated :slightly_smiling_face:

#2

hi,
you cant set location for a hosted element, in any way, have you checked if your family have Offset parameter for them? if so it must be zero to be attached to the wall, make a script to set the parameter with zero value

1 Like
#3

Its non hosted element.
Do you mean to say Offset parameter from wall, then there is no offset parameter from wall.

sample.rfa (544 KB)

#4

One thing you can do is ticking the “Moves with Nearby Element” parameter checkbox:


You can do that in Revit or in Dynamo with Setparameter by name.
If you want to change the location of the element via Dynamo you can use the node Element.Setlocation:
image
Feed in the element you want to move and the point (the location)

1 Like