Hello
I was wandering if there was a way to let the user choose by either selecting elements or all elements of a category while using dynamo player.
which means if he picks one the other input will not go through.

appreciate any help
Hello
I was wandering if there was a way to let the user choose by either selecting elements or all elements of a category while using dynamo player.
which means if he picks one the other input will not go through.

appreciate any help
If you want to go the Python way:
import clr
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
# Place your code below this line
if IN[0]:
output = uidoc.Selection.PickElementsByRectangle()
else:
output = FilteredElementCollector(doc).OfCategoryId(UnwrapElement(IN[1]).Id).WhereElementIsNotElementType().ToElements()
# Assign your output to the OUT variable.
OUT = output