This document covers the following topics:
The collection of commands defined by plug-ins.
The following properties are available:
Used to navigate to the parent interface of this interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoControlBars) | Get only |
Used to navigate to the root interface.
Natural Data Format | Variant Type | Remark |
---|---|---|
HANDLE OF OBJECT | VT_DISPATCH (INatAutoStudio) | Get only |
The number of commands that were registered by plug-ins.
Natural Data Format | Variant Type | Remark |
---|---|---|
I4 | VT_DISPATCH (INatAutoSystem) | Get only |
The following methods are available:
Creates a new command and adds it to the collection.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | HANDLE OF OBJECT | VT_DISPATCH (INatAutoCommand) | |
CommandID | I4 | VT_I4 | |
Caption | A | VT_BSTR | |
Image |
A |
VT_BSTR |
Optional |
The newly added command.
Numeric ID of the new command. The plug-in can choose any positive
integer value. When the user later selects the command in the user interface,
this ID is passed to the plug-in in the method
INaturalStudioPlugIn::OnCommand
.
A string used to identify the command in menus and toolbars.
An image used to represent the command visually. The image must be a 16 color, 16x16 bitmap, using RGB(192,192,192) as the background color.
The image can be specified in three ways:
As an absolute path name of a .bmp file.
As an IPictureDisp
interface. An
IPictureDisp
interface can be created in Natural using
the method INatAutoImages::LoadImage
.
An IPictureDisp
interface cannot be passed across
process boundaries. This is due to a Microsoft restriction (MSDN Q150034).
Therefore this alternative can only be used with plug-ins running as in-process
servers. Natural written plug-ins always run as local servers and can therefore
not use this alternative.
As an index into a table of user images pre-defined in Natural Studio. These are the images that can be assigned to user commands in the Customize dialog.
Returns a specific command from the collection. Used to iterate through the collection.
Name | Natural Data Format | Variant Type | Remark |
---|---|---|---|
Return value | HANDLE OF OBJECT | VT_DISPATCH (INatAutoCommand) | |
Index | I4 | VT_I4 |
The command identified by the value specified in Index.
The index of the command in the collection (a value between 1 and Count).