.. highlightlang:: us .. index:: ObjCreate .. _objcreate: ObjCreate ========= .. us.tag ObjCreate ENGLISH :ref:`ObjCreate` creates a new object. .. function:: handle = ObjCreate(nClass) handle = ObjCreate(nClass, dat1, ...) .. us.return **Return Value** *handle* is the handle of the object, or 0 if the object could not be created. .. us.params **Parameters** .. uparam:: nClass *nClass* is one of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - ``OBJ_APPLICATION`` - there is only one of this objects. It will be automatically created when UniPlot is started. * - ``OBJ_DOCUMENT`` - see :ref:`DocCreate`. * - ``OBJ_EDITOR`` - see :ref:`EdCreate`. * - ``OBJ_LAYER`` - see :ref:`LayerCreate`. * - ``OBJ_XYDATASET`` - see :ref:`XYCreate` and :ref:`TYCreate`. * - ``OBJ_XYZDATASET`` - see :ref:`XYZCreate` and :ref:`XYZCreateFromMatrix`. * - ``OBJ_TEXT`` - see :ref:`TBCreate`. * - ``OBJ_RECT`` - see :ref:`RBCreate`. * - ``OBJ_ELLIPSE`` - see :ref:`EBCreate`. * - ``OBJ_LINE`` - see :ref:`LBCreate`. * - ``OBJ_LINK`` - see :ref:`CBCreate`. * - ``OBJ_PEN`` - see :ref:`PenCreate`. * - ``OBJ_MARKER`` - see :ref:`MarkerCreate`. * - ``OBJ_FONT`` - see :ref:`FontCreate`. * - ``OBJ_FILE`` - see :ref:`fopen`. * - ``OBJ_CONTAINER`` - see :ref:`CnCreate`. .. uparam:: dat1 The type and number of the data to create the object depend on the type of the object. .. us.comment **Comment** Normally, the function :ref:`ObjCreate` is not called. Instead, a function wrapper is called. Example: Call up the function :ref:`DocCreate` instead of ``ObjCreate(OBJ_DOCUMENT)``. .. seealso:: :ref:`overview-objects`, :ref:`ObjDestroy` :sub:`id-148201`