The ViewFamily for this view type.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Examples

public ViewFamily GetViewFamily(Document doc, View view)
{
ViewFamily viewFamily = ViewFamily.Invalid;
ElementId viewTypeId = view.GetTypeId();
if (viewTypeId.IntegerValue > 1) // some views may not have a ViewFamilyType
{
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()
If viewTypeId.IntegerValue > 1 Then
' some views may not have a ViewFamilyType
Dim viewFamilyType As ViewFamilyType = TryCast(doc.GetElement(viewTypeId), ViewFamilyType)
viewFamily__1 = viewFamilyType.ViewFamily
End If
Return viewFamily__1
End Function