|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.arcmapui.MxDocument
public class MxDocument
ESRI Mx Document.
The map document (MxDocument) is the ArcMap running application. The overall role of the map document is to control the representation of data . This object implements several interfaces including IMxApplication and IDocument. IMxDocument is a starting point for accessing most of the other ArcMap objects including the collection of maps, the page layout, and the style gallery. The IDocument interface provides access to the document's title, type, accelerator table, CommandBars collection, and VBA project.
There is one map document per session of ArcMap. Instantiating a new MxDocument starts a new ArcMap application. Actually, creating a new MxDocument really creates a new Application object which in turn co-creates a new MxDocument.
To edit the contents of a map document saved to a file (*.mxd) outside of an ArcMap session or without instantiating a new Application (ArcMap process), see IMapDocument. IMapDocument provides the ability to edit and save the contents of a map document.
Constructor Summary | |
---|---|
MxDocument()
Constructs a MxDocument using ArcGIS Engine. |
|
MxDocument(Object obj)
Construct a MxDocument using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
void |
addContentsView(IContentsView contentsView)
Adds a contents view object to the TOC. |
void |
addDataGraph(IDataGraphBase graph)
Adds the graph to the collection. |
void |
addIDataGraphCollectionEventsListener(IDataGraphCollectionEvents theListener)
addIDataGraphCollectionEventsListener. |
void |
addIDocumentEventsDispListener(IDocumentEventsDisp theListener)
addIDocumentEventsDispListener. |
void |
addIDocumentEventsListener(IDocumentEvents theListener)
addIDocumentEventsListener. |
void |
addLayer(ILayer layer)
Adds a layer to the current focus map. |
boolean |
applies(Object pUnk)
Indicates if the receiver can apply the given object at any given time. |
Object |
apply(Object newObject)
Applies the given property to the receiver and returns the old object. |
boolean |
canApply(Object pUnk)
Indicates if the receiver can apply the given object at that particular moment. |
void |
canInsertObject(boolean[] pEnabled)
Indicates if the document allows objects to be inserted. |
boolean |
changeLayout()
Indicates if the wizard used to select a new layout is shown. |
void |
clearContentsViews()
Removes all current contents views. |
void |
close()
Close the map document. |
void |
createPreview()
Creates a thumbnail preview of the document. |
void |
deletePreview()
Deletes the thumbnail preview of the document. |
void |
enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
enumConnectionPoints |
boolean |
equals(Object o)
Compare this object with another |
void |
esri_new(String sDocument)
Creates and opens a new map document in preparation for the contents to be retrieve or updated. |
void |
findConnectionPoint(GUID riid,
IConnectionPoint[] ppCP)
findConnectionPoint |
IAcceleratorTable |
getAccelerators()
The accelerator table for this document. |
IActiveView |
getActivatedView()
The activated view. |
IActiveView |
getActiveView()
The active view. |
ICommand |
getActiveViewCommand()
The command associated with the active view. |
IAreaPatch |
getAreaPatch()
Default Area Patch. |
String |
getAuthor()
The author of the document. |
IFormattedTextSymbol |
getCallout()
Default Callout. |
String |
getCategory()
The category of the document. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
ICommandBars |
getCommandBars()
The commandbars collection in this document. |
String |
getComments()
Comments for the document. |
IContentsView |
getContentsView(int index)
The contents view at the specified index. |
int |
getContentsViewCount()
The number of contents views in the document. |
Object |
getContextItem()
The last item that was right-clicked. |
ILatLonFormat |
getCoordinateReadoutLatLonFormat()
The format used for the coordinate readout on the status bar. |
int |
getCoordinateReadoutUnits()
The units used for the coordinate readout on the status bar. |
String |
getCredits()
The credits of the document. |
Object |
getCurrent(Object pUnk)
The object currently being used. |
IContentsView |
getCurrentContentsView()
The current contents view of the document. |
IPoint |
getCurrentLocation()
The current mouse location in map units. |
Font |
getCustomTOCFont()
Custom TOC Font. |
double |
getCustomTOCFontSize()
Custom TOC Font Size in Points. |
IDataGraphBase |
getDataGraph(int index)
Graph at the given index. |
int |
getDataGraphCount()
Number of graphs in the collection. |
IEnumDataset |
getDatasets()
The datasets in the document. |
Object |
getDateExported()
Date the document was last exported. |
Object |
getDatePrinted()
Date the document was last printed. |
Object |
getDateSaved()
Date the document was last saved. |
IColor |
getDefaultColor(int type)
The default color for the given type. |
Font |
getDefaultTextFont()
The default font for text. |
IFontSize |
getDefaultTextFontSize()
The default font size for text. |
String |
getDocumentFilename()
The map document filename that the MapDocument coclass is linked to. |
String |
getDocumentTitle()
The title of the document. |
int |
getDocumentType()
The type of map document currently loaded in the object. |
int |
getDocumentVersion()
The version of the document to save. |
IFillSymbol |
getFillSymbol()
Default Fill Symbol. |
IMap |
getFocusMap()
The current focus map. |
String |
getFolder()
The folder of the document. |
String |
getHyperlinkBase()
The hyperlink base of the document. |
IUID |
getID()
The unique id for this document. |
String |
getKeywords()
The keywords for the document. |
ILatLonFormat |
getLatLonFormat()
The format object used for reporting lat-lon values. |
ILayer |
getLayer(int mapIndex,
int layerIndex)
The Layer object at the specified index for the specified map. |
ILinePatch |
getLinePatch()
Default Line Patch. |
ILineSymbol |
getLineSymbol()
Default Line Symbol. |
IMap |
getMap(int mapIndex)
The Map object at the specified index. |
int |
getMapCount()
The number of Map objects contained within the map document. |
IMaps |
getMaps()
The collection of maps in the document. |
IMarkerSymbol |
getMarkerSymbol()
Default Marker Symbol. |
String |
getName()
The name of the document. |
INumberFormat |
getNumericFormat()
The format object used for reporting numeric values. |
IOperationStack |
getOperationStack()
The operation stack. |
IPageLayout |
getPageLayout()
The page layout. |
IApplication |
getParent()
The application in which this document is open. |
double |
getPatchHeight()
Default Patch Height in Points. |
double |
getPatchWidth()
Default Patch Width in Points. |
String |
getPath()
The path of the document. |
IPrinter |
getPrinter()
The printer object. |
double |
getSearchTolerance()
The global search tolerance in geographic units for selection. |
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. |
IStyleGallery |
getStyleGallery()
Reference to the document's Style Gallery. |
String |
getSubject()
The subject of the document. |
ITableProperties |
getTableProperties()
Table properties, for Layers and Tables in ArcMap. |
ITextSymbol |
getTextSymbol()
Default Text Symbol. |
IPicture |
getThumbnail()
The thumbnail stored in the map document. |
String |
getTitle()
The title of this document. |
int |
getType()
The type of this document. |
Object |
getVBProject()
The VBProject for this document. |
void |
getVersionInfo(boolean[] versionInfoMissing,
int[] lMajor,
int[] lMinor,
int[] lRevision,
int[] lBuild)
Retrieve the detailed version information of the map document. |
int |
hashCode()
the hashcode for this object |
void |
insertObject()
Inserts an object into the document. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isHasPreviewSaved()
Indicates the presence of a thumbnail preview in the document. |
boolean |
isHasPreviewToSave()
Indicates the presence of a thumbnail preview to be saved with the document. |
boolean |
isMapDocument(String sDocument)
Indicates if the map document is a valid map document. |
boolean |
isPasswordProtected(String sDocument)
Indicates if the map document is protected by a passsword. |
boolean |
isPresent(String sDocument)
Indicates if the map document is present. |
boolean |
isReadOnly(String sDocument)
Indicates if the map document is read only. |
boolean |
isRelativePaths()
Indicates if path names are stored relative to the document. |
boolean |
isRestricted(String sDocument)
Indicates if the use of the map document is restricted to certain applications. |
boolean |
isSavePreview()
Indicates if a preview of the document is saved when the document is saved. |
boolean |
isUsesRelativePaths()
Indicates if the data in the map document is referenced using relative paths. |
void |
open(String sDocument,
String bsPassword)
Open the map document in preparation for the contents to be retrieve or updated. |
void |
removeAllDataGraphs()
Removes all graphs from the collection. |
void |
removeDataGraph(IDataGraphBase graph)
Removes the graph from the collection. |
void |
removeIDataGraphCollectionEventsListener(IDataGraphCollectionEvents theListener)
removeIDataGraphCollectionEventsListener. |
void |
removeIDocumentEventsDispListener(IDocumentEventsDisp theListener)
removeIDocumentEventsDispListener. |
void |
removeIDocumentEventsListener(IDocumentEvents theListener)
removeIDocumentEventsListener. |
void |
replaceContents(IMxdContents pObject)
Replace the contents of the map document. |
void |
save(boolean bUseRelativePaths,
boolean bCreateThumnbail)
Save the contents of the map document to the bound file. |
void |
saveAs(String sDocument,
boolean bUseRelativePaths,
boolean bCreateThumnbail)
Save the contents of the map document to the specified file name. |
void |
setActiveView(IActiveView pActiveView)
Set the ActiveView content of the map document. |
void |
setActiveViewByRef(IActiveView activeView)
The active view. |
void |
setAreaPatch(IAreaPatch patch)
Default Area Patch. |
void |
setAuthor(String author)
The author of the document. |
void |
setCallout(IFormattedTextSymbol callout)
Default Callout. |
void |
setCategory(String category)
The category of the document. |
void |
setClean()
Resets the dirty flag on the document. |
void |
setComments(String comments)
Comments for the document. |
void |
setContextItem(Object item)
The last item that was right-clicked. |
void |
setCoordinateReadoutLatLonFormatByRef(ILatLonFormat format)
The format used for the coordinate readout on the status bar. |
void |
setCoordinateReadoutUnits(int units)
The units used for the coordinate readout on the status bar. |
void |
setCredits(String credits)
The credits of the document. |
void |
setCurrentContentsViewByRef(IContentsView view)
The current contents view of the document. |
void |
setCurrentLocation(IPoint mouseLoc)
The current mouse location in map units. |
void |
setCustomTOCFont(Font font)
Custom TOC Font. |
void |
setCustomTOCFontSize(double fontSizePts)
Custom TOC Font Size in Points. |
void |
setDefaultColor(int type,
IColor color)
The default color for the given type. |
void |
setDefaultTextFont(Font fontDisp)
The default font for text. |
void |
setDefaultTextFontSize(IFontSize fontSize)
The default font size for text. |
void |
setDelayUpdateContents(boolean rhs1)
Indicates document update notifications should be ignored. |
void |
setDirty()
Sets the dirty flag on the document. |
void |
setDocumentTitle(String title)
The title of the document. |
void |
setDocumentVersion(int docVersion)
The version of the document to save. |
void |
setFillSymbol(IFillSymbol lSymbol)
Default Fill Symbol. |
void |
setHyperlinkBase(String path)
The hyperlink base of the document. |
void |
setKeywords(String keywords)
The keywords for the document. |
void |
setLatLonFormatByRef(ILatLonFormat format)
The format object used for reporting lat-lon values. |
void |
setLinePatch(ILinePatch patch)
Default Line Patch. |
void |
setLineSymbol(ILineSymbol lineSymbol)
Default Line Symbol. |
void |
setMarkerSymbol(IMarkerSymbol markerSymbol)
Default Marker Symbol. |
void |
setNumericFormatByRef(INumberFormat format)
The format object used for reporting numeric values. |
void |
setPageLayoutByRef(IPageLayout pageLayout)
The page layout. |
void |
setPatchHeight(double heightPts)
Default Patch Height in Points. |
void |
setPatchWidth(double widthPts)
Default Patch Width in Points. |
void |
setRelativePaths(boolean relPaths)
Indicates if path names are stored relative to the document. |
void |
setSavePreview(boolean savePreview)
Indicates if a preview of the document is saved when the document is saved. |
void |
setSearchTolerancePixels(int tol)
The global search tolerance in pixels for selection. |
void |
setSubject(String subject)
The subject of the document. |
void |
setTextSymbol(ITextSymbol textSymbol)
Default Text Symbol. |
void |
updateContents()
Notifies the document that the contents have been updated. |
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 |
---|
public MxDocument() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic MxDocument(Object obj) throws IOException
obj
to MxDocument
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
MxDocument theMxDocument = (MxDocument) obj;
Method Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void addIDocumentEventsDispListener(IDocumentEventsDisp theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.arcmapui.IDocumentEventsDisp interface.
IOException
- If there are communications problems.public void removeIDocumentEventsDispListener(IDocumentEventsDisp theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.arcmapui.IDocumentEventsDisp interface.
IOException
- If there are communications problems.public void addIDocumentEventsListener(IDocumentEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.arcmapui.IDocumentEvents interface.
IOException
- If there are communications problems.public void removeIDocumentEventsListener(IDocumentEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.arcmapui.IDocumentEvents interface.
IOException
- If there are communications problems.public void addIDataGraphCollectionEventsListener(IDataGraphCollectionEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.carto.IDataGraphCollectionEvents interface.
IOException
- If there are communications problems.public void removeIDataGraphCollectionEventsListener(IDataGraphCollectionEvents theListener) throws IOException
theListener
- An object that implements the com.esri.arcgis.carto.IDataGraphCollectionEvents interface.
IOException
- If there are communications problems.public IApplication getParent() throws IOException, AutomationException
getParent
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IApplication
public String getTitle() throws IOException, AutomationException
Title returns the name of the currently loaded document or template. It returns "Untitled" if the document has never been saved. If the document object is the Normal template, Title returns Normal.mxt.
Note that file extension is included with the name (e.g. MyDocument.mxd) if the Windows Explorer Folder Option "Hide extensions for known file types" is unchecked when the document is opened. Otherwise, Title returns the name without the file extension.
getTitle
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ICommandBars getCommandBars() throws IOException, AutomationException
CommandBars is a collection of all the toolbars available to a document. The ICommandBars interface allows you to set properties for all the commandbars and to create, find, or hide commandbars.
getCommandBars
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ICommandBars
public IAcceleratorTable getAccelerators() throws IOException, AutomationException
An AcceleratorTable is an object that contains a list of accelerator keys and the command identifiers associated with them.
getAccelerators
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAcceleratorTable
public IUID getID() throws IOException, AutomationException
getID
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getType() throws IOException, AutomationException
Use the Type property to determine whether the document object is the document, a base template, or the Normal template. Type returns an esriDocumentType enumeration.
getType
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.esriDocumentType
public Object getVBProject() throws IOException, AutomationException
The VBProject property returns a reference to the VBA VBProject object associated with the document. Use the VBProject object to set properties for the project, to access the VBComponents collection (all the modules, class modules, forms, etc. in the project), and to access the References collection.
In the Visual Basic Editor in ArcMap, there can be up to three VBA projects. The document, the base template, and the Normal template all have a VBA project. In the following snapshot of the Project Explorer, the VBA project for the Normal template is called Normal (Normal.mxt). The VBA project for the current document is called Project (MyMap.mxd). This document is based on a template so there is also a VBA project for the template called TemplateProject (MyBase.mxt).
In the Visual Basic Editor in ArcCatalog, there is only one VBA project - Normal (Normal.gxt).
getVBProject
in interface IDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPageLayoutByRef(IPageLayout pageLayout) throws IOException, AutomationException
setPageLayoutByRef
in interface IBasicDocument2
setPageLayoutByRef
in interface IMxDocument
pageLayout
- A reference to a com.esri.arcgis.carto.IPageLayout (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPageLayout getPageLayout() throws IOException, AutomationException
This method returns an IPageLayout reference to the PageLayout object. The page layout is the visual representation of a map. A typical page layout is composed of a page and many elements including data, graphics, and text.
From an object point of view, the PageLayout object has a Page object and a collection of Element objects. The page is used to manage page size and printing. Element objects include MapFrames, GraphicElements, and TextElements. Anything that can be placed on a map is a type of element.
Athough, you can programmatically create your own page layout and assign it to the map document, the general practice is to modify the existing one.
getPageLayout
in interface IBasicDocument2
getPageLayout
in interface IMxDocument
getPageLayout
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPageLayout
public IActiveView getActiveView() throws IOException, AutomationException
This method provides access to the active view. ArcMap currently supports two types of views, layout view and data view; the view with focus is the active view. If ArcMap is in layout view, this property returns an IActiveView reference to the PageLayout object. Alternatively, if ArcMap is in data view, the returned IActiveView reference is to a Map object. Both the PageLayout and Map objects implement the IActiveView interface.
Note, an ArcMap document may have multiple maps (data frames) in it. Multiple maps means multiple Map objects. Any Map in this collection may be set as the active view. There is typically only one PageLayout object per session of ArcMap.
To determine if the returned reference is to a PageLayout object or a Map, attempt a query interface (QI) to either IPageLayout or IMap. If you know you want a reference to the focus map, use IMxDocument::FocusMap instead. Similarly, if you know you want a reference to the page layout, use IMxDocument::PageLayout instead. This is often the case when you need to refresh the display. For example, if someone has panned the map and you now need to refresh it, explicitly use IMxDocument::FocusMap which returns a reference to the Map with focus, and then QI for IActiveView.
Use this property to also set the active view programmatically.
getActiveView
in interface IMxDocument
getActiveView
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IActiveView
public void setActiveViewByRef(IActiveView activeView) throws IOException, AutomationException
setActiveViewByRef
in interface IMxDocument
activeView
- A reference to a com.esri.arcgis.carto.IActiveView (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IActiveView getActivatedView() throws IOException, AutomationException
This property is primarily used when adding graphics as it conveniently gives a reference to the object set as the target graphics container.
In ArcMap's layout view, graphics can either be added to the PageLayout's graphics container or the focus Map's graphics container if the Map has been activated by double-clicking on it. In this case, IMxDocument::ActiveView differs from IMxDocument::ActivatedView in that the ActiveView property may pass a reference to the PageLayout object while the ActivatedView property may pass a reference to the focus Map object if that Map has been activated. In data view, both ActiveView and ActivatedView return a reference to the focus Map.
getActivatedView
in interface IBasicDocument2
getActivatedView
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.arcmapUI.IActiveView
public ICommand getActiveViewCommand() throws IOException, AutomationException
The command associated with the current active view.
In ArcMap the active view can be either a Map (corresponding to Data view in ArcMap) or a PageLayout (corresponding to Layout view in ArcMap). To switch between these different views, ArcMap has two active view commands: GeographicViewCommand and LayoutViewCommand. These commands are the tiny globe and page buttons on the scroll bar and also appear in the View menu. GeographicViewCommand sets the focus Map as the ActiveView and LayoutViewCommand sets the PageLayout as the ActiveView.
getActiveViewCommand
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMap getFocusMap() throws IOException, AutomationException
This property is a short-cut to IActiveView::FocusMap and is read-only. To programmatically change the FocusMap use IActiveView::FocusMap.
A user's map may comprise one or more Map objects. Each Map object typically holds layers of data as well as several MapSurround objects such as a Legend. This property returns an IMap reference to the Map object that currently has focus. In ArcMap, the focus map is the one visible in data view and the one selected in layout view.
getFocusMap
in interface IBasicDocument2
getFocusMap
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.arcmapUI.IActiveView
public ILayer getSelectedLayer() throws IOException, AutomationException
Returns the currently selected layer in the table of contents.
To select a layer in the table of contents, obtain an IContentsView reference via IMxDocument::ContentsView, then use either IContentsView::AddToSelectedItems or IContentsView::SelectedItem. To learn more, read the help for IContentsView.
getSelectedLayer
in interface IBasicDocument
getSelectedLayer
in interface IBasicDocument2
getSelectedLayer
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getSelectedItem() throws IOException, AutomationException
This property returns a reference to the currently selected item in the table of contents. The return is an IUnknown because there are several possbile objects the selected item can be.
When working in the Display tab, the reference could be to a Map object if you have a data frame selected, one of the Layer objects (FeatureLayer, FDOGraphicsLayer, etc) if you have a layer selected, or a LegendGroup if you have a unique value or heading selected.
In the Source tab, the reference can be to any of the above objects plus a Table, FeatureDataset, or Workspace.
In the case where more than one item is selected, the reference is to a Set object.
getSelectedItem
in interface IBasicDocument
getSelectedItem
in interface IBasicDocument2
getSelectedItem
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getContextItem() throws IOException, AutomationException
This property returns the item that was last right-clicked in the table of contents. Use this property when creating a custom context menu. For example, after right-clicking on a layer in the table of contents, a context menu appears which has several commands including Copy and Remove.
getContextItem
in interface IBasicDocument
getContextItem
in interface IBasicDocument2
getContextItem
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setContextItem(Object item) throws IOException, AutomationException
setContextItem
in interface IBasicDocument
setContextItem
in interface IBasicDocument2
setContextItem
in interface IMxDocument
item
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IStyleGallery getStyleGallery() throws IOException, AutomationException
The StyleGallery is an object that manages styles. Styles are a collection of predefined colors, symbols, properties of symbols, and map elements that are used to create maps. Styles help organizations follow a mapping standard and help promote consistency in mapping products.
The StyleGallery is the object underlying the Style Manager window in ArcMap. There is one StyleGallery object per application and it is global. Instantiating a new StyleGallery object really finds the one created by the application.
getStyleGallery
in interface IBasicDocument2
getStyleGallery
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addLayer(ILayer layer) throws IOException, AutomationException
This method is a shortcut to the AddLayer method on the focus map (IMap::Addlayer).
addLayer
in interface IBasicDocument
addLayer
in interface IBasicDocument2
addLayer
in interface IMxDocument
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.arcmapUI.IMap
public void updateContents() throws IOException, AutomationException
Refreshes the current view in the table of contents. UpdateContents is a shortcut - it calls Refresh on the current contents view (IContentsView::Refresh). Access to the current view is provided through IMxDocument::CurrentContentsView.
updateContents
in interface IBasicDocument
updateContents
in interface IBasicDocument2
updateContents
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getSearchTolerance() throws IOException, AutomationException
The application's search tolerance is measured and set using pixel units. This property automatically converts the size of the pixels to map units. The example shows how this conversion is done.
getSearchTolerance
in interface IBasicDocument2
getSearchTolerance
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSearchTolerancePixels() throws IOException, AutomationException
This property controls the application's search tolerance. The search tolerance is measured in pixel units. Use IMxDocument::SearchTolerance to check the search tolerance in map units.
getSearchTolerancePixels
in interface IBasicDocument2
getSearchTolerancePixels
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSearchTolerancePixels(int tol) throws IOException, AutomationException
setSearchTolerancePixels
in interface IBasicDocument2
setSearchTolerancePixels
in interface IMxDocument
tol
- The tol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void insertObject() throws IOException, AutomationException
insertObject
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void canInsertObject(boolean[] pEnabled) throws IOException, AutomationException
canInsertObject
in interface IMxDocument
pEnabled
- The pEnabled (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMaps getMaps() throws IOException, AutomationException
The map document has a collection of Map objects which are accessible through this property. The reference IMaps is typically used to add and delete maps from the collection.
See the FocusMap property on this interface for accessing just the one map with focus.
getMaps
in interface IBasicDocument2
getMaps
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMaps
public IOperationStack getOperationStack() throws IOException, AutomationException
The map document manages an operation stack which provides undo/redo functionality. Modifications, including those to elements and features, are typically wrapped inside an operation. Operations are added to the operation stack so the modification can be rolled out and then rolled back if desired. For example, when a graphic element is moved, the operation can be undone moving the graphic back to its original location.
Depending on your scenario, there are different methodologies for creating an operation and adding it to the OperationStack.
getOperationStack
in interface IBasicDocument2
getOperationStack
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IOperationStack
public Font getDefaultTextFont() throws IOException, AutomationException
This property conveniently stores a default font for any tool requiring one. For example, the New Text tool adds text graphics to an active view and initially uses the font stored in this property.
getDefaultTextFont
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDefaultTextFontSize(IFontSize fontSize) throws IOException, AutomationException
setDefaultTextFontSize
in interface IMxDocument
fontSize
- A reference to a com.esri.arcgis.display.IFontSize (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFontSize getDefaultTextFontSize() throws IOException, AutomationException
This property conveniently stores a default font size for any tool requiring one. For example, the New Text tool on ArcMap's Draw toolbar, adds text graphics to an active view and initially uses the font size stored in this property.
getDefaultTextFontSize
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDefaultTextFont(Font fontDisp) throws IOException, AutomationException
setDefaultTextFont
in interface IMxDocument
fontDisp
- A reference to a com.esri.arcgis.support.ms.stdole.Font (A com.esri.arcgis.support.ms.stdole.Font COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IColor getDefaultColor(int type) throws IOException, AutomationException
getDefaultColor
in interface IMxDocument
type
- A com.esri.arcgis.arcmapui.esriMxDefaultColorTypes constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDefaultColor(int type, IColor color) throws IOException, AutomationException
setDefaultColor
in interface IMxDocument
type
- A com.esri.arcgis.arcmapui.esriMxDefaultColorTypes constant (in)color
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPoint getCurrentLocation() throws IOException, AutomationException
A lot of tools require the current mouse location in order to perform an operation. This property provides a short-cut alternative to having to manually calculate the current mouse location in map units. For example, a typical pan tool needs the current mouse location in three different places: when the mouse if first clicked, while the mouse drags, and when the button is released. Although ITool provides the mouse location for each of these events, the location is given in x,y device units. Rather than writing a function that uses something like IDisplayTransformation::ToMapPoint to calculate the location in map units, the Location property does this automatically behind the scenes.
getCurrentLocation
in interface IBasicDocument2
getCurrentLocation
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCurrentLocation(IPoint mouseLoc) throws IOException, AutomationException
setCurrentLocation
in interface IBasicDocument2
setCurrentLocation
in interface IMxDocument
mouseLoc
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDelayUpdateContents(boolean rhs1) throws IOException, AutomationException
Delays calling refresh of the current contents view. For example, after loading a layer you should call UpdateContents to refresh the contents view (table on contents). When loading several layers, there is no need to refresh the contents view after each layer is loaded; instead, delay refreshing the contents view until all the layers have been loaded.
All calls to UpdateContents are ignored when DelayUpdateContents is set to TRUE. To ensure the contents view is ultimately refreshed, UpdateContents is automatically called when DelayUpdateContents is set back to FALSE.
setDelayUpdateContents
in interface IMxDocument
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isRelativePaths() throws IOException, AutomationException
isRelativePaths
in interface IMxDocument
isRelativePaths
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRelativePaths(boolean relPaths) throws IOException, AutomationException
setRelativePaths
in interface IMxDocument
setRelativePaths
in interface IDocumentInfo2
relPaths
- The relPaths (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IContentsView getCurrentContentsView() throws IOException, AutomationException
A contents view is a tab in the table of contents. ArcMap ships with two contents views, Display and Source. The object behind Display is TOCDisplayView and TOCCatalogView is behind the Source view. Custom contents views can be created by implementing the IContentsView interface. 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.
getCurrentContentsView
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCurrentContentsViewByRef(IContentsView view) throws IOException, AutomationException
setCurrentContentsViewByRef
in interface IMxDocument
view
- A reference to a com.esri.arcgis.arcmapui.IContentsView (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getContentsViewCount() throws IOException, AutomationException
A contents view is a tab in the table of contents. ArcMap ships with two contents views: Display (TOCDisplayView) and Source (TOCCatalogView). Create custom contents views by implementing the IContentsView interface. 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. The Display contents view is not listed here as it is the default.
getContentsViewCount
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IContentsView getContentsView(int index) throws IOException, AutomationException
getContentsView
in interface IMxDocument
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITableProperties getTableProperties() throws IOException, AutomationException
getTableProperties
in interface IBasicDocument
getTableProperties
in interface IBasicDocument2
getTableProperties
in interface IMxDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDirty() throws IOException, AutomationException
If the document's dirty flag is set to True, then you will be prompted to save the document when the document is closed or the ArcMap application is shut down. Use the SetDirty method to set the document's dirty flag to True.
The SetClean method on IDocumentDirty2 does the opposite of this.
setDirty
in interface IDocumentDirty
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setClean() throws IOException, AutomationException
If the document's dirty flag is set to True, then you will be prompted to save the document when the document is closed or when the ArcMap application is shut down. If you don't want to be prompted to save the document when you close the document or when the ArcMap application is shutdown, then you can use the SetClean method to set the document's dirty flag to False.
The SetDirty method on IDocumentDirty does the opposite of this.
setClean
in interface IDocumentDirty2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean applies(Object pUnk) throws IOException, AutomationException
Applies indicates whether the specified object can be applied to the current object. For instance, we might want to ask our CircleElement whether a Color object applies to it. If it does, then we can use the Apply method to update our CircleElement with the new Color object.
CanApply differs from Applies in that it is a check for the editability of the object at any given time. Applies indicates whether an object can be applied at all, while CanApply indicates whether an object can be applied at that particular moment.
applies
in interface IPropertySupport
pUnk
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean canApply(Object pUnk) throws IOException, AutomationException
CanApply indicates whether the specified object can be applied to the current object. For instance, we might want to ask our CircleElement whether a Color object applies to it. If it does, then we can use the Apply method to update our CircleElement with the new Color object.
CanApply differs from Applies in that it is a check for the editability of the object at any given time. Applies indicates whether an object can be applied at all, while CanApply indicates whether an object can be applied at that particular moment.
canApply
in interface IPropertySupport
pUnk
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getCurrent(Object pUnk) throws IOException, AutomationException
getCurrent
in interface IPropertySupport
pUnk
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object apply(Object newObject) throws IOException, AutomationException
Apply will apply the specified object to the current object. For instance, I might apply a Color object to my RectangleElement. When I execute Apply, the object I replace (the old object) is returned.
Use the Applies and CanApply methods to determine if an Apply can be used on an object.
apply
in interface IPropertySupport
newObject
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean changeLayout() throws IOException, AutomationException
changeLayout
in interface IChangeLayout
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setFillSymbol(IFillSymbol lSymbol) throws IOException, AutomationException
setFillSymbol
in interface IBasicDocumentDefaultSymbols
setFillSymbol
in interface IDocumentDefaultSymbols
lSymbol
- A reference to a com.esri.arcgis.display.IFillSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFillSymbol getFillSymbol() throws IOException, AutomationException
getFillSymbol
in interface IBasicDocumentDefaultSymbols
getFillSymbol
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLineSymbol(ILineSymbol lineSymbol) throws IOException, AutomationException
setLineSymbol
in interface IBasicDocumentDefaultSymbols
setLineSymbol
in interface IDocumentDefaultSymbols
lineSymbol
- A reference to a com.esri.arcgis.display.ILineSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILineSymbol getLineSymbol() throws IOException, AutomationException
getLineSymbol
in interface IBasicDocumentDefaultSymbols
getLineSymbol
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMarkerSymbol(IMarkerSymbol markerSymbol) throws IOException, AutomationException
setMarkerSymbol
in interface IBasicDocumentDefaultSymbols
setMarkerSymbol
in interface IDocumentDefaultSymbols
markerSymbol
- A reference to a com.esri.arcgis.display.IMarkerSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMarkerSymbol getMarkerSymbol() throws IOException, AutomationException
getMarkerSymbol
in interface IBasicDocumentDefaultSymbols
getMarkerSymbol
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setTextSymbol(ITextSymbol textSymbol) throws IOException, AutomationException
setTextSymbol
in interface IDocumentDefaultSymbols
textSymbol
- A reference to a com.esri.arcgis.display.ITextSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITextSymbol getTextSymbol() throws IOException, AutomationException
getTextSymbol
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCallout(IFormattedTextSymbol callout) throws IOException, AutomationException
setCallout
in interface IDocumentDefaultSymbols
callout
- A reference to a com.esri.arcgis.display.IFormattedTextSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFormattedTextSymbol getCallout() throws IOException, AutomationException
getCallout
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAreaPatch(IAreaPatch patch) throws IOException, AutomationException
setAreaPatch
in interface IBasicDocumentDefaultSymbols
setAreaPatch
in interface IDocumentDefaultSymbols
patch
- A reference to a com.esri.arcgis.carto.IAreaPatch (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IAreaPatch getAreaPatch() throws IOException, AutomationException
getAreaPatch
in interface IBasicDocumentDefaultSymbols
getAreaPatch
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLinePatch(ILinePatch patch) throws IOException, AutomationException
setLinePatch
in interface IBasicDocumentDefaultSymbols
setLinePatch
in interface IDocumentDefaultSymbols
patch
- A reference to a com.esri.arcgis.carto.ILinePatch (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILinePatch getLinePatch() throws IOException, AutomationException
getLinePatch
in interface IBasicDocumentDefaultSymbols
getLinePatch
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPatchWidth(double widthPts) throws IOException, AutomationException
setPatchWidth
in interface IBasicDocumentDefaultSymbols
setPatchWidth
in interface IDocumentDefaultSymbols
widthPts
- The widthPts (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getPatchWidth() throws IOException, AutomationException
getPatchWidth
in interface IBasicDocumentDefaultSymbols
getPatchWidth
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPatchHeight(double heightPts) throws IOException, AutomationException
setPatchHeight
in interface IBasicDocumentDefaultSymbols
setPatchHeight
in interface IDocumentDefaultSymbols
heightPts
- The heightPts (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getPatchHeight() throws IOException, AutomationException
getPatchHeight
in interface IBasicDocumentDefaultSymbols
getPatchHeight
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCustomTOCFont(Font font) throws IOException, AutomationException
setCustomTOCFont
in interface IBasicDocumentDefaultSymbols
setCustomTOCFont
in interface IDocumentDefaultSymbols
font
- A reference to a com.esri.arcgis.support.ms.stdole.Font (A com.esri.arcgis.support.ms.stdole.Font COM typedef) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Font getCustomTOCFont() throws IOException, AutomationException
getCustomTOCFont
in interface IBasicDocumentDefaultSymbols
getCustomTOCFont
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCustomTOCFontSize(double fontSizePts) throws IOException, AutomationException
setCustomTOCFontSize
in interface IBasicDocumentDefaultSymbols
setCustomTOCFontSize
in interface IDocumentDefaultSymbols
fontSizePts
- The fontSizePts (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getCustomTOCFontSize() throws IOException, AutomationException
getCustomTOCFontSize
in interface IBasicDocumentDefaultSymbols
getCustomTOCFontSize
in interface IDocumentDefaultSymbols
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void clearContentsViews() throws IOException, AutomationException
clearContentsViews
in interface IContentsViewEdit
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addContentsView(IContentsView contentsView) throws IOException, AutomationException
addContentsView
in interface IContentsViewEdit
contentsView
- A reference to a com.esri.arcgis.arcmapui.IContentsView (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDataGraphCount() throws IOException, AutomationException
getDataGraphCount
in interface IDataGraphCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDataGraphBase getDataGraph(int index) throws IOException, AutomationException
getDataGraph
in interface IDataGraphCollection
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void removeDataGraph(IDataGraphBase graph) throws IOException, AutomationException
removeDataGraph
in interface IDataGraphCollection
graph
- A reference to a com.esri.arcgis.carto.IDataGraphBase (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void addDataGraph(IDataGraphBase graph) throws IOException, AutomationException
addDataGraph
in interface IDataGraphCollection
graph
- A reference to a com.esri.arcgis.carto.IDataGraphBase (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void removeAllDataGraphs() throws IOException, AutomationException
removeAllDataGraphs
in interface IDataGraphCollection
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumDataset getDatasets() throws IOException, AutomationException
getDatasets
in interface IDocumentDatasets
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDocumentTitle() throws IOException, AutomationException
getDocumentTitle
in interface IDocumentInfo
getDocumentTitle
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDocumentTitle(String title) throws IOException, AutomationException
setDocumentTitle
in interface IDocumentInfo
setDocumentTitle
in interface IDocumentInfo2
title
- The title (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getSubject() throws IOException, AutomationException
getSubject
in interface IDocumentInfo
getSubject
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSubject(String subject) throws IOException, AutomationException
setSubject
in interface IDocumentInfo
setSubject
in interface IDocumentInfo2
subject
- The subject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getAuthor() throws IOException, AutomationException
getAuthor
in interface IDocumentInfo
getAuthor
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAuthor(String author) throws IOException, AutomationException
setAuthor
in interface IDocumentInfo
setAuthor
in interface IDocumentInfo2
author
- The author (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getCategory() throws IOException, AutomationException
getCategory
in interface IDocumentInfo
getCategory
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCategory(String category) throws IOException, AutomationException
setCategory
in interface IDocumentInfo
setCategory
in interface IDocumentInfo2
category
- The category (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getComments() throws IOException, AutomationException
getComments
in interface IDocumentInfo
getComments
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setComments(String comments) throws IOException, AutomationException
setComments
in interface IDocumentInfo
setComments
in interface IDocumentInfo2
comments
- The comments (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getKeywords() throws IOException, AutomationException
getKeywords
in interface IDocumentInfo
getKeywords
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setKeywords(String keywords) throws IOException, AutomationException
setKeywords
in interface IDocumentInfo
setKeywords
in interface IDocumentInfo2
keywords
- The keywords (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getHyperlinkBase() throws IOException, AutomationException
getHyperlinkBase
in interface IDocumentInfo
getHyperlinkBase
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setHyperlinkBase(String path) throws IOException, AutomationException
setHyperlinkBase
in interface IDocumentInfo
setHyperlinkBase
in interface IDocumentInfo2
path
- The path (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isSavePreview() throws IOException, AutomationException
isSavePreview
in interface IDocumentInfo
isSavePreview
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSavePreview(boolean savePreview) throws IOException, AutomationException
setSavePreview
in interface IDocumentInfo
setSavePreview
in interface IDocumentInfo2
savePreview
- The savePreview (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getCredits() throws IOException, AutomationException
getCredits
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCredits(String credits) throws IOException, AutomationException
setCredits
in interface IDocumentInfo2
credits
- The credits (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getName() throws IOException, AutomationException
getName
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getPath() throws IOException, AutomationException
getPath
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getFolder() throws IOException, AutomationException
getFolder
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getDateSaved() throws IOException, AutomationException
getDateSaved
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getDatePrinted() throws IOException, AutomationException
getDatePrinted
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getDateExported() throws IOException, AutomationException
getDateExported
in interface IDocumentInfo2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void createPreview() throws IOException, AutomationException
createPreview
in interface IDocumentPreview
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deletePreview() throws IOException, AutomationException
deletePreview
in interface IDocumentPreview
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasPreviewSaved() throws IOException, AutomationException
isHasPreviewSaved
in interface IDocumentPreview
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasPreviewToSave() throws IOException, AutomationException
isHasPreviewToSave
in interface IDocumentPreview
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILatLonFormat getLatLonFormat() throws IOException, AutomationException
getLatLonFormat
in interface IReportUnitFormat
getLatLonFormat
in interface IReportUnitFormat2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLatLonFormatByRef(ILatLonFormat format) throws IOException, AutomationException
setLatLonFormatByRef
in interface IReportUnitFormat
setLatLonFormatByRef
in interface IReportUnitFormat2
format
- A reference to a com.esri.arcgis.system.ILatLonFormat (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INumberFormat getNumericFormat() throws IOException, AutomationException
getNumericFormat
in interface IReportUnitFormat
getNumericFormat
in interface IReportUnitFormat2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setNumericFormatByRef(INumberFormat format) throws IOException, AutomationException
setNumericFormatByRef
in interface IReportUnitFormat
setNumericFormatByRef
in interface IReportUnitFormat2
format
- A reference to a com.esri.arcgis.system.INumberFormat (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILatLonFormat getCoordinateReadoutLatLonFormat() throws IOException, AutomationException
getCoordinateReadoutLatLonFormat
in interface IReportUnitFormat2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCoordinateReadoutLatLonFormatByRef(ILatLonFormat format) throws IOException, AutomationException
setCoordinateReadoutLatLonFormatByRef
in interface IReportUnitFormat2
format
- A reference to a com.esri.arcgis.system.ILatLonFormat (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCoordinateReadoutUnits() throws IOException, AutomationException
getCoordinateReadoutUnits
in interface IReportUnitFormat2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCoordinateReadoutUnits(int units) throws IOException, AutomationException
setCoordinateReadoutUnits
in interface IReportUnitFormat2
units
- A com.esri.arcgis.system.esriUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDocumentVersion(int docVersion) throws IOException, AutomationException
setDocumentVersion
in interface IDocumentVersion
docVersion
- A com.esri.arcgis.system.esriArcGISVersion constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDocumentVersion() throws IOException, AutomationException
Determines which version an object is persisted. This can be useful when saving an object ObjectStream or MemoryBlobStream and you want the version of that object to be compatible with previous releases of ArcGIS. Not all persistable objects implement IDocumentVersion; you should ensure the object supports this interface before accessing this property.
getDocumentVersion
in interface IMapDocument
getDocumentVersion
in interface IDocumentVersion
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isMapDocument(String sDocument) throws IOException, AutomationException
isMapDocument
in interface IMapDocument
sDocument
- The sDocument (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isPresent(String sDocument) throws IOException, AutomationException
isPresent
in interface IMapDocument
sDocument
- The sDocument (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isReadOnly(String sDocument) throws IOException, AutomationException
isReadOnly
in interface IMapDocument
sDocument
- The sDocument (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isRestricted(String sDocument) throws IOException, AutomationException
isRestricted
in interface IMapDocument
sDocument
- The sDocument (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isPasswordProtected(String sDocument) throws IOException, AutomationException
isPasswordProtected
in interface IMapDocument
sDocument
- The sDocument (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void esri_new(String sDocument) throws IOException, AutomationException
esri_new
in interface IMapDocument
sDocument
- The sDocument (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void open(String sDocument, String bsPassword) throws IOException, AutomationException
Opens the specified MapDocument in preparation for reading it. The MapDocument can be an an ArcMap document (*.mxd), ArcMap template (*.mxt), Published Map File (*.pmf) or Layer File (*.lyr). The MapDocument will be cached so no other users will be able to access the MapDocument until it has been closed.
Before using the Open methods check whether the specified document IsPresent, IsRestricted, IsMapDocument and IsPasswordProtected. If the MapDocument is password protected, specify the password in the Open method.
If a Layer File (*.lyr) is opened a portriat PageLayout containing one Map with the layer added to it is created.
When opening or creating a map document with the IMapDocument Open() or New() methods, you should always make subsequent calls to IActiveView::Activate() in order to properly initialize the display of the PageLayout and Map objects. Call Activate() once for the PageLayout and once for each Map you will be working with. If your application has a user interface, you should call Activate() with the hWnd of the application's client area. If your application runs in the background and has no windows, you can always get a valid hWnd from the GDI GetDesktopWindow() function, part of the Win32 API.
open
in interface IMapDocument
sDocument
- The sDocument (in)bsPassword
- The bsPassword (in, optional, pass if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getDocumentFilename() throws IOException, AutomationException
Returns the DocumentFilename of the last map document that was successfully opened with the Open method. An empty string will be returned if no document has been opened.
getDocumentFilename
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDocumentType() throws IOException, AutomationException
Returns the type of MapDocument that is open.
If a map template (*.mxt) is open esriMapDocumentTypeMxd will be returned.
getDocumentType
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isUsesRelativePaths() throws IOException, AutomationException
Determines whether the MapDocument that is open stores paths to data sources as relative path names (relative to the MapDocument) or absolute path names.
If a Published Map File (*.pmf) is Open that was published with ArcGIS 8.x or a Layer File (*.lyr) is Open the UsesRelativePaths will always return false.
isUsesRelativePaths
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getMapCount() throws IOException, AutomationException
Returns the number of map's within the PageLayout.
getMapCount
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IMap getMap(int mapIndex) throws IOException, AutomationException
getMap
in interface IMapDocument
mapIndex
- The mapIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILayer getLayer(int mapIndex, int layerIndex) throws IOException, AutomationException
getLayer
in interface IMapDocument
mapIndex
- The mapIndex (in)layerIndex
- The layerIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPrinter getPrinter() throws IOException, AutomationException
The Printer stored in the MapDocument. If a map document (*.mxd) or map template (*.mxt) is Open the Printer returned will be the printer stored in the document when it was last saved. If no printer is saved in the document the Printer will be nothing. If a Published Map File (*.pmf) or layer file (*.lyr) is Open the Printer will be nothing. Creating a New MapDocument will set the Printer to nothing.
If the Printer cannot be found on the system, a message box will display indicating that the printer is not installed. The MessageLogger can be used to switch this message off.
getPrinter
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPicture getThumbnail() throws IOException, AutomationException
Returns the Thumbnail stored in the MapDocument that is open. Not every MapDocument has a thumbnail. The Thumnail is a small bitmap picture representation of the contents of the MapDocument.
getThumbnail
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void close() throws IOException, AutomationException
Closes the MapDocument. This sets the DocumentFilename property to an empty string and resets the ActiveView, PageLayout, Map, MapCount, Printer and Thumbnail properties.
close
in interface IMapDocument
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getVersionInfo(boolean[] versionInfoMissing, int[] lMajor, int[] lMinor, int[] lRevision, int[] lBuild) throws IOException, AutomationException
Returns the major, minor, revision and build numbers of the MapDocument if the map document version information is present.
getVersionInfo
in interface IMapDocument
versionInfoMissing
- The versionInfoMissing (in/out: use single element array)lMajor
- The lMajor (in/out: use single element array)lMinor
- The lMinor (in/out: use single element array)lRevision
- The lRevision (in/out: use single element array)lBuild
- The lBuild (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void replaceContents(IMxdContents pObject) throws IOException, AutomationException
Replaces the contents of the MapDocument with the contents of the specified Map, PageLayout, MapControl or PageLayoutControl. Before using the ReplaceContents method a New MapDocument must be created or an existing MapDocument must be Open.
If a MapControl is passed to the ReplaceContents method the MapDocument will be replaced with the IMapControl2::Map. Likewise, if a PageLayoutControl is passed to the ReplaceContents method the MapDocument will be replaced with the IPageLayoutControl::PageLayout.
If the MapDocument contents is replaced with the contents of a Map or MapControl a portriat PageLayout containing the map will be created.
replaceContents
in interface IMapDocument
pObject
- A reference to a com.esri.arcgis.carto.IMxdContents (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setActiveView(IActiveView pActiveView) throws IOException, AutomationException
Use this method to set the ActiveView of the MapDocument. Use the PageLayout and Map properties to specify the ActiveView.
setActiveView
in interface IMapDocument
pActiveView
- A reference to a com.esri.arcgis.carto.IActiveView (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(boolean bUseRelativePaths, boolean bCreateThumnbail) throws IOException, AutomationException
Saves the MapDocument that is Open and any changes that have been made to it. Before using the Save method check whether the document IsReadOnly. If a MapDocument is read only use the SaveAs method to create a new MapDocument. By default MapDocuments are saved without relative paths and thumbnails.
Specifying thumbnails as True can delay saving complex map documents as the view of the document is generated for the thumbnail. However, thumbnails are guides for users browsing map documents using ArcCatalog and Windows Explorer.
If a Published Map File (*.pmf) or Layer File (*.lyr) is Open use the SaveAs method to create a new Map Document (*.mxd), as attempting to use the Save method will return an error.
save
in interface IMapDocument
bUseRelativePaths
- The bUseRelativePaths (in, optional, pass true if not required)bCreateThumnbail
- The bCreateThumnbail (in, optional, pass true if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void saveAs(String sDocument, boolean bUseRelativePaths, boolean bCreateThumnbail) throws IOException, AutomationException
Saves the MapDocument that is Open and any changes that have been made to it to a new MapDocument with the specified filename. The filename that is supplied must be valid and inlcude the *.mxd extension. By default MapDocuments are saved without relative paths and thumbnails.
Specifying thumbnails as True can delay saving complex map documents as the view of the document is generated for the thumbnail. However, thumbnails are guides for users browsing map documents using ArcCatalog and Windows Explorer.
The SaveAs method cannot be used to save the MapDocument as an earlier ArcGIS 8.3 map document.
saveAs
in interface IMapDocument
sDocument
- The sDocument (in)bUseRelativePaths
- The bUseRelativePaths (in, optional, pass true if not required)bCreateThumnbail
- The bCreateThumnbail (in, optional, pass true if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
enumConnectionPoints
in interface IConnectionPointContainer
ppEnum
- A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP) throws IOException, AutomationException
IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.
findConnectionPoint
in interface IConnectionPointContainer
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)ppCP
- A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |