Book a Demo

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

Prev Next

GetItem

Return the full properties for the selected item.

Inputs

Parameter

Details

parameters

  • C++: const char*
  • C#: string

A JSON string of parameters. Includes:

  • itemID - the unique id of the item (as passed back in GetItemList)
  • level - the level hierarchy of the requested menu (starting with 1 for first level)
  • currentID, currentName - the id and name of the current menu level
  • levelXID - the ID of the menu level X for all previous levels in the hierarchy; that is, level1ID, level2ID
  • levelXName - the name of the menu level X for all previous levels in the hierarchy; that is, level1Name, level2Name

Outputs via Callbacks

AddProperty - multiple calls per menu item:

  • AddProperty(index, "id", "item1");
  • AddProperty(index, "name", "Item 1");

Optional extra properties. These can be custom propertyID:propertyValue pairs, eg:

  • AddProperty(index, "notes", "Example notes for item 1");
  • AddProperty(index, "modifiedDate", "2022-04-06T11:33:44");
  • AddProperty(index, "type", "Requirement");
  • AddProperty(index, "url", "http://example.com/item/1");
  • AddProperty(index, "propertyX", "Item 1 Property X");
  • AddProperty(index, "propertyY", "Item 1 Property Y");
  • AddProperty(index, "propertyZ", "Item 1 Property Z");

[Optional] LogMessage or SetError - to provide user feedback.

Details

This method receives a request to populate the 'External' tab in the main properties list with details about this external item.

This method should fill in the item's properties by calling the AddProperty callback method.

Each item requires two calls to AddProperty, and can accept extra optional calls to specify custom properties. The 'index' value is not required for this call. Set it to 0.

Mandatory properties:

  • id - the id passed in specifies a unique id representing this menu item; the Plug-in can receive this id back in subsequent calls (such as when requesting the next sub-menu level)
  • name - the user-displayable name of the menu item

Optional Properties:

The optional properties can be any propertyID:propertyValue pair. For the property to be listed in the Properties window, the property name must match a field value as returned by the GetFields method.