DrawFeature

Activates an interactive mode for drawing a layer feature in the 3D World. The drawing process and style can be controlled using the related drawing events: OnDrawingAbort, OnDrawingFinished, and OnDrawingGeometryChanged. The IFeature return value can be used to set any of the properties of the drawn feature.

Note:    The Position of the returning  IFeature feature should not be modified until the draw action is complete, i.e., until the OnDrawingFinished event is sent.

 

JavaScript

 

DrawFeature (

       DrawingMode,

       Left,

       Top)

 

C#

 

IFeature80 DrawFeature (

       DrawingMode = DrawingMode.DRAW_MODE_MAGNET,

       int Left = int.MaxValue,

       int Top = int.MaxValue)

 

C++

 

HRESULT DrawFeature(

       [in] DrawingMode DrawingMode

       [in] long Left,

       [in] long Top,

       [out, retval] IFeature80** pIFeature80)

Parameters

DrawingMode

An enum that determines a feature object's initial move mode, i.e., how it is moved in the 3D Window, and how the property sheet is displayed when the object is created. The DrawingMode enum is divided into two subgroups. This parameter can use a combination of values from the two subgroups, but no more than one value from each subgroup can be used.

Property Sheet Display Group – Use only one of the following values:

·          DRAW_MODE_SHOW_PROPERTY = 1
Open the property sheet including the top toolbar to edit the object.

·          DRAW_MODE_SHOW_PROPERTY_TOOLBAR = 2
Open only the property sheet toolbar to edit the item.

Move Mode Group – Use only one of the following values:

·          DRAW_MODE_MAGNET = 4
Sets the edit mode to move the object based on where the mouse is pointing in the 3D Window. This makes it easier to move an object or node on a vertical plane or above a 3DML layer or other terrain object.

·          DRAW_MODE_XY = 8    
Set the edit mode to move the object in the XY plane.

Left

Determines the placement of the feature's property sheet. Left position relative to Render 3D Window. The default in full property sheet mode is the last position of the full property sheet. The default in property sheet panel mode is the last positon of the panel property sheet.

Top

Determines the placement of the feature's property sheet. Top position relative to Render 3D Window. The default in full property sheet mode is the last position of the full property sheet. The default in property sheet panel mode is the last positon of the panel property sheet.

Return Value

pIFeature80

An IFeature80 representing the newly added feature. . The return object can be used to set any of the properties of the drawn object.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.