Regular API function

simAddDrawingObjectItem / sim.addDrawingObjectItem

Description Adds an item (or clears all items) to a previously inserted drawing object. See also sim.addDrawingObject and sim.removeDrawingObject
C synopsis simInt simAddDrawingObjectItem(simInt objectHandle,const simFloat* itemData)
C parameters
objectHandle: handle of a previously added drawing object
itemData: data relative to an item. If the item is a point item, 3 values are required (x;y;z). If the item is a line item, 6 values are required, and if the item is a triangle item, 9 values are required. Additional values (auxiliary values) might be required depending on the drawing object attributes. See the drawing object types and attributes for more information. If nullptr the drawing object is emptied of all its items
C return value
-1 if operation was not successful. If the point was added, then the return value is >0, if it was not added (e.g. drawing object is saturated or the item was merged with an existing item), then the return value will be 0.
Lua synopsis int result=sim.addDrawingObjectItem(int drawingObjectHandle,table[] itemData)
Lua parameters
Similar to the C-function counterpart. Additionally, objectHandle can be combined with sim.handleflag_setmultiple to clear and set several drawing items at once.
Lua return values
Similar to the C-function counterpart