Hi,
I made a lot of sections (100+) to detailing foundation beams these beams connect against each other.
If i rebar these beams (in view) also the rebar from intersecting beams are visible.
What i want to make is the rebar in these sections invisible with Element Hide or View Visibility States using Dynamo.
I don’t know where to begin to identify these sections can you help me to start.
Thnks Edwin.
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import System
from System.Collections.Generic import *
document = DocumentManager.Instance.CurrentDBDocument
uiDocument = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
view = uiDocument.ActiveGraphicalView
instance = UnwrapElement(IN[0][0])
def HideElements(view, instance) :
ids = List[ElementId]()
if not instance.IsHidden(view) and instance.CanBeHidden(view) :
ids.Add(instance.Id)
TransactionManager.Instance.EnsureInTransaction(document)
view.HideElements(ids)
TransactionManager.Instance.TransactionTaskDone()
return None
HideElements(view, instance)
instance is the rebar element if you want to hide multiple rebar element iterate through a loop.