Customization > Automation Interface > Functions > Functions for Select Object Dialog > SelectObjectOfStereotype function (automation interface)
SelectObjectOfStereotype function (automation interface)
Syntax:
SelectObjectOfStereotype("<id>", TRUE¦FALSE)
Where:
<id> is a string that specifies the Id of the Stereotype for which the Select Object dialog is opened.
TRUE specifies that a New button appears on the Select Object dialog.
FALSE specifies that the Select Object dialog does not include a New button.
The return value from SelectObjectOfStereotype function will either be the GUID of the selected item, the name of the new item that was entered in the text box on the dialog or it will be empty. Note that the return value can be empty because New was clicked with no name specified or because Cancel was clicked.
Examples
In this example, the Select Object dialog is opened in the context of the My Stereotype stereotype (no New button):
Set objStereotypeToUse = Dictionary.Item("Stereotype", "My Stereotype")
strID = objStereotypeToUse("ID")
strSelected = Studio.SelectObjectOfStereotype(strID, False)