Returns a new isometric View3D.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public static View3D CreateIsometric(
Document document,
ElementId viewFamilyTypeId
)
Parameters
- document Document
-
The document to which the new View3D will be added.
- viewFamilyTypeId ElementId
-
The id of the ViewFamilyType which will be used by the new View3D. The type needs to be a ThreeDimensional ViewType.
Return Value
View3D
The new isometric View3D.
Exceptions
| Exception | Condition |
|---|
| ArgumentException |
This View Family Type is not a ThreeDimensional view type.
-or-
3D view creation is not allowed in this family.
|
| ArgumentNullException |
A non-optional argument was null
|
| ModificationForbiddenException |
The document is in failure mode: an operation has failed,
and Revit requires the user to either cancel the operation
or fix the problem (usually by deleting certain elements).
-or-
The document is being loaded, or is in the midst of another
sensitive process.
|
| ModificationOutsideTransactionException |
The document has no open transaction.
|
Remarks
The new View3D will receive a unique view name. The view will be oriented in the same position as the default 3D view.
Example
VB
Dim collector1 As New FilteredElementCollector(document)
collector1 = collector1.OfClass(GetType(ViewFamilyType))
Dim viewFamilyTypes As IEnumerable(Of ViewFamilyType)
viewFamilyTypes = From elem In collector1 _
Let vftype = TryCast(elem, ViewFamilyType) _
Where vftype.ViewFamily = ViewFamily.ThreeDimensional _
Select vftype
Dim view3D__1 As View3D = View3D.CreateIsometric(document, viewFamilyTypes.First().Id)
If view3D__1 IsNot Nothing Then
Dim eye As New XYZ(10, 10, 10)
Dim up As New XYZ(0, 1, 1)
Dim forward As New XYZ(0, 1, -1)
Dim viewOrientation3D As New ViewOrientation3D(eye, up, forward)
view3D__1.SetOrientation(viewOrientation3D)
End If
See Also
Reference