Regular API function

simGetConfigurationTree / sim.getConfigurationTree

Description Retrieves configuration information for a hierarchy tree (object relative positions/orientations, joint/path values). Calling sim.setConfigurationTree at a later time, will restore the object configuration (use this function to temporarily save object positions/orientations/joint/path values)
C synopsis simChar* simGetConfigurationTree(simInt objectHandle)
C parameters
objectHandle: handle of the object that is at the base of the tree (all objects built on top of this one (including this one)) will have their configuration retrieved. sim_handle_all will retrieve the configuration for the whole scene
C return value
Configuration data if operation was successful, nullptr otherwise. The returned data should be deleted with simReleaseBuffer when not used anymore
Lua synopsis string buffer=sim.getConfigurationTree(int objectHandle)
Lua parameters
Similar to the C-function counterpart. In addition, child scripts can use the argument sim.handle_self to retrieved the configuration tree of the object that the child script is attached to
Lua return values
buffer: use that value to restore the configuration tree with sim.setConfigurationTree.