February 1, 2020, 2:20pm
I have a problem with the node of Addfamilyinstance.bylocation.
This node is working fine with the point input, but when I’m trying to place it by plane the family element doesn’t follow the plane rotation. As you see in the pictures, the floor opening supposes to rotate accordingly to the plane input.
Or if place first the family and then rotate the family later the output is NULL. Does Rhino.inside has the node like dynamo ( FamilyInstance.SetRotation).
Thank you guys,
February 3, 2020, 12:34am
The trick is to create a plane and use a plane to specify the point and rotation of the family on insert. This sample at the end covers the creation and use of the plane for rotation:
February 3, 2020, 8:52am
I have tried your suggestion to create the plane, and yes it’s working, but only working for the Famly that not embedded with a host like furniture or etc.
But when I tried with the Family that embedded to the host, the rotation of the family is not accordingly to the given plane.
Here is the Screenshot of my trials.
Not working family rotation (embedded inside the host)
Working Famliy rotation (without host)
February 3, 2020, 4:38pm
What do you mean by family embedded inside a host?
February 3, 2020, 4:47pm
Maybe my sentence is not correct. Sorry for that, What I mean is the Hosted Family and Non-Hosted Family.
The Addfamilyinstance.bylocation only working with Non-Hosted Family as the previous Screenshot.
When I’m using the “Deckenöffnung Rechteckig” family (hosted family) for the floor, the outcome doesn’t rotate as the Plane input.
February 3, 2020, 5:46pm
I created a quick python script node that realigns the family instances to the given plane after they are placed.
Take a look at these example files
Align Family Instance.zip (519.1 KB)
I also filed an issue to correct this behaviour:
05:46PM - 03 Feb 20 UTC
Describe the bug
AddFamilyInstance.ByLocation component does not apply transform on hosted instances. The correct transform needs to be appied to the hosted...
February 4, 2020, 9:28am
I tried your script and its work within your example file, but when I tried to copy the Phyton Node (Align Instance) to my file, Its does not work and gave me an error.
The instance(s) actually not out side of the host. its still in the host family.
February 4, 2020, 8:26pm
Would you mind sharing a sample model and the family that your are using plus your GH definition so I can replicate the error on my side and attemp to provide a solution?
February 5, 2020, 9:11am
This is the file of mine. Thank you for willing to help me.
Rotating Family.zip (6.8 MB)
February 5, 2020, 9:36pm
Okay so the clash points that you are collecting are not scaled to the Revit model units.
This is the location of the instance:
And this is the plane origin that you are trying to reorient to:
I changed the python node to reorient based on the location of the instance itself but use the X and Y axis directions from the plane:
Also added data type checks. Change the python code to this:
from System import Enum
import rhinoscriptsyntax as rs
from RhinoInside.Revit import Revit, Convert
from Autodesk.Revit import DB
doc = Revit.ActiveDBDocument
if isinstance(I, DB.FamilyInstance) and isinstance(L, Rhino.Geometry.Plane):
t = DB.Transaction(doc, "Align Instance")
I.Pinned = False
I.SetTransform(I.Location.Point, L.XAxis.ToHost(), L.YAxis.ToHost())
I.Pinned = True
Here is proof of work:
February 6, 2020, 10:20am
Thanks for your amazing work. I copy your script and paste it to the new python node, and its work.
*ps: In addition, I introduce an output to the Python node so I can continue to work with the element
March 12, 2020, 7:17pm
Align Family Instance_flip.zip (338.5 KB)
I wanted to test out the python script you put together and was wondering if you could tell me why the family by location throws an error when you try to flip the plane vertically along the curve. My simple example file extracts one plane, remakes the plane with a vertical rotation, and then tries to place a simple block. Thanks in advance!
hello I’ve downloaded the script but there is an error saying 1. Solution exception:‘FamilyInstance’ object has no attribute ‘SetTransform’ thank you for your work and efforts
July 1, 2020, 12:14am
Hey sorry for the very late reply. A couple of issues here
The family that is shared needs to be edited so it is not “Always Vertical”
Families that are expected to be placed at arbitrary orientations, need to be “Work-Plane Based”
The component seems to have a bug. An issue AND a fix has been posted here and should solve the problem for the next release
12:13AM - 01 Jul 20 UTC
See forum discussion below. The user has a badly configured family (family needs to be workplane-based), however, the "Add Family Instance"...
Is this only applicable for family instance? not applicable for detail item or generic annotation family?
My scenario is I am inserting a revision triangle which a generic annotation family on top
right hand of the revision cloud with an offset distance. The idea is to select all those points from multiple sheets and them insert the revision cloud triangle, this will save time from manual insertion on every point and sheet.
July 27, 2022, 1:38am
Since detail items are view dependent, they utilize a different component to be added to view… the component is called Add Detail Item and is available from V1.8 RC2
Thanks Mohamed, what if the location of the cloud and revision triangle are with in the sheet but outside the viewport, can we base the location thru sheet space? thanks.
July 27, 2022, 3:46am
Can you show me / provide an example of what you are trying to achieve
Hi Mohamed, I would to place/insert the revision triangle beside the revision cloud, like this? thanks.
It so happen that I cannot get the revision triangle family.
July 27, 2022, 4:05am
Are the triangles going to be placed on Sheets directly, or are they going to be placed inside views?.. and are they detail items or annotation symbols ?