IUAVariable.SetDynamicLinkToAlias(aliasName, path, mode)
Set a dynamic link from a variable to a child or nested node inside an alias, specifying the dynamic link mode.
void SetDynamicLinkToAlias(string aliasName, string[] path, DynamicLinkMode mode = DynamicLinkMode.Read);
Arguments
- aliasName(string)
- TheBrowseNameof the Alias.
- path
- An array of strings specifying the path to a child or nested node inside the alias.
- mode(DynamicLinkMode)
- An optional argument that specifies the dynamic link mode.The following dynamic link modes are available:
- DynamicLinkMode.Read(default)
- Read (from source node to parent).
- DynamicLinkMode.Write
- Write (from parent to source).
- DynamicLinkMode.ReadWrite
- Read and write (bidirectional).
- ResourceURI
- A C# object that contains the path indicated in the argument.
Example
Link a variable to the default attribute (
Value
) of a direct child of an alias in ReadWrite mode:[ExportMethod] public void CreateDynamicLinkToAlias() { // Get the Text variable of a TextBox var myVariable = Owner.GetVariable("TextBox1/Text"); // Link to {MotorAlias}/Speed in ReadWrite mode myVariable.SetDynamicLinkToAlias("MotorAlias", new string[] { "Speed" }, DynamicLinkMode.ReadWrite); }
Provide Feedback