EditItemEx

This method replaces EditItem (now reserved) and should be used instead. Places a specified item in edit mode and positions the property sheet, if opened, in the specified position on the 3D Window. The flags parameter provides control over the display of the property sheet (e.g., whether to display the property sheet with or without the top toolbar) and over the initial edit and move modes. In TerraExplorer GUI, these modes are set using the property sheet toolbar:

Graphical user interface, text, application Description automatically generated.

 

JavaScript

 

EditItemEx

       ID,

       Flags

       propertySheetVisibleGroups

       Left

       Top)

 

C#

 

void EditItemEx (  

       string ID,

       EditItemFlags Flags = EditItemFlags.EDIT_ITEM_SHOW_PROPERTY,

       object propertySheetVisibleGroups = 0,

       [int Left = int.MaxValue],

       [int Top = int.MaxValue])

 

C++

 

HRESULT EditItemEx (

       [in] BSTR ID,

       [in] EditItemFlags Flags,

       [in] VARIANT propertySheetVisibleGroups,

       [in] long Left,`

       [in] long Top)

Parameters

ID

The ID of the item to edit.

Flags 

An enum that determines the edit and move modes and the display of the property sheet. The Flags enum is divided into four subgroups. This parameter can use a combination of values from each of the subgroups, but no more than one value from each subgroup can be used.

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

·          EDIT_ITEM_USE_PROPERTY = 0 (reserved)

·          EDIT_ITEM = 1
Sets the edit mode to edit polyline and polygon objects.

·          EDIT_ITEM_VERTICES = 2
Sets the edit mode to edit the nodes of polyline and polygon objects.

·          EDIT_ITEM_BUILDING_ROOF = 3
Sets the edit mode to edit the building roof.

·          EDIT_ITEM_MOVE_Y = 4 (reserved)

·          EDIT_ITEM_VERTICES_Y = 6 (reserved)

·          EDIT_ITEM_DRAG_TO_CURSOR = 7
Sets the edit mode to drag the object without an additional click. In all other modes, the mouse button must be held down while moving the object.

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

·          EDIT_ITEM_SHOW_PROPERTY = 256
Open the property sheet including the top toolbar to edit the item.

·          EDIT_ITEM_SHOW_PROPERTY_TOOLBAR = 512
Open only the property sheet toolbar to edit the item.

·          EDIT_ITEM_SHOW_PROPERTY_WITHOUT_TOOLBAR = 1024
Open the property sheet without the top toolbar to edit the item.

·          EDIT_ITEM_SHOW_PROPERTY_WITH_UNDO_REDO_TOOLBAR = 2048
Open the property sheet with a toolbar that only includes the undo and redo commands.

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

·          EDIT_ITEM_MOVE_MODE_XY = 4096
Sets the edit mode to move in the XY plane.

·          EDIT_ITEM_MOVE_MODE_Z = 8192
Sets the edit mode to move in the Z plane.

·          EDIT_ITEM_MOVE_MODE_MAGNET = 16384
Sets the edit mode to move 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.

Snap Group – Use only one of the following values:

·          EDIT_ITEM_SNAP_NEW = 32768
Sets the edit mode to snap to other objects based on the selected snapping option. See "Snapping Options" in ISGWorld.SetOptionParam and the TerraExplorer User Guide for more information.

propertySheetVisibleGroups

An array of enum values that determines the groups that should be visible in the property sheet. Only values relevant to the item being edited should be included in the array.

The following enum values are supported:

·          PSVG_NONE = 0,

·          PSVG_TRACK_LINE_STYLE = 1,

·          PSVG_APPEARANCE = 2,

·          PSVG_MODEL = 3,

·          PSVG_POSITION = 4,

·          PSVG_GEOMETRY = 5,

·          PSVG_SETTINGS = 6,

·          PSVG_GENERAL = 7,

·          PSVG_ATTACMENT_OFFSET = 8,

·          PSVG_ATTACHMENT_OBJECTS = 9,

·          PSVG_COLOR_AND_INTENSITY = 10,

·          PSVG_EFFECT = 11,

·          PSVG_FLOOD_DATA = 12,

·          PSVG_ELEVATION = 13,

·          PSVG_PROJECTION = 14,

·          PSVG_CONNECTION = 15,

·          PSVG_IMPORT_LAYER = 16,

·          PSVG_IMPORT_ATTRIBUTE_FIELDS = 17,

·          PSVG_LAYER_BOUNDING_BOX = 18,

·          PSVG_LOC = 19,

·          PSVG_VISIBILITY_CONDITION = 20,

·          PSVG_REFRESH_CONDITION = 21,

·          PSVG_SYMBOL = 22,

·          PSVG_IMAGE_LABEL_OPTIONS = 23,

·          PSVG_OBSERVER = 24,

·          PSVG_TARGETS = 25,

·          PSVG_ANALYSIS = 26,

·          PSVG_MODIFY_TERRAIN = 27,

·          PSVG_POINTS_POS = 28,

·          PSVG_LINE_STYLE = 29,

·          PSVG_LABEL_OPTIONS = 30,

·          PSVG_LABEL_ALIGNMENT = 31,

·          PSVG_3D_MODEL = 32,

·          PSVG_DYNAMIC_OBJS = 33,

·          PSVG_TEXTURE = 34,

·          PSVG_BUILDINGS = 35,

·          PSVG_POINT_CLOUD = 36,

·          PSVG_IMAGE_OPTIONS = 37,

·          PSVG_VOLUME = 38,

·          PSVG_MIN_MAX_VALS = 39,

·          PSVG_IMAGERY = 40,

·          PSVG_TEXT_OPTIONS = 41,

·          PSVG_TEXT_N_IMAGE_ALIGNMENT = 42,

·          PSVG_ATTRIBUTES = 43,

·          PSVG_OBJ_OPTIONS = 44,

·          PSVG_ROUTE_OPTION = 45,

·          PSVG_WAY_POINTS = 46,

·          PSVG_VIDEO = 47,

·          PSVG_PROJECTOR = 48,

·          PSVG_VIEWER_POS = 49,

·          PSVG_VISIBILITY = 50

Left

The property sheet's top left X position (in pixels) relative to the 3D Window top left position.

Top

The property sheet's top left Y position (in pixels) relative to the 3D Window top left position.

 

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the Project Tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Cannot use Tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

Item ID is a group so an object cannot be retrieved.