View3DCreatePerspective Method |
Returns a new perspective View3D.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntaxpublic static View3D CreatePerspective(
Document document,
ElementId viewFamilyTypeId
)
Public Shared Function CreatePerspective (
document As Document,
viewFamilyTypeId As ElementId
) As View3D
public:
static View3D^ CreatePerspective(
Document^ document,
ElementId^ viewFamilyTypeId
)
static member CreatePerspective :
document : Document *
viewFamilyTypeId : ElementId -> View3D
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 perspective View3D.
ExceptionsException | 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.
See Also