ArcObjects Library Reference (PublisherControls)  

IARControl.CurrentARTool Property

Current active tool for the control.

[Visual Basic .NET]
Public Property CurrentARTool As esriARTool
[C#]
public esriARTool CurrentARTool {get; set;}

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Description

The CurrentARTool used to interact with the CurrentView. The CurrentARTool for the ARPageLayout view is independent from the CurrentARTool for the ARMap view. For example, the built in map zoom in tool maybe the CurrentARTool when the CurrentView is a map, and the built in page layout pan tool maybe the CurrentARTool when the CurrentView is a page layout. Loading a new document into the ArcReaderControl will cause the CurrentARTool property to be set for each view according to the ‘DefaultDataTool’ and ‘DefaultLayoutTool’ settings in the ARConfiguration.

Setting the CurrentARTool will change the mouse cursor and may popup a modeless dialog. For example, setting the current tool to the built in identify tool will cause the identify dialog to open. Some of the tools may change the focus map when the current view is a page layout. The CurrentARTool cannot be set to Nothing, instead set the CurrentARTool to the NoneSelected tool.  

The following table lists each tool and briefly describes its function

Tool Description
esriARToolNoneSelected Use this tool if you want nothing to happen when the user interacts with the CurrentView .
esriARToolMapZoomIn, esriARToolMApZoomOut, esriARToolMapPan Use these tools to navigate around an ARMap regardless of the CurrentView; these tools will work on a map when the current view is a page layout. Click or drag a rectangle on the CurrentView to use the zoom tools, and depress the mouse and drag the CurrentView in a particular direction before releasing the mouse to pan.
esriARToolLayoutZoomIn, esriARToolLayoutZoomIn, esriARToolLayoutPan Use these tools to navigate around the ARPageLayout when it is the CurrentView. Click or drag a rectangle on the CurrentView to use the zoom tools, and depress the mouse and drag the CurrentView in a particular direction before releasing the mouse to pan.
esriARMapIdentify, esriARMapIdentifyUsingLayer Use these tools to identify features in the CurrentView. Click on a single feature or drag a rectangle to select multiple features in the CurrentView . The window has its own context menus; incorporates a raster viewer; and can display hyperlinks.
esriARMapMeasure Use this tool to measure distances and areas on an ARMap regardless of the CurrentView. Measurements are given in IARMap::DistanceUnits
esriARMapHyperlink Use this tool to access any hyperlinks present in the data regardless of the CurrentView .
esriARToolMarkUpPenThin, esriARToolMarkUpPenMedium, esriARToolMarkUpPenThick
Use these tools to provide users with the ability to add 'Mark Up' to the Published Map File loaded in the ArcReaderControl.
esriARToolMarkUpHighlightYellow, esriARToolMarkUpHighlightGreen, esriARToolMarkUpHighlightBlue
Use these tools to provide users with the ability to highlight areas of the Published Map File loaded in the ArcReaderControl.
esriARToolMarkUpEraserSmall, esriARToolMarkUpEraserMedium, esriARToolMarkUpEraserLarge, esriARToolMarkUpEraserStroke
Use these tools to provide users with the ability to erase MarkUp that has been added to the Published Map File loaded in the ArcReaderControl.
esriARToolCustom
Use this to use a tool other than the built in tools. The custom tool must be a COM object that implements both ICommand and ITool. Custom tools can only be used if the PMF document was published with permission to access internal ArcObjects. Use the HasDocumentPermission method to check this.

Errors Returned

2003 800A07D3: No document loaded

2041 800A07F9: The current tool will not deactivate 

2103 800A0837: The current document does not have permission to perform an identify operation 

2104 800A0838: The current document does not have permission to access hyperlinks 

2105 800A0839: The current document does not have permission to perform a measure operation 

Remarks

Setting the CurrentARTool property to the Identify, Measure or Hyperlink tools will return an error if the currently loaded document was not published with permission to Identify, Measure and access Hyperlinks. Use the IARControl::HasDocumentPermission method to determine this.

Always check if a tool is enabled before setting it to the CurrentARTool property, by returning the ARCommandInfo and checking the IARCommandInfo::Enabled state. Here are some occasions when an esriARTool maybe disabled:

See Also

IARControl Interface