Download Here - The Building Coder

Transcript
Views
Method
Parameters
View3D NewView3D( ref XYZ
viewDirection)
viewDirection:
ViewPlan NewViewPlan(
pViewName:
string pViewName,
Vector pointing towards the viewer’s eye.
Level pLevel,
Name for the new plan view. It must be unique or a
null pointer.
ViewType viewType
pLevel:
Level associated with the plan view.
)
viewType:
Type of plan view created. It must be Floor Plan or
Ceiling Plan (Structural Plan in Structure).
ViewSection NewViewSection(
BoundingBoxXYZ box
box:
View orientation and bounds. The X axis points
towards the right of screen; Y - towards up; Z towards the user.
)
ViewSheet NewViewSheet(
titleBlock:
FamilySymbol titleBlock
The titleblock family symbol applied to the sheet.
)
ViewDrafting NewViewDrafting(
)
Table 38: Create View Element Methods
If a view is created successfully, these methods return a reference to the view, otherwise it returns
null. The methods are described in the following sections.
Delete a view by useing the Document.Delete method with the view ID. You can also delete viewdependent elements. For example, deleting the level element causes Revit to delete the
corresponding plan view or deleting the camera element causes Revit to delete the corresponding
3D view.
Note: Currently, you cannot gain access to Schedule views in the Revit 2008 API as there is no
NewScheduleView method.
14.2 View3D
View3D is a freely-oriented three-dimensional view. There are two kinds of 3D views, perspective
view and orthographic view. The difference between the two views is based on the projection ray
relationship. The View3D.IsPerspective property indicates whether a 3D view is perspective or
orthographic.
Complete the following steps to add a View3D by adding a camera.
1. From the toolbar click View > New > Camera.
2. Check the Perspective check box to add a perspective view or leave it blank to add an
orthographic view.
3. Click the drawing area to place the camera.
4. Select a point to specify the sight direction.
Figure 134: Perspective check box
Revit 2008 API User Manual
175