Place Face Based Family on Table Family

As the title suggest I am trying to place a face based family onto the top face of a table family.

What I know:

  • There have been early discussions about the Revit API not being able to set a new host
  • Springs.FamilyInstance.ByFacePoints

I am starting with what I think is essentially a simple exercise, however, having trouble. I am basically getting all the family surfaces, getting their center points, and finding the one that has the highest Z value (giving me the top). From that surface/face I am trying to use the Springs.FamilyInstance.ByFacePoints node but it is:

A) Giving me null when I input the surface into topology.faces before I plug it in
B) Crashing when I put the surface and its respective midpoint straight into the node.

I am confirming this has been run under manual run mode and the family type is a face based family. Any help would be appreciated.

1 Like

Hi @Dynamonkey

Could you show complete graph. And also watch node showing values which your feeding to “Springs.FamilyInstanceByFace”.

Hi Kulkul I appreciate you jumping on board. The initial surface input is coming from a list from element.faces of a table family, which sometimes does not output a list of surfaces for certain families but in this example does. The meat of the script is shown in the image.

Hi @Dynamonkey

Without looking the values which your feeding to spring node it is difficult to solve your issue. Hope that make sense.

I ran this even on an in place basic extrusion and it does not output anything. I don’t see how any watch nodes will help you. Literally the Topology.Faces outputs a Face, the Type receives a Family Type:, and the point receives a Point. Surprise surprise. Again the question is fundamentally more about the meat of the script shown here. It all makes sense to me but lost why it does not work. Get all surfaces of family or geometry -> Get the highest Z positioned surface and its mid point -> input the surface or its topology face into the Springs node for “Face” --> input a face based family type into the Type node -> input the center point of the surface to the point node.

Confirming script works on a wall but having trouble making it work on other faces. Doesn’t seem to like families, which I know Dimitar touched on this.

@Dynamonkey This should work…
LampsOnTables.dyn (128.2 KB)


6 Likes

Getting the geometry of a family instance involves extra steps (compared to system families) and that seem to trip the way in which dynamo stores the reference between the revit faces and the dynamo surfaces. It’s already been reported here:

1 Like