Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mv01d

Pages: [1]
1
Bugs and Issues / Add-In MainMenu Location Bug
« on: May 09, 2014, 05:43:56 pm »
I have an Add-In which uses different menus for each of the three menu locations (MainMenu, TreeView, and Diagram). Thus the implementation swiches between the menues depending on the
menuLocation parameter of the following methods:

Code: [Select]

void EA_MenuClick(EA.Repository repository, string menuLocation, string menuName, string itemName)

void EA_GetMenuState(EA.Repository repository, string menuLocation, string menuName, string itemName, ref bool isEnabled, ref bool isChecked)

object EA_GetMenuItems(EA.Repository repository, string menuLocation, string menuName)



The first issue: When i go into my main menu, EA calls the EA_GetMenuState continously even if i don't move to another item. This behaviour in only in the main menu but not in the tree view or diagram menu.

The second issue comes up if a menu item is being clicked by the user. In this case EA switches the menuLocation to Diagram. Huh?!


05/09/2014 09:17:44.246 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt6")
05/09/2014 09:17:44.246 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.246 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="Show Version")
05/09/2014 09:17:44.246 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.496 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt1")
05/09/2014 09:17:44.496 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.496 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt2")
05/09/2014 09:17:44.496 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.496 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt3")
05/09/2014 09:17:44.496 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.496 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt4")
05/09/2014 09:17:44.496 [TRACE]:  => (isEnabled=True, isChecked=True)
05/09/2014 09:17:44.496 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt5")
05/09/2014 09:17:44.527 [TRACE]:  => (isEnabled=True, isChecked=True)
05/09/2014 09:17:44.527 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt6")
05/09/2014 09:17:44.527 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.527 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="Show Version")
05/09/2014 09:17:44.527 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.761 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="Menu")
05/09/2014 09:17:44.761 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.761 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt2")
05/09/2014 09:17:44.761 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.761 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt3")
05/09/2014 09:17:44.761 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.761 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt4")
05/09/2014 09:17:44.761 [TRACE]:  => (isEnabled=True, isChecked=True)
05/09/2014 09:17:44.761 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt5")
05/09/2014 09:17:44.777 [TRACE]:  => (isEnabled=True, isChecked=True)
05/09/2014 09:17:44.777 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt6")
05/09/2014 09:17:44.777 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.777 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="Show Version")
05/09/2014 09:17:44.777 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:44.855 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt6")
05/09/2014 09:17:44.855 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:45.042 [TRACE]: EA_GetMenuState(menuLocation="MainMenu", menuName="-AddIn", itemName="DoIt6")
05/09/2014 09:17:45.042 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:45.042 [TRACE]: EA_GetMenuState(menuLocation="Diagram", menuName="-AddIn", itemName="DoIt6")
05/09/2014 09:17:45.042 [TRACE]:  => (isEnabled=True, isChecked=False)
05/09/2014 09:17:45.042 [TRACE]: EA_MenuClick(menuLocation="Diagram", menuName="-AddIn", itemName="DoIt6")

This bug is present in EA10 and EA11.

2
Bugs and Issues / Issus on Property Types API
« on: February 24, 2014, 09:09:09 pm »
  • Adding a new Property Type with the following code
Code: [Select]
var obj = repository.PropertyTypes.AddNew(propertyName, "<memo>");

if (obj != null)
{
      type = obj as EA.PropertyType;
      type.Detail = "Type=AddinBroadcast;";
      type.Update();
}

Does not refresh the repository correctly. The new Propery does not triggers a EA_OnConnectorTagEdit call until a re-open of the project. (Tested: EA10 and EA11 beta)


  • The call EA.Repository.PropertyTypes.GetByName(...) leads to the Exception:
Code: [Select]
System.Runtime.InteropServices.COMException (0x80040002): Action is not supported
  bei EA.CollectionClass.GetByName(String Name)
(Tested: EA10 and EA11 beta)
[/list]

3
I currently have the same problem. I think this could be a bug, which should be solved. It seems that the implementation of propertyType.Update() does not update the property types correctly, which can only be solved by re-open the whole project.

There are some other issus related to property types: The repository.PropertyTypes.GetByName() method seems to be not yet implemented.

Code: [Select]
System.Runtime.InteropServices.COMException (0x80040002): Action is not supported
   bei EA.CollectionClass.GetByName(String Name)

 :-/

4
REMARK:

Indeed there is a method for altering the default appearance of EA objects:

SetAppearance (long Scope, long Item,  long Value)

http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/element2.html

5
Ok, you are right. Execute is one of the [TypeLibFunc(64)] marked methods from the IDualRepository.

Thanks!

6
Tanks for your advice! I'm using Enterprise Architect 10. I just checked the EA.Repository object for a possibility but there is only a SQLQuery method which fails on update statements like UPDATE t_object SET Backcolor=-1 WHERE Object_ID=3 with:

DAO.QueryDef [3141]

The SELECT statement incluides a reserved word or anm argument name that is misspelled or missing, or the punctuation is incorrect.



7
How do I modify the default appearance of a specific object via the object model. As far as i can see. the object properties are stored in the t_object tabel (e.g t_object.Backcolor).

Thanks for your help!

Pages: [1]