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.
Function EA_QueryAvailableCompartments (Repository As EA.Repository) As Variant
The EA_QueryAvailableCompartments function syntax contains this parameter.
Description: An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.
A String containing a comma-separated list of user-defined compartments.
Function EA_QueryAvailableCompartments(Repository As EA.Repository) As Variant
Dim sReturn As String
sReturn = ""
If m_FirstCompartmentVisible = True Then
sReturn = sReturn + "first,"
If m_SecondCompartmentVisible = True Then
sReturn = sReturn + "second,"
If m_ThirdCompartmentVisible = True Then
sReturn = sReturn + "third,"
If Len(sReturn) > 0 Then
sReturn = Left(sReturn, Len(sReturn)-1)
EA_QueryAvailableCompartments = sReturn