Define File Name Tokens
Default File Name Format
By default, the Simulink® 3D Animation™ Viewer records simulations or captures virtual scene frames in a file named with the following format:
This format creates a unique file name each time you capture
a frame or record the animation. The file name uses the
%f token is replaced with the name of the virtual world associated with
the model. The
%n token is a number that increments each time
that you record a simulation for the same virtual world. For example, if the name of
the virtual world file is
vrplanets.vrml and you record a
simulation for the first time, the animation file is
vrplanets_anim_1.x3d. If you record the simulation a second
time, the animation file name is
vrplanets_anim_2.x3d. In the
case of frame captures, capturing another frame of the scene increments the
%e token represents the virtual world 3D file extension
as the extension of the virtual world that drives the animation. 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
.x3dv, you cannot set
%e token to
Uses for File Name Tokens
You can use several tokens to customize the automated generation of frame capture or animation files. To use these tokens to create varying frame capture or animation file names, you can:
Create files whose root names are the same as the root names of the virtual world. This option is useful if you use different virtual worlds for one model.
Create files in directories relative to the virtual world location. This option is useful if you want to ensure that the virtual world file and frame capture or animation file are in the same folder.
Create rolling numbered file names such that subsequent frame captures or runs of the model simulation create incrementally numbered file names. This approach is useful if you expect to create files of different parts of the model simulation. This feature allows you to capture a frame or run a Simulink model multiple times, but create a unique file each time.
Create multiple file names with time or date stamps, with a unique file created each time.
See File Name Tokens for a summary of the file name tokens.