Document.OpenView memory error

Hi, I’m trying to open a sheet view in the current document but getting the error below. I’ve also tried a transaction end node and a few other python nodes from the forum but they throw up expected view got list error.


import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
from Revit.Elements import *
clr.AddReference('System')
from System.Collections.Generic import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
myView = UnwrapElement(IN[0])

uiapp.ActiveUIDocument.RequestViewChange(myView)

#Assign your output to the OUT variable.

The only thing i can think of that would create this problem is that you are running x32 software on a x64 computer, or vice versa.

But i am not completely sure so maybe look online :slight_smile:

@Nick_Boyts hey man. I have it a go here. With a transaction end too but I think the python code threw a expected view got list error

Try reducing the sheet to a single item instead of a list.

Thanks for your help Nick. I was creating a script for purging a model for transmittal. I ended up just running the script on the start view and changing the start view title block to the model issue title block to avoid having to work this out

I’m stucking this problem too, had solved?