Define File Name Tokens

Default File Name Format

By default, the Simulink® 3D Animation™ Viewer captures virtual scene frames or records simulations 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. %f and %n are tokens. %f is replaced with the name of the virtual world associated with the model and %n is a number that increments each time you record a simulation for the same virtual world. If you do not change the default file name, for example, if the name of the virtual world file is vrplanets and you record a simulation for the first time, the animation file is


If you record the simulation a second time, the animation file name is vrplanets_anim_2.wrl. In the case of frame captures, capturing another frame of the scene increments the number.

Uses for File Name Tokens

You can use a number of 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 those 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 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.

Was this topic helpful?