Table of Contents
Set Pipeline Parameter To List Of Files
This command super cedes a retired command. In order to process multiple files it can be useful to identify all of the files in a folder path and assign the names to a pipeline parameter.
Pipeline Command
The command details are as follows:
Set_Pipeline_Parameter_To_List_Of_Files /PARAMETER_NAME= the name of the Pipeline Parameter created /FOLDER= The folder from which to start the search /SEARCH_SUBFOLDERS=TRUE ! /FILE_MASK=*.cmo ;
Retired Command
The command Set_Pipeline_Parameter_To_List_Of_CMO_Files is retired.
Note: If the FILE_MASK parameter in the Set Pipeline Parameter To List Of Files is left as the default *.cmo the command will behave identically with the retired command.
Example 1: Set Pipeline Parameter to a list of files containing MVC
This example will prompt the user for the folder name and then search for all files containing the text string MVC and set the pipeline parameter name to TEST
! Set Pipeline to FOLDER. Leaving the /PARAMETER_VALUE= blank will prompt the ! user to select the folder Set_Pipeline_Parameter_To_Folder_Path /PARAMETER_NAME=FOLDER /PARAMETER_VALUE= ! /PARAMETER_VALUE_SEARCH_FOR= ! /PARAMETER_VALUE_REPLACE_WITH= ! /PARAMETER_VALUE_APPEND= ; ! Set the pipeline parameter TEST to a list of files with MVC in the filename Set_Pipeline_Parameter_To_List_Of_Files /PARAMETER_NAME=TEST /FOLDER=::FOLDER /SEARCH_SUBFOLDERS=TRUE /FILE_MASK=*MVC* ;
Example 2: Set Pipeline Parameter to list of cmo files and copy a model metric
This example will prompt the user for the folder name and search for all files containing the text string .cmo. It will loop over all cmo files
- Open each cmo file
- Copy a signal to the Global Workspace
- Close the cmo file
! Prompt the user for the folder Set_Pipeline_Parameter_To_Folder_Path /PARAMETER_NAME=FOLDER /PARAMETER_VALUE= ! /PARAMETER_VALUE_SEARCH_FOR= ! /PARAMETER_VALUE_REPLACE_WITH= ! /PARAMETER_VALUE_APPEND= ; ! Find all .cmo files Set_Pipeline_Parameter_To_List_Of_Files /PARAMETER_NAME=FILES /FOLDER=::FOLDER /SEARCH_SUBFOLDERS=TRUE /FILE_MASK=*.cmo ; ! Loop over all cmo files For_Each /ITERATION_PARAMETER_NAME=INDEX /ITEMS=::FILES ; ! Open a cmo file File_Open /FILE_NAME=::INDEX ; ! Copy a model metric signal named Scott into the Global Workspace ! Name the folder containing the signal by the cmo filename Evaluate_Expression /EXPRESSION=MODEL::METRIC::Scott /RESULT_NAME=GLOBAL::Scott /RESULT_TYPE=METRIC /RESULT_FOLDER=::INDEX ; ! Close all c3d files File_Close /FILE_NAME=*.c3d ; ! Close all models Close_Calibration_File /CALIBRATION_FILE=*.c3d ; End_For_Each /ITERATION_PARAMETER_NAME=INDEX ;