Hello,
I have an Add-In which I use by right clicking in the project browser on any package and chose the specific function through the context menu.
In my code (c#) the function EA_MenuClick is called.
The functions header is as follows:
public void EA_MenuClick(EA.Repository rep, string Location, string MenuName, string ItemName)When using my specific function chosen via context menu the very first time after EA was started the parameter "Location" is defined as "MainMenu".
When running the exactly same function via the exactly same way (in both cases as described: right click on package in projectbrowser navigate to "the" specific function via context menu) it then shows "TreeView" as value of parameter "Location".
I do not understand why it differs. I just could imagine either a bug or that something is "selcted" by the code when executed the first time.
Well its not rep.GetTreeSelectedPackage(), this is in both cases the same.
I tried a look into
http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/eaadd_insea_menuclick.htmlwhich was just confusing:
There a function with the following header is described:
Sub EA_MenuClick(Repository As EA.Repository, ByVal MenuName As String, ByVal ItemName As String)furthermore below only these three parameters are described for "detail".
But directly below "Syntax" stands the following:
Syntax:
Sub EA_MenuClick(Repository As EA.Repository, MenuLocation As String, MenuName As String, ItemName As String)Suddenly the documentation talks about a fourth parameter "MenuLocation".
I am not able to find a further definition of this parameter and what it does or what were typically values returned.
If I knew this I may could find out why it is changed by my code or if it changed by my code at all or it may is still something like a bug, I dont know.
Thanks for any hints.