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

GetDefaultTypeMapping

Return a default list of how the External Item types map to the Enterprise Architect element types.

Inputs

Parameter

Details

parameters

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

A JSON string of parameters. Reserved for future use.

Outputs via Callbacks

AddProperty - 2-4 values per type to map. Use a unique index value for each mapping:

  • AddProperty(index, "externalType", "Requirement");
  • AddProperty(index, "internalType", "Requirement");
  • [Optional] AddProperty(index, "stereotype", "document");
  • [Optional] AddProperty(index, "toolbox", "Extended::Requirements");

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

Details

The values returned by this method are used to populate the Type Mapping in the External Data Configuration. It defines the default values for how an External Item's type maps to an Enterprise Architect element type when linking an item. This mapping is configurable by an end user in Enterprise Architect by editing the Type Mapping in the External Data Configuration.

The 'externalType' value should match the user-friendly Type name as specified in GetTypes, as well as the Type returned by, for example, GetItems.

The 'internalType' value should match an Enterprise Architect Type name.

Optionally, specify which Toolbox page this type came from. This will show when the user manually edits the mapping, allowing them to select another type from the same Toolbox page easily.

Always specify a default mapping type. This will be used if no matching mapping is found.

  • AddProperty(index, "externalType", "Default");
  • AddProperty(index, "internalType", "Requirement");

Optional stereotype:

  • AddProperty(index, "stereotype", "document");

Specify the Toolbox page to allow users to change the mapping configuration to a type from the same Toolbox page.

  • AddProperty(index, "toolbox", "Extended::Requirements");

Other mappings can be specified if required. For example:

  • AddProperty(index, "externalType", "Feature");
  • AddProperty(index, "internalType", "Feature");
  • AddProperty(index, "toolbox", "Extended::Requirements");