Difference between revisions of "API Console.AddText"

From Flowcode Help
Jump to navigationJump to search
(XML import of API documentation)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
<sidebar>API Contents</sidebar>
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Adds a window to the list of consoles available
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddText'''
 
+
|-
<div style="width:25%; float:right" class="toc">
+
| colspan="2" | Adds a window to the list of consoles available&nbsp;
====Class hierarchy====
+
|-
[[API Console|Console]]
+
|-
:[[API Console|AddText]]
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
</div>
+
| width="90%" | Name
__TOC__
+
|-
 
+
| colspan="2" | The name to appear as the consoles title&nbsp;
==Parameters==
+
|-
[[Variable Types|STRING]] ''Name''
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
:The name to appear as the consoles title
+
| width="90%" | UserWrite
 
+
|-
[[Variable Types|BOOL]] ''UserWrite''
+
| colspan="2" | Set true to allow input from the User&nbsp;
:Set true to allow input from the User
+
|-
 
+
| 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''
==Return value==
+
|}
[[Variable Types|HANDLE]]
 
 
 
A handle to the text console that can be used to change its style and content.
 
  
  
Line 42: Line 39:
  
 
===Flowchart example===
 
===Flowchart example===
The example [[file:SIMAPI Console.fcf]] illustrates basic creation of a console window.
+
The example {{Fcfile|SIMAPI Console.fcfx|SIMAPI Console}} illustrates basic creation of a console window.

Latest revision as of 11:41, 16 January 2023

Fc9-comp-macro.png AddText
Adds a window to the list of consoles available 
Fc9-string-icon.png - STRING Name
The name to appear as the consoles title 
Fc9-bool-icon.png - BOOL UserWrite
Set true to allow input from the User 
Fc9-h32-icon.png - HANDLE Return


Detailed description

A text console is a stream of text suitable for use as a terminal to display, for example RS232 data or a remote connection. When text is added, this is always appended to the end of the stream so the text contents will get larger. This differs from the AddMemory call which has a fixed size and operates in 'overwrite' mode to change the text.


Once a handle is created it must be retained, as Flowcode will remove any handles from the system that are not referenced.


The style and content of the console can be changed at any time. The only thing that is fixed is the type of console - a text console always has a variable size and a variable number of characters per line.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Console.AddText("name", true)

Flowchart example

The example FC6 Icon.png SIMAPI Console illustrates basic creation of a console window.