Documentation

vrworld/save

Write virtual world to virtual world 3D file

Syntax

save(vrworld_object,file)
save(vrworld_object,file,'-export')
save(vrworld_object,file,'-nothumbnail')
save(vrworld_object,file,'-export','-nothumbnail')

Arguments

vrworld_object

vrworld object representing a virtual world

file

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.

'-export'

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.

'-nothumbnail'

Suppress creating a thumbnail image used for virtual world preview.

Description

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 CR-LF or LF, according to the local system default. Values are separated by spaces.

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

Was this topic helpful?