Book a Demo

Author Topic: Create Connector to Connector via API  (Read 2961 times)

Daiim

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Create Connector to Connector via API
« on: October 02, 2018, 11:15:10 pm »
Hi there,

I want to create an connector from an element to another connector. But providing the ConnectorID as SupplierID does not work. Any Ideas how to handle this case using the API?

Code: [Select]
IDualElement element = [...] // fetch element
IDualConnector connector = [...] // fetch connector

//--- create connector to connector
IDualConnector traceReference = element.Connectors.AddNew("", "Trace");
traceReference.SupplierID = connector.ConnectorID;
traceReference.Update();  // << crash

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Create Connector to Connector via API
« Reply #1 on: October 02, 2018, 11:34:31 pm »
IIRC there is some kind of dummy end object created to represent the connector, probably using t_xref.

You will probably have to replicate this somehow, using the backdoor operation Repository.Execute(SQL)

Geert