CommandManager.PromptMessage Method

Parent Object: CommandManager

Description

This method allows the developer to put up prompt messages (unless the user has suppressed this prompt) much like the Visual Basic MsgBox functionality.

Syntax

CommandManager.PromptMessage( Prompt As String, Buttons As Long, [Title] As Variant, [DefaultAnswer] As Variant, [Restrictions] As Variant, [PromptStrings] As Variant ) As Long

Parameters

Name Type Description
Prompt String The string that will appear in the dialog.
Buttons Long Describes which buttons will be used, and which is the default answer. For example "vbOKCancel + vbDefaultButton1", or "vbYesNo".
Title Variant Each time you call the function, you can give it a new dialog title/caption. If not supplied, the title will default to "Inventor x", where x is the release number.

This is an optional argument whose default value is null.
DefaultAnswer Variant The default response for the dialog. (vbOK, vbYes, etc.)

This is an optional argument whose default value is null.
Restrictions Variant The client can specify which of the "don't ask me" options to allow (these options are grayed on the dialog). Also, in Inventor there is an option for which window should get focus when you exit the dialog (default is the mainframe window of Inventor). Zero or more of the following, in combination (can be added together with +): General options * kNoRestrictions (Allow all of the radio button options in the dialog "Don't ask ever again", "Don't ask again this session", for all buttons) * kDontAllowNeverAgain (Disable the "Don't ever as again" option) * kDontAllowNoMoreThisSession (Disable the "Don't ask again this session" option) Button 1 options (i.e. what is allowed/not allowed if button 1 is picked) * kDontAllowButton1NeverAgain (Disable the "Don't ever ask again" option if button 1 is selected) * kDontAllowButton1NoMoreThisSession (Disable the "No more this session") Button 2 options (i.e. what is allowed/not allowed if button 2 is picked) * kDontAllowButton2NeverAgain (Disable the "Don't ever ask again" option if button 1 is selected) * kDontAllowButton2NoMoreThisSession Button 3 options (i.e. what is allowed/not allowed if button 3 is picked) * kDontAllowButton3NeverAgain (Disable the "Don't ever ask again" option if button 1 is selected) * kDontAllowButton3NoMoreThisSession

This is an optional argument whose default value is null.
PromptStrings Variant

This is an optional argument whose default value is null.

Remarks

If you pick one of the radio buttons in the "Prompts" section of the dialog, the prompt and your choice will be saved to the registry, and your selection will work for future uses of the prompt (i.e. when the client calls the prompt, if the user has selected one of the "don't ask me" options, the dialog is suppressed, and the answer specified earlier by the user is returned).

Version

Introduced in version 10