Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Topic
Prev Next

Session Object

The Session runtime object provides a common input/feedback mechanism across all script languages, giving access to objects of the types described in the System Type library. It is available through both the 'Scripts' tab and the script 'Console' tab to any script run within Enterprise Architect.

Properties

Properties

Detail

See also

Attributes

  • UserName - Returns the current windows username (read only)
  • Version - Returns the version of this object (read only)

Methods

  • Input(string Prompt) - displays a dialog box prompting the user to input a value; returns the string value that was entered by the user
  • Output(string Output) - writes text to the current default output location; during:
         -  Normal script execution, output is written to the 'Script' tab of the System Output window
         -  Script Debugging, output is written to the Debug window
         -  Use of the Script Console, output is written to the Console
  • Prompt(string Prompt, long PromptType) - displays a modal dialog containing the specified prompt text and button types; returns the 'PromptResult' value corresponding to the button that the user clicked

PromptType values

  • promptOK = 1
  • promptYESNO = 2
  • promptYESNOCANCEL = 3
  • promptOKCANCEL = 4

PromptResult values

  • resultOK = 1
  • resultCancel = 2
  • resultYes = 3
  • resultNo = 4

Session.Prompt Example

(VBScript)

If (Session.Prompt("Continue?", promptYESNO) = resultYes) Then...

Learn more