Book a Demo

Author Topic: Simple procedure to change connector types?  (Read 3826 times)

Lars

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Simple procedure to change connector types?
« on: February 02, 2013, 01:40:33 am »
Since I'm required to change the type of connector between a large set of functions and requirements I'm searching for a simple (fast) procedure to accomplish the task.

I'm familiar with the relationship matrix, and have found the built in export function. But is there a similiar way to import connectors and at the same time change the type of connector from e.g. Depencency (trace) to Realization?

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Simple procedure to change connector types?
« Reply #1 on: February 02, 2013, 02:19:49 am »
Hi,

i don't have any solution for the user interface, but you can do this with sql-queries or/and a script. But therefore but need to know exactly what you want to do - and on which element you cast it.

Regards

STefan
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Simple procedure to change connector types?
« Reply #2 on: February 02, 2013, 02:37:52 am »
Hi,

if you have a clear rule to identify the connectors to change the type then it's possible and not that difficult to make a SQL Update Script.

Its like:
Update t_connector set .......  where (condition to indentify the correct connectors).

Kind regards,

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Simple procedure to change connector types?
« Reply #3 on: February 02, 2013, 04:08:48 am »
You might get yourself started by looking into my book Inside EA  :)

q.
« Last Edit: February 02, 2013, 04:09:11 am by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Simple procedure to change connector types?
« Reply #4 on: February 04, 2013, 06:17:17 pm »
It is going to be either the SQL solution, or write some small script to change the type of the connectors, or you could try to export the model to XMI, and do a find and replace to change the type of connector.
And then import the xmi again.

Geert

Lars

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Simple procedure to change connector types?
« Reply #5 on: February 04, 2013, 07:32:22 pm »
Thanks for your replies!

Scripting is possible! Though, this leads me on to yet another issue. I have a VB-script today, which establishes connectors between two elements (free of choice).

This script worked just fine before I updated to EA version 10. The type of connector is configured to be set to Dependency (trace), but is now instead defined as Abstraction (trace).

I use the following syntax:
set elementConnector = source.Connectors.AddNew ( "elementConnector", "trace" )

Any thoughts?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Simple procedure to change connector types?
« Reply #6 on: February 05, 2013, 12:36:12 am »
You'd better use
Code: [Select]
set elementConnector = source.Connectors.AddNew ( "elementConnector", "Dependency" );
elementConnector.Stereotype = "trace";

q.

Lars

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Simple procedure to change connector types?
« Reply #7 on: February 05, 2013, 12:41:59 am »
Thanks! Solved the problem.

Lars