Stick the element on the wall

I have some small element, that represent IoT sensors in the rooms. I used already script which automatically placed needed sensors in the center of the room from the list of sensors & rooms.
Now I have accurate information of their location in the room (wall, door, etc.)
So I created script where I can semi-automatically place them on the position. I select a room, select the wanted location and then select the sensor element and translate it to that point on the surface. But result looks like this:
image

What is wrong with this is, that first element is half in the wall and secondly it is rotated incorrectly. It is horizontal instead of vertical. I was researching about rotating families and it seems there is some problem about rotating families in Revit in any wanted orientation.

Does anyone know how to solve this using Dynamo?
Thanks

Anyone?

How has your family been created? Can you post a screen-grab of your Graph?
Is is a Generic Model element which is placed by workplane/vertical/face?
Can you upload your files for testing?
Sorry for the mass of questions but more information will help us help you. :grinning:

So here is the file I used to place sensors in the rooms, from the list which explains which sensor is in which room. Sensor_placer-wSensorPar.dyn (159.2 KB)

Then after I used this script to manually move the sensor object to position on the wall where it was installed TranslateTempSensor.dyn (11.8 KB)

And this is the sensor family used
SENZORFAMILY.rfa (624 KB)

Thank you :slight_smile:

Sorry for the lateness of my reply.

Firstly you will need to make your family able to be placed using Workplanes, otherwise it will always be vertical.

Then it should be easy enought to sort.


The python for Flipping the Workplane (if required) by @Daniel_Woodcock1 can be found here.
Flip Work Plane Equivalent

4 Likes