Creating Objects

This topic explains how to create a workbench instance for a Class from your model.

Access Project Browser | Right-click on Class | Execution Analyzer | Create Workbench Instance of Class (Ctrl+Shift+J)

You can also drag the class directly from the Project Browser on to the Workbench window.




See also

Creating an Object on the Workbench

Select the class in the Project Browser and drag it on to the Object Workbench window.

The 'Workbench' dialog displays.

Type in a name for the new instance. The name should be unique for the workbench.

Click on the Create button.

Choosing a Constructor

The 'Constructor' dialog may be displayed where a choice of constructor exists.

Select the constructor from the drop-down list.

Enter Parameters

Provide values for the selected constructor's parameters: 

  • Strings as arguments

Surround values with quotes where appropriate or where the value would conflict with the name of a Workbench object.

  • Objects as  arguments

Enter the name of the Workbench object.

  • String array arguments take text values separated by commas:

one,two,three,"a book","a bigger book"

  • Object array as arguments take object names separated by commas:

Supply the named Workbench objects separated by commas. Example:


Invoke Constructor

Click on the Invoke button to create the instance. The object can be recognized by its name in the Workbench window.

Learning Center topics

  • Alt+F1 | Enterprise Architect | Execution Analysis | Object Workbench | Creating Variables