| Contents | Index |
addexternproto(vrworld_object, protofile, protoname) addexternproto(vrworld_object, protofile, protoname, protodef)
vrworld_object | A vrworld object representing the virtual world. |
protofile | String containing the name of the prototype file from which the EXTERNPROTO declaration is added. |
protoname | String containing the name of the EXTERNPROTO declaration. |
protodef | String containing a new name for the EXTERNPROTO declaration. |
addexternproto(vrworld_object, protofile, protoname) adds an EXTERNPROTO declaration from file protofile to the virtual world. The handle vrworld_object refers to the virtual world. The EXTERNPROTO declaration is identified as protoname. If protoname is a cell array of identifiers, the function adds multiple EXTERNPROTOs from one file to the virtual world.
addexternproto(vrworld_object, protofile, protoname, protodef) adds an EXTERNPROTO declaration from file protofile to the virtual world. The handle vrworld_object refers to the virtual world. The EXTERNPROTO declaration is identified as protoname. If protoname is a cell array of identifiers, the function adds multiple EXTERNPROTOs from one file to the virtual world. This command then renames the new EXTERNPROTO declaration to protodef.
In both cases, the EXTERNPROTO declaration becomes equivalent to the VRML PROTO declaration. In other words, protoname or protodef becomes an internal PROTO type in the virtual scene associated with vrworld_object. After you save the virtual world, these PROTO declarations no longer require a reference to the original file, protofile, that contains the EXTERNPROTO declarations.

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |