Open jyt13 opened 1 year ago
Not sure what is going wrong. I tested this with the following code:
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
I see this code also in your website, but it is in VB, I am using JScript. And because now the script I am working is quite big already and I know nothing of programming with VB, it is hard for me to change the language.
So, may I know, from a developer's point of view, it should be theoretically correct when here is an array of strings in the corresponding language, is it?
Dear Mr. Bellekens,
I am now trying to build an add-in with JScripts in EA using EA-Matic.
When I fill the code of EA_GetMenuItems, I try to return a string array, so that I can have multiple menu options:
if (MenuName == ......) { return ["A","B"] }
But it always indicates me an error message which is:
I would like to know how to solve this issue? I am using EA 15.2.