Just clarifying I’m not missing something in C#/ZTN development and reflectable types.
Managed to reflect DB.FamilyParmeter without issue, but can’t seem to find any exposed DB.FamilyType equivalent. There is Dynamo FamilyType (> FamilySymbol), so I’m assuming maybe not available yet.
There’s this code using the FamilyManager to get FamilyParameter values - seems to be a bit of a workaround
/// <summary>
/// Gets the value of a family parameter of the current family type, this applies to all family parameters (instance and type).
/// </summary>
/// <param name="parameterName">A family parameter of the current type.</param>
/// <param name="familyTypeName">The name of the family type.</param>
/// <returns>The parameter value.</returns>
public object GetParameterValueByName(string familyTypeName, string parameterName)
{
Autodesk.Revit.DB.FamilyParameter familyParameter = FamilyManager.get_Parameter(parameterName);
if (familyParameter == null)
throw new InvalidOperationException(Properties.Resources.ParameterNotFound);
TransactionManager.Instance.EnsureInTransaction(this.InternalFamilyDocument);
SetFamilyDocumentCurrentType(familyTypeName);
TransactionManager.Instance.TransactionTaskDone();
switch (familyParameter.StorageType)
{
case Autodesk.Revit.DB.StorageType.Integer:
return FamilyManager.CurrentType.AsInteger(familyParameter) * UnitConverter.HostToDynamoFactor(familyParameter.Definition.GetDataType());
This file has been truncated. show original
Thanks! In my case was hoping for a dynamo friendly in/out type to pass on canvas. Suspect there isnt one yet in my research.