WIP - 'Super-Family' Creator; line-based family problems

This is Part 1 of a three-part post on my ‘Super-Family’ creator.

TLDR: Does anyone know of a way to place instances of Line-Based Families within the Family Editor (ie, as subfamilies)?

So far this process almost works; but is broken by the behavior of two-pick (Line-based) families in Revit, and the lack of API support for such objects at the family editor level. (see my growing list of really annoying Revit ‘features’)

What is a ‘Super-Family’? Essential it’s just a family with a whole bunch of Nested Subfamilies (mostly Shared Subfamilies) which can be placed as a single object in Revit.

Why try to automate this process? Well, Revit has one (actually it has many more) really annoying “feature” in that for some unknown reason you can’t copy objects between a Project and a Family. Not even between a Project and an In-Place family within that Project! To me this is obvious functionality that has been missing since, well, forever.

I’m no genius at C# so I’m doing this in Dynamo…

What does this Dynamo Script do?

This first script creates a text-form output of selected objects in Revit. Note that in this example I’m filtering some items out - notably System Families that cannot exist within a Family ( another gripe of mine…)

The Script and Example files are attached to this post, along with a sample output in XLS format.

Open the Project file, select some objects (add your own objects if you like) and run the script. The output should be something similar to the example XLS file.

The XLS file is used in the second and third parts to create a ‘Superfamily’

Superfam Object Lister.dyn (61.5 KB)

Project_Copy_to_Family.rvt (744 KB)

Family_List.xls (9.1 KB)

1 Like

Here’s Part 2 of 3.

The second Script loads the required subfamilies into a single, empty RFA file.

Important! The script requires the CLOCKWORK and DANEDU (search for DAN EDU in the Dynamo Packages list) packages to work!

Attached to this post is the Script and the sample files required. Place the named RFAs into a folder of your choice, and Open the ‘Empty Generic Family.RFA’ file in Revit.

Before you run the script you will have to select some paths for the source files - the Folder you place the subfamilies into, and the location of the XLS file the script will read.

If you used your own families in step one, ensure they are in the subfamily folder for loading.

Running the script will load the subfamilies listed in the XLS sheet into the open family.

You will need to SAVE the file again after the script completes - the Save node triggers before the subfamilies are laoded and really only renames the file. This isn’t optimal; but I haven’t yet figured out how to trigger the save after all the subfamilies have completed loading.

empty generic family.rfa (340 KB)

Superfam RFA Loader.dyn (20.7 KB)

Directional_Thing.rfa (272 KB)
Circle.rfa (276 KB)
Line_Thing.rfa (276 KB)
Square.rfa (276 KB)

1 Like

Part 3 of 3 - Building the RFA

The final part places the subfamilies in the Family Editor into the configuration saved in the XLS file previously generated.

This is a fairly straight-forward process for Point-Based families; the script opens the XLS file, parses the table stored, creates Points at the appropriate locations; places Instances of the required families and then Sets the Rotation of those instances.

All fairly straight forward; although the sharp-eyed reader will notice a slight error due to object ‘flipping’. I have resolved this issue with a separate Python node that resolves the flip status. I have a much larger set of scripts for actual use, I’ve trimmed these down to basic operation to highlight the last remaining problem - the dreaded Two-Point Families (Line-Based Families)

To Run this script - open the family you created in Part 2; then select the XLS source file and hit Run.

Your Point-based families will all place themselves correctly and in the right orientation. So far so good.

The Line-Based families - don’t work at all. I haven’t yet figured out a way of placing these.

At present the nodes show my latest idea - place as adaptive families (nope, didn’t work)

> Any assistance in a way to placing Line-Based families within the Family Editor would be greatly appreciated!

Superfam RFA Builder.dyn (63.8 KB)