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

EARules_PropagateStereotype

EARules_PropagateStereotype allows an Add-In registered to provide rules for a language to control if a particular stereotype from a classifier should be applied to an instance with that classifier.

This event occurs when a classifier is assigned to an instance.

Syntax

Function EARules_PropagateStereotype (Repository As EA.Repository, Language As String, Element as EA.Element, Stereotype as String) As Integer

The EARules_PropagateStereotype 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 showing a context menu that includes the option for applying the stereotype.

Element Class

Stereotype

String

Direction: IN

Description: Specifies the qualified name of the stereotype to apply.

Return Value

  • Return a positive value to allow the stereotype from the type to be applied
  • Return zero to prevent the stereotype from being applied
  • Return a negative value to use the behavior from the base rules

Learn more