IMcGraphOverlay2ActiveTool Property
|
|
Exposes a McGraphToolServer instance for the currently active tool.
Namespace:
MediaCy.IQL.Display.Overlays
Assembly:
MediaCy.IQL.Display.Overlays (in MediaCy.IQL.Display.Overlays.dll) Version: 10.0.6912.0
SyntaxReadOnly Property ActiveTool As IMcGraphToolServer
Get
Return Value
Type:
IMcGraphToolServerA new McGraphToolServer instance for the currently Active builtin
tool or Nothing if no tool is active (in this case the
McGraphToolServer.ActiveOverlay property will be NULL). For custom tools, the
actual custom tool McGraphToolServer instance is returned, not a duplicate of
it. In any case, the returned instance must be released if it is non-NULL
before the active McGraphOverlay can be released.
Implements
IMcGraphOverlayActiveTool
RemarksThe McGraphToolServer instance exposes properties that you can
examine to determine which McGraphOverlay instance, if any, has an active
tool (this is the McGraphToolServer.ActiveOverlay property).
The McGraphToolServer.ToolClassName will be "McGraphToolSelect" for the
built-in select tool and an empty string for built-in graphic object creation
tools. It will be the ProgID of an active custom tool.
The McGraphToolServer.ActiveClassName will be the class name of
the type of graph object being created (e.g., "McGraphObjRect"). It will be
an empty string if the selection tool is active.
ExamplesSub ShowActiveTool()
Dim ActiveTool As McGraphToolServer
Set ActiveTool = ThisApplication.ActiveImage.AnnotationOverlay.ActiveTool
If ActiveTool Is Nothing Then
MsgBox "There is no active tool."
Else
MsgBox "Overlay with Active Tool: " _
& ThisApplication.McObject(ActiveTool.ActiveOverlay).Name(True) & vbCrlf _
& "Tool Name: " & ActiveTool.ToolClassName & vbCrlf _
& "Tool Object Name: " & ActiveTool.ActiveClassName & vbCrlf
End If
End Sub
See Also