Set crop box to none

Hi, How do I set crop boxes to none. Need views crop box to none so another node in the script works. Found some python that does it but the parameter is becoming read only.

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

import clr
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

views = UnwrapElement(IN[0])

TransactionManager.Instance.EnsureInTransaction(doc)

eleID = ElementId(-1)
for item in views:
scopeBox = item.get_Parameter(BuiltInParameter.VIEWER_VOLUME_OF_INTEREST_CROP).Set(eleID)
TransactionManager.Instance.TransactionTaskDone()

OUT = 0

Hi,

You can untick the parameters Crop View and Crop Region Visible.

I cant seem to turn off “crop view” because a scope box is applied im trying to turn off. Both read only.

The scope box isnt read only in Revit, seems to be when dynamo is running.

Use Springs.Element.SetParameterToNone node.
It will do the trick.

3 Likes

Powerful node. thank you