Place structural profile families along the refernce curves


#1

Hello,

Is there any way to create structural profile Families along the reference curves created in Dynamo.
As far as my understanding says, i have to create an adaptive component families in order to accomplish this Task???Parametric Truss.dyn (32.1 KB)


#2

Hi, you can use for example StructuralFraming.BeamByCurve

You then might need to Disallow Join and change the Y and Z reference of your beams

If you want to automatically disallow all your beam join, you can use this Python script:

import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

clr.AddReference('System')
from System.Collections.Generic import List

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

#Preparing input from dynamo to revit
element = UnwrapElement(IN[0])

#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)

for x in element:
	StructuralFramingUtils.DisallowJoinAtEnd(x,0)
	StructuralFramingUtils.DisallowJoinAtEnd(x,1)

TransactionManager.Instance.TransactionTaskDone()

OUT = element

#3

@lucamanzoni
Thanks for the above example.
Actually i want to create a truss Family, so i am running this script inside Family Editor mode, where you can’t select model Elements for some reasons and this node doesn’t work in my case.
Is there any way to perform it inside Family editing mode?


#4

It was just a fast example to show you that the node exists, then I took your graph and changed AdaptiveComponent.ByParametersOnCurveReference with StructuralFraming.BeamByCurve. The screenshot is the result of your adjusted graph in a project mode.

If you are creating a Truss Family, just use the Truss Family Template, it has everything you need. You first draw lines and then you can choose which beams to use. It’s already parametric, you don’t need Dynamo and beams are already applied to your lines :wink: