DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Expand DG Kernel ControlsDG Kernel Controls
Expand API ReferenceAPI Reference
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Models > Entities > Model Items > View Points Go to DGKC docs Search Documentation


Viewpoints

 
Models keep an array of viewpoints (Viewpoint Array). A viewpoint keeps information about the current configuration of view, which is the result of the previous viewing manipulations Zoom/Pan/Rotate. This information can be saved with the model and used to restore the configuration programmatically via IViewPoint_DG.SetCurrent method.

One of viewpoints can be set as the Default Viewpoint. Default viewpoint is restored automatically on the model load, including application start-up.

Viewpoints stored in the Viewpoint Array are called Persistent Viewpoints. View of  a DG Kernel Component also maintains a single viewpoint called Transient Viewpoint. It is not saved with the model and exists only to facilitate programmatic modification for the configuration of view.

Viewpoints are entities, hence they have Name and Visibility properties, which can be managed via IEntity_DG interface. Viewpoints are always top-level items, so they do not have parents. Like Entities viewpoints have Local Frame property. Its visibility can be managed via IEntity_DG interface.

Collection of Persistent viewpoints is managed by IViewPointArray_DG interface, which can be queried via path: DG Kernel > GetView > IView_DG > IViewPointArray_DG.

IArray_DG queried via path: DG Kernel > GetView > GetExtendedProperties() > IDictionary_DG > GetInterface("ViewPoints") > IArray_DG allows some additional operations like search for a viewpoint by its name, changing order of viewpoints in the array and insertion of an existing viewpoint.

Individual viewpoint is managed by IViewPoint_DG, which can be obtained with ViewPointArray.GetAt.

IViewPoint_DG for the transient viewpoint can be queried directly from IView_DG without any add or create operations.

To add a new persistent viewpoint use IViewPointArray_DG.Add. The new viewpoint will store the current configuration of view automatically.

Name and other properties of the added viewpoint can be modified in the Model Explorer.

See also Point Of View Sample