User Tools

Site Tools


visual3d:documentation:pipeline:file_commands:select_active_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:file_commands:select_active_file [2024/07/17 15:42] – removed sgrangervisual3d:documentation:pipeline:file_commands:select_active_file [2025/07/10 20:04] (current) wikisysop
Line 1: Line 1:
 +====== Select Active File ======
 +
 +===== Overview =====
 +
 +The **Select_Active_File** command in Visual3D can allow the user to select which file is active in the workspace. As many of the pipeline commands in Visual3D act on the active files only, using this command can allow you to determine which they are applied to.
 +
 +
 +{{:Tutorial4_5.jpg}}
 +
 +==== Pipeline Command ====
 +
 +The pipeline command below is used to select the [[Visual3D:Documentation:Definitions:Active_Files|Active_Files]]
 +
 +<code>
 +Select_Active_File
 +! /FILE_NAME=
 +! /QUERY=
 +! /SUBJECT_TAGS=NO_SUBJECT
 +;
 +</code>
 +
 +=== File_Name ===
 +
 +The parameter **/File_Name=** can be a single file, a TAG referring to all files with that TAG, or the keyword ALL_FILES, which makes all of the files in the Visual3D Workspace active.
 +
 +**Note:** Visual3D defines files by their full pathname. For example, the following command will not be recognized
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME= file1.c3d
 +;
 +</code>
 +
 +To fix the example above, you define the full pathname:
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME= c:\data\session1\file1.c3d
 +;
 +</code>
 +
 +or you can use a wildcard:
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME= *file1.c3d
 +;
 +</code>
 +
 +or you can specify a TAG:
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME= TAG1
 +;
 +</code>
 +
 +=== Query ===
 +
 +The Query option (**Visual3D Professional Only**) allows you to select a subset of the files referred by to FILE_NAME. You can query using [[Visual3D:Documentation:Pipeline:Expressions:Expressions_Overview|expressions]]:
 +
 +/QUERY=METRIC::PROCESSED::MASS > 75
 +
 +=== Subject_Tags ===
 +
 +Set the active subject tag - FOR MULTISUBJECT ONLY!
 +
 +==== Example 1: Global_Workspace ====
 +
 +This example shows how to make the [[Visual3D:Documentation:Definitions:Global_Workspace|Global Workspace]] active
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME=GLOBAL
 +! /QUERY=
 +;
 +</code>
 +
 +==== Example 2 - ALL_FILES and OR Query ====
 +
 +From ALL_FILES select files that are tagged TAG1 or TAG2. Note there are multiple syntaxes for the "or". Two are shown below:
 +
 +Using the "+" as the "OR" operator
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME=ALL_FILES
 +/QUERY=TAG1 + TAG2
 +;
 +</code>
 +
 +Using "|" as the "OR" operator
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME=ALL_FILES
 +/QUERY=TAG1 | TAG2
 +;
 +</code>
 +
 +==== Example 3 - ALL_FILES AND and NOT Query ====
 +
 +From ALL_FILES select files that are TAG1 AND NOT TAG2 using the operators "&" and "NOT"
 +
 +<code>
 +Select_Active_File
 +/FILE_NAME=ALL_FILES
 +/QUERY=TAG1 & NOT(TAG2)
 +;
 +</code>
 +
 +==== Example 4 - ALL_FILES and a wildcard ====
 +
 +From ALL_FILES select files that do not contain the wildcard *run*.c3d
 +
 +This cannot be done in one step. Command will be used to tag the files prior to using the Select_Active command.
 +
 +<code>
 +! Assign tag RUN to files with "run" in the pathname
 +Assign_Tags_To_Files
 +/MOTION_FILE_NAMES=*run*.c3d
 +! /QUERY=
 +/TAGS=RUN
 +;
 +
 +! Assign tag NOT_RUN to files that are not tagged RUN
 +Assign_Tags_To_Files
 +/MOTION_FILE_NAMES=ALL_FILES
 +/QUERY=NOT(RUN)
 +/TAGS=NOT_RUN
 +;
 + 
 +! Select NOT_RUN as the active files
 +Select_Active_File
 +/FILE_NAME=NOT_RUN
 +! /QUERY=
 +;
 +</code>
 +
 +[[Visual3D:Documentation:Pipeline:General_Information:Pipeline_Commands_Reference|Back to Pipeline Commands Reference]]
 +
 +
  
visual3d/documentation/pipeline/file_commands/select_active_file.1721230944.txt.gz · Last modified: 2024/07/17 15:42 by sgranger