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.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectSendToServiceThis interface allows to use ‘Send To’ functionalities through anAPI.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 theseproducts is not granted, the first invocation to one of CATIASendToServicemethods 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 verifiesthat the given input file is valid (exists and is not a directory), itrecursively 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 SendToServiceinterface.Parameters:oErrorParamA parameter string given together with the error code.oErrorCodeThe last executed method error code:code diagnosisoErrorParam value0 action successfully performed :-)1 PX1 license not granted2 internal error5 file already in the list file name6 file is not in the list file name7 empty file list8 missing target directory9 no common root directory10 file does not exist file name11 input is a directory directory name12 directory check failed directory name13 invalid file name given name14 file has no read permission given name36 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 toSetInitialFile method.Notice : in case AddFile has also been invoked, the files recursively pointed by the added filealso 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(CATSafeArrayVariantoWillBeCopied)Retreives the complete list of the files that will be copied. This listmatches the list of dependant files, but without the files for which RemoveFilehas 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 targetdirectory.Parameters:iKeep=1: to preserve the relative tree structure of thefiles.This option will be effective only if there is a common rootdirectory for all files.iKeep=0: to copy the files directly in the destination directoryExample: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 becopied.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 andoptions.A “report.txt” report file is generated in the specified destinationdirectory.
- 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 givendirectory exists. Be careful, if SetDirectoryOneFile method has been previouslycalled, its action is overriden by this SetDirectoryFilecall.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 becopied. The file will be copied in the specified target directory. Be carefulthat using this method implies that the ‘KeepDirectory’ variable will beautomatically 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 giveninput file is valid (exists and is not a directory)It generates a complete list of the recursively dependent files to becopied.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 invalidcharactersParameters: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