Static Public Member Functions | List of all members
DimensionHandler Struct Reference

The default type handler for Dimension elements (type: DIMENSION_ELM). More...

#include <DimensionHandler.h>

Inheritance diagram for DimensionHandler:
DisplayHandler IDimensionEdit ITransactionHandler IAnnotationHandler ITextEdit Handler IDimensionQuery ITextQuery NonCopyableClass

Static Public Member Functions

static DGNPLATFORM_EXPORT
BentleyStatus 
GetTextPointNo (int &pointNo, ElementHandleCR element, int segmentNo)
 Utility method to get the point number from a given segment number. More...
 
static DGNPLATFORM_EXPORT
BentleyStatus 
CreateDimensionElement (EditElementHandleR eeh, IDimCreateDataCR createData, DimensionType dimType, bool is3d, DgnModelRefR modelRef)
 Create a new dimension element with the supplied properties. More...
 
- Static Public Member Functions inherited from DisplayHandler
static DisplayHandlerGetInstance ()
 
static void InitializeBasis (EditElementHandleR eh, TransformCR transform, DRange3dCP range)
 Initialize basis for an element - In most cases this should be done only once at creation. More...
 
- Static Public Member Functions inherited from ITransactionHandler
static void CallOnAdded (ElementHandleR)
 
static void CallOnAddedComplete (ElementHandleR)
 

Additional Inherited Members

- Public Types inherited from ITextEdit
enum  ReplaceStatus { ReplaceStatus_Success = 0, ReplaceStatus_Error = 1, ReplaceStatus_Delete = 2 }
 
- Public Member Functions inherited from DisplayHandler
void GetPathDescription (ElementHandleCR el, WStringR string, DisplayPathCP path, WCharCP levelStr, WCharCP modelStr, WCharCP groupStr, WCharCP delimiterStr)
 Return a full description of the path to be used to inform the user which element is under consideration. More...
 
void GetTransformOrigin (ElementHandleCR el, DPoint3dR origin)
 Get the Transform Origin for this element. More...
 
void GetSnapOrigin (ElementHandleCR el, DPoint3dR origin)
 Get the snap origin for this element. More...
 
void GetOrientation (ElementHandleCR el, RotMatrixR orientation)
 Get an "orientation" RotMatrix for this element. More...
 
bool GetBasisTransform (ElementHandleCR eh, TransformR transform)
 Get an "basis" Transform for this element. More...
 
bool GetBasisRange (ElementHandleCR eh, DRange3dR range)
 Get an basis Range for this element. More...
 
void SetBasisRange (EditElementHandleR eh, DRange3dCR range)
 Set an basis Range for this element. More...
 
void SetBasisTransform (EditElementHandleR eh, TransformCR transform)
 Set an basis Transform for this element. More...
 
bool IsRenderable (ElementHandleCR el)
 Determine whether this element is renderable (i.e., subject to lighting). More...
 
bool IsPlanar (ElementHandleCR el, DVec3dP normal, DPoint3dP point, DVec3dCP inputDefaultNormal)
 Test whether this element is planar. More...
 
bool IsVisible (ElementHandleCR el, ViewContextR context, bool testRange, bool testLevel, bool testClass)
 Determine whether this element is visible in the supplied context. More...
 
StatusInt Drop (ElementHandleCR eh, ElementAgendaR dropGeom, DropGeometryCR geometry)
 Drop this element to a group of (simpler) primitive elements. More...
 
- Public Member Functions inherited from Handler
void GetDescription (ElementHandleCR el, WStringR string, UInt32 desiredLength)
 Get a brief string describing the element. More...
 
void GetTypeName (WStringR string, UInt32 desiredLength)
 Get the type name for this handler. More...
 
DisplayHandlerP GetDisplayHandler ()
 Use this method instead of dynamic_cast<DisplayHandlerP> (handler) More...
 
ITransactionHandlerP GetITransactionHandler ()
 Use this method instead of dynamic_cast<ITransactionHandlerP> (handler) More...
 
IDependencyHandlerP GetIDependencyHandler ()
 Use this method instead of dynamic_cast<IDependencyHandlerP> (handler) More...
 
StatusInt ApplyTransform (EditElementHandleR element, TransformInfoCR transform)
 Transform the element. More...
 
StatusInt FenceStretch (EditElementHandleR element, TransformInfoCR transform, FenceParamsP fp, FenceStretchFlags options)
 The handler is requested to "stretch" the specified element, that is, to transform the portions of the element that meet the clip criteria. More...
 
StatusInt FenceClip (ElementAgendaP inside, ElementAgendaP outside, ElementHandleCR element, FenceParamsP fp, FenceClipFlags options)
 The handler is requested to clip the specified element, that is, to return the portions of the element that are inside/outside the clip criteria. More...
 
void ConvertTo3d (EditElementHandleR eeh, double elevation)
 Convert a 2d element to it's 3d form. More...
 
void ConvertTo2d (EditElementHandleR eeh, TransformCR flattenTrans, DVec3dCR flattenDir)
 Convert a 3d element to it's 2d form. More...
 
void QueryProperties (ElementHandleCR eh, PropertyContextR context)
 Method for enummerating the common properties of elements such as color and level. More...
 
void EditProperties (EditElementHandleR eeh, PropertyContextR context)
 Method for changing the common properties of elements such as color and level. More...
 
bool ExposeChildren (ElementHandleCR el, ExposeChildrenReason reason)
 Determine whether the children of this element should be exposed to the caller for the intended purpose. More...
 
- Public Member Functions inherited from IDimensionEdit
DGNPLATFORM_EXPORT void ApplyDimensionStyle (EditElementHandleR eeh, DimensionStyleCR dimStyle, bool retainOverrides)
 Modify the properties of a dimension element to conform to the provided dimension style object. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetPoint (EditElementHandleR eeh, DPoint3dCP point, AssocPoint const *assocPt, int iPoint)
 Insert a new point into a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus InsertPoint (EditElementHandleR eeh, DPoint3dCP point, AssocPoint const *assocPt, DimensionStyleCR dimStyle, int iPoint)
 Insert a new point into a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetHeight (EditElementHandleR eeh, double height)
 Modify the height of a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetJustification (EditElementHandleR eeh, int segmentNo, DimStyleProp_Text_Justification just)
 Modify the justification of a segment in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetWitnessVisibility (EditElementHandleR eeh, int pointNo, bool value)
 Modify the visibility of a witness line in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetWitnessUseAltSymbology (EditElementHandleR eh, int pointNo, bool value)
 Modify whether the witness line uses an alternate symbology. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetRotationMatrix (EditElementHandleR eeh, RotMatrixCR rmatrix)
 Modify the rotation matrix of a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus DeletePoint (EditElementHandleR dim, int pointNo)
 Deletes the vertex at pointNo from a dimension element. More...
 
DGNPLATFORM_EXPORT
DgnHandlersStatus 
SetProxyCell (EditElementHandleR dimElement, DgnPlatform::ElementId const &proxyCellId, DPoint3dCR origin, RotMatrixCR rotMatrix)
 Set the proxy cell element used in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetTextOffset (EditElementHandleR dimElement, int segmentNo, DPoint2dCR offset)
 Set text offset in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetViewRotation (EditElementHandleR dimElement, RotMatrixCR rMatrix)
 Set view rotation stored in a dimension element. More...
 
DGNPLATFORM_EXPORT void SetAngularDimensionClockWiseSweep (EditElementHandleR dimElement, bool value)
 Set the clockwise sweep flag stored in an angular dimension. More...
 
DGNPLATFORM_EXPORT BentleyStatus SetPointsForLabelLine (EditElementHandleR eeh, DSegment3dCP segment, HitPathP hitPath, double offset, RotMatrixCR viewRMatrix, DimensionStyleCR dimStyle)
 Insert a new point into a dimension element. More...
 
- Public Member Functions inherited from IDimensionQuery
DGNPLATFORM_EXPORT DimensionType GetDimensionType (ElementHandleCR eh) const
 Query the type of a dimension element. More...
 
DGNPLATFORM_EXPORT
DimensionStylePtr 
GetDimensionStyle (ElementHandleCR eh) const
 Get an object representing the style of a dimension element. More...
 
DGNPLATFORM_EXPORT
DimStylePropMaskPtr 
GetOverrideFlags (ElementHandleCR eh) const
 Query the local overrides from the dimension's style. More...
 
DGNPLATFORM_EXPORT int GetNumPoints (ElementHandleCR eh) const
 Query the number of points in dimension element. More...
 
DGNPLATFORM_EXPORT int GetNumSegments (ElementHandleCR eh) const
 Query the number of segements present in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus ExtractPoint (ElementHandleCR eh, DPoint3dR point, int iPoint) const
 Query a point from a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetHeight (ElementHandleCR eh, double &height) const
 Query the height of a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetJustification (ElementHandleCR eh, int segmentNo, DimStyleProp_Text_Justification &just) const
 Query the justification of a text in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetWitnessVisibility (ElementHandleCR eh, int pointNo, bool &value) const
 Query the visibility of a witness line in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetWitnessUseAltSymbology (ElementHandleCR eh, int pointNo, bool &value) const
 Query whether the witness line uses an alternate symbology. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetRotationMatrix (ElementHandleCR eh, RotMatrixR rmatrix) const
 Query for the rotation matrix of a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetProxyCell (ElementHandleCR dimElement, DgnPlatform::ElementId &proxyCellId, DPoint3dP origin, RotMatrixP rotMatrix) const
 Query for existence of a proxy cell element used in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetTextOffset (ElementHandleCR dimElement, int segmentNo, DPoint2dR offset) const
 Query for the text offset in a dimension element. More...
 
DGNPLATFORM_EXPORT BentleyStatus GetViewRotation (ElementHandleCR dimElement, RotMatrixR rmatrix) const
 Query for the view rotation stored in a dimension element. More...
 
DGNPLATFORM_EXPORT bool GetAngularDimensionClockWiseSweep (ElementHandleCR dimElement) const
 Get the clockwise sweep flag stored in an angular dimension. More...
 
- Public Member Functions inherited from IAnnotationHandler
bool HasAnnotationScale (double *annotationScale, ElementHandleCR element) const
 Query if the specified element is an annotation. More...
 
StatusInt AddAnnotationScale (EditElementHandleR eh, DgnModelRefP model)
 Set up annotation scale on eh. More...
 
StatusInt RemoveAnnotationScale (EditElementHandleR eh)
 Remove annotation scale from eh. More...
 
- Public Member Functions inherited from ITextEdit
DGNPLATFORM_EXPORT
ITextEditRestrictionsPtr 
GetTextPartEditRestrictions (ElementHandleCR, ITextPartIdCR) const
 Get an ITextEditRestrictions object to determine any restrictions on editing a text part. More...
 
DGNPLATFORM_EXPORT ReplaceStatus ReplaceTextPart (EditElementHandleR, ITextPartIdCR, TextBlockCR)
 Replaces an existing piece of text with a new one. More...
 
- Public Member Functions inherited from ITextQuery
DGNPLATFORM_EXPORT bool IsTextElement (ElementHandleCR) const
 Determines if this element is a standard DGN text element (e.g. type 7 or 17). Many element types support ITextQuery, but it is sometimes useful to know if the element is generic text as opposed to some other element type that exposes formatted text. If a handler returns true, it is guaranteed to provide a single ITextPartId when queried. More...
 
DGNPLATFORM_EXPORT bool DoesSupportFields (ElementHandleCR) const
 Determines if this element supports fields. More...
 
DGNPLATFORM_EXPORT ITextPartIdPtr GetTextPartId (ElementHandleCR, HitPathCR) const
 Gets the ITextPartId for the piece of text indicated by the hitpath (or NULL). This is most useful for non generic DGN text element handlers, which can store more than just text in them. More...
 
DGNPLATFORM_EXPORT void GetTextPartIds (ElementHandleCR, ITextQueryOptionsCR, T_ITextPartIdPtrVectorR) const
 Gets ITextPartIds for all pieces of text in this element. More...
 
DGNPLATFORM_EXPORT TextBlockPtr GetTextPart (ElementHandleCR, ITextPartIdCR) const
 Generates and returns a TextBlock representing the provided ITextPartId. More...
 
- Protected Types inherited from ITransactionHandler
enum  PreActionStatus { PRE_ACTION_Ok = 0, PRE_ACTION_Block = 1 }
 
- Protected Member Functions inherited from ITransactionHandler
virtual void _OnUndoRedo (ElementHandleP afterUndoRedo, ElementHandleP beforeUndoRedo, ChangeTrackAction action, bool isUndo, ChangeTrackSource source)
 Called when an element is changed by either the Undo or Redo command in MicroStation. More...
 
virtual void _OnHistoryRestore (ElementHandleP after, ElementHandleP before, ChangeTrackAction actionStep, BentleyDgnHistoryElementChangeType effectiveChange)
 Called when an element is changed by design history to restore a historical version. More...
 
virtual void _OnUndoRedoFinished (ElementRefP element, bool isUndo)
 Called after undo/redo has restored all elements involved in the transaction and after all undo/redo callbacks have been invoked. More...
 
virtual void _OnDeleted (ElementHandleP element)
 Called after an element is deleted from a model. More...
 
virtual void _OnAdded (ElementHandleP element)
 Called after an element is added to a model. More...
 
virtual void _OnAddedComplete (ElementHandleP element)
 Called after an element is added to a model. More...
 
virtual void _OnModified (ElementHandleP newElement, ElementHandleP oldElement, ChangeTrackAction action, bool *cantBeUndoneFlag)
 Called after an element is directly changed in MicroStation and the DgnModel holds the new state of the element. More...
 
virtual void _OnUndoRedoXAttributeChange (XAttributeHandleCR xAttr, ChangeTrackAction action, bool isUndo, ChangeTrackSource source)
 Called whenever an XAttribute is changed by either the Undo or Redo command in MicroStation. More...
 
virtual void _OnXAttributeChanged (XAttributeHandleCR xAttr, ChangeTrackAction action, bool *cantBeUndoneFlag)
 Called when an XAttribute has been added, removed, or modified on the element. More...
 
virtual PreActionStatus _OnAdd (EditElementHandleR)
 
virtual PreActionStatus _OnReplace (EditElementHandleR, ElementHandleCR)
 
virtual PreActionStatus _OnDelete (ElementHandleCR)
 
virtual PreActionStatus _OnRemoveHandler (ElementHandleCR)
 

Detailed Description

The default type handler for Dimension elements (type: DIMENSION_ELM).

Remarks
Required library : DgnPlatform<ApiNumber>.lib i.e. DgnPlatform5.lib

Member Function Documentation

static DGNPLATFORM_EXPORT BentleyStatus CreateDimensionElement ( EditElementHandleR  eeh,
IDimCreateDataCR  createData,
DimensionType  dimType,
bool  is3d,
DgnModelRefR  modelRef 
)
static

Create a new dimension element with the supplied properties.

Parameters
eehOUT the new element
createDataIN properties used to create the element
dimTypeIN the type of dimension to create
is3dIN pass true to create a 3d element
modelRefIN model with which to associate this element
Returns
SUCCESS if the element was created
static DGNPLATFORM_EXPORT BentleyStatus GetTextPointNo ( int &  pointNo,
ElementHandleCR  element,
int  segmentNo 
)
static

Utility method to get the point number from a given segment number.


The documentation for this struct was generated from the following file:

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