Regular API function

simSetGraphUserData / sim.setGraphUserData

Description Sets one value in a user-defined graph data stream. See also sim.resetGraph and sim.handleGraph.
C synopsis simInt simSetGraphUserData(simInt graphHandle,const simChar* dataStreamName,simFloat data)
C parameters
graphHandle: handle of the graph object
dataStreamName: the name of the data stream. The data stream must be of type "user-defined"
data: the value to set. If, for a given simulation step this function is not called for a user-defined data stream, then the data will be missing for that simulation step.
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis number result=sim.setGraphUserData(number graphHandle,string dataStreamName,number data)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page