Book a Demo

Author Topic: Connect to Element Feature  (Read 2896 times)

David Hawley

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Connect to Element Feature
« on: December 28, 2011, 04:05:06 am »
Is there any way from the Automation interface to add a connector between two attributes of different classes.  How to do this manually is given in the help topic "Connect to Element Feature", but I cannot find out how to set the connector up through the API.
What I tried: setting connector.ClientID and .SupplierID to the attribute IDs.  The call to connector.Update fails.  If I use the elementIDs instead, the connection is made, but at the attribute level.

David Hawley

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Connect to Element Feature
« Reply #1 on: December 28, 2011, 05:00:44 am »
I found a big hint on qwerty's post on OpagueBahaviour (=???).

The answer is:
conn.StyleEx = String.Format("LFEP={0}L;LFSP={1}R;", attr1.AttributeGUID, attr2.AttributeGUID), as well as setting the ClientID and Supplier ID to the corresponding classes.

Works like a charm.