Hi Everyone,
I have a line based generic model family (.rfa). Could anyone tell me how to use it in dynamo? For example, I have its endpoints: A (0,0,100) vs B(0,100,100).Based line Generic Model.rfa (284 KB)
Hi Hoc,
Are you looking to place family by End points?
Or you want to use this family to draw a solid element by points?
Hi Kulkul,
I was looking for a guide to use line-based family. However, I can do it now. Thank you very much.
For the benefit of others who might have a similar query, could you please post your solution.
Sure! the solution is based on Kulkul suggetion. Instead of using line-based family, we can use a generic model (.rfa) and set a parameter for its length. Now, it is quite similar to line-based family. Of course, we should use âFamilyInstance.ByPointâ to place it in model.
Actually, donât you think, a two point Adaptive component family will better mimic a line based family.
Adaptive component is a good choice but it may make the model size much larger.
@Vikram_Subbaiah and @Hoc_Em,
You can use Python to place the Line Based Generic Model family. The correct overload for that is this:
f = doc.Create.NewFamilyInstance(locationLine, familyType, level, StructuralType.NonStructural)
f.Location.Curve = locationLine
I have also set the Location property of the family instance after its creation as you can see above. It seemed to be necessary when I was working on this, but I might be wrong on that.
Also, the trick to this working on generic models and not a beam - which all examples are showing - is to set the structural type to non structural.
Cheers!
On practically the same lines outlined by @Konrad_K_Sobon , here is a non Python approach âŚ
- First change the Family Category in the line based family file
-Then in DynamoâŚ
EDIT:
To address the concern about having all line based families as Structural framing, once the families are placed, the Family Category can be changed back to what it was earlier and reloaded into the project.
@Vikram_Subbaiah +10 for creativity and -10 for usability. I mean we are supposed to be making things easier and cleaner, and instead this is really muddying up the water here. I donât think anyone wants to have every line based family be Structural Framing just because Dynamo doesnât have a OOTB node that places other family types. Your approach is kinda cool, but really generates quite few issues down the line so I cannot endorse it.
@Konrad_K_Sobon I wouldnât endorse it either.
Just a possible work around for the Python illiterate
The Clockwork package has had a âFamilyInstance.ByCurveâ node for a very long time now, you should give that a try.
Hi Everyone, and thanks in advance for any pointers;
I was trying to make this node work but the python is telling me in the family creation method it is expecting and XYZ and Iâm feeding a curve, which was the whole point.
The only method I have seen in the API that lets you use a curve is:
NewFamilyInstanceCreationData Method (Curve, FamilySymbol, Level, StructuralType)
But if I try to use it the Python tells me:
AttributeError: âDocumentâ object has no attribute âNewFamilyInstanceCreationDataâ
Any ideas?
Thanks again
Iâm sure Iâm doing things wrong
The problem was that I was feeding it a list of levels.
If I just feed one it seems to work.
Iâll try modifying the code to work with several levels.
Also the designscript code" curve : Autodesk.Curve;" is throwing an array rank reduction error.
That node appears to be broken in Dynamo 1.3.1 / Revit 2018. It only ever returns a null value.