Main Content

File Name Tokens

The software supports various file naming formats using file tokens. By default, the Viewer captures virtual scene frames or records simulations in a file named with the following format: %f_anim_%n.%e. This format creates a unique file name each time you capture a frame or record the animation.

The following tokens are the same for frame capture (.tif or .png) or animation (.x3d, .x3d, .x3dv, and .avi) files.

TokenDescription

%n

The current incremental number replaces this token in the file name string. Each subsequent frame capture or run of the simulation increments the number. For example, the format %f_anim_%n.x3d saves the animation to my virtual world_anim_1.x3d on the first run, my virtual world_anim_2.x3d on the second run, and so forth.

%f

The virtual world file name replaces this token in the file name string. For example, the format %f_anim_%D.x3d saves the animation to my virtual world_anim_29.x3d.

%e

The virtual world file name replaces this token represents with the virtual world 3D file extension (.x3d, .x3d, or .x3dv). By default, the %e token uses the file extension of the virtual world 3D file that drives the animation. The VR Sink and VR Source block Source file parameter specifies the file extension of the virtual world.

You can specify a different extension. However, if the file extension in the Source file parameter is .x3d or .x3dv, you cannot set %e token to .x3d (VRML).

%d

The full path to the virtual world 3D file replaces this token in the file name string and creates files in directories relative to the virtual world file location. For example, the format %d/animdir/%f_anim_%n.avi saves the animation in the animdir subfolder of the folder containing the virtual world 3D file. If animdir subfolder does not exist, the software creates the animdir subfolder. This token is most helpful if you want to ensure that the virtual world file and animation file are in the same folder.

%Y

The current four-digit year replaces this token in the file name string. For example, the format %f_anim_%Y.x3d saves the animation to my virtual world_anim_2015.x3d for the year 2015.

%M

The current month replaces this token in the file name string. For example, the format %f_anim_%M.x3d saves the animation to my virtual world_anim_4.x3d for a start record time in April.

%D

The current day in the month replaces this token in the file name string. For example, the format %f_anim_%D.x3d saves the animation to my virtual world_anim_29.x3d for the 29th day of the month.

%h

The current hour replaces this token in the file name string. For example, the format %f_anim_%h.x3d saves the animation to my virtual world_anim_14.x3d for any time between 14:00 and 15:00.

%m

The current minute replaces this token in the file name string. For example, the format %f_anim_%h%m.x3d saves the animation to my virtual world_anim_1434.x3d for a start record time of 14:34.

%s

The current second replaces this token in the file name string. For example, the format %f_anim_%h%m%s.x3d saves the animation to my virtual world_anim_150430.x3d for a start record time of 15:04:30.

Related Topics