Class DynamicProperty
An object attached to a SmartComponent that has value, type and attributes. The property value is used to control the behavior of the SmartComponent
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
sistent("TDynamicProperty")]
public sealed class DynamicProperty
Constructors
DynamicProperty(String, String)
Creates a new instance of the DynamicProperty class.
Declaration
public DynamicProperty(string name, string valueType)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the DynamicProperty. |
String | valueType | The Type name of the DynamicProperty. |
Properties
Attributes
Gets a PropertyAttributeCollection describing different aspects of this property. Certain attributes are used by the RobotStudio user interface, see KnownAttributeKey.
Declaration
public PropertyAttributeCollection Attributes { get; }
Property Value
Type | Description |
---|---|
PropertyAttributeCollection |
Description
Gets or sets a localized description for this property.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The description is retrieved from localized resource strings in the parent component, see GetResourceString(String). The setter sets the English description unless LanguageOverride is set.
DisplayName
Gets or sets a localized name for this property.
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The name is retrieved from localized resource strings in the parent component, see GetResourceString(String). The setter sets the English name unless LanguageOverride is set.
DisplayValue
Returns a string representation of Value.
Declaration
public string DisplayValue { get; }
Property Value
Type | Description |
---|---|
String |
GroupName
Gets or sets a localized group name for this property. It can be used to group properties in a user interface.
Declaration
public string GroupName { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The name is retrieved from localized resource strings in the parent component, see GetResourceString(String). The setter sets the English name unless LanguageOverride is set.
Name
Get the name of the DynamicProperty.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String | A String that represents the name of the DynamicProperty. |
Parent
Gets the ProjectObject that contains this signal. The object implements IHasDynamicProperties.
Declaration
public ProjectObject Parent { get; }
Property Value
Type | Description |
---|---|
ProjectObject |
ReadOnly
Indicates if the value of this property shall be possible to modify in a user interface or not.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The value can always be set programatically or through a binding, even if ReadOnly is true.
UIVisible
Indicates if this property should normally be visible in a user interface . It shall be used as a hint for user interface implementors.
Declaration
public bool UIVisible { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Value
Gets or sets the property value. The value is automatically converted to the proper type if possible.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
Object |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the value can not be converted or is invalid. |
ValueType
Get the associated Type.
Declaration
public Type ValueType { get; }
Property Value
Type | Description |
---|---|
Type | Associated Type. |
Methods
GetBindings()
Returns an array of bindings from this property to other properties.
Declaration
public PropertyBinding[] GetBindings()
Returns
Type | Description |
---|---|
PropertyBinding[] | An array of PropertyBinding containing the bindings. |
GetValidTypes()
Returns an array of all Types that are valid for constructing a DynamicProperty.
Declaration
public static Type[] GetValidTypes()
Returns
Type | Description |
---|---|
Type[] |
IsValidName(String)
Checks if a string is a valid name for a dynamic property.
Declaration
public static bool IsValidName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
Boolean |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
TrySetValue(Object)
Try to set the specified value on the property. A value validation is performed. The value is set only if it is valid.
Declaration
public ValueValidationInfo TrySetValue(object value)
Parameters
Type | Name | Description |
---|---|---|
Object | value |
Returns
Type | Description |
---|---|
ValueValidationInfo | A ValueValidationInfo that specifies the result of the validation. |
ValidateValue(Object)
Check if its possible to set the specified value on this property, given the property type and restrictions.
Declaration
public ValueValidationInfo ValidateValue(object value)
Parameters
Type | Name | Description |
---|---|---|
Object | value |
Returns
Type | Description |
---|---|
ValueValidationInfo | A ValueValidationInfo that specifies the result of the validation. |