Classes | Macros | Typedefs | Enumerations
Named Views

NamedViews provide a mechanism for saving all the viewing parameters in the DgnFile by a specified Name. More...

Classes

struct  NamedViewCollection
 Each DgnFile has one associated NamedViewCollection. More...
 
struct  NamedViewPropMask
 The NamedViewPropMask. More...
 
struct  ViewBoundarySynchOptions
 
struct  NamedView
 Base named view class to sub-class from in order to create new view types. More...
 
struct  NamedViewDisplayableData
 View data handled by NamedViewDisplayable interface. More...
 
struct  NamedViewDisplayable
 Displayable counterpart to NamedViews. More...
 

Macros

#define VIEWTYPE_Basic   L"Basic"
 
#define VIEWTYPE_Plan   L"Plan"
 
#define VIEWTYPE_Section   L"Section"
 
#define VIEWTYPE_Elevation   L"Elevation"
 
#define VIEWTYPE_Detail   L"Detail"
 
#define VIEWTYPE_Markup   L"Markup"
 

Typedefs

typedef RefCountedPtr
< NamedViewPropMask > 
NamedViewPropMaskPtr
 A reference counted pointer to a NamedViewPropMask. More...
 

Enumerations

enum  NamedViewStatus {
  Success = 0, NameTooShort = NAMED_VIEW_ERROR_BASE + 1, NameTooLong = NAMED_VIEW_ERROR_BASE + 2, NameNotUnique = NAMED_VIEW_ERROR_BASE + 3,
  NameIllegalCharacter = NAMED_VIEW_ERROR_BASE + 4, ViewNotFound = NAMED_VIEW_ERROR_BASE + 5, NameOwningDgnFileUnknown = NAMED_VIEW_ERROR_BASE + 6, BadFile = NAMED_VIEW_ERROR_BASE + 7,
  CantWriteToFile = NAMED_VIEW_ERROR_BASE + 8, WrongHandler = NAMED_VIEW_ERROR_BASE + 9, CantSetHandler = NAMED_VIEW_ERROR_BASE + 10, ViewNotPersistent = NAMED_VIEW_ERROR_BASE + 11,
  CouldNotDelete = NAMED_VIEW_ERROR_BASE + 12, CantReplaceInFile = NAMED_VIEW_ERROR_BASE + 13, BadNamedView = NAMED_VIEW_ERROR_BASE + 14, BadTargetViewport = NAMED_VIEW_ERROR_BASE + 15,
  ModelNotFound = NAMED_VIEW_ERROR_BASE + 16, CantSaveXAttributes = NAMED_VIEW_ERROR_BASE + 17
}
 Possible status values returned from NamedView and NamedViewCollection methods. More...
 
enum  AnnotationAttachmentStatus {
  Success = 0, Error = ANNOTATIONATTACHMENT_ERROR_BASE + 1, NoDrawingLink = ANNOTATIONATTACHMENT_ERROR_BASE + 2, No3DReference = ANNOTATIONATTACHMENT_ERROR_BASE + 3,
  CantClip = ANNOTATIONATTACHMENT_ERROR_BASE + 4, NotNamedView = ANNOTATIONATTACHMENT_ERROR_BASE + 5, NoAnnotationAttachment = ANNOTATIONATTACHMENT_ERROR_BASE + 6, ActiveAnnotationAttachment = ANNOTATIONATTACHMENT_ERROR_BASE + 7
}
 Possible status values returned from Annotation Attachment methods. More...
 
enum  RefRangePathStatus {
  Success = 0, Error = REFRANGEPATH_ERROR_BASE + 1, ThlReference = REFRANGEPATH_ERROR_BASE + 2, No3DReference = REFRANGEPATH_ERROR_BASE + 3,
  NoIntersectingReference = REFRANGEPATH_ERROR_BASE + 4, DwgReference = REFRANGEPATH_ERROR_BASE + 5
}
 Possible status values returned while computing reference path by comparing ranges. More...
 
enum  ViewGraphicsType { Elements = 0, WireFrame = 1, VisibleEdges = 2 }
 View Graphics Type. More...
 
enum  NamedViewProp {
  Type = 0, Name = 1, Description = 2, LevelMasks = 3,
  GeomInfo_Origin = 4, GeomInfo_Delta = 5, GeomInfo_RotMatrix = 6, GeomInfo_Activez = 7,
  GeomInfo_CameraAngle = 8, GeomInfo_CameraFocalLen = 9, GeomInfo_CameraPosition = 10, GeomInfo_ViewFlags = 11,
  PortInfo_RelativeRect = 12, PortInfo_AspectRatio = 13, PortInfo_ViewPixelRect = 14, TypeSpecificData = 15,
  NAMEDVIEW_NUMPROPS = 16
}
 NamedView properties enumeration. Used as the index into the array of flags in NamedViewPropMask, which is returned from the NamedView::Compare method. More...
 
enum  ExtractReferenceViewInfoStatus {
  Success = 0, NotAssociatedToASavedView, IsSynchronizedWithSavedView, CouldNotAcquireViewData,
  UnexpectedError
}
 
enum  MarkupViewType { Standard = 0, Clash = 1, DV = 2 }
 

Detailed Description

NamedViews provide a mechanism for saving all the viewing parameters in the DgnFile by a specified Name.

Type name returned by NamedView::GetViewTypeName () and ViewElementHandler::GetViewTypeNameForPersistence ().

NamedViews can be recalled and applied to view windows to recreate the view that was previously saved. NamedViews are also used to specify the desired view for a DgnAttachment.

Each NamedView saves the ViewInfo and ViewPortInfo, along with a name and description.

There are a number of subtypes of NamedViews. Most of the subtypes, such as Section Views, Elevation Views, Detail Views, and Plan Views are used for specific drawing composition purposes. The subtypes store additional data as XAttributes.

The basic NamedViews have an ElementHandler of type ViewElementHandler, while the NamedView subtypes have an ElementHandler that is a subclass of ViewElementHandler. The NamedView ElementHandlers are the 'factory' classes for NamedViews.

NamedViews are stored in the DictionaryModel of the DgnFile. They are accessed through the NamedViewCollection, which is retrieved using the DgnFile::GetNamedViews method.

These are non-translatable strings that can be used to compare view types and for persisting view types in dgn files. Since they are persisted, they should never be changed.

Macro Definition Documentation

#define VIEWTYPE_Basic   L"Basic"
#define VIEWTYPE_Detail   L"Detail"
#define VIEWTYPE_Elevation   L"Elevation"
#define VIEWTYPE_Markup   L"Markup"
#define VIEWTYPE_Plan   L"Plan"
#define VIEWTYPE_Section   L"Section"

Typedef Documentation

typedef RefCountedPtr<NamedViewPropMask> NamedViewPropMaskPtr

A reference counted pointer to a NamedViewPropMask.

Enumeration Type Documentation

enum AnnotationAttachmentStatus
strong

Possible status values returned from Annotation Attachment methods.

Enumerator
Success 

The method succeeded.

Error 

General error.

NoDrawingLink 

The named view does not contain drawing link to create annotation attachment.

No3DReference 

Could not find reference to named view's 3D model.

CantClip 

Can't clip annotation attachment with drawing title boundary.

NotNamedView 

Given view is not a named view.

NoAnnotationAttachment 

Could not synchronize annotation attachment because it does not exist.

ActiveAnnotationAttachment 

Could not change annotation attachment because it is activated.

enum ExtractReferenceViewInfoStatus
strong
Enumerator
Success 
NotAssociatedToASavedView 
IsSynchronizedWithSavedView 
CouldNotAcquireViewData 
UnexpectedError 
enum MarkupViewType
strong
Enumerator
Standard 
Clash 
DV 
enum NamedViewProp
strong

NamedView properties enumeration. Used as the index into the array of flags in NamedViewPropMask, which is returned from the NamedView::Compare method.

Enumerator
Type 

View type.

Name 

View name.

Description 

View description.

LevelMasks 

Per-view Level Display Masks.

GeomInfo_Origin 

View origin.

GeomInfo_Delta 

View delta.

GeomInfo_RotMatrix 

View orientation.

GeomInfo_Activez 

Active Z.

GeomInfo_CameraAngle 

Camera Angle.

GeomInfo_CameraFocalLen 

Camera Focal Length.

GeomInfo_CameraPosition 

Camera Position.

GeomInfo_ViewFlags 

View Flags.

PortInfo_RelativeRect 

Screen-relative viewport rectangle.

PortInfo_AspectRatio 

Aspect Ratio.

PortInfo_ViewPixelRect 

Pixel rectangle.

TypeSpecificData 

Subtype-specific data.

NAMEDVIEW_NUMPROPS 
enum NamedViewStatus
strong

Possible status values returned from NamedView and NamedViewCollection methods.

Enumerator
Success 

The method succeeded.

NameTooShort 

The name specified is too short.

NameTooLong 

The name specified is too long.

NameNotUnique 

The name specified is not unique with the DgnFile.

NameIllegalCharacter 

The name contains an illegal character.

ViewNotFound 

The NamedView is not found.

NameOwningDgnFileUnknown 

The NamedView is not yet associated with a DgnFile.

BadFile 

The NamedView is not associated with a DgnFile.

CantWriteToFile 

An error occurred while trying to write the persistent data to the DgnFile. Perhaps the file is readonly.

WrongHandler 

Attempt to read the NamedView element with the wrong ElementHandler.

CantSetHandler 

Can not set the ElementHandler.

ViewNotPersistent 

Can not delete the NamedView because it is not persistent.

CouldNotDelete 

The NamedView's persistent representation cannot be deleted from the DgnFile. Perhaps the file is readonly.

CantReplaceInFile 

The NamedView's persistent representation cannot be replaced in the DgnFile. Perhaps the file is readonly.

BadNamedView 

Defect in the NamedView definition.

BadTargetViewport 

Attempt to Apply to a invalid viewport.

ModelNotFound 

The RootModelId specifed in the named view does not exist in the DgnFile.

CantSaveXAttributes 

At attempt to save XAttributes while creating the Named View Element failed.

enum RefRangePathStatus
strong

Possible status values returned while computing reference path by comparing ranges.

Enumerator
Success 

The method succeeded.

Error 

General error.

ThlReference 

Reference path is not complete because of True Hidden Line reference.

No3DReference 

No 3D reference was found.

NoIntersectingReference 

No intersecting reference was found.

DwgReference 
enum ViewGraphicsType
strong

View Graphics Type.

Enumerator
Elements 
WireFrame 
VisibleEdges 

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.