Difference between revisions of "API Component.Property.CopyValue"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Copies a property value from one target to another
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CopyValue'''
 +
|-
 +
| colspan="2" | Copies a property value from one target to another&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Source
 +
|-
 +
| colspan="2" | The source component to copy from&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Dest
 +
|-
 +
| colspan="2" | The target component to copy to&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Property
 +
|-
 +
| colspan="2" | The textual name of the property&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
<div style="width:25%; float:right" class="toc">
 
====Class hierarchy====
 
[[API Component|Component]]
 
:[[API Component.Property|Property]]
 
::[[API Component.Property|CopyValue]]
 
</div>
 
__TOC__
 
  
==Parameters==
+
==Detailed description==
[[Variable types|HANDLE]] ''Source''
+
This copies a components property value named ''Property'' from the ''Source'' component to the ''Dest''. It is provided for convenience.
:The source component to copy from
 
  
[[Variable types|HANDLE]] ''Dest''
 
:The target component to copy to
 
  
[[Variable types|STRING]] ''Property''
+
An equivalent call using [[API Component.Property.SetValue|SetValue]] from ''this'' to a ''dest'' component may be:
:The textual name of the property
+
:<tt>::Component.Property.SetValue(dest, "property", this::property)</tt>
  
  
==Return value==
+
And from any component to another:
[[Variable types|STRING]]
+
:<tt>value = ::Component.Property.GetValue(source, "property")
''<span style="color:red;">No additional information</span>''
+
:<nowiki/>::Component.Property.SetValue(dest, "property", value)</tt>
 
 
 
 
==Detailed description==
 
''<span style="color:red;">No additional information</span>''
 
  
  
Line 34: Line 44:
 
* Declare a variable 'result' of type STRING
 
* Declare a variable 'result' of type STRING
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Property.CopyValue(source, dest, "property")</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Property.CopyValue(source, dest, "property")</pre>
 
''<span style="color:red;">No additional information</span>''
 

Latest revision as of 11:54, 16 January 2023

Fc9-comp-macro.png CopyValue
Copies a property value from one target to another 
Fc9-h32-icon.png - HANDLE Source
The source component to copy from 
Fc9-h32-icon.png - HANDLE Dest
The target component to copy to 
Fc9-string-icon.png - STRING Property
The textual name of the property 
Fc9-string-icon.png - STRING Return


Detailed description

This copies a components property value named Property from the Source component to the Dest. It is provided for convenience.


An equivalent call using SetValue from this to a dest component may be:

::Component.Property.SetValue(dest, "property", this::property)


And from any component to another:

value = ::Component.Property.GetValue(source, "property")
::Component.Property.SetValue(dest, "property", value)


Examples

Calling in a calculation

  • Declare a variable 'result' of type STRING
  • Add to a calculation icon:
    result = ::Component.Property.CopyValue(source, dest, "property")