Hi,
I try to Set grid extend in view. I was successful in set it in active view. but when i set up for multiple view. I got error. any help with the python or node that allow me to do is appreciated.
here the python code
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
#Import DocumentManager and TransactionManager
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
#Import RevitAPI
clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
grids = UnwrapElement(IN[0])
view = UnwrapElement(IN[1])
crvs = UnwrapElement(IN[2])
curves = []
curvesViews = []
TransactionManager.Instance.EnsureInTransaction(doc)
for i in range(0,len(grids)):
grids[i].SetCurveInView(DatumExtentType.ViewSpecific,view,crvs[i])
TransactionManager.Instance.TransactionTaskDone()
#Assign your outputs to the OUT variable
OUT = grids