---
title: "My namespace"
canonical: "https://docs.cuesystem.com/space/CVCHELP/509149273/My%20namespace"
format: markdown
---
> Macro (toc)

---

# MyCommon 

You can explicitly determine a constant, a function, or a class used in your module as defined in the MyCommon module. 

#### Example 

```visualbasic
// module Controller1.Main 
Var Temperature As Double := MyCommon.MAX_TEMPERATURE
```

# MyController 

You can explicitly determine a constant, a function, etc. class used in your module is defined in MyController's modules. 

#### Example 

```visualbasic
MyController.DebugPrint("Hello")
```

# MyLink 

It is a reference to the object that generates a link. 

#### Example 

```visualbasic
Process FullScreenWindow1_Button1_OnPush() Link FullScreenWindow1.Button1.OnPush() 
  // instead of: 
  // Do While FullScreenWindow1.Button1.IsPressed() 
  // with using MyLink: 
  Do While MyLink.IsPressed() 
    // ... 
  End Do 
End Process
```

# MyModule 

You can explicitly determine a constant, a function, etc. class used in your module is defined in the same module. 

#### Example 

```visualbasic
Private Process Autoexec() 
  MyModule.PrintAbs(-10) 
End Process 

Function PrintAbs(x As Double) 
  If x < 0 Then 
    x *= -1 
  End If 

  DebugPrint(x) 
End Function
```

# MyProject 

You can explicitly determine a constant, a function, etc. class used in your module is defined in your project. 

#### Example 

```visualbasic
Private Process Autoexec() 
  // followed commands are equivalent 
  MyProject.Controller1.Main.PrintAbs(-10) 
  Controller1.Main.PrintAbs(-10) 
  Main.PrintAbs(-10) 
  PrintAbs(-10) 
End Process 

Function PrintAbs(x As Long) 
  If x < 0 Then 
    x *= -1 
  End If 
  DebugPrint(x) 
End Function
```

# Namespace 

Namespace is the alias name of the module that never changes. Namespace can be specified for all types of modules except user modules. Namespace is defined in the General tab. Namespace is the text and therefore can contain Unicode characters only. It is recommended, however, that the Namespace name should contain just ASCII characters. Namespace name can be considered as a module global identifier. As such it must comply with the rules that guarantee that the two Namespace names are not equal. The simplest feasible rule is that central authority assigns to each programmer’s entity a specific prefix, which is then used by the programmer’s entity at the beginning of its Namespace identifiers. Namespace then can be used in other modules that refer to this module. The system even provides automatic integration of all modules whose Namespace is referenced. But this automatic integration works only if the corresponding module(s) is located in one of the system folders or in the same folder the module has been read from. 

#### Example 

```visualbasic
Global GraphicClass MyGraphicWindow Inherits Namespace "CUE.GraphicCollection.GenericObjects.2".FloatingWindow 
  // MyGraphicWindow code extension 
End GraphicClass
```

# The Rules for Creating NAMESPACE 

#### Basic Rules 

- NAMESPACE must be unique
- Spaces, diacritics, and non-ASCII characters should not be used
- NAMESPACE is case insensitive
- NAMESPACE name is written in the corresponding text box without the quotes, they are only used in the code to refer to the object.

#### NAMESPACE Format 

"*Author.ObjectType.Name.X*" 

- Author - unique name of the entity that created the object, e.g. *CUE*, AV_*MEDIA*, *Jiri_Jares*.
- ObjectType – one of the following types:

- *GraphicCollection*
- *Device*
- *Applet*

- Name

- for graphic collections and applets it is an object name, e.g.: *GenericObjects*, *BasicKeyboards*

- for devices it is the beginning of the CVCD file name without the version number, e.g.: *Onkyo_AV_Receiver_TX-SR805_Ir*,* iLight_Lighting_Control_SCI1205S_Serial*

- X - the major version number, e.g.: *1*, *2*, *11*. The version numbering of objects must follow the rule that when you change or extend the API only the major version number is changed. Subversion addresses only bug fixes, but does not change the API.

#### Examples: 

- "*CUE.GraphicCollection. GenericObjects.2*"
- "*CUE.Applet. SimpleScheduler.1*"

- "*AV_MEDIA. Device. Marantz_CD_Player_CC4001_SerialOutput.12*"