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 - keesbghs

Pages: [1]
1
Correct, these are the ones. Thanks

I should have payed more attention to the "ElementID" in "The ElementID of the element at the source end of this connector." I don't know why I didn't see that one before.

2
Maybe I'm just confusing what Connector is. Maybe it is just the Realize itself that I should be looking at.

3
Background.

I'm investigating the possibility to read Requirements and "solutions" from an EA project. I am using Python with the win32com library. Much of the documentation I find from this Reference https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/reference.html. At the moment my Python code can see all the Packages, Elements and Connectors.

The problem.

However, given a Connector (https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/connector2_2.html) I cannot see what it is connecting to. The one end of the connector is obvious, that's the Element->Realize where I find the connector. What is the other end? There is a ConnectorEnd, but that doesn't help me (yet).

Strangely, when I digest the raw database I can see a t_connector table, which does have a Start_Object_ID and a End_Object_ID. I even wrote some Python code with SQLalchemy (which BTW is way faster than the win32com method). This basically gives the information that I need. But I don't want to have to mix SQL and win32com. I also have to modify Packages/Elements which I certainly don't want to change via SQL.

4
Thanks, I found the enum values in the EAConstants-*.* files.

These values are not available in Python, at least, not to my knowledge. Unless there is a win32com API trick, which I'm not aware of.

5
Thanks Geert. I did see that objecttypeenum.html, I see the enum, but the items are sorted alphabetically and they don't have associated numeric values.

You mention "Local Scripts". Is that part of some installation? I don't have that in my EA v16.1

BTW the HTML markup of the documentation is pretty bad. Why is there so much white space? Why don't they use better (non-proportional) fonts for code examples. It hurts my eyes.

6
I'm trying to write some Python code using the win32com api. Many time I get a `COMObject` with an `ObjectType` attribute. For example a `Repository` has `ObjectType` 2, `Package` had `ObjectType` 5.

Is there a document somewhere that lists all the object types?

7
I had already written some Python code with SQLalchemy, which is indeed much faster. The only problem is that this is basically some sort of reverse engineering. I don't (yet?) want to use that to write into the database.

8
Hi,
With the Python win32com module it is possible to read the details of Packages, Elements and Realizes. I've used information from
https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/repository3.html
https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/package_2.html
https://sparxsystems.com/enterprise_architect_user_guide/17.0/add-ins___scripting/element2.html
I'm getting the data that I want to see.

But it is really, really slow. I have just some 200 elements, which takes almost 6 minutes (!!!) to read.

Did anyone else see this too? What can I do to speed it up?

Pages: [1]