Family Editor: "Family Element Visibility Settings" for Plan/RCP

Does anyone know if there’s a node or package that can manipulate the on/off values in the Family Element Visibility Settings of Revit’s family editor?

My goal is to create a graph that will open all Specialty Equipment families and toggle “on” the Plan/RCP visibility for all geometry in the family and re-load them into the model.

Here’s an image of the dialog box inside the family editor that I am referring to:


Thank you

Any luck with this stuff?
I think I found the class we’ll need to use in the RevitAPI docs here:

I’m having trouble using it correctly in dynamo/python though…

was searching on this topic today,
no experiences right now?

Funny i had to do something like that not too long ago

# Charger les bibliothèques DesignScript et Standard Python
import sys
import clr,System
from Autodesk.DesignScript.Geometry import *
from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
import Revit

doc = DocumentManager.Instance.CurrentDBDocument

def toList(elt):
	if isinstance(elt,list):
		return UnwrapElement(elt)
		return [UnwrapElement(elt)]
elt = UnwrapElement(IN[0])
coarse = IN[1]
medium = IN[2]
fine = IN[3]
frontBack = IN[4]
leftRight = IN[5]
planRCPCut = IN[6]

visibility = FamilyElementVisibility(FamilyElementVisibilityType.Model)
visibility.IsShownInCoarse = coarse
visibility.IsShownInMedium = medium
visibility.IsShownInFine = fine
visibility.IsShownInFrontBack = frontBack
visibility.IsShownInLeftRight = leftRight
visibility.IsShownInPlanRCPCut = planRCPCut

OUT = "ok"

nice thanks for sharing.

I found that with the OOTB-Nodes it is also possible to change the setting, but only running in Family Editor.

What is the input? is it “Selected Element”?
or is it possible to select a family in Project and change the behavior of that family with Dynamo Player then?

Heinrich Boldt

Since your changing something inside a family you need to access the geometry in the family so no you cannot do that from a project.
The input is the element you want to change. It was to change some lines in ly case so i would filter the lines based on the type and change the values.

1 Like

Visibility Settings Familyeditor.dyn (31.5 KB)
this is what I used to change the Visibility.
We use lots of Subcategories for Lines and 3D Elements.
I filtered all 3D-Elements and changed the visibility for “planRCPCut” to true.
I would like to use it in the project with View templates - when the visibility is disabled, we cant use it in View templates :slight_smile:

I tried your script, but I got an error :frowning:

Thanks again for participating in this discussion
Heinrich Boldt

Symbolic lines and model elements do not use the same code actually

@Daniel_Hurtubise I too tried using your Python script to control the visibility of objects in my Family. It works great for objects like extrusions, but whenever I try to use it on Model Lines, I receive an error stating that the object doesn’t have a “SetVisibility” attribute. I know I can manually adjust the visibility on the Model Lines. But I am confused as to why it doesn’t work with the Python Script that you provided. Any insight would be greatly appreciated.

Sorry for totally missing that.
Not all elements uses the same methods, i think i have another one for Model Lines

1 Like