EA_QueryAvailableCompartments

Details

This event occurs when Enterprise Architect's diagrams are refreshed. It is a request for the Add-In to provide a list of user-defined compartments. The EA_GetCompartmentData event then queries each object for the data to display in each user-defined compartment.

Syntax

Function EA_QueryAvailableCompartments(Repository As EA.Repository) As Variant

The EA_QueryAvailableCompartments function syntax contains the following elements:

Parameter

Type

Direction

Description

Repository

EA.Repository

IN

An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.

Return Value

A String containing a comma-separated list of user-defined compartments.

Example

 

Function EA_QueryAvailableCompartments(Repository As EA.Repository) As Variant

       Dim sReturn As String

       sReturn = ""

       If m_FirstCompartmentVisible = True Then

               sReturn = sReturn + "first,"

       End If

       If m_SecondCompartmentVisible = True Then

               sReturn = sReturn + "second,"

       End If

       If m_ThirdCompartmentVisible = True Then

               sReturn = sReturn + "third,"

       End If

 

       If Len(sReturn) > 0 Then

               sReturn = Left(sReturn, Len(sReturn)-1)

       End If

 

       EA_QueryAvailableCompartments = sReturn

End Function