User Tools

Site Tools


visual3d:documentation:pipeline:pipeline_commands:set_pipeline_parameter_to_list_of_files

Set Pipeline Parameter To List Of Files

This command supersedes 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 can be found in the Pipeline Workshop within the Pipeline Control folder as follows:

Set_Pipeline_Parameter_To_List_Of_Files
/PARAMETER_NAME=
/FOLDER=
! /SEARCH_SUBFOLDERS=FALSE
! /FILE_MASK=*.cmo
! /ALPHABETIZE=TRUE
! /RETURN_FOLDER_NAMES=FALSE
! /RETURN_RELATIVE_FILENAMES=FALSE
;

Command Parameters

The following table shows the command parameters that can be used to define the command and their descriptions:

Parameter Description
FolderThe folder from which to start the search
Search SubfoldersTrue or False: Search subfolders for files
File MaskThe file type to search for
AlphabetizeTrue or False: List the results in alphabetical order
Return Folder NamesTrue or False: Return the folder name/path for each file
Return Relative FilenamesTrue or False: Return filenames relative to root folder

Dialog

This command can be edited as text using the parameters above or by using the dialog box:

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
;
visual3d/documentation/pipeline/pipeline_commands/set_pipeline_parameter_to_list_of_files.txt · Last modified: 2026/02/09 19:48 by wikisysop