Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Proagile on July 21, 2021, 01:54:39 am

Title: problem with connector styles
Post by: Proagile on July 21, 2021, 01:54:39 am
Hi, I tried to add styles / properties to a connector through t_diagramLinks but they are not reflected in the diagram connectors, is there another way to apply styles (api or similar) or is it the only way through database?

Example of an insert:

"INSERT INTO t_diagramlinks (DiagramID,ConnectorID,Geometry,Style,Hidden,Path,Instance_ID) VALUES (" + esta.idDiagClon + ", " + nuevaConexion.ConnectorID + ", '" + estilo.Geometry + "', '" + estilo.Style + "', " + estilo.Hidden + ", '" + estilo.Path + "', " + id + ")"

The record in the database looks like this, but the diagram does not show the break in the connector

(https://i.imgur.com/WWxY2Ai.png)
Title: Re: problem with connector styles
Post by: qwerty on July 21, 2021, 07:28:31 am
Hard to tell, but you should add a break manually for that connector and compare the difference. That might give you a clue.

q.
Title: Re: problem with connector styles
Post by: Paolo F Cantoni on July 21, 2021, 07:57:22 am
Hard to tell, but you should add a break manually for that connector and compare the difference. That might give you a clue.

q.
Wot 'e sed!
Plus, having determined the difference required.  Try to duplicate the manual style exactly via code to confirm there's not something else going on.

Paolo
Title: Re: problem with connector styles
Post by: Geert Bellekens on July 24, 2021, 03:57:01 pm
Why are you inserting diagramlinks? You can use the API to create those for you.
I would never do that myself. Updating maybe, if I don't have another option, but never insert.

Geert
Title: Re: problem with connector styles
Post by: Proagile on July 26, 2021, 10:59:50 pm

The problem was with a previous query so the API did not work for us, but once this was resolved we could do it through the API, thank you very much for the answers.