Réserver une Démo
Pré. Proc.

EARules_ElementDisplayName

EARules_ElementDisplayName allows an Add-In registered to provide rules for a language to override the text displayed for the name in the default notation. An example of where you might want to use this is if an element should take its name automatically from another element.

This event occurs during the drawing of Activity Partitions and Shape Scripts.

Syntax

Function EARules_ElementDisplayName (Repository As EA.Repository, Language As String, Element as EA.Element, CurrentName as String, Base as Integer) As String

The EARules_ElementDisplayName function syntax contains these parameters.

Parameter

Description

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

Language

String

Direction: IN

Description: Specifies the language for the rule that Enterprise Architect is requesting. This will match one of the values returned from EARules_Initialize.

EARules_Initialize

Element

EA.Element

Direction: IN

Description: Specifies the element currently being drawn.

Element Class

CurrentName

String

Direction: IN

Description: Specifies the name currently being used for this element.

Base

Integer

Direction: OUT

Description: Controls whether the base rules will be called if you return an empty value. A non-zero value and return of an empty string means that the parent rules will determine the display of the element name.

Return Value

A string to override the displayed name of the element on a diagram.