Book a Demo

Author Topic: delete Connector does not work anymore  (Read 4177 times)

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
delete Connector does not work anymore
« on: May 18, 2010, 11:36:26 pm »
I just upgraded to the newest EA version
and now my deleteConnector method doesnt work anymore.

Code: [Select]
public void deleteConnector(EA.Connector con, EA.Repository Repository)
        {
            EA.Element client = Repository.GetElementByID(con.ClientID);
            EA.Element supplier = Repository.GetElementByID(con.SupplierID);
            
            
            short i =0;
            foreach(EA.Connector actLink in client.Connectors) {

                if (actLink.ConnectorID == con.ConnectorID)
                {
                    client.Connectors.Delete(i);

                }
                i++;
            }
            
            
        }

I tried all kind of update() and refresh on every involved object.
but the connection is still there.
Any Ideas
in EA 7.5 this method worked.

Stao

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: delete Connector does not work anymore
« Reply #1 on: May 18, 2010, 11:52:56 pm »
Have you tried deleteAt()?

Geert

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: delete Connector does not work anymore
« Reply #2 on: May 19, 2010, 12:12:00 am »
does not work.
it seems that the delete methods have no effect at all.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: delete Connector does not work anymore
« Reply #3 on: May 19, 2010, 03:26:50 pm »
Have you reported it to Sparx support?
If this is a bug then they better fix it quickly.

Geert

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: delete Connector does not work anymore
« Reply #4 on: September 07, 2010, 09:58:36 pm »
is there any solution?
im still not able to delete connectors via addin

beginner

  • Guest
Re: delete Connector does not work anymore
« Reply #5 on: September 07, 2010, 11:21:26 pm »
I just tried it here. Works without problems.

Try to extract GetLastError() from the collection.

b.
« Last Edit: September 07, 2010, 11:24:15 pm by beginner »

stao

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: delete Connector does not work anymore
« Reply #6 on: September 08, 2010, 10:39:04 pm »
solved...
reload diagram != refreshAllOpenDiagrams