1

I am Having a doubt in Revit API. I want to hide some elements in Sheets of the Revit document. But I need an Active view to hide that. view.HideElements(ids) If I take a view which is active and try to hide elements in it, I am getting exception TypeError: expected View, got SectionView. Is there any way to hide that ? or is there any way to make my SectionView as Active View?

Help me with this. Either in Python or Dynamo Script(Design Script) or C#

I am trying to hide elements in Sheets In Revit Architecture Software but if the sheet is in Active View I can hide easily by taking the active view. If I take Sheets from FilteredElementCollector and try to hide elements in that, It is not working.

Rocker-APK
  • 51
  • 6

1 Answers1

1

Found The Way in Python

TransactionManager.Instance.EnsureInTransaction(document)
TransactionManager.Instance.ForceCloseTransaction()

uiDocument.RequestViewChange(view) 

RequestViewChange is the Revit API method which can change the view of the UI-Document. Sometimes document won't allow to change the view while a transaction is going on so I force closed the Transaction.

Rocker-APK
  • 51
  • 6