cns_createNodeType

Creates a new node type.

Synopsis

int cns_createNodeType(string sTypeName, langString lsDisplayname, int iValue, string sIconPath);

Parameters

Parameter Description
sTypeName ID of the node type
lsDisplayname Display name of the node type
iValue Value which shall be assigned to the node type (must be unique and greater than 500)
sIconPath Path to the image file which shall be used as icon. Supported file format: .png

Return value

Returns 0 if the node type is created or an appropriate error code in case of an error.

Errors

Possible errors:

  • -1 => Name is already used

Description

This function allows to create a new node type.

main()
{
  cns_createNodeType("NodeTypeID", "MyNodeType", 501, "");
}

Availability

UI, CTRL