this has to be easy,
but im really struggeling to find the parameter value of a shared parameter via dynamo/python.
in c# i would do it like this: “window.get_Parameter(new Guid(“c54e24d6-cb57-4fa2-a246-f65bcc1c8b3d”)).AsValueString())” but i cant for the love of god make it work in dynamo.
Transaction is not needed since you are not doing any modifications on the Revit model.
So maybe you can simplify doing this.
import clr
clr.AddReference('RevitServices')
clr.AddReference('RevitAPI')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
import System
# Documento actual
doc = DocumentManager.Instance.CurrentDBDocument
# Entradas
elements = UnwrapElement(IN[0])
guids = IN[1] # lista de strings de GUID
# Convertir strings a objetos System.Guid
guid_objs = [System.Guid(g) for g in guids]
# Recorrer elementos y GUIDs
result = []
for el in elements:
values = []
for g in guid_objs:
p = el.get_Parameter(g)
if p:
values.append(p.AsString())
else:
values.append(None)
result.append(values)
OUT = result
Here is the documentation where the method e.get_Parameter(guid)