cns_createView

Creates a new view.

Synopsis

bool cns_createView(string view, langString viewdisplay, string viewseparator);

Parameters

Parameter Description
view ID of the view CAUTION! To create a view, the view path must contain the system name, e.g. "System1.myView".
viewdisplay Display name of the view
viewseparator Separator for the view

Return value

Returns TRUE if successful and FALSE in case of an error.

Errors

Possible errors:

  • View ID is already used

  • Invalid separator

Description

This function creates a new view. It is possible to define the ID, the multilingual name and the separator for the view.

Anmerkung:

The following characters are not allowed for separators: ','','*','?'

Moreover, numbers and letters which are already used in the view or node name must not be used.

The example creates a view with the ID "myView" for a multilingual project (English and German).

main()
{
  langString myLang;
  setLangString(myLang,0,"Meine Sicht");
  setLangString(myLang,1,"My View");
  DebugN(cns_createView("System1.myView", myLang, "."));
}

Availability

UI, CTRL