Regular API function

simGetCollectionHandle / sim.getCollectionHandle

Description Retrieves a collection handle based on its name. The operation of this function depends on the current name suffix settings (see sim.getNameSuffix, sim.setNameSuffix, and the section on accessing general-type objects). See also sim.createCollection, sim.addObjectToCollection, sim.getCollectionObjects and sim.isHandleValid.
C synopsis simInt simGetCollectionHandle(const simChar* collectionName)
C parameters
collectionName: name of the collection. If the name is appended by a "@silentError" suffix, then no error will be output if the collection does not exist.
C return value
Handle of the collection, or -1 in case of an error
Lua synopsis number collectionHandle=sim.getCollectionHandle(string collectionName)
Lua parameters
Same as C-function
Lua return values
Same as C-function
Remote API equiv.
B0-based remote API: simxGetCollectionHandle
Legacy remote API: simxGetCollectionHandle

All regular API functions on one page