pycatia.in_interfaces.file¶
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.file.File(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectInfInterfaces.FileComponentFileRepresents the file object.Role: The file object allows to manipulate files with UNIX and Windows. Use itinstead of the one of Visual Basic to make portable macros. Its gives access toinformation about the file and can open a file as a TextStreamobject.- open_as_text_stream(i_mode: str) TextStream ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func OpenAsTextStream(CATBSTR iMode) As TextStreamOpens the file and retrieves it as a TextSteam object. Paramater iMode canhave the value “ForReading”, “ForWriting” or“ForAppending”.Example:This example opens the file TestFile for reading and retrieves in thetext stream TextStr.Dim TextStr As CATIATextSteamSet TextStr = TestFile.OpenAsTextStream(“ForReading”)
- Parameters:
i_mode (str) –
- Return type:
- property size: int¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property Size() As long (Read Only)Returns the size of the file.Example:This example retrieves in FileSize the size of the FileTestFile.Dim FileSize As LongFileSize = TestFile.Size
- Return type:
int
- property type: str¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property Type() As CATBSTR (Read Only)Returns the type of the file. For instance, if the file has a .txt or .docextension, its type will be “Text Document”.Example:This example retrieves in FileType the type of the FileTestFile.Dim FileType As StringFileSize = TestFile.Size
- Return type:
str