I have written a simple script that creates composition links between an element and any child elements. It works except that when I try to set the direction, I don't get the effect for which I am looking to achieve. I want "Source -> Destination". But it always sets it to "Destination -> Source". I
var theElement as EA.Element;
theElement = Repository.GetTreeSelectedObject();
elements = new Enumerator(theElement.Elements);
while (!elements.atEnd()) {
var element as EA.Element;
element = elements.item();
connector = element.Connectors.AddNew("Part Of","composedOf");
connector.SupplierId = theElement.ElementID;
connector.Direction = "Source -> Destination";
// Assuming need update here so that the supplier end is filled in properly.
connector. Update();
// this works fine. Aggregation is showing properly.
connector.SupplierEnd.Aggregation = 2;
connector.Update();
elements.moveNext();
}