Table of Contents
File New
Overview
The File_New command is used to clear the active workspace in Visual3D and initialize a new, blank workspace. This is commonly used in batch processing pipelines, where workflows involve repeatedly loading, analyzing, and saving data across multiple CMZ files.
This command does not prompt the user to save- any unsaved changes in the active workspace will be lost when the command is executed. Therefore, it is good practice to use File_Save or File_Save_As beforehand if you want to preserve any changes made to the workspace.
This command is equivalent to navigating to File > New, pressing Ctrl+N, or clicking the New Page icon in the Visual3D toolbar.
Pipeline Command
The command below is as seen in the Visual3D application. It has no parameters, as it performs a standalone function:
File_New ;
Command Parameters
There are no parameters associated with the File_New command.
Dialog
There is no dialog box associated with this command. In the Visual3D user interface, the equivalent action is triggered by:
- Navigating to File > New
- Pressing Ctrl + N
- Clicking the New Page button on the Visual3D toolbar.
Examples
The following example demonstrates a complete workflow in which File_New is used multiple times to manage and reset the workspace between tasks.
Example 1: Pre-processing and Saving Joint Angles
This example walks through a workflow involving joint angle computation and workspace clearing.
Step 1: Clear any previously loaded workspace and open a subject workspace file
File_New ; File_Open /FILE_NAME=Data_Files\Sub04_Workspace.cmz [User Selection] ! /FILE_PATH= ! /SEARCH_SUBFOLDERS=FALSE ! /SUFFIX= ! /SET_PROMPT=File_Open ! /ON_FILE_NOT_FOUND=PROMPT ! /FILE_TYPES_ON_PROMPT= ;
Step 2: Compute joint angles (Left Hip and Left Knee)
Compute_Model_Based_Data /RESULT_NAME=Left_Hip_Angle /SUBJECT_TAG=ALL_SUBJECTS /FUNCTION=JOINT_ANGLE /SEGMENT=LTH /REFERENCE_SEGMENT=RPV /RESOLUTION_COORDINATE_SYSTEM= ! /USE_CARDAN_SEQUENCE=FALSE ! /NORMALIZATION=FALSE ! /NORMALIZATION_METHOD= ! /NORMALIZATION_METRIC= ! /NEGATEX=FALSE ! /NEGATEY=FALSE ! /NEGATEZ=FALSE ! /AXIS1=X ! /AXIS2=Y ! /AXIS3=Z ! /TREADMILL_DATA=FALSE ! /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0) ! /TREADMILL_SPEED=0.0 ; Compute_Model_Based_Data /RESULT_NAME=Left_Knee_Angle /SUBJECT_TAG=ALL_SUBJECTS /FUNCTION=JOINT_ANGLE /SEGMENT=LSK /REFERENCE_SEGMENT=LTH /RESOLUTION_COORDINATE_SYSTEM= ! /USE_CARDAN_SEQUENCE=FALSE ! /NORMALIZATION=FALSE ! /NORMALIZATION_METHOD= ! /NORMALIZATION_METRIC= ! /NEGATEX=FALSE ! /NEGATEY=FALSE ! /NEGATEZ=FALSE ! /AXIS1=X ! /AXIS2=Y ! /AXIS3=Z ! /TREADMILL_DATA=FALSE ! /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0) ! /TREADMILL_SPEED=0.0 ;
Step 3: Save the workspace with a new name
File_Save_As /FILE_NAME=Current_Results\Sub04_Workspace_with_ModelBased.cmz ! /FOLDER= ! /SET_PROMPT=Save CMZ file as ! /SAVE_EMBEDDED_GRAPHICS=FALSE ! /CREATE_FOLDER_PATH=FALSE ;
Step 4: Close the file and prepare for the next file.
File_Close /FILE_NAME=ALL_FILES ! /QUERY= ! /CLOSE_ASSOCIATED_MODELS=FALSE ; File_New ;
Notes
- File_New is a non-reversible operation in pipelines. Use with caution when automating.