Webots Reference Manual - chapter 8 - section 3

Webots Reference Manual


8.3 DEF and USE

A node which is named using the DEF keyword can be referenced later by its name in the same file with USE statements. The DEF and USE keywords can be used to reduce redundancy in .wbt and .proto files. DEF name are limited in scope to a single .wbt or .proto file. If multiple nodes are given the same DEF name, each USE statement refers to the closest node with the given DEF name preceding it in the .wbt or .proto file.

[DEF defName] nodeName { nodeBody }

USE defName

Although it is permitted to name a Solid using the DEF keyword, USE statements are not allowed for Solid nodes and derived nodes. Indeed, the ability for identical solids to occupy the same position is useless, if not hazardous, in a physics simulation.
release 7.0.2
Copyright © 2012 Cyberbotics Ltd. All right reserved.