# Placing FamilyInstances by Point and Rotation

Dear All,

For a project I would like to place some automatic Family Instances based on data in a form of a list.

There are two things I wish to obtain:

1. Placing the instances by coordinates (x,y,z)
2. Giving all instances a specific roation (Rx, Ry, Rz)

I have succeeded the first thing. I am still struggling with the second one. Can someone help me out?

For now it’s is only possible to give a rotation around the z-axis.

Hello!

I had the same problem some time ago.
I tried a solution with coordinate systems and the node FamilyInstance.ByCoordinateSystem, applying some of the rotations on the other axis, but with no success… i think the problem with that solution is the parameter inside the family, something like workplane base or other versions… (if you want to explore that tell me because it is a simpler solution.)

The solution I am using on my scripts is placing by face with FamilyInstance.ByFace. I got that working but it migth be possible to do it another way. I have created a solid instance on the point I want to place the family and rotate that instance. With this node the family places always on the face of the solid so it is possible to rotate it in all directions.

Hope it helps! It was the solution i found and it works on my cases, but it is complex…

2 Likes

Hi Diogoo,

Thanks for replying. I was hoping that there was a more simple solution. But I will have a look at this one ;).

Hi again!
Yesterday i got another solution that can be better for you.

You can get the geometry of the family instance and get the geometry with Element.Geometry.
After that you can rotate the geometry with Geometry.Rotate node.
The geometry is know rotated, but is also needed to import it again (similiar to the code I have before) .
You can delete the previous element.

You can try that solution too, maybe it is easier.

Hi @MarvinTheMartian and @diogoo21 ,
I have a solution , If you are trying to rotate a familyinstance along a path

Python Script

``````> # Load the Python Standard and DesignScript Libraries
> import sys
> import clr
> from Autodesk.DesignScript.Geometry import *
>
> # The inputs to this node will be stored as a list in the IN variables.
> xval = IN[0]
> angle = IN[1]
>
> # Place your code below this line
> o=[]
> for x,a in zip(xval,angle):
>     if x<0:
>         o.append(360-a)
>     else:
>         o.append(a)
> # Assign your output to the OUT variable.
> OUT = o
``````
1 Like