Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: markus8521 on July 15, 2025, 10:28:51 pm

Title: Access ConnectionPointReference / Cross-References / Custom References via API
Post by: markus8521 on July 15, 2025, 10:28:51 pm
Hello everyone,

I have a state machine, let's call it stm_A. One of the states therein is state_B, classified by the state machine stm_B. stm_b has Exit Points. I have referenced the Exit Points of state_B via the ConnectionPointReference dialog window to the corresponding Exit Points of stm_B (as required by the EA documentation).

Now, I would like to access this relation via the API from a script. Can anyone tell me, which API attribute for an element is working here? I have already tried the ones from https://sparxsystems.com/enterprise_architect_user_guide/17.1/add-ins___scripting/element2.html (https://sparxsystems.com/enterprise_architect_user_guide/17.1/add-ins___scripting/element2.html). (I am accessing the Exit Point element of the state)

I have the same issue with the alternative: creating a custom reference.

In a special case it works, if stm_B is already finished. Then i can drag and drop it into stm_A inclusing all Structural Elements. In this case, EA automatically creates an "instance-relationship" as seen in the Traceability-window. Now i can simply use the ClassifierID reference. But if stm-B is changed I can't seem to find a way to create this kind of relationship manually between the Exit Points. Does anyone know a method?