1
Automation Interface, Add-Ins and Tools / Re: Creating Template Binding automatically via JavaScript
« on: November 23, 2018, 04:25:47 am »
:)Thanks a lot that worked well
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
var connection = currentElement.Connectors.AddNew("TemplateBinding","TemplateBinding");
Session.Output(connection.Name);
connection.SupplierID = el.ElementID;
var tempbinding = connection.TemplateBindings.AddNew("TemplateBindings",el.ElementGUID);
tempbinding.FormalName = "ReturnType";
tempbinding.ActualName = "Test";
tempbinding.Update();
connection.TemplateBindings.Refresh();
connection.Update();
el.Update();
currentElement.Connectors.Refresh();
currentElement.Update();