Hey there,
I am trying to create a script by which I could determine the Worksets the reference planes are in and change them by bulk so for example, select all reference planes within the project and change their workset.
I have the node from Orchid package which can select the existing ref planes within the model, but the thing is even though I just manually created 10 reference planes there are 454 listed… my guess is these are somehow an internal part of some geometry, but I cant seem to filter out only the ones created by the user.
any ideas?
I tried also creating a completely new project in which it did not find any reference planes and when I created one then the node outputted 1 exactly.
@juraj.valko7Q28C sounds tricky. but whats the downside of removing those unwanted ones? lost of annotations?
Actually havent thought of it in this way, now when I tried to delete them it worked and there were no warnings about dimensions not being able to find a reference so should not be a problem.
But still it does not seem exactly like a systematic solution, I would like to understand where 400+ reference planes are coming from, I was thinking if it is not taking into consideration the refplanes in loaded families which are part of the project, but even after deleting the family instances the number of reference planes did not change… then I thought maybe it is the linked files, but actually no after removing links the number did not change either…
Does anyone have an idea where these planes might be coming from?
What makes you think they aren’t in your actual project?
And do you 400+ after the deletion? Or was that before?
@juraj.valko7Q28C
there were no warnings about dimensions not being able to find a reference so should not be a problem.
i tested it in rvt 2025, the annotation was removed after the removal of reference planes and no warnings at all. if ref planes are hosting a lot of annotations, i’d be more cautious with this.
I would like to understand where 400+ reference planes are coming from
i did a quick check on how many visible ref planes for each view in a rvt sample file. seemingly, they are all there. u could throw the code snippet into a python node to have a quick check also. it gets even trickier if some ref planes are hidden. but for a rough check, it should suffice. (btw i remember there’s better way of doing this which is more elegant and handles the “hidden” issue as well, but my brain is so washed now.)
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI 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
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Preparing input from dynamo to revit
elems = UnwrapElement(IN[0])
test = []
for view in FilteredElementCollector(doc).OfClass(View).WhereElementIsNotElementType().ToElements():
try:
rps = FilteredElementCollector(doc, view.Id).OfClass(ReferencePlane).WhereElementIsNotElementType().ToElements()
if len(rps):
test.append([view, rps])
except:
continue
OUT = test
I was thinking if it is not taking into consideration the refplanes in loaded families which are part of the project, but even after deleting the family instances the number of reference planes did not change…
i think its irrelevant, these ref planes are at project level.
then I thought maybe it is the linked files, but actually no after removing links the number did not change either…
i think this is irrelevant as well. unless u accidentally queried the link document/model.