Author Topic: v16 - How to access the Target Scope columns via scripting?  (Read 445 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8323
  • Karma: +236/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
v16 - How to access the Target Scope columns via scripting?
« on: August 09, 2022, 07:58:09 pm »
t_connector holds two columns, SourceTS and DestTS (Target Scope), to represent whether the scope at the relevant end is a classifier or instance.  We'd like to be able to manipulate this via scripting, but there doesn't seem to be a property to achieve this with.  We can access them in shapescripts via <end>.targetscope, and we will render the end differently depending on the value.


Can anyone confirm?  If there is such a scripting property, could a kind soul please advise what it is?


TIA,
Paolo


PS: Thomas Killian's (otherwise) excellent "Scripting EA" book, unfortunately, conflates Visibility (Access) with Visibility (Scope) in the Source/Target Properties Window description.
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 12980
  • Karma: +371/-298
  • I'm no guru at all
    • View Profile
Re: v16 - How to access the Target Scope columns via scripting?
« Reply #1 on: August 09, 2022, 08:09:51 pm »
Oh, EA supports mixing (look into the DB tables naming) terms so it dragged me into that. Will fix it since I'm anyway at revising Inside and Scripting now too...

q.

qwerty

  • EA Guru
  • *****
  • Posts: 12980
  • Karma: +371/-298
  • I'm no guru at all
    • View Profile
Re: v16 - How to access the Target Scope columns via scripting?
« Reply #2 on: August 09, 2022, 08:16:53 pm »
Have you checked the ConnectorEnd properties? Currently can't go through them, but if none of them is a candidate you have to use a query...

https://sparxsystems.com/enterprise_architect_user_guide/15.2/automation/connectorend.html

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8323
  • Karma: +236/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16 - How to access the Target Scope columns via scripting?
« Reply #3 on: August 09, 2022, 08:44:00 pm »
Have you checked the ConnectorEnd properties? Currently can't go through them, but if none of them is a candidate you have to use a query...

https://sparxsystems.com/enterprise_architect_user_guide/15.2/automation/connectorend.html

q.
Yes, it looks like the usual EAUI - go 90% of the way but don't do it completely.

I was hoping to avoid a query, but "been there, done that!"

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!