https://i0.wp.com/bellekens.com/wp-content/uploads/2015/01/ea-maticlogo64_with-subtitle_2.png?fit=264%2C64&ssl=164264Geert Bellekenshttps://bellekens.com/wp-content/uploads/2024/06/BellekensWebsiteLogo_300x64.pngGeert Bellekens2015-03-14 15:20:012016-10-01 15:17:48Configure your own default line styles in Enterprise Architect with EA-Matic
With EA-Matic you can develop add-ins for Enterprise Architect using the built-in scripting feature of EA.
This example EA-Matic script keeps the signature of the overriding operations in sync with the signature of the overridden operation.
This is especially useful when you are modelling an interface and a number of classes that realize this interface. EA has this neat feature Overrides and Implementations accessed by Ctrl-Shift-O to copy operations from an interface or superclass to the realizing/specializing class.
This works great when you have created a new operation, or added a new realizing class, but once you change the signature of your interface operation you are on your own.… Read more
With EA-Matic you can develop add-ins for Enterprise Architect using the built-in scripting feature of EA.
This example EA-Matic script keeps the names of objects synchronized with the name of their classifier.
When modelling with objects the name of the object is often left empty because it doesn’t have any significance at that point. One of the downsides of this practice is that in things like the traceability view, or in the links view the object shows up without a name, which of course doesn’t help much.… Read more
https://i0.wp.com/bellekens.com/wp-content/uploads/2015/01/ea-maticlogo64_with-subtitle_2.png?fit=264%2C64&ssl=164264Geert Bellekenshttps://bellekens.com/wp-content/uploads/2024/06/BellekensWebsiteLogo_300x64.pngGeert Bellekens2015-02-01 07:15:462016-10-01 15:11:19Synchronize object and classifier name in Enterprise Architect with EA-Matic
With EA-Matic you can develop add-ins for Enterprise Architect using the built-in scripting feature of EA.
This example shows how to make diagrams that maintain themselves to make sure they are always up-to-date.
The idea is that we want a diagram that shows all the relations of the owning object. The diagram should always be up-to-date without manual intervention.
To indicate that this diagram is an automatic diagram we nest it under the class and prefix it with AUTO_Â and on the diagram we place the owning object and its related elements
'EA-Matic
'Tell EA what the menu options should be
function EA_GetMenuItems(MenuLocation, MenuName)
if MenuName = "" then
'Menu Header
EA_GetMenuItems = "-&MyAddinMenu"
else
if MenuName = "-&MyAddinMenu" then
'Menu items
Dim menuItems(1)
menuItems(0) = "TreeViewMenu"
menuItems(1) = "DiagramMenu"
EA_GetMenuItems = menuItems
end if
end if
end function
Step 2: define the menu state
'Define the state of the menu options
function EA_GetMenuState(MenuLocation, MenuName, ItemName, IsEnabled, IsChecked)
if MenuName = "-&MyAddinMenu" then
Select Case ItemName
case "TreeViewMenu"
if MenuLocation = "TreeView" then
IsEnabled = true
else
IsEnabled = false
end if
case "DiagramMenu"
if MenuLocation = "Diagram" then
IsEnabled = true
else
IsEnabled = false
end if
end select
end if
'to return out parameter values we should return an array with all parameters
EA_GetMenuState = Array(MenuLocation, MenuName, ItemName, IsEnabled, IsChecked)
end function
Step 3: React to user clicking a menu option
'react to user clicking a menu option
function EA_MenuClick(MenuLocation, MenuName, ItemName)
if MenuName = "-&MyAddinMenu" then
Select Case ItemName
case "TreeViewMenu"
Dim Package
Set Package = Repository.GetTreeSelectedPackage()
https://i0.wp.com/bellekens.com/wp-content/uploads/2015/01/ea-maticlogo64_with-subtitle_2.png?fit=264%2C64&ssl=164264Geert Bellekenshttps://bellekens.com/wp-content/uploads/2024/06/BellekensWebsiteLogo_300x64.pngGeert Bellekens2015-01-11 08:48:062016-10-01 15:01:46Using the add-in menu with EA-Matic