Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: hln on June 21, 2013, 07:02:01 pm

Title: IDE is crashed when creating connector
Post by: hln on June 21, 2013, 07:02:01 pm
Sparx IDE is crashed when creating connector between ArchiMate_Juntion and ArchiMate_Plateau elements
Code: [Select]
EA.Element plateauElement = repository.GetElementByID(plateauId);
EA.Element junctionElement = repository.GetElementByID(junctionId);
EA.Connector connector = junctionElement.Connectors.AddNew("", "Aggregation");
connector.Stereotype = "ArchiMate_Aggregation";
connector.Direction = Source -> Destination
connector.SupplierID = plateauElement.ElementID;
connector.Update();

- Sparx IDE is crashed when connector.Update() method is called. The problem will not occur if I create connector by manually in diagram.
Exception:
Code: [Select]
System.Runtime.InteropServices.COMException was caught
  Message=The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
  Source=EAManagerAddIn
  ErrorCode=-2147417851
  StackTrace:
       at EA.IDualConnector.Update()
       at EAManagerAddIn.Export.ExportToEaManager.transformInternal(TransformationContext context, MappedEntity plateau) in D:\SOA\ea-sparx-add-in\EAManagerAddIn\EAManagerAddIn\Export\ExportToEaManager.cs:line 155
  InnerException:
Title: Re: IDE is crashed when creating connector
Post by: Geert Bellekens on June 21, 2013, 07:24:10 pm
are you sure you need this?
Code: [Select]
connector.Direction = Source -> DestinationThat doesn't seem valid. (does it even compile?)

Geert
Title: Re: IDE is crashed when creating connector
Post by: hln on June 21, 2013, 07:36:42 pm
Quote
are you sure you need this?
Code: [Select]
connector.Direction = Source -> DestinationThat doesn't seem valid. (does it even compile?)

Geert

HI Geert,
I try to remove this line from code and error still occurs.
I try to create connector between other elements (for ex: ArchiMate_Component) and ArchiMate_Plateau element and connector is successfully created.
Title: Re: IDE is crashed when creating connector
Post by: Geert Bellekens on June 21, 2013, 10:52:43 pm
In that case I don't have a clue.
If I were you I'd contact sparx support.

Geert
Title: Re: IDE is crashed when creating connector
Post by: qwerty on June 22, 2013, 10:26:16 pm
Quote
are you sure you need this?
Code: [Select]
connector.Direction = Source -> DestinationThat doesn't seem valid. (does it even compile?)

Geert
Direction is a string. It should be
Code: [Select]
connector.Direction = "Source -> Destination“;
q.