CommandManager.PromptMessage Method
Parent Object: CommandManagerDescription
This method allows the developer to put up prompt messages (unless the user has suppressed this prompt) much like the Visual Basic MsgBox functionality.
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 "Controls when you will see this prompt" options, the dialog is suppressed, and the answer specified earlier by the user is returned).Syntax
CommandManager.PromptMessage( Prompt As String, Buttons As Long, [Title] As Variant, [DefaultAnswer] As Variant, [Restrictions] As Variant, [PromptStrings] As Variant ) As LongParameters
Name | Type | Description |
Prompt | String | The string that will appear in the dialog. The string can include "%s" to indicate a string placeholder, while you can specify the string value using the PromptStrings argument. The string can also specify the hyperlink with XML tags. |
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 "Controls when you will see this prompt" 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
This is an optional argument whose default value is null. |
PromptStrings | Variant | Optional input String or String array or Long value. If this input is Long it can indicate the parent window handler(HWND) for this prompt. If this argument is String or String array, and the input Prompt value includes "%s" then the "%s" will be replaced by this String value or String array sequentially. This is an optional argument whose default value is null. |