17
Custom Properties in InduSoft Web Studio January 2016

Custom Properties in InduSoft Web Studio

Embed Size (px)

Citation preview

Page 1: Custom Properties in InduSoft Web Studio

Custom Properties in InduSoft Web Studio

January 2016

Page 2: Custom Properties in InduSoft Web Studio

THANK YOU!Together, we are stronger!

15+ years of innovation, collaboration, evolution, and success!

Page 3: Custom Properties in InduSoft Web Studio

Agenda

InduSoft (Fabio Terezinho)– Introduction – Description and Demos– Special Scenarios– Q&A

Page 4: Custom Properties in InduSoft Web Studio

Introduction

Page 5: Custom Properties in InduSoft Web Studio

Definition

Custom Properties (also known as Mnemonics) are place holders (aliases) that can configured to screen scripts, screen animations and objects properties.

Page 6: Custom Properties in InduSoft Web Studio

Goal / Benefit

Custom Properties allows you to configure generic Symbols or generic screens, and assign values, tags, or expressions to their properties dynamically during the runtime. Therefore, you can re-use your “templates” of symbols and screens, improving productivity and enhancing overall consistency and quality.

Page 7: Custom Properties in InduSoft Web Studio

Description and Demos

Page 8: Custom Properties in InduSoft Web Studio

Syntax

#CustomPropertyName:CustomPropertyValue Where:

CustomPropertyName = Identifier (alias name) of the custom property.

CustomPropertyValue = Actual (default) value of the custom property. It can be a literal value (numeric or alphanumeric), a tag, or even an expression between parentheses. It can also be omitted (no default value), so there is no default value for the custom property, but its value can still be set dynamically during the runtime.

Page 9: Custom Properties in InduSoft Web Studio

Runtime behavior

During the runtime, only the CustomPropertyValue is used and the remaining text from the aforementioned syntax is ignored. Examples:

Custom Property(full syntax)

Custom Property Name(alias used as identifier)

Custom Property Value(used during the runtime)

#MyNumValue:10 MyNumValue 10

#MyTextValue:”ABC” MyTextValue “ABC”

#MyTag:Second MyTag Second

#MyExpression:(Minute*10) MyExpression (Minute*10)

Page 10: Custom Properties in InduSoft Web Studio

Applicability

Linked Symbols

Screens

Page 11: Custom Properties in InduSoft Web Studio

$Open() built-in function

Pass Mnemonic values through the function:Syntax: $Open(ScreenName, X1, Y1, X2, Y2, Resize, ID, CustomPropertyList)Example: $Open("Popup", -1, -1, -1, -1, 0, 0, "#MyNumber:10 #MyText:""ABC""")

Pass Mnemonic values through an external file:Syntax: $Open(ScreenName, X1, Y1, X2, Y2, Resize, ID, FileName)Example: $Open("Popup", -1, -1, -1, -1, 0, 0, “MyMnemonic1")Remarks: The text file must be saved on the \Web sub-folder of the project, with the extension “.mne”. Each Custom Property must be configured in a different line of the file, as illustrated below:

Page 12: Custom Properties in InduSoft Web Studio

Special Scenarios

Page 13: Custom Properties in InduSoft Web Studio

Tag Fields

Replace Custom Property value partially using tag fields configured on the objects and animations.

Assume you have a screen where you configure the following syntaxes on different objects:

#MyTag:Minute#MyTag:Minute->Min#MyTag:Minute->Max#MyTag:Minute->Unit

$Open("MyScreen", -1, -1, -1, -1, 0, 0, "#MyCustomProperty:Second")

This function will replace values as indicated in the following table:

Custom Property configured on the objects and animations Custom Property passed by the built-in function $Open() Actual value executed during the

runtime#MyCustomProperty:Minute #MyCustomProperty:Second Second

#MyCustomProperty:Minute->Min #MyCustomProperty:Second Second->Min#MyCustomProperty:Minute->Max #MyCustomProperty:Second Second->Max#MyCustomProperty:Minute->Unit #MyCustomProperty:Second Second->Unit

Page 14: Custom Properties in InduSoft Web Studio

Class Tags

Replace Custom Property value partially using class tags on the objects and animations

Assume you have a screen where you configure the following syntaxes on different objects:

#MyTag:MyTagA.MemberX#MyTag:MyTagA.MemberY#MyTag:MyTagA.MemberZ

$Open("MyScreen", -1, -1, -1, -1, 0, 0, "#MyCustomProperty:MyTagB")

This function will replace values as indicated in the following table:

Custom Property configured on the objects and animations

Custom Property passed by the built-in function $Open()

Actual value executed during the runtime

#MyCustomProperty:MyTagA.MemberX #MyCustomProperty:MyTagB MyTagB.MemberX#MyCustomProperty:MyTagA.MemberY #MyCustomProperty:MyTagB MyTagB.MemberX#MyCustomProperty:MyTagA.MemberZ #MyCustomProperty:MyTagB MyTagB.MemberX

Page 15: Custom Properties in InduSoft Web Studio

Array Tags

Replace Custom Property value partially using array tags

Assume you have a screen where you configure the following syntaxes on different objects:

#MyTag:MyArray[1]#MyTag:MyArray[2]#MyTag:MyArray[3]

$Open("MyScreen", -1, -1, -1, -1, 0, 0, "#MyCustomProperty:NewArray")

This function will replace values as indicated in the following table:

Custom Property configured on the objects and animations

Custom Property passed by the built-in function $Open()

Actual value executed during the runtime

#MyCustomProperty:MyArray[1] #MyCustomProperty:NewArray NewArray[1]#MyCustomProperty:MyArray[2] #MyCustomProperty:NewArray NewArray[2]#MyCustomProperty:MyArray[3] #MyCustomProperty:NewArray NewArray[3]

Page 16: Custom Properties in InduSoft Web Studio

Q&A

Page 17: Custom Properties in InduSoft Web Studio

THANK YOU!