com.esri.arcgis.arcmap
Class Application

java.lang.Object
  extended by com.esri.arcgis.arcmap.Application
All Implemented Interfaces:
IApplicationWindows, IEnumPrinterNames, IMxApplication, IMxApplication2, IGxCatalogDefaultDatabase, IGxCatalogWorkspace, IGxApplication, IApplication, IApplicationStatus, IDockableWindowManager, IMultiThreadedApplication, IObjectFactory, IVbaApplication, IWindowPosition, com.esri.arcgis.interop.RemoteObjRef, IExtensionManager, Serializable

public class Application
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IApplication, IMxApplication, IMxApplication2, IVbaApplication, IExtensionManager, IEnumPrinterNames, IApplicationWindows, IMultiThreadedApplication, IDockableWindowManager, IWindowPosition, IObjectFactory, IApplicationStatus, IGxApplication, IGxCatalogWorkspace, IGxCatalogDefaultDatabase

ESRI ArcMap Application

Remarks

The Application object is the core object in the ArcMap and ArcCatalog applications. This object represents the application itself and acts as the central point where access is gained to other objects in the system. The Application object's primary interface is IApplication.

Instantiating a new MxDocument starts a new ArcMap application. Cocreating a new MxDocument actually creates a new Application object which in turn co-creates a new MxDocument.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
Application()
          Constructs a Application using ArcGIS Engine.
Application(Object obj)
          Construct a Application using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addIApplicationStatusEventsListener(IApplicationStatusEvents theListener)
          addIApplicationStatusEventsListener.
 void copyToClipboard()
          Copies the current view to the clipboard.
 Object create(Object objectID)
          Creates an instance of an object identified by objectID.
 void createCodeModule(String docName, String moduleName)
          Creates a code module in the specified VBA project.
 void deleteSelection()
          Deletes the current selection.
 boolean equals(Object o)
          Compare this object with another
 void expandSelection()
          Expands the current selection.
 void export()
          Exports the current document.
 IExtension findExtension(Object nameOrID)
          Finds the extension by CLSID (IUID) or name (String).
 IExtension findExtensionByCLSID(IUID extensionCLSID)
          Finds an extension by its CLSID.
 IExtension findExtensionByName(String extensionName)
          Finds an extension by its name.
 IEnvelope getAreaOfInterest()
          The default area of interest for the application.
 String getCaption()
          The caption of this application.
 IGxCatalog getCatalog()
          The current catalog.
static String getClsid()
          getClsid.
 ICommandItem getCurrentTool()
          The currently selected tool.
 ISet getDataWindows()
          The data windows in the application.
 IWorkspaceName getDefaultDatabaseName()
          The default geodatabase.
 IWorkspaceName getDefaultDatabaseNameNoValidate()
          The default geodatabase.
 IAppDisplay getDisplay()
          The application display.
 IDockableWindow getDockableWindow(IUID dockWnd)
          Finds a dockable window looking first in the collection and then in the category.
 IDocument getDocument()
          The document that is currently loaded in the application.
 IExtension getExtension(int index)
          The extension at the specified index.
 IUID getExtensionCLSID(int index)
          The CLSID of the extension at the specified index.
 int getExtensionCount()
          The number of extensions loaded in the application.
 int getHeight()
          The height of the window.
 int getHWnd()
          The handle of the application's window.
 int getLeft()
          The distance between the internal left edge of the window and screen.
 String getName()
          The name of this application.
 IPaper getPaper()
          The current paper settings.
 IPrinter getPrinter()
          The current printer settings.
 int getProcessID()
          The process ID for the application.
 IGxObject getSelectedObject()
          The first selected object, or the location if no objects are selected.
 IGxSelection getSelection()
          The selection of application.
 ISelectionEnvironment getSelectionEnvironment()
          The selection environment.
 int getState()
          The state of the window.
 IStatusBar getStatusBar()
          The statusbar of this application.
 ITemplates getTemplates()
          The templates collection.
 int getTop()
          The distance between the internal top edge of the window and screen.
 IGxTreeView getTreeView()
          The tree view.
 Object getVBE()
          The Visual Basic Environment.
 IGxView getView()
          The current view.
 IUID getViewClassID()
          The current view's class ID.
 int getWidth()
          The width of the window.
 String getWorkspaceFolderPath()
          The workspace path.
 int hashCode()
          the hashcode for this object
 void insertCode(String docName, String moduleName, String codeText)
          Inserts code into the specified module.
 boolean isCanDeleteSelection()
          Indicates if the current selection can be deleted.
 boolean isCanRenameSelection()
          Indicates if the current selection can be renamed.
 boolean isDialogVisible(int dialogID)
          Indicates if the specified dialog is visible in the application.
 boolean isInitialized()
          Is the application initialized.
 boolean isPauseDrawing()
          Pause display updates.
 boolean isUseWorkspaceFolder()
          Indicates if the catalog uses a workspace folder as a home folder.
 boolean isVisible()
          Indicates if the application window is visible.
 void lockCustomization(String password, ICustomizationFilter custFilter)
          Locks the application's user interface against any customizations.
 void move(int left, int top, int width, int height)
          Moves and optionally resizes the windows in a single function.
 void newDocument(boolean selectTemplate, String templatePath)
          Creates a new document in this application.
 String next()
          The next Printer Name.
 void openDocument(String path)
          Opens a document in this application.
 void openWorkspaceFolder(String workspaceFolderPath)
          Opens the document catalog.
 void printDocument()
          Displays the Print dialog.
 void printPreview()
          Displays how the document will look like when it is printed.
 void refresh(String startingPath)
          Refreshes the catalog tree starting at the specified path.
 void refreshWindow()
          Redraws the application window.
 int registerThreadManager(IDllThreadManager pThreadMgr)
          Registers a DLL thread manager with the application.
 void removeCodeModule(String docName, String moduleName)
          Removes a code module from the specified VBA project.
 void removeIApplicationStatusEventsListener(IApplicationStatusEvents theListener)
          removeIApplicationStatusEventsListener.
 void renameSelection()
          Renames the current selection.
 void reset()
          Reset the Enumeration to the beginning.
 Object runVBAMacro(String docName, String moduleName, String macroName, Object arguments)
          Runs the specified VBA macro.
 void saveAsDocument(String saveAsPath, boolean saveAsCopy)
          Saves the document that is currently open in this application to a different file.
 void saveDocument(String saveAsPath)
          Saves the document that is currently open in this application.
 void setAreaOfInterest(IEnvelope aoi)
          The default area of interest for the application.
 void setCaption(String caption)
          The caption of this application.
 void setCurrentToolByRef(ICommandItem tool)
          The currently selected tool.
 void setDefaultDatabaseName(IWorkspaceName ppWorkspaceName)
          The default geodatabase.
 void setDefaultDatabaseNameNoValidate(IWorkspaceName ppWorkspaceName)
          The default geodatabase.
 void setHeight(int height)
          The height of the window.
 void setLeft(int left)
          The distance between the internal left edge of the window and screen.
 void setLocation(String rhs1)
          The location to the specified path.
 void setPauseDrawing(boolean flag)
          Pause display updates.
 void setPrinterByRef(IPrinter printer)
          The current printer settings.
 void setState(int windowState)
          The state of the window.
 void setTop(int top)
          The distance between the internal top edge of the window and screen.
 void setUseWorkspaceFolder(boolean bUseWorkspaceFolder)
          Indicates if the catalog uses a workspace folder as a home folder.
 void setViewClassID(IUID viewClassID)
          The current view's class ID.
 void setVisible(boolean visible)
          Indicates if the application window is visible.
 void setWidth(int width)
          The width of the window.
 void showContextMenu(int x, int y)
          Displays a context menu for the current selection.
 Object showDialog(int dialogID, Object bShow)
          Displays the specified dialog in the application.
 void shutdown()
          Terminates the application.
 void unlockCustomization(String password)
          Unlocks previous user interface customization lock.
 void unregisterThreadManager(int mgrCookie)
          Unregisters a DLL thread manager with the application.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

Application

public Application()
            throws IOException,
                   UnknownHostException
Constructs a Application using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

Application

public Application(Object obj)
            throws IOException
Construct a Application using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to Application.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems Application theApplication = (Application) obj;
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

addIApplicationStatusEventsListener

public void addIApplicationStatusEventsListener(IApplicationStatusEvents theListener)
                                         throws IOException
addIApplicationStatusEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.framework.IApplicationStatusEvents interface.
Throws:
IOException - If there are communications problems.

removeIApplicationStatusEventsListener

public void removeIApplicationStatusEventsListener(IApplicationStatusEvents theListener)
                                            throws IOException
removeIApplicationStatusEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.framework.IApplicationStatusEvents interface.
Throws:
IOException - If there are communications problems.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of this application.

Remarks

Returns the string ArcMap for the ArcMap application.

Returns the string ArcCatalog for the ArcCatalog application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getName in interface IApplication
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDocument

public IDocument getDocument()
                      throws IOException,
                             AutomationException
The document that is currently loaded in the application.

Remarks

In ArcMap, the Document is the currently loaded document.
In ArcCatalog, the Document is the Normal template.

Both ArcMap and ArcCatalog applications are composed of several things including a document. The document is an object which controls the representation of data. In ArcMap, the document object is the MxDocument CoClass and in ArcCatalog it is the GxDocument CoClass. Access to these CoClasses is provided through this property.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getDocument in interface IApplication
Returns:
A reference to a com.esri.arcgis.framework.IDocument
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IDocument, GxDocument, com.esri.arcgis.arcmapUI.MxDocument

getStatusBar

public IStatusBar getStatusBar()
                        throws IOException,
                               AutomationException
The statusbar of this application.

Remarks

The status bar is the horizontal area at the bottom of an ArcGIS application window. It provides information about the selected command. For example, if you select a layer in the table of contents in ArcMap, the status bar will tell you how many features are currently selected. It may also display a progress bar while something is being processed.

The IStatusBar interface allows you to set the properties of the status bar.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getStatusBar in interface IApplication
Returns:
A reference to a com.esri.arcgis.system.IStatusBar
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IStatusBar

showDialog

public Object showDialog(int dialogID,
                         Object bShow)
                  throws IOException,
                         AutomationException
Displays the specified dialog in the application.

Description

Refer to the esriMxDlgIDs Constants help topic for a listing of the dialog ids in ArcMap.

Refer to the esriGxDlgIDs Constants help topic for a listing of the dialog ids in ArcCatalog.

Remarks

This example shows the TOC in ArcMap if it is not already visible. You would get m_app from the hook in ICommand::OnCreate().

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
showDialog in interface IApplication
Parameters:
dialogID - The dialogID (in)
bShow - A Variant (in, optional, pass null if not required)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.arcmapUI.esriMxDlgIDs, com.esri.arcgis.arccatalogui.esriGxDlgIDs

isDialogVisible

public boolean isDialogVisible(int dialogID)
                        throws IOException,
                               AutomationException
Indicates if the specified dialog is visible in the application.

Description

Refer to the esriMxDlgIDs Constants help topic for a listing of the dialog ids in ArcMap.

Refer to the esriGxDlgIDs Constants help topic for a listing of the dialog ids in ArcCatalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isDialogVisible in interface IApplication
Parameters:
dialogID - The dialogID (in)
Returns:
The bVisible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.arcmapUI.esriMxDlgIDs, com.esri.arcgis.arccatalogui.esriGxDlgIDs

getCurrentTool

public ICommandItem getCurrentTool()
                            throws IOException,
                                   AutomationException
The currently selected tool.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCurrentTool in interface IApplication
Returns:
A reference to a com.esri.arcgis.framework.ICommandItem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ICommandItem

setCurrentToolByRef

public void setCurrentToolByRef(ICommandItem tool)
                         throws IOException,
                                AutomationException
The currently selected tool.

Remarks

This VBA macro makes the Identify tool the currently selected tool in ArcMap.

 Public Sub SetCurrentTool()

   Dim pItem As ICommandItem

   ' Use the built-in ArcId module to find unique identifier 

   ' for the Identify tool

   Set pItem = CommandBars.Find(arcid.Query_Identify)

   Set Application.CurrentTool = pItem

 End Sub

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setCurrentToolByRef in interface IApplication
Parameters:
tool - A reference to a com.esri.arcgis.framework.ICommandItem (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ICommandItem

getVBE

public Object getVBE()
              throws IOException,
                     AutomationException
The Visual Basic Environment.

Remarks

The VBE is the root object that provides access to all other objects represented in Visual Basic for Applications that is embedded in the application.



Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getVBE in interface IApplication
Returns:
A reference to another Automation Object (IDispatch)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

newDocument

public void newDocument(boolean selectTemplate,
                        String templatePath)
                 throws IOException,
                        AutomationException
Creates a new document in this application.

Description

selectTemplate Specify True if you want the New document dialog to be opened to allow the user to select a template. [Optional]

templatePath is a string representing the path and filename of the template to base the new document on if selectTemplate is False. [Optional]

Remarks

If selectTemplate is True, the New document dialog is displayed.

If templatePath is not specified, the New document dialog is displayed regardless of the value of selectTemplate.

Note, this method does not work in ArcCatalog.

The following example creates a new document in ArcMap using the Normal template. You would get m_app from the hook in ICommand::OnCreate().

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
newDocument in interface IApplication
Parameters:
selectTemplate - The selectTemplate (in, optional, pass false if not required)
templatePath - The templatePath (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openDocument

public void openDocument(String path)
                  throws IOException,
                         AutomationException
Opens a document in this application.

Description

Path is a string representing the path and filename of the document to be opened. [Optional]

Remarks

If no Path is specified, the Open dialog is displayed.

Note, this method does not work in ArcCatalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
openDocument in interface IApplication
Parameters:
path - The path (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveDocument

public void saveDocument(String saveAsPath)
                  throws IOException,
                         AutomationException
Saves the document that is currently open in this application.

Description

saveAsPath is a string representing a path and filename for the document that is being saved. [Optional]

Remarks

If this document is a new document that has not been saved yet and a saveAsPath is not specified, the Save As dialog will be displayed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
saveDocument in interface IApplication
Parameters:
saveAsPath - The saveAsPath (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveAsDocument

public void saveAsDocument(String saveAsPath,
                           boolean saveAsCopy)
                    throws IOException,
                           AutomationException
Saves the document that is currently open in this application to a different file.

Description

saveAsPath is a string representing a new path and filename for the document that is being saved. [Optional]

saveAsCopy specify True if you want to save a copy of the document to a new filename but keep the original document open in the application; otherwise False. [Optional]

Remarks

If no saveAsPath is specified, the Save As dialog will be displayed.

Note, this method does not work in ArcCatalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
saveAsDocument in interface IApplication
Parameters:
saveAsPath - The saveAsPath (in, optional, pass null if not required)
saveAsCopy - The saveAsCopy (in, optional, pass false if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

printPreview

public void printPreview()
                  throws IOException,
                         AutomationException
Displays how the document will look like when it is printed.

Remarks

Note, this method does not work in ArcCatalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
printPreview in interface IApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

printDocument

public void printDocument()
                   throws IOException,
                          AutomationException
Displays the Print dialog.

Remarks

Note, this method does not work in ArcCatalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
printDocument in interface IApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

lockCustomization

public void lockCustomization(String password,
                              ICustomizationFilter custFilter)
                       throws IOException,
                              AutomationException
Locks the application's user interface against any customizations.

Description

password is a string representing a password. The string must be at least five characters long.

custFilter is a customization filter object which implements the ICustomizationFilter interface. [Optional]

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
lockCustomization in interface IApplication
Parameters:
password - The password (in)
custFilter - A reference to a com.esri.arcgis.framework.ICustomizationFilter (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ICustomizationFilter

unlockCustomization

public void unlockCustomization(String password)
                         throws IOException,
                                AutomationException
Unlocks previous user interface customization lock.

Description

password is a string representing the password that was used to lock customization. The string must be at least five characters long.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
unlockCustomization in interface IApplication
Parameters:
password - The password (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

refreshWindow

public void refreshWindow()
                   throws IOException,
                          AutomationException
Redraws the application window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
refreshWindow in interface IApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTemplates

public ITemplates getTemplates()
                        throws IOException,
                               AutomationException
The templates collection.

Remarks

The Templates object is a collection of the templates that are currently loaded in the application. In ArcCatalog, the Normal template, Normal.gxt, is the only template that is ever loaded. In ArcMap, there is either two or three templates loaded. The Normal template, Normal.mxt, is always loaded. Also, the document is considered a template is this case; there is always a document loaded in ArcMap. Optionally, the document can be based on another template referred to as a base template.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getTemplates in interface IApplication
Returns:
A reference to a com.esri.arcgis.framework.ITemplates
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ITemplates

getHWnd

public int getHWnd()
            throws IOException,
                   AutomationException
The handle of the application's window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getHWnd in interface IApplication
Returns:
The hWnd (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtensionByName

public IExtension findExtensionByName(String extensionName)
                               throws IOException,
                                      AutomationException
Finds an extension by its name.

Description

extensionName specifies the name of an extension as a string.

Remarks

To find the Name of an ESRI extension, refer to the following technical document:

ArcGIS Developer Help > Technical Documents > Names and IDs > Extensions

If an extension is registered as a Just-In-Time extension, FindExtensionByName may return nothing. The safest way to get a reference to any extension is to use FindExtensionByCLSID.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
findExtensionByName in interface IApplication
Parameters:
extensionName - The extensionName (in)
Returns:
A reference to a com.esri.arcgis.system.IExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IExtension

findExtensionByCLSID

public IExtension findExtensionByCLSID(IUID extensionCLSID)
                                throws IOException,
                                       AutomationException
Finds an extension by its CLSID.

Description

ExtensionCLSID specifies the unique identifier (UID) of an extension.

Remarks

COM coclasses are identified by a globally unique identifier (GUID). There are two formats for the GUID for a coclass: a class ID (CLSID) and a ProgID. The ProgID is a text alias for a CLSID. The UID coclass can be used to represent the GUID of an extension object. You can set the IUID.Value property to either the CLSID or the ProgID.

To find the CLSID and ProgID of an ESRI extension, refer to the following technical document:

ArcGIS Developer Help > Technical Documents > Names and IDs > Extensions

For your custom extensions, the ProgID is a string composed of the name of your project used to make the extension and the class name of the extension. For example if you have a Visual Basic project called MyCustomExt and there is a class module for your extension called clsMyExtension in that project, then the ProgID for this command would be "MyCustomExt.clsMyExtension". To find the CLSID for this command, you could search the system registry for this ProgID.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
findExtensionByCLSID in interface IApplication
Parameters:
extensionCLSID - A reference to a com.esri.arcgis.system.IUID (in)
Returns:
A reference to a com.esri.arcgis.system.IExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IExtension, IUID

shutdown

public void shutdown()
              throws IOException,
                     AutomationException
Terminates the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
shutdown in interface IApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isVisible

public boolean isVisible()
                  throws IOException,
                         AutomationException
Indicates if the application window is visible.

Remarks

Set the Visible property to True to make the application window visible.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isVisible in interface IApplication
Returns:
The visible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVisible

public void setVisible(boolean visible)
                throws IOException,
                       AutomationException
Indicates if the application window is visible.

Remarks

Set the Visible property to True to make the application window visible.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setVisible in interface IApplication
Parameters:
visible - The visible (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCaption

public void setCaption(String caption)
                throws IOException,
                       AutomationException
The caption of this application.

Remarks

The Caption is the string that appears as the title of the application's main window.
This VBA macro sets the title of the main ArcMap or ArcCatalog application window.
 Public Sub SetCaption()

     Application.Caption = "My Custom Application"

 End Sub 

 

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setCaption in interface IApplication
Parameters:
caption - The caption (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCaption

public String getCaption()
                  throws IOException,
                         AutomationException
The caption of this application.

Description

The Caption is the string that appears as the title of the application's main window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCaption in interface IApplication
Returns:
The caption
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPrinterByRef

public void setPrinterByRef(IPrinter printer)
                     throws IOException,
                            AutomationException
The current printer settings.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setPrinterByRef in interface IMxApplication
Specified by:
setPrinterByRef in interface IMxApplication2
Parameters:
printer - A reference to a com.esri.arcgis.output.IPrinter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPrinter

public IPrinter getPrinter()
                    throws IOException,
                           AutomationException
The current printer settings.

Remarks

This property returns an IPrinter interface. The IPrinter interface is the core component for printing a document, its members control the current printer settings and create printing jobs.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getPrinter in interface IMxApplication
Specified by:
getPrinter in interface IMxApplication2
Returns:
A reference to a com.esri.arcgis.output.IPrinter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPrinter

getPaper

public IPaper getPaper()
                throws IOException,
                       AutomationException
The current paper settings.

Remarks

The IPaper interface and the IPrint interface are the main components for printing. The IPaper interface controls the current paper settings. The IPrint interface has a Paper member which must be set for the print output to be correct.

The IPaper interface is persisted in the document when 'Same As Printer' is checked on in the Page Setup dialog.

In Microsoft Windows terms, the IPaper interface is a wrapper around the GDI DEVMODE and DEVNAME structures.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getPaper in interface IMxApplication
Specified by:
getPaper in interface IMxApplication2
Returns:
A reference to a com.esri.arcgis.output.IPaper
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPaper

getDisplay

public IAppDisplay getDisplay()
                       throws IOException,
                              AutomationException
The application display.

Remarks

This method returns a reference to the IAppDisplay interface. The AppDisplay CoClass implements IAppDisplay and it is the main display object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getDisplay in interface IMxApplication
Specified by:
getDisplay in interface IMxApplication2
Returns:
A reference to a com.esri.arcgis.display.IAppDisplay
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.arcmapUI.IAppDisplay

getSelectionEnvironment

public ISelectionEnvironment getSelectionEnvironment()
                                              throws IOException,
                                                     AutomationException
The selection environment.

Remarks

This property returns a reference to the ISelectionEnvironment interface. The selection environment is made up of a number of properties including area search distance, selection method, combination method, and the color in which to draw the selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSelectionEnvironment in interface IMxApplication
Specified by:
getSelectionEnvironment in interface IMxApplication2
Returns:
A reference to a com.esri.arcgis.carto.ISelectionEnvironment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ISelectionEnvironment

export

public void export()
            throws IOException,
                   AutomationException
Exports the current document.

Remarks

Calling this method launches the Export dialog. Supported export formats for the document are: EMF, EPS, PDF, AI, SVG, BMP, JPEG, PNG, GIF, and TIFF.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
export in interface IMxApplication
Specified by:
export in interface IMxApplication2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

copyToClipboard

public void copyToClipboard()
                     throws IOException,
                            AutomationException
Copies the current view to the clipboard.

Remarks

This method copies the ArcMap document to the system clipboard so that it can be copied into other applications. For example, after copying a document to the clipboard, you can paste it into a Word document. The type of object pasted is ESRI ArcMap Document.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
copyToClipboard in interface IMxApplication
Specified by:
copyToClipboard in interface IMxApplication2
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPauseDrawing

public void setPauseDrawing(boolean flag)
                     throws IOException,
                            AutomationException
Pause display updates.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setPauseDrawing in interface IMxApplication2
Parameters:
flag - The flag (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isPauseDrawing

public boolean isPauseDrawing()
                       throws IOException,
                              AutomationException
Pause display updates.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isPauseDrawing in interface IMxApplication2
Returns:
The flag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

runVBAMacro

public Object runVBAMacro(String docName,
                          String moduleName,
                          String macroName,
                          Object arguments)
                   throws IOException,
                          AutomationException
Runs the specified VBA macro.

Description

docName specifes the name of the VBA project that contains the macro you want to run.

moduleName specifes the name of the module that contains the macro you want to run.

MacroName specifies the name of the macro you want to run.

arguments is a Variant array that represents the arguments that you want to pass into this macro.

Remarks

If the macro is in the current document, docName will be "Project".

If the macro is in the Normal template, docName will be "Normal".

If the macro is in a template, docName will be "TemplateProject".

If you want to pass arguments into this macro you are running, first add the arguments to an array and then use that array for arguments parameter of the RunVBAMacro method.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
runVBAMacro in interface IVbaApplication
Parameters:
docName - The docName (in)
moduleName - The moduleName (in)
macroName - The macroName (in)
arguments - A Variant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createCodeModule

public void createCodeModule(String docName,
                             String moduleName)
                      throws IOException,
                             AutomationException
Creates a code module in the specified VBA project.

Description

docName specifes the name of the VBA project in which you want to create the module.

moduleName specifes the name of the module that you want to create.

Remarks

If you want to create the module in the current document, docName will be "Project".

If you want to create the module in the Normal template, docName will be "Normal".

If you want to create the module in a template, docName will be "TemplateProject".

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
createCodeModule in interface IVbaApplication
Parameters:
docName - The docName (in)
moduleName - The moduleName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeCodeModule

public void removeCodeModule(String docName,
                             String moduleName)
                      throws IOException,
                             AutomationException
Removes a code module from the specified VBA project.

Description

docName specifes the name of the VBA project from which you want to remove the module.

moduleName specifes the name of the module that you want to remove.

Remarks

If you want to remove a module from the current document, docName will be "Project".

If you want to remove a module from the Normal template, docName will be "Normal".

If you want to remove a module from a template, docName will be "TemplateProject".

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
removeCodeModule in interface IVbaApplication
Parameters:
docName - The docName (in)
moduleName - The moduleName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insertCode

public void insertCode(String docName,
                       String moduleName,
                       String codeText)
                throws IOException,
                       AutomationException
Inserts code into the specified module.

Description

docName specifes the name of the VBA project that contains the module in which you want to insert code.

moduleName specifes the name of the module in which you want to insert code. This module must already exist in the VBA project.

codeText is a string that represents all the code for the macro.

Remarks

If you want to insert code into a module in the current document, docName will be "Project".

If you want to insert code into a module in the Normal template, docName will be "Normal".

If you want to insert code into a module in a template, docName will be "TemplateProject".

The string for codeText must include all the text for the macro code including the sub procedure declaration and end sub.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
insertCode in interface IVbaApplication
Parameters:
docName - The docName (in)
moduleName - The moduleName (in)
codeText - The codeText (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtensionCount

public int getExtensionCount()
                      throws IOException,
                             AutomationException
The number of extensions loaded in the application.

Description

Returns the number of extensions currently loaded in the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtensionCount in interface IExtensionManager
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtension

public IExtension getExtension(int index)
                        throws IOException,
                               AutomationException
The extension at the specified index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getExtension in interface IExtensionManager
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.system.IExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtensionCLSID

public IUID getExtensionCLSID(int index)
                       throws IOException,
                              AutomationException
The CLSID of the extension at the specified index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getExtensionCLSID in interface IExtensionManager
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtension

public IExtension findExtension(Object nameOrID)
                         throws IOException,
                                AutomationException
Finds the extension by CLSID (IUID) or name (String).

Description

The FindExtension method will get an extension by either its name string or by its CLSID. Using IExtensionManager is not the only way to get a reference to an extension; the IApplication interface has FindExtensionByCLSID and FindExtensionByName methods.

nameOrID is a variant representing the identifier of the extension. This can either be the UID of the extension or the name string.

Remarks

COM coclasses are identified by a globally unique identifier (GUID). There two formats for the GUID for a coclass: a class ID (CLSID) and a ProgID. The ProgID is a text alias for a CLSID. The UID coclass can be used to represent the GUID of an extension object. You can set the IUID.Value property to either the CLSID or the ProgID.

To find the Name, CLSID, and ProgID of an ESRI extension, refer to the following technical document:

ArcObjects Developer Help > Technical Documents > Names and IDs > Extensions

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
findExtension in interface IExtensionManager
Parameters:
nameOrID - A Variant (in)
Returns:
A reference to a com.esri.arcgis.system.IExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Reset the Enumeration to the beginning.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
reset in interface IEnumPrinterNames
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

next

public String next()
            throws IOException,
                   AutomationException
The next Printer Name.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
next in interface IEnumPrinterNames
Returns:
The printerName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDataWindows

public ISet getDataWindows()
                    throws IOException,
                           AutomationException
The data windows in the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getDataWindows in interface IApplicationWindows
Returns:
A reference to a com.esri.arcgis.system.ISet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getProcessID

public int getProcessID()
                 throws IOException,
                        AutomationException
The process ID for the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getProcessID in interface IMultiThreadedApplication
Returns:
The pid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

registerThreadManager

public int registerThreadManager(IDllThreadManager pThreadMgr)
                          throws IOException,
                                 AutomationException
Registers a DLL thread manager with the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
registerThreadManager in interface IMultiThreadedApplication
Parameters:
pThreadMgr - A reference to a com.esri.arcgis.framework.IDllThreadManager (in)
Returns:
The mgrCookie
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unregisterThreadManager

public void unregisterThreadManager(int mgrCookie)
                             throws IOException,
                                    AutomationException
Unregisters a DLL thread manager with the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
unregisterThreadManager in interface IMultiThreadedApplication
Parameters:
mgrCookie - The mgrCookie (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDockableWindow

public IDockableWindow getDockableWindow(IUID dockWnd)
                                  throws IOException,
                                         AutomationException
Finds a dockable window looking first in the collection and then in the category.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getDockableWindow in interface IDockableWindowManager
Parameters:
dockWnd - A reference to a com.esri.arcgis.system.IUID (in)
Returns:
A reference to a com.esri.arcgis.framework.IDockableWindow
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLeft

public void setLeft(int left)
             throws IOException,
                    AutomationException
The distance between the internal left edge of the window and screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setLeft in interface IWindowPosition
Parameters:
left - The left (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLeft

public int getLeft()
            throws IOException,
                   AutomationException
The distance between the internal left edge of the window and screen.

Remarks

The Left property determines the position of the window in screen coordinates relative to the upper-left corner of the display screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getLeft in interface IWindowPosition
Returns:
The left
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTop

public void setTop(int top)
            throws IOException,
                   AutomationException
The distance between the internal top edge of the window and screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setTop in interface IWindowPosition
Parameters:
top - The top (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTop

public int getTop()
           throws IOException,
                  AutomationException
The distance between the internal top edge of the window and screen.

Remarks

The Top property determines the position of the window in screen coordinates relative to the upper-left corner of the display screen.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getTop in interface IWindowPosition
Returns:
The top
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWidth

public void setWidth(int width)
              throws IOException,
                     AutomationException
The width of the window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setWidth in interface IWindowPosition
Parameters:
width - The width (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWidth

public int getWidth()
             throws IOException,
                    AutomationException
The width of the window.

Remarks

The Height and Width properties determine the size of the window. This is in screen units.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getWidth in interface IWindowPosition
Returns:
The width
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHeight

public void setHeight(int height)
               throws IOException,
                      AutomationException
The height of the window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setHeight in interface IWindowPosition
Parameters:
height - The height (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHeight

public int getHeight()
              throws IOException,
                     AutomationException
The height of the window.

Remarks

The Height and Width properties determine the size of the window. This is in screen units.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getHeight in interface IWindowPosition
Returns:
The height
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

move

public void move(int left,
                 int top,
                 int width,
                 int height)
          throws IOException,
                 AutomationException
Moves and optionally resizes the windows in a single function.

Remarks

You can use the Move method to set the Left, Top, Width, and Height properties all at the same time.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
move in interface IWindowPosition
Parameters:
left - The left (in)
top - The top (in)
width - The width (in, optional, pass 0 if not required)
height - The height (in, optional, pass 0 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setState

public void setState(int windowState)
              throws IOException,
                     AutomationException
The state of the window.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setState in interface IWindowPosition
Parameters:
windowState - A com.esri.arcgis.framework.esriWindowState constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getState

public int getState()
             throws IOException,
                    AutomationException
The state of the window.

Remarks

The State property uses the esriWindowState enumeration to specify whether the window is normal, minimized, or maximized.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getState in interface IWindowPosition
Returns:
A com.esri.arcgis.framework.esriWindowState constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

create

public Object create(Object objectID)
              throws IOException,
                     AutomationException
Creates an instance of an object identified by objectID.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
create in interface IObjectFactory
Parameters:
objectID - A Variant (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isInitialized

public boolean isInitialized()
                      throws IOException,
                             AutomationException
Is the application initialized.

Description

Run-time user interface customizations should not be made before the application framework has fully initialized itself; the framework provides the IApplicationStatusEvents::Initialized event to signal when the framework has initialized as well as the IApplicationStatus::Initialized property that returns the currrent state.

Product Availability

Available with ArcGIS Desktop.

Specified by:
isInitialized in interface IApplicationStatus
Returns:
The pOut
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCatalog

public IGxCatalog getCatalog()
                      throws IOException,
                             AutomationException
The current catalog.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCatalog in interface IGxApplication
Returns:
A reference to a com.esri.arcgis.catalog.IGxCatalog
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getView

public IGxView getView()
                throws IOException,
                       AutomationException
The current view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getView in interface IGxApplication
Returns:
A reference to a com.esri.arcgis.catalogUI.IGxView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getViewClassID

public IUID getViewClassID()
                    throws IOException,
                           AutomationException
The current view's class ID.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getViewClassID in interface IGxApplication
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setViewClassID

public void setViewClassID(IUID viewClassID)
                    throws IOException,
                           AutomationException
The current view's class ID.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setViewClassID in interface IGxApplication
Parameters:
viewClassID - A reference to a com.esri.arcgis.system.IUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTreeView

public IGxTreeView getTreeView()
                        throws IOException,
                               AutomationException
The tree view.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getTreeView in interface IGxApplication
Returns:
A reference to a com.esri.arcgis.catalogUI.IGxTreeView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelection

public IGxSelection getSelection()
                          throws IOException,
                                 AutomationException
The selection of application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSelection in interface IGxApplication
Returns:
A reference to a com.esri.arcgis.catalog.IGxSelection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectedObject

public IGxObject getSelectedObject()
                            throws IOException,
                                   AutomationException
The first selected object, or the location if no objects are selected.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSelectedObject in interface IGxApplication
Returns:
A reference to a com.esri.arcgis.catalog.IGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLocation

public void setLocation(String rhs1)
                 throws IOException,
                        AutomationException
The location to the specified path. If the path isn't yet part of the catalog, it is added as a folder connection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

refresh

public void refresh(String startingPath)
             throws IOException,
                    AutomationException
Refreshes the catalog tree starting at the specified path. If startingPath is 0 or the empty string, the entire catalog is refreshed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
refresh in interface IGxApplication
Parameters:
startingPath - The startingPath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

showContextMenu

public void showContextMenu(int x,
                            int y)
                     throws IOException,
                            AutomationException
Displays a context menu for the current selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
showContextMenu in interface IGxApplication
Parameters:
x - The x (in)
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

expandSelection

public void expandSelection()
                     throws IOException,
                            AutomationException
Expands the current selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
expandSelection in interface IGxApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanDeleteSelection

public boolean isCanDeleteSelection()
                             throws IOException,
                                    AutomationException
Indicates if the current selection can be deleted.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isCanDeleteSelection in interface IGxApplication
Returns:
The pEnabled
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteSelection

public void deleteSelection()
                     throws IOException,
                            AutomationException
Deletes the current selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
deleteSelection in interface IGxApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanRenameSelection

public boolean isCanRenameSelection()
                             throws IOException,
                                    AutomationException
Indicates if the current selection can be renamed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isCanRenameSelection in interface IGxApplication
Returns:
The pEnabled
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

renameSelection

public void renameSelection()
                     throws IOException,
                            AutomationException
Renames the current selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
renameSelection in interface IGxApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAreaOfInterest

public IEnvelope getAreaOfInterest()
                            throws IOException,
                                   AutomationException
The default area of interest for the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getAreaOfInterest in interface IGxApplication
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAreaOfInterest

public void setAreaOfInterest(IEnvelope aoi)
                       throws IOException,
                              AutomationException
The default area of interest for the application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setAreaOfInterest in interface IGxApplication
Parameters:
aoi - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isUseWorkspaceFolder

public boolean isUseWorkspaceFolder()
                             throws IOException,
                                    AutomationException
Indicates if the catalog uses a workspace folder as a home folder.

Product Availability

Available with ArcGIS Desktop.

Specified by:
isUseWorkspaceFolder in interface IGxCatalogWorkspace
Returns:
The bUseWorkspaceFolder
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUseWorkspaceFolder

public void setUseWorkspaceFolder(boolean bUseWorkspaceFolder)
                           throws IOException,
                                  AutomationException
Indicates if the catalog uses a workspace folder as a home folder.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setUseWorkspaceFolder in interface IGxCatalogWorkspace
Parameters:
bUseWorkspaceFolder - The bUseWorkspaceFolder (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceFolderPath

public String getWorkspaceFolderPath()
                              throws IOException,
                                     AutomationException
The workspace path.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getWorkspaceFolderPath in interface IGxCatalogWorkspace
Returns:
The workspaceFolderPath
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openWorkspaceFolder

public void openWorkspaceFolder(String workspaceFolderPath)
                         throws IOException,
                                AutomationException
Opens the document catalog.

Product Availability

Available with ArcGIS Desktop.

Specified by:
openWorkspaceFolder in interface IGxCatalogWorkspace
Parameters:
workspaceFolderPath - The workspaceFolderPath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultDatabaseName

public IWorkspaceName getDefaultDatabaseName()
                                      throws IOException,
                                             AutomationException
The default geodatabase.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getDefaultDatabaseName in interface IGxCatalogDefaultDatabase
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspaceName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultDatabaseName

public void setDefaultDatabaseName(IWorkspaceName ppWorkspaceName)
                            throws IOException,
                                   AutomationException
The default geodatabase.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setDefaultDatabaseName in interface IGxCatalogDefaultDatabase
Parameters:
ppWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultDatabaseNameNoValidate

public IWorkspaceName getDefaultDatabaseNameNoValidate()
                                                throws IOException,
                                                       AutomationException
The default geodatabase. Does not perform validation on the geodatabase.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getDefaultDatabaseNameNoValidate in interface IGxCatalogDefaultDatabase
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspaceName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultDatabaseNameNoValidate

public void setDefaultDatabaseNameNoValidate(IWorkspaceName ppWorkspaceName)
                                      throws IOException,
                                             AutomationException
The default geodatabase. Does not perform validation on the geodatabase.

Product Availability

Available with ArcGIS Desktop.

Specified by:
setDefaultDatabaseNameNoValidate in interface IGxCatalogDefaultDatabase
Parameters:
ppWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.