Version 6.3.13 for Windows
 —  Extending Natural Studio with Plug-ins  —

INatAutoCommands

This document covers the following topics:


Purpose

The collection of commands defined by plug-ins.

Top of page

Properties

The following properties are available:

Parent

Used to navigate to the parent interface of this interface.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoControlBars) Get only

Studio

Used to navigate to the root interface.

Natural Data Format Variant Type Remark
HANDLE OF OBJECT VT_DISPATCH (INatAutoStudio) Get only

System

The number of commands that were registered by plug-ins.

Natural Data Format Variant Type Remark
I4 VT_DISPATCH (INatAutoSystem) Get only

Top of page

Methods

The following methods are available:

Add

Creates a new command and adds it to the collection.

Parameters

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
HANDLE OF OBJECT
I4

VT_BSTR
VT_DISPATCH (IPictureDisp)
VT_I4

Optional
Return value

The newly added command.

CommandID

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.

Caption

A string used to identify the command in menus and toolbars.

Image

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:

Item

Returns a specific command from the collection. Used to iterate through the collection.

Parameters

Name Natural Data Format Variant Type Remark
Return value HANDLE OF OBJECT VT_DISPATCH (INatAutoCommand)  
Index I4 VT_I4  
Return value

The command identified by the value specified in Index.

Index

The index of the command in the collection (a value between 1 and Count).

Top of page