Main Content


(To be removed) Write virtual world to virtual world 3D file

vrworld/save will be removed in a future release. For more information, see Version History.





vrworld object representing a virtual world


Name of virtual world 3D file, specified as a string. You can specify a .wrl (VRML), .x3dv (XML encoded) or .x3d (X3D in classic or XML format) file.


Saves a complete copy of the virtual world, including all resources used by the world, located relative to the exported virtual world location. Resources include virtual world elements such as textures and resources from the Simulink 3D Editor library. This option supports using a Simulink® 3D Animation™ virtual world outside of Simulink 3D Animation.


Suppress creating a thumbnail image used for virtual world preview.


The save method saves the current virtual world to a VRML97 file or X3D file, based on the file extension (.wrl , .x3dv, or.x3d) that you specify. The virtual world must be open for you to use this method.

If the virtual world is associated to a VRML file, it can be saved to the VRML or X3D file formats. If the virtual world is associated to an X3D file, it can be saved only to one of the X3D file formats.

If you specify a VRML file, the resulting file is a VRML97 compliant UTF-8 encoded text file.

Lines are indented using spaces. Line ends are encoded as LF on all platforms to ensure cross-platform compatibility.

You can use the optional '-export' and '-nothumbnail' arguments either by themselves or together, in addition to the required vrworld_object and file arguments.

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrworld/save will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.