Change Display Model - View Properties

Hi,

I have some sections views that I want to turn off the “Display Model” properties, so it will only show annotations. Is there a node that can do that?
An alternative would be changing this setting on the view template, but I couldn’t find a node to do that either!

Thanks

Look for the View.SetCategoryVisibility node and search the forum you’ll probably find what you need.

Hello @bran0169
try this

import clr
import sys
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

toList = lambda x : x if hasattr(x, '__iter__') else [x]
#Preparing input from dynamo to revit
lstView = toList(UnwrapElement(IN[0]))

#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)

for v in lstView:
	paraDMode = v.get_Parameter(BuiltInParameter.VIEW_MODEL_DISPLAY_MODE)
	#0 -> Normal
	#1 -> half tone
	#2 -> do not display
	paraDMode.Set(2)

TransactionManager.Instance.TransactionTaskDone()

OUT = lstView
2 Likes

Great! Thanks @c.poupin it works perfectly

1 Like