The File_Close command is used to close open movement files in the Visual3D workspace. It mirrors the user action File > Close from the Visual3D menu but is used programmatically within a pipeline script.
This command is important in batch processing or cleanup workflows, where you may need to:
Important Notes:
Below is the standard form of the File_Close command, showing its available parameters.
File_Close /FILE_NAME= ! /QUERY= ! /CLOSE_ASSOCIATED_MODELS=FALSE ;
The following table shows the command parameters and descriptions:
Parameter | Description |
/FILE_NAME= | Specifies the movement file(s) to be closed. Accepts a full filename, wildcards (e.g., *walk*.c3d), the keyword ALL_FILES, or a list parameter path (e.g., ::FILES) |
! /QUERY= | Logical expression to filter files based on tags (e.g., Tag1 & NOT Tag2). Works the same as in Select_Active_File. |
! /CLOSE_ASSOCIATED_MODELS= FALSE | If True, closes any models linked to the movement files. Default is FALSE. |
This command does not have a dedicated dialog box. In the Visual3D interface, the equivalent action is navigating to File > Close, which will make open the prompts to ensure that the user is aware that any unsaved progress will be lost.
When executed via pipeline, these prompts do not appear- files are closed immediately and without confirmation.
The following examples will go through the use of the File_Close command in the Visual3D application.
This example demonstrates how to close all movement files where the filename contains the word “walk”.
File_Close /FILE_NAME=*walk*.c3d !/QUERY= !/CLOSE_ASSOCIATED_MODELS=FALSE
This example demonstrates how to use a tag-based query to selectively close files.
! Step 1- Select all files that are tagged Tag1 but NOT Tag2 Select_Active_File /FILE_NAME=ALL_FILES /QUERY=Tag1 & NOT(Tag2) ; ! Step 2 - Store that selection in a list variable Set_Pipeline_Parameter_To_List_Of_Tagged_Files /PARAMETER_NAME=FILES ! /TAG_NAME= /GET_CURRENT_SELECTED_FILES=TRUE ! /USE_SHORT_FILENAMES=FALSE ; File_Close /FILE_NAME=::FILES ;