i am working with a graph that duplicates the views I selected as a dependent, then applies a scope box to the duplicated views. The last thing i would like to do is not working correctly though - set the crop region visible to NO. What am I doing wrong here? Cheers!
I read another topic quite similar to mine and that was the other personâs mistake indeed, so I tried to do the same. In my case it doesnât work because the output I am trying to use is an array (perhaps because i used cross product ?)
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
#The inputs to this node will be stored as a list in the IN variables.
views = UnwrapElement(IN[0])
doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)
for v in views:
v.CropBoxVisible = False
TransactionManager.Instance.TransactionTaskDone()
#Assign your output to the OUT variable.
OUT = 0
I think the issue is the lacing and levels. I donât know your exact dataset but using @L2 with cross-product even though both of the other inputs are only a single element may be messing you up.
Hello, I am trying to turn off my new Viewport Crop Region using with following script but it doesnât work.
newViewport.LookupParameter(âCrop Region Visibleâ).AsInteger().Set(0)
and also
newViewport.GetParameter(âCrop Region Visibleâ)[0].AsInteger().Set(0)
Can anybody give me some help? Thanks