It would be nice to have nodes for setting the distribution of rebars (make rebar sets). I currently use this python to achieve this, but it would be better to have everything in one package. (It's hardcoded to work with millimeters)
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure 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
#Preparing input from dynamo to revit
rebarElement = UnwrapElement(IN[0])
spacing = IN[1]/304.8
arrayLength = IN[2]/304.8
barsOnNormalSide = IN[3]
#Change rebar in transaction
TransactionManager.Instance.EnsureInTransaction(doc)
rebarElement.SetLayoutAsMaximumSpacing(spacing,arrayLength,barsOnNormalSide,1,1)
TransactionManager.Instance.TransactionTaskDone()
OUT = rebarElement
It would be nice to have nodes for setting the distribution of rebars (make rebar sets). I currently use this python to achieve this, but it would be better to have everything in one package. (It's hardcoded to work with millimeters)