pycatia.in_interfaces.text_stream

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.in_interfaces.text_stream.TextStream(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
TextStream

The textstream object allows to manage input and output for a text
stream.
property at_end_of_line: bool

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property AtEndOfLine() As boolean (Read Only)

Returns a boolean value which specifies if the index position in the stream
is at a end of line.

Example:
This example retrieves in EndLine the end of line value for the
TextStream TestStream.

Dim EndLine As Boolean
EndLine = TestStream.AtEndOfLine
Return type:

bool

property at_end_of_stream: bool

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
o Property AtEndOfStream() As boolean (Read Only)

Returns a boolean value which specifies if the index position in the stream
is at a end of stream.

Example:
This example retrieves in EndStream the end of stream value for the
TextStream TestStream.

Dim EndStream As Boolean
EndStream = TestStream.AtEndOfStream
Return type:

bool

close() None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub Close()

Closes a text stream.

Example:
This example closes the TextStream TestStream

TestStream.Close
Return type:

None

read(i_num_of_char: int) str

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func Read(long iNumOfChar) As CATBSTR

Returns a string which contains a given number of characters from the
current position in the stream.

Parameters:

iNumOfChar
The number of characters to read.

Returns:
oReadString The retrieved string.

Example:
This example retrieves the next fifty characters of the TextStream
TestStream in the stream ReadString.

Dim ReadString As String
Set ReadString = TestStream.Read(50)
Parameters:

i_num_of_char (int) –

Return type:

str

read_line() str

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Func ReadLine() As CATBSTR

Returns a string which contains a line of charaters from the current
position in the stream.

Returns:
oReadLine The retrieved read line.

Example:
This example retrieves the next line of the TextStream TestStream
in the stream ReadString.

Dim ReadString As String
Set ReadString = TestStream.ReadLine
Return type:

str

write(i_written_string: str) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub Write(CATBSTR iWrittenString)

Writes a string in the text stream.

Parameters:

iWrittenString
The string to write in the stream.

Example:
This example write a string in the the TextStream
TestStream.

TestStream.Write(“This is a test”)
Parameters:

i_written_string (str) –

Return type:

None