Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: RonStein on July 04, 2007, 02:41:22 am
-
Using the latest beta 3 and the Java API, I do always get back an empty string when trying to access the role name, role type or other information of a connector end object.
Here is the code snippet (elem is a class object):
...
for (Connector link : elem.GetConnectors())
{
ConnectorEnd clientElement = link.GetClientEnd();
ConnectorEnd supplierElement = link.GetSupplierEnd();
String eaStartType = clientElement.GetRoleType();
...
eaStartType is always empty.
Any suggestions?
Ronald
-
I'm not using the Java API but I would try stepping through by accessing "simple" things first, like the connector Name (need to set that in EA of course) and Type. Sometimes it's just a simple thing missing...
-
Thanks for replying, but the code (and the model) worked before. I have used GroovyCOM before and now that the Java API is available I would like to take advantage of typed access and changed the code only to follow the new API (in fact I had to change only a few things). So I still think it might be a bug in the API.
Ronald
-
Then you should submit a bug report to the beta-bug page (found in the beta 1 release notes)
-
My assumption about getRoleType() was wrong. To get the connection end type (class) of a role end, I have to query by the ID. Therefore - my mistake, no API bug here.