User Tools

Site Tools


visual3d:documentation:pipeline:file_commands:file_close

File Close

Overview

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:

  • Close all files before loading a new set
  • Close only certain files based on their name or tags
  • Ensure memory or processing space is freed between tasks

Important Notes:

  • This command does not save any unsaved changes. Any processing, labeling, or metrics not explicitly saved will be lost when the file is closed.
  • Only movement files can be closed using this command.
  • Static model files remain open, unless closed using a separate command

Pipeline Command

Below is the standard form of the File_Close command, showing its available parameters.

File_Close
/FILE_NAME=
! /QUERY=
! /CLOSE_ASSOCIATED_MODELS=FALSE
;

Command Parameters

The following table shows the command parameters and descriptions:

ParameterDescription
/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= FALSEIf True, closes any models linked to the movement files. Default is FALSE.

Dialog

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.

Examples

The following examples will go through the use of the File_Close command in the Visual3D application.

Example 1: Close all trials that contain "walk" in the filename

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

Example 2: Close only trials with Tag1 and NOT Tag2

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
;

Back to Pipeline Commands Reference

visual3d/documentation/pipeline/file_commands/file_close.txt · Last modified: 2025/07/22 16:42 by wikisysop