Share

View Object


Description

The View object represents a view in a document.

Methods

Name Description
Activate Method that causes this view to become the active view (i.e. receive user-focus).
Close Method that closes the view. If only one view exists for a document and the Close method is called it will also cause the Document to close.
Fit Method that fits all of the contents of the document within the view. Can optionally cause the display of the view to be updated.
GetWindowExtents Method that returns the current size and position of the view's window.
GoHome Method that sets the view to the default view of the model.
Move Method that moves the window this view is contained within.
ResetFront Method that resets the front view to the factory default.
SaveAsBitmap Method that saves the view as a bitmap.
SaveAsBitmapWithOptions Method that saves the view as a bitmap with more options. The width and height arguments define the aspect ratio and the number of pixels in the output image. The Options argument allow you to define more effects for the bitmap.
SaveAsBitmapWithRayTracing Method that saves the view with ray tracing on as a bitmap in one of the following types: bmp, jpg, png, tiff, and gif.
SetCurrentAsFront Method that sets the current view as the front view.
SetCurrentAsHome Method that sets the current view as the home view.
SetCurrentAsTop Method that sets the current view as the top view.
StartRenderingRateRecord Method that starts a rendering rate record for the graphics window.
StopRenderingRateRecord Method that stops the rendering rate record for the graphics window and gets the results.
Update Method that causes the view to update. In some cases, changes made to a model or to the view will not immediately be shown in the view and the Update method must be called to cause the view to refresh.

Properties

Name Description
Application Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned.
AreTexturesOn Gets and sets whether to turn textures on.
Camera Property that returns a Camera object which contains the information that defines the current contents of the view.
Caption Gets/Sets the caption on this View's window.
DisplayMode Gets/Sets the Display Mode on this View's window.
DisplaySeparateColorsType Read-write property that gets and sets which type of display separate colors will be applied.
Document Property that returns the the view is associated with.
Height Gets/Sets the Height of the view window.
HWND Property that returns the hWnd for the window. This provides convenient access to the window's hWnd. Having the hWnd allows you to use various Windows API calls with the window.
IsRayTracingPaused Gets and sets whether the current ray tracing process is paused. If this property returns true then set it to false will continue the current ray tracing.
Left Gets/Sets the distance between the left edge of the view window and left edge of the frame window.
NoiseReductionEnabled Read-write property that gets and sets whether the noise reduction is enabled or not when ray tracing is enabled.
Parent Property that returns the parent object from whom this object can logically be reached.
RayTracing Gets and sets whether to enable ray tracing for the view.
RayTracingProgress Gets the progress in percentage of the ray tracing process.
RayTracingQuality Gets and sets the quality used when ray tracing is enabled.
ShowAmbientShadows Gets and sets whether to display ambient shadows.
ShowGroundPlane Gets and sets whether to display the ground plane.
ShowGroundReflections Gets and sets whether to display ground reflections.
ShowGroundShadows Gets and sets whether to display ground shadows.
ShowObjectShadows Gets and sets whether to display object shadows.
Top Gets/Sets the distance between the top of the view window and top of the frame window.
Type Returns an ObjectTypeEnum indicating this object's type.
ViewFrame Read-only property that returns the ViewFrame this view is located in.
ViewTab Read-only property that returns the ViewTab of this view.
Visible Gets/Sets the visibility of this View.
Width Gets/Sets the Width of the view window.
WindowState Gets/Sets this windows state.

Accessed From

Application.ActiveView, ViewList.Item, Views.Add, Views.Item, ViewsEnumerator.Item

Samples

Name Description
Drive the camera This sample will fly the camera around the model. To simplify the code, the target is hard coded at the origin and the up vector is the positive Z.
Create sheet metal face and fold features This sample demonstrates the creation of sheet metal face and fold features.
Client graphics texture-based color mapping This test applies texture coordinates expressing distance from the origin to 'the triangle mesh of whatever Part you have open. It then creates either a discrete-band or continuous color mapper and allows you to adjust the values of the mapper to change the range of values that map to various colors.
Create sheet metal lofted flange feature The following sample demonstrates the creation of a sheet metal lofted flange feature.
Client graphics - image in point graphics The following sample demonstrates creation of point client graphics with a custom image.
Create sheet metal rip feature This sample demonstrates the creation of a rip sheet metal feature.
Transient solid body creation The following sample demonstrates the creation of a transient solid block body. The newly created body is then displayed using client graphics in a part.
Client graphics creation of 3D primitives This sample demonstrates the creation of 3D primitives (cylinder, cone, etc.) using client graphics.
Create curve primitives This sample demonstrates the creation of curve primitives (lines, arcs, circles, etc.) using client graphics.
Cancel a double click Demonstrates how to receive (and in this case, cancel) a double click from a user.
OnDrag Event - dragging a WorkPoint This sample demonstrates the use of the OnDrag event to drag fixed work points when no command is active. This sample only allows drags parallel to the X-Y plane. This sample is dependent on events and VB only supports events within a class module.

Version

Introduced in version 4