I have a universal script for placing elements for windows and doors, but there are situations when I need to place only windows. Is it possible to configure Dynamo so that it is not necessary to select an element in Revit.Selection?
i’d use a select model elements node and add a category filter for doors and windows.
This way the user can just drag select whatever and your script filters out all doors and windows in the selection
I thought about that, but this option is less convenient, as all elements are selected, including those that are not needed, which leads to “lags,” especially if the model is already large. I was hoping there were other methods.
Then select both doors and windows as you do now and after that make two if checks where you use booleans for ‘Use Doors =true/false’ and ‘Use Windows = true/false’. if false, you feed the list create node nothing and if true you feed in the elements from that category
I believe Data-Shapes has a custom node to select by category or you can create your own through the API.
PickElementsByRectangle Method (ISelectionFilter)
Yep, It is. Data-Shapes has node “Select model elements of category”. Thanks
