I want to edit the parameter called “Dörrlittera” in the family editor. Just to get it to work i am trying to append the parameter with the string “AAA”.
If i understand this correctly there is 16 types of the parameter called “Dörrlittera”. As can be seen in the image.
I want to iterate through them and edit with Set().
But i can only change one of the types for some reason…
What am i doing wrong? The code seems to be working fine, except the “Set()” function.
import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
clr.AddReference(‘RevitServices’)
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
param_values =
types = doc.FamilyManager.Types
famMan = doc.FamilyManager
TransactionManager.Instance.EnsureInTransaction(doc)
familyTypesItor = famMan.Types.ForwardIterator()
familyTypesItor.Reset()
while (familyTypesItor.MoveNext()):
familyType = familyTypesItor.Current
familyParam = famMan.get_Parameter(IN[0])
param_values.append(familyType.AsString(familyParam))
famMan.Set(familyParam, IN[1] + familyType.AsString(familyParam))
TransactionManager.Instance.TransactionTaskDone()
OUT = param_values