预订演示

请注意 : 本帮助页面不适用于最新版本的Enterprise Architect. 最新的帮助文档在这里.

前页 后页

MDG_GetProperty

MDG_GetProperty provides miscellaneous Add-In details to Enterprise Architect.
This function is called by Enterprise Architect to poll the Add-In for information relating to the PropertyName. This event should occur in as short a duration as possible, as Enterprise Architect does not cache the information provided by the function.
Values corresponding to these PropertyNames must be provided:

  • IconID - Return the name of a DLL and a resource identifier in the format #ResID, where the resource ID indicates an icon
          c:\program files\myapp\myapp.dlll#101

  • Language - Return the default language that Classes should be assigned when they are created in Enterprise Architect

  • HiddenMenus - Return one or more values from the MDGMenus enumeration to hide menus that do not apply to your Add-In
          if(PropertyName == "HiddenMenus")


                  return mgBuildProject + mgRun;

Syntax

Function MDG_GetProperty (Repository As EA.Repository, PackageGuid As String, PropertyName As String) As Variant
The MDG_GetProperty function syntax contains these parameters.

Parameter

Type

See also

Repository

EA.Repository
Direction: IN
Description: An EA.Repository object representing the currently-open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.
Repository Class

PackageGuid

String
Direction: IN
Description: The GUID identifying the Enterprise Architect Package sub-tree that is controlled by the Add-In.

PropertyName

String
Direction: IN
Description: The name of the property that is used by Enterprise Architect. See the start of this topic for the possible values.

Return Value

See the start of this topic.