Difference between revisions of "API Console.AddText"

From Flowcode Help
Jump to navigationJump to search
(XML import API changes)
Line 20: Line 20:
 
[[Variable types|HANDLE]]
 
[[Variable types|HANDLE]]
  
''<span style="color:red;">No additional information</span>''
+
A handle to the text console that can be used to change its style and content.
  
  
 
==Detailed description==
 
==Detailed description==
''<span style="color:red;">No additional information</span>''
+
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 [[API Console.AddMemory|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.
 +
 
  
  
Line 32: Line 37:
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Console.AddText("name", true)</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Console.AddText("name", true)</pre>
  
''<span style="color:red;">No additional information</span>''
+
===Flowchart example===
 +
The example [[file:SIMAPI Console.fcf]] illustrates basic creation of a console window.

Revision as of 09:32, 5 June 2013

<sidebar>API contents</sidebar> Adds a window to the list of consoles available

Class hierarchy

Console

AddText

Parameters

STRING Name

The name to appear as the consoles title

BOOL UserWrite

Set true to allow input from the User


Return value

HANDLE

A handle to the text console that can be used to change its style and content.


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.


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 File:SIMAPI Console.fcf illustrates basic creation of a console window.