Difference between revisions of "API Component.Clone"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Clones an existing object to another position on the panel
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Clone'''
 +
|-
 +
| colspan="2" | Clones an existing object to another position on the panel&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Source
 +
|-
 +
| colspan="2" | The object to copy&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | DestParent
 +
|-
 +
| colspan="2" | The parent to link the cloned object to&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | NewPosition
 +
|-
 +
| colspan="2" | A position to move the object to&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
<div style="width:25%; float:right" class="toc">
 
====Class hierarchy====
 
[[API Component|Component]]
 
:[[API Component|Clone]]
 
</div>
 
__TOC__
 
 
==Parameters==
 
[[Variable types|HANDLE]] ''Source''
 
:The object to copy
 
 
[[Variable types|HANDLE]] ''DestParent''
 
:The parent to link the cloned object to
 
 
[[Variable types|HANDLE]] ''NewPosition''
 
:A position to move the object to
 
 
==Return value==
 
[[Variable types|HANDLE]]
 
 
''<span style="color:red;">No additional information</span>''
 
  
 +
==Detailed description==
 +
This creates an identical copy of the object which may be inserted at any point in the component tree.
  
  
==Detailed description==
+
The root object may not be cloned, but other to that any object (even a [[API Component.GetOriginal|definition]]) may be cloned.
''<span style="color:red;">No additional information</span>''
 
  
  
Line 34: Line 38:
 
* Declare a variable 'result' of type HANDLE
 
* Declare a variable 'result' of type HANDLE
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Clone(source, destparent, newposition)</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Component.Clone(source, destparent, newposition)</pre>
 
''<span style="color:red;">No additional information</span>''
 

Latest revision as of 11:54, 16 January 2023

Fc9-comp-macro.png Clone
Clones an existing object to another position on the panel 
Fc9-h32-icon.png - HANDLE Source
The object to copy 
Fc9-h32-icon.png - HANDLE DestParent
The parent to link the cloned object to 
Fc9-h32-icon.png - HANDLE NewPosition
A position to move the object to 
Fc9-h32-icon.png - HANDLE Return


Detailed description

This creates an identical copy of the object which may be inserted at any point in the component tree.


The root object may not be cloned, but other to that any object (even a definition) may be cloned.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Component.Clone(source, destparent, newposition)