You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was exploring FamilyParameter class elements using FamilyManager.GetParameters(). It returns IList<FamilyParameter> from which I got the ElementId associated with each FamilyParameter. But when I use that Id in Search and Snoop..., RevitLookup only shows the properties + methods for Element and ParameterElement. There are several properties available in the FamilyParameter class that are not available in the ParameterElement class that RevitLookup detected the element as.
I had something similar happen when exploring Family/FamilySymbol/FamilyInstance attributes from within Fabrication parts.
I think it would be good to have a way to cast an element to a different type.
Example macro for demonstration:
publicvoidChangeParameterValues(){uiapp=newUIApplication(Application);FamilyManagerfm=uiapp.ActiveUIDocument.Document.FamilyManager;IList<FamilyParameter>parameters=fm.GetParameters();StringBuilderstringBuilder=newStringBuilder();TaskDialogtd=newTaskDialog("Family Parameters");td.MainInstruction="This document's Family Parameters";td.MainContent=string.Join("\n",parameters.Select(x =>x.Id+" = "+x.Definition.Name));td.Show();}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was exploring FamilyParameter class elements using
FamilyManager.GetParameters()
. It returnsIList<FamilyParameter>
from which I got the ElementId associated with each FamilyParameter. But when I use that Id in Search and Snoop..., RevitLookup only shows the properties + methods for Element and ParameterElement. There are several properties available in theFamilyParameter
class that are not available in theParameterElement
class that RevitLookup detected the element as.I had something similar happen when exploring Family/FamilySymbol/FamilyInstance attributes from within Fabrication parts.
I think it would be good to have a way to cast an element to a different type.
Example macro for demonstration:
Beta Was this translation helpful? Give feedback.
All reactions