Hi,
I can’t find any parameters associated with section boxes in the Revit API. Simply, I want to convert a section box into a bounding box and retrieve the bounding box parameters if these are not available as parameters from a section box.
I assumed a section box was essentially a bounding box in the first place; however, I don’t think this is the case.
Thank you. BTW this script works for getting the parameters of any category that has parameters, just returns none for section box.
# Enable Python support and load DesignScript library
import clr
# wrapping and unwrapping Revit Elements
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
sectionBoxCat = UnwrapElement(IN[0])
output = []
# assign current document
doc = DocumentManager.Instance.CurrentDBDocument
# filter for sectionBox
collector = FilteredElementCollector(doc, doc.ActiveView.Id)
#filter = ElementCategoryFilter(BuiltInCategory.OST_SectionBox)
sectionBox = collector.OfCategoryId(sectionBoxCat.Id).FirstElement()
parameters = sectionBox.GetOrderedParameters()
for item in parameters:
output.append(item.Definition.Name)
#output.append(parameter.Definition.BuiltInParameter)
OUT = output