com.esri.arcgis.arcglobe
Interface IGMxDocument

All Superinterfaces:
Serializable
All Known Implementing Classes:
GMxDocument, IGMxDocumentProxy

public interface IGMxDocument
extends Serializable

Provides access to members that control the ArcGlobe Document object.

Description

The IGMxDocument is a starting point for accessing most of the ArcGlobe objects. This interface allows you to manipulate ArcGlobe document specific properties and methods, such as storing a document with relative paths, changing the search tolerance in pixels, saving a preview of the globe document to be viewed in ArcCatalog, loading and saving ArcGlobe animation files (*.aga files), adding a layer in the TOC, and removing all the layers in the TOC of a globe document.

Remarks

Obtain a reference to IGMxDocument via IApplication::Document.

When To Use

This interface is a starting point for getting a handle to other objects in ArcGlobe desktop application. Almost every ArcGlobe desktop customization uses IGMxDocument one way or another.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.


Method Summary
 void addLayer(ILayer layer)
          Adds a layer to the current focus map.
 IContentsView2 getContentsView(int index)
          The contents view at the specified index.
 int getContentsViewCount()
          The number of contents views in the document.
 Object getContextItem()
          The item that is selected or was last right-clicked.
 IContentsView2 getCurrentContentsView()
          The current contents view of the document.
 IColor getDefaultColor(int type)
          The default color for the given type.
 IScene getScene()
          The scene.
 int getSearchTolerancePixels()
          The global search tolerance in pixels for selection.
 Object getSelectedItem()
          The selected item in the layer control.
 ILayer getSelectedLayer()
          The selected layer in the layer control.
 boolean isRelativePaths()
          Indicates if path names are stored relative to the document.
 boolean isSavePreview()
          Indicates if a preview image is saved in the document.
 void removeAllLayers()
          Removes all layers.
 void setContextItem(Object item)
          The item that is selected or was last right-clicked.
 void setCurrentContentsViewByRef(IContentsView2 view)
          The current contents view of the document.
 void setDefaultColor(int type, IColor color)
          The default color for the given type.
 void setDelayUpdateContents(boolean rhs1)
          Indicates whether to ignore document update notifications.
 void setRelativePaths(boolean relPaths)
          Indicates if path names are stored relative to the document.
 void setSavePreview(boolean savePreview)
          Indicates if a preview image is saved in the document.
 void setScene(IScene pScene)
          The scene.
 void setSearchTolerancePixels(int tol)
          The global search tolerance in pixels for selection.
 void updateContents()
          Notifies the document that the contents have been updated.
 

Method Detail

getSelectedLayer

ILayer getSelectedLayer()
                        throws IOException,
                               AutomationException
The selected layer in the layer control.

Remarks

This property provides a handle to the currently selected layer in the table of contents.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectedItem

Object getSelectedItem()
                       throws IOException,
                              AutomationException
The selected item in the layer control.

Remarks

Use the SelectedITem property to obtain a reference to the selected item in the TOC. This property returns an IUnknown because an item in the TOC can be any number f things. For example, when working with the Display tab the reference can be one of the layers, if a layer is selected.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getContextItem

Object getContextItem()
                      throws IOException,
                             AutomationException
The item that is selected or was last right-clicked.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setContextItem

void setContextItem(Object item)
                    throws IOException,
                           AutomationException
The item that is selected or was last right-clicked.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
item - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLayer

void addLayer(ILayer layer)
              throws IOException,
                     AutomationException
Adds a layer to the current focus map.

Remarks

This method is a shortcut to the AddLayer method on the IScene (IScene::AddLayer).

Note: Using IGMxDocument::AddLayer, the layer is added as draped on the globe surface, by default.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
layer - A reference to a com.esri.arcgis.carto.ILayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAllLayers

void removeAllLayers()
                     throws IOException,
                            AutomationException
Removes all layers.

Remarks

RemoveAllLayers deletes all the layers present in the Table Of Contents of the current ArcGlobe document and therefore, should be carefully used.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

updateContents

void updateContents()
                    throws IOException,
                           AutomationException
Notifies the document that the contents have been updated.

Remarks

Use UpdateContents to automatically refresh the active TOC.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDelayUpdateContents

void setDelayUpdateContents(boolean rhs1)
                            throws IOException,
                                   AutomationException
Indicates whether to ignore document update notifications.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
rhs1 - The rhs1 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSearchTolerancePixels

int getSearchTolerancePixels()
                             throws IOException,
                                    AutomationException
The global search tolerance in pixels for selection.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
The tol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSearchTolerancePixels

void setSearchTolerancePixels(int tol)
                              throws IOException,
                                     AutomationException
The global search tolerance in pixels for selection.

Remarks

The SearchTolerancePixels method changes the search tolerance in pixels. This is similar to changing the search tolerance on the Selection Options dialog on the user interface.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
tol - The tol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultColor

IColor getDefaultColor(int type)
                       throws IOException,
                              AutomationException
The default color for the given type.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Parameters:
type - A com.esri.arcgis.arcmapui.esriMxDefaultColorTypes constant (in)
Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultColor

void setDefaultColor(int type,
                     IColor color)
                     throws IOException,
                            AutomationException
The default color for the given type.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Parameters:
type - A com.esri.arcgis.arcmapui.esriMxDefaultColorTypes constant (in)
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getScene

IScene getScene()
                throws IOException,
                       AutomationException
The scene.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
A reference to a com.esri.arcgis.analyst3d.IScene
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setScene

void setScene(IScene pScene)
              throws IOException,
                     AutomationException
The scene.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
pScene - A reference to a com.esri.arcgis.analyst3d.IScene (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isRelativePaths

boolean isRelativePaths()
                        throws IOException,
                               AutomationException
Indicates if path names are stored relative to the document.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
The relPaths
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRelativePaths

void setRelativePaths(boolean relPaths)
                      throws IOException,
                             AutomationException
Indicates if path names are stored relative to the document.

Remarks

RelativePaths can be set to True for storing a document with relative paths. Setting the property to False stores the document with full paths.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
relPaths - The relPaths (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSavePreview

boolean isSavePreview()
                      throws IOException,
                             AutomationException
Indicates if a preview image is saved in the document.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
The savePreview
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSavePreview

void setSavePreview(boolean savePreview)
                    throws IOException,
                           AutomationException
Indicates if a preview image is saved in the document.

Remarks

The SavePreview property specifies whether or not a thumbnail image of the globe is displayed in ArcCatalog or not, when browsing globe documents. For saving a preview of the current ArcGlobe document, this proerty should be set to True.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
savePreview - The savePreview (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentContentsView

IContentsView2 getCurrentContentsView()
                                      throws IOException,
                                             AutomationException
The current contents view of the document.

Description

A contents view is a tab in the table of contents. ArcGlobe has three contents views: Display (TOCGMxDisplayView), Source (TOCGMxCatalogView), and Type (TOCGMxTypeView). Only one contents view can be active at a time. Use this property to set the current contents view and to get a reference to the current contents view. Setting the current contents view automatically calls IContentsView::Refresh.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
A reference to a com.esri.arcgis.arcmapui.IContentsView2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCurrentContentsViewByRef

void setCurrentContentsViewByRef(IContentsView2 view)
                                 throws IOException,
                                        AutomationException
The current contents view of the document.

Remarks

Use the CurrentContentsView to set the current contents view and to get a reference to the current contents view. Setting the current contents view automatically refreshes the table of contents (IContentsView::Refresh).

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Parameters:
view - A reference to a com.esri.arcgis.arcmapui.IContentsView2 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getContentsViewCount

int getContentsViewCount()
                         throws IOException,
                                AutomationException
The number of contents views in the document.

Remarks

A contents view is a tab in the table of contents. ArcGlobe has three contents views: Display (TOCGMxDisplayView), Source (TOCGMxCatalogView), and Type (TOCGMxTypeView). Only one contents view can be active at a time. This property returns the number of contents views registered in the ESRI Contents Views component category.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Supported Platforms

Windows

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getContentsView

IContentsView2 getContentsView(int index)
                               throws IOException,
                                      AutomationException
The contents view at the specified index.

Product Availability

Available with ArcGIS Desktop. Requires 3D Analyst Extension.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.arcmapui.IContentsView2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.