Group |
---|
Model Preparation | |||
Description | Import a list of IOs configurations from a file (*.rios) in a project
| ||
---|---|---|---|
Required Control | None | ||
Usage | ImportIOsConfiguration(project_path_dst, file_path_to_exported_ios, io_list_name_to_import=[]) |
Import IOs into a project specified by '
Input |
|
---|
If some IOs are already present, their import will be skipped while others will be imported
IMPORTANT: Project where IOs are imported, must be closed when importing IOs.
Note
|
Parameters
project_path_dst {str} --
|
|
|
|
|
Returns
- io_importation_status {dict} -- List of ios with their status of importation. (key=io_name ; value="success" or "skipped").
- project_path_dst {str} -- Directory path to the project where IOs are imported.
- file_path_to_import_ios {str} -- file path to the file containing exported IOs (*.rios), created by using 'ExportIOsConfiguration(...)' method
- io_list_name_to_import {str/list/empty} -- Given IO or list of IOs to be imported.
- If empty or omitted, all IOs from project 'project_path_dst' will be imported.
Output
| ||
Output | Return a dictionary containing the name of the IO as a key and the status of the importation : success or skipped, if already present. | |
---|---|---|
Exception | Method |
returns 'None' if an error occurred. | |
Examples | >>> r.ImportIOsConfiguration(r'C:\__WORKSPACE__\tmp\rtdemo2', r'C:\\temp\\rios\\opcua.rios') {'OPCUA Server': 'success'} |
---|---|
Related Items | GetIOsConfiguration, ExportIOsConfiguration |
Modules | import RtlabApi |