Documentation

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 (.wrl, .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.wrl saves the animation to vrplanets_anim_1.wrl on the first run, vrplanets_anim_2.wrl 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.wrl saves the animation to vrplanets_anim_29.wrl.

%e

The virtual world file name replaces this token represents with the virtual world 3D file extension (.wrl, .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 .wrl (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.wrl saves the animation to vrplanets_anim_2015.wrl for the year 2015.

%M

The current month replaces this token in the file name string. For example, the format %f_anim_%M.wrl saves the animation to vrplanets_anim_4.wrl 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.wrl saves the animation to vrplanets_anim_29.wrl 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.wrl saves the animation to vrplanets_anim_14.wrl 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.wrl saves the animation to vrplanets_anim_1434.wrl 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.wrl saves the animation to vrplanets_anim_150430.wrl for a start record time of 15:04:30.

Related Examples

Was this topic helpful?