Adds an application-defined command to the menu, with restrictions on use. SIS Control applications can only add to the local menus.
Visual Basic |
---|
Public Function AddCommand( _ ByVal menu As String, _ ByVal help As String, _ ByVal clsName As String, _ ByVal min As Integer, _ ByVal max As Integer, _ ByVal filter As String, _ ByVal locus As String _ ) As Integer |
The menu command string. Applications which use the SIS Control will have the AppCommand event called with this string as an argument. GisLink customisations must have a button on the main form with this string as the Caption.
In order to add to an existing menu, this string must exactly match the menu text, including ampersand (&) characters preceding any underlined keyboard shortcut, and pipe (|) characters to signify a sub-menu.
If this string does not include a pipe symbol then the command will be added to the local, right-mouse menu. Sub-menus on the local menu are denoted by the hash (#) symbol. Keyboard shortcuts are not supported on the local menu.
Available: MD ME MM OD OM OV SISpy
Groups:
sis.AddCommand ("Display Property Details",
"Displays the details of the current Selected Property", "Point", 1, 1, "Properties", "Spatial Search" )
The local menu Display Property Details will be available whenever a single point item which matches the filter Properties, but is also within the Spatial Filter Spatial Search, is selected.
Note: Functions that create Buttons and Menu items have the option for a filter. These filters can be set for a class of Item, i.e. LineString, Polygon, etc.
The following sample code shows this where the class is for a Group:
Sis1.CreatePropertyFilter("GroupItem", "_classLocal$ = ""Group""") Sis1.AddCommand("Display Group Details","Displays the details of the current Selected Group", "Item", 1, 1, "GroupItem", "")
By design the class filter for a Group will not work for the AddCommand, Buttons or Menus.
See also Commands (ActiveX Control).
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).