Hi guys
I’m trying to mount simulate how it works element.parameter button, but there are some problems as follows:
python code:
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
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 *
import System
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
dataEnteringNode = IN
_e = IN[0]
elements =
for i in _e:
`elements.append(UnwrapElement(i))
def valuePara(_e):
a1=[i.Definition.Name for i in _e.Parameters]
a2=[i.AsValueString() for i in _e.Parameters]
_epara=
for i in range(len(a1)):
_epara.Add(str(a1[i]) + ': ’ + str(a2[i]))
return _epara
value =
for i in elements:
value.append(valuePara(i))
OUT = value