Clockwork Package - bug in FamilyInstance.ByCurve

From discussion here: Drawing in Revit: lines, details, line based families..?

I’ve isolated the issue with the function FamilyInstance.ByCurve; and I provide a test case that displays the issue.

The issue occurs when Dynamo is running against an RFA document rather than a RVT document, ie, in the Family Editor mode.

In the examples given, open in-project-edit.rvt and test-two-point-place.dyn using the latest Clockwork package.

The example will create a copy of the two-point family correctly.

Now open in-family-edit.rfa and test-two-point-place-rfa.dyn. This example will produce a ‘null’ output from the FamilyInstance.ByCurve node, but no other error is indicated. The opject will not be copied despite the curve being created and a level (Ref Level) being selected.

There is probably something within the FamilyInstance.ByCurve node that is calling the Document, and there is something different about either the Document or the Level when you are in the Family Editor.

test-two-point-place.dyn (6.1 KB)
test-two-point-place-rfa.dyn (6.1 KB)
in-family-edit.rfa (500 KB)
in-project-edit.rvt (520 KB)

@Andreas_Dieckmann FYI,

Thanks. Will look into it.

1 Like

@Adrian_Esdaile - I had a look into the Revit API documentation. Unfortunately the method used here for project documents is not available for family documents in the Revit API.

Well, darn.

I have written a lovely set of Dynamo graphs that can take any objects from a RVT model and turn them into a ‘super-family’ of nested components; but it only works for “single-click” objects. “two-click” objects (NOT Adaptive Families / Components) or “line-based families” don’t work with my graph, annoyingly. Or rather they do work, but once placed as a ‘single-click’ object they then behave as a ‘single-click’ object unless edited directly using the mouse. Confusing - and it feels like a bug in Revit and/or it’s API to me. It’s theoretically possible to calculate a rotation from a vector of the source object, but once you have placed a “two-click” object using Dynamo it ‘locks’ in place and cannot be manipulated by further nodes the same way a ‘single-click’ can.

With a ‘single-click’ object you can place an instance, then use SetRotation or Move by Vector to manipulate it; but if you place a “two-click” object it refuses to respond to further nodes; but it doesn’t throw any errors, thus making it very difficult to diagnose what is or isn’t happening.

Whats odd is that you can place line-based families in the UI; so the method must be there - its just not exposed in the API.

I’ll try to clarify all this with some further examples and the full graphs to show what I’m trying to achieve.

Edit: that might need a whole new post - they are some mighty big graphs…

My full post about the code that raised this issue (it’s a LONG post!) is at: WIP - ‘Super-Family’ Creator; line-based family problems