Ive got a small headscratcher here with using the PickBox() selection method in the Revit API.
For some reason the PickBoxStyle is not recognised.
Have I missed loading a reference or is this something else?
Revit 2018
Dynamo 1.3.2
import clr
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference)'RevitAPI')
from Autodesk.Revit.DB.Events import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
pickedBox = uidoc.Selection.PickBox(PickBoxStyle.Enclosing, "Select a box")
OUT=pickedBox
Hi @Ewan_Opie ,
Thanks for this code ! I am currently working on something similar and I would like to convert user pickedbox to points, curves, …etc in order to place a schedule according to user selection in sheets.
Do you think it is possible to create a list of curves or points out of the user selected area ?
I’ve tried using your code with the dynamo nodes (element location, curves, BBox, …etc.) but it doesn’t give anything.
Hi again @Ewan_Opie ,
the script works perfectly for selecting a region from any view. Even with sheets, which is great.
However, I tried to use the rectangle center-point to place a schedule view, but it is being placed very far from the selected region.
What do you think is the reason ?
Thanks