-

Working with Namespaces

This topic contains the following sections:

Using namespaces

Language elements with a namespace definition can be used in the same way as language elements which are not a member of a namespace. To access an element, you have to enter (select) the full qualified name or the short name. (See also the section "Visibility of namespace elements" bellow.)

Intellisense for namespaces

At any location where namespaces can be used (referred) in PLCnext Engineer (for example, variables tables, code worksheets, etc.), Intellisense is supported for the namespace entries. When typing the namespace name, for example, in the graphic editor, Intellisense shows all language elements with the corresponding namespace.

Note
The language elements that are a member of the global namespace are shown in Intellisense with their short name (without the global namespace identifier '_.'). To add the element, for example to a code worksheet, you can either type the short name or start typing with the global namespace identifier '_.'
 

Visibility of namespace elements

Once a namespace is declared for a language element, the namespace identifier is visible at all locations where the element is used in your project. The following table shows some examples:

LocationExample
Namespace in Variables table

Note
The namespace path is only shown when entered.

Namespace in 'Data List'
Namespace in 'Tasks and Events' editor
Namespace in COMPONENTS area
Language element tooltip