Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: hln on June 21, 2013, 07:02:01 pm
-
Sparx IDE is crashed when creating connector between ArchiMate_Juntion and ArchiMate_Plateau elements
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:
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:
-
are you sure you need this?
connector.Direction = Source -> DestinationThat doesn't seem valid. (does it even compile?)
Geert
-
are you sure you need this?
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.
-
In that case I don't have a clue.
If I were you I'd contact sparx support.
Geert
-
are you sure you need this?
connector.Direction = Source -> DestinationThat doesn't seem valid. (does it even compile?)
Geert
Direction is a string. It should be connector.Direction = "Source -> Destination“;
q.