i will change phase in all view project, error AttributeError : ‘list’ object has no
attribute ‘get_Parameter’ [’ File “”,
line 25, in \n’]
# Enable Python support and load DesignScript library
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
# The inputs to this node will be stored as a list in the IN variables.
view = UnwrapElement(IN[0])
phase = UnwrapElement(IN[1])
# Place your code below this line
TransactionManager.Instance.EnsureInTransaction(doc)
# Set the phase parameter of the view to the phase ID
view.get_Parameter(BuiltInParameter.VIEW_PHASE).Set(phase.Id)
TransactionManager.Instance.TransactionTaskDone()
# Assign your output to the OUT variable.
OUT = "Phase has been set successfully."

