ExecuteMethod Property (KeyBinding Object)

Object: KeyBinding Object

Access: Read/Write

Sets or returns the procedure associated with the keybinding object.

Usage

KeyBinding.ExecuteMethod = String

Arguments

None.

Return Values

A string that represents the procedure to be run when the assigned accelerator key (or key combination) is pressed.

Examples

' 
' This example adds a key binding to execute a method defined in the 
' script 
' 
' Assign shortcut keys Alt+F1 to myZoomSelectedMethod 
Set bindObj = docBindingTables.AddKeyBinding ("Alt+F1", _ 
		"myZoomSelectedMethod", BindFunction, BindAccelerator) 
		 
' Associate the current script engine with the key binding  
bindObj.Target = ScriptEngine 
' Call method below with this name 
bindObj.ExecuteMethod = "myZoomSelectedMethod" 
' Keep this script running so that the handler can be executed 
Scripting.DontExit = True 
 
Sub myZoomSelectedMethod( ) 
     ' Zoom around selected objects 
     doc.ActiveViewEx.SetExtentsToSelection 
End Sub