Hi,
This works?
import clr
#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
#Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
#Reference the active Document and application
doc = DocumentManager.Instance.CurrentDBDocument
elem = UnwrapElement(IN[0])
#elem_param = elem.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS)
elem_param = elem.LookupParameter("Base Offset")
TransactionManager.Instance.EnsureInTransaction(doc)
if elem_param.Set(5):
OUT = 'Success'
else:
OUT = 'Failed to Set Parameter'
TransactionManager.Instance.TransactionTaskDone()
From hereā¦Looking to set Parameter value with Python. Am I using the correct command? - #4 by MartinSpence
Hope that helps,
Mark