pycatia.in_interfaces.send_to_service

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.send_to_service.SendToService(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
SendToService

This interface allows to use ‘Send To’ functionalities through an
API.
Example: Set Send=CATIA.CreateSendTo()
This interface requires the installation of CATIA - PPR xPDM Gateway 1 Product
(PX1) or the installation of the CATIA-SmarTeam plugin. In case one of these
products is not granted, the first invocation to one of CATIASendToService
methods will fail.
add_file(i_path: str) None

Note

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

Adds a file to the list of the files ‘to be copied’. This method verifies
that the given input file is valid (exists and is not a directory), it
recursively adds pointed files.

Parameters:

iPath
: The path of the file to be added to the list of the ‘to be copied’ files.
Example:
Send.AddFile(iPath)
Parameters:

i_path (str) –

Return type:

None

get_last_send_to_method_error(o_error_param: str, o_error_code: int) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub GetLastSendToMethodError(CATBSTR oErrorParam,
long oErrorCode)

Retreives the diagnosis related to the last call to SendToService
interface.

Parameters:

oErrorParam
A parameter string given together with the error code.

oErrorCode
The last executed method error code:
code diagnosisoErrorParam value
0 action successfully performed :-)
1 PX1 license not granted
2 internal error
5 file already in the list file name
6 file is not in the list file name
7 empty file list
8 missing target directory
9 no common root directory
10 file does not exist file name
11 input is a directory directory name
12 directory check failed directory name
13 invalid file name given name
14 file has no read permission given name
36 allocation failed :-(
Parameters:
  • o_error_param (str) –

  • o_error_code (int) –

Return type:

None

get_list_of_dependant_file(o_dependant: tuple) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetListOfDependantFile(CATSafeArrayVariant oDependant)

Retrieves the complete list of the files recursively pointed by the file given in argument to
SetInitialFile method.
Notice : in case AddFile has also been invoked, the files recursively pointed by the added file
also are retrieved.

Parameters:

oDependant
: The table of dependant files.
Example:
Send.GetListOfDependantFile(oDependant)
Parameters:

o_dependant (tuple) –

Return type:

None

get_list_of_to_be_copied_files(o_will_be_copied: tuple) None

Note

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

Retreives the complete list of the files that will be copied. This list
matches the list of dependant files, but without the files for which RemoveFile
has been invoked.

Parameters:

oWillBeCopied
: The table of the files that will be copied.
Example:
Send.GetListOfToBeCopiedFiles(oWillBeCopied)
Parameters:

o_will_be_copied (tuple) –

Return type:

None

keep_directory(i_keep: bool) None

Note

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

Controls the directory tree structure in the target
directory.

Parameters:

iKeep
=1: to preserve the relative tree structure of the
files.
This option will be effective only if there is a common root
directory for all files.
iKeep
=0: to copy the files directly in the destination directory

Example:
Send.KeepDirectory(ikeep)
Parameters:

i_keep (bool) –

Return type:

None

remove_file(i_file: str) None

Note

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

Removes a file from the list of the files that will be
copied.

Parameters:

iFile
: The File (With extension) to be removed from the list of the ‘to be copied’ files.
Example:
Send.RemoveFile(iFile)
Parameters:

i_file (str) –

Return type:

None

run() None

Note

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

Executes the copy action, according to previously set files and
options.
A “report.txt” report file is generated in the specified destination
directory.
Return type:

None

set_directory_file(i_directory: str) None

Note

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

Positions the destination directory. This method verifies that the given
directory exists. Be careful, if SetDirectoryOneFile method has been previously
called, its action is overriden by this SetDirectoryFile
call.

Parameters:

iDirectory
: The destination directory where the files will be copied.
Example:
Send.SetDirectoryFile(iDirectory)
Parameters:

i_directory (str) –

Return type:

None

set_directory_one_file(i_file: str, i_directory: str) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetDirectoryOneFile(CATBSTR iFile,
CATBSTR iDirectory)

Allows positioning the destination directory for one given file to be
copied. The file will be copied in the specified target directory. Be careful
that using this method implies that the ‘KeepDirectory’ variable will be
automatically set to 0.

Parameters:

iFile
: The name (Name With extension) of the given file.
iDirectory
: The directory where this file will be copied.
Example:
Send.SetDirectoryOneFile(iFile, iDirectory)
Parameters:
  • i_file (str) –

  • i_directory (str) –

Return type:

None

set_initial_file(i_path: str) None

Note

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

Sets the initial file to be copied. This method verifies that the given
input file is valid (exists and is not a directory)
It generates a complete list of the recursively dependent files to be
copied.
Example:
This example positions the file of path ipath in the list of ‘to be copied’
files. All its dependant files will also be added in the list of ‘to be copied’
files.

Parameters:

iPath
: Full path of the file to be copied.

Send.SetInitialFile(iPath)
Parameters:

i_path (str) –

Return type:

None

set_rename_file(i_oldname: str, i_new_name: str) None

Note

CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
o Sub SetRenameFile(CATBSTR iOldname,
CATBSTR iNewName)

Renames one file to be copied. The new name may not have invalid
characters

Parameters:

iOldname
: The old file name (With extension).
iNewName
: The new file name (Without extension).
Example:
Send.SetRenameFile(iOldname, iNewName)
Parameters:
  • i_oldname (str) –

  • i_new_name (str) –

Return type:

None