ViewFamilyTypeViewFamily Property |
The ViewFamily for this view type.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic ViewFamily ViewFamily { get; }Public ReadOnly Property ViewFamily As ViewFamily
Get
public:
property ViewFamily ViewFamily {
ViewFamily get ();
}member ViewFamily : ViewFamily with get
Property Value
ViewFamily
Examplepublic ViewFamily GetViewFamily(Document doc, View view)
{
ViewFamily viewFamily = ViewFamily.Invalid;
ElementId viewTypeId = view.GetTypeId();
ElementId viewTypeIdOne = new ElementId(1L);
if (viewTypeId > viewTypeIdOne)
{
ViewFamilyType viewFamilyType = doc.GetElement(viewTypeId) as ViewFamilyType;
viewFamily = viewFamilyType.ViewFamily;
}
return viewFamily;
}Public Function GetViewFamily(doc As Document, view As View) As ViewFamily
Dim viewFamily__1 As ViewFamily = ViewFamily.Invalid
Dim viewTypeId As ElementId = view.GetTypeId()
Dim viewTypeIdOne As ElementId = New ElementId(1L)
If viewTypeId > viewTypeIdOne Then
Dim viewFamilyType As ViewFamilyType = TryCast(doc.GetElement(viewTypeId), ViewFamilyType)
viewFamily__1 = viewFamilyType.ViewFamily
End If
Return viewFamily__1
End FunctionNo code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also