> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/rt-lab-api/python-rtlab-api-reference/introduction-to-functions_143429297/createalias_144251280.md).

# CreateAlias

<table data-header-hidden><thead><tr><th width="199.77777099609375"></th><th></th></tr></thead><tbody><tr><td><strong>Group</strong></td><td>Alias</td></tr><tr><td><strong>Description</strong></td><td><p>Create a new alias which is used as a reference to an absolute path of a parameter or signal. The alias is appended to the current list of aliases. The alias’s name is a no case-sensitive string that should be unique. It should not contains the following special character: asterisk (*) and question mark (?). It consists of partitions and a name, or a name only. A partition is an organizational unit, or container, used to organize aliases into a hierarchical structure. Partitions and name of the alias are separated by slash (/) characters. The topmost partition in any partition is called the root partition. A partition that is below another partition is called a subpartition. A partition above a subpartition is called the parent partition. The root partition is a slash (/) characters.<strong>Below are examples of valid alias’name:</strong></p><ul><li>myAliasName</li><li>/myPartition/myAliasName</li><li>/myRootPartition/myChildrenPartition/myAliasName</li></ul><p>When using alias’ API functions, many syntax is available to refer to one specific alias.<strong>For example, an alias called “/myPartition/myAlias” can be referenced with the following syntax:</strong></p><ul><li>/myPartition/myAlias,</li><li>myPartition/myAlias or</li><li>myAlias (required a unique name)</li></ul><p>**Note:**the last syntax is only available if no other partitions contain an alias with the name ‘myAlias’. With Matlab/Simulink, the absolute path of a parameter is the concatenation of the path of the block that contains the parameter and the name of the parameter.<strong>Below are examples of parameter’s paths of a SineWave block:</strong></p><ul><li>Subsystem/SineWave/Amplitude</li><li>Subsystem/SineWave/Frequency</li></ul><p>By analogy, with Matlab/Simulink, the absolute path of a signal is the concatenation of the path of the block that outputs the signal and the signal’s label. If the label is empty in the Simulink model, the port’s name that outputs the signal is used instead of the label.<strong>Below are examples of paths for a signal at the outport 1 of a SineWave block:</strong></p><ul><li>SubSystem/SineWave/MySignalLabel, or</li><li>SubSystem/SineWave/Port1</li></ul><p><strong>Note:</strong> any of the following kind of signals can be referenced: control signals, acquisition signals and dynamic signals.</p></td></tr><tr><td><strong>Required Control</strong></td><td>Configuration control</td></tr><tr><td><strong>Usage</strong></td><td><strong>RtlabApi.CreateAlias</strong>(aliasName, referencePath)</td></tr><tr><td><strong>Input</strong></td><td><ul><li>**aliasName:**Name of the alias. It must be unique.</li><li><strong>referencePath:</strong> Absolute path of the parameter or signal referenced by the alias. This path must exist in the model.</li></ul></td></tr><tr><td><strong>Output</strong></td><td>None</td></tr><tr><td><strong>Exception</strong></td><td><ul><li><strong>EOK:</strong> Success.</li><li>**EPERM:**Configuration control has not been granted to this client.</li><li><strong>EINVAL:</strong> The reference path of the parameter or signal is not found in the model.</li><li>**EACCES:**The alias already exists.</li><li><strong>EBADF:</strong> Model not specified by previous Connect or OpenProject.</li><li><strong>EIO:</strong> Error sending the request or receiving the reply.</li></ul></td></tr><tr><td><strong>Examples</strong></td><td><br></td></tr><tr><td><strong>Related Items</strong></td><td><strong>RemoveAlias, LoadAlias, GetValueByAlias, SetValueByAlias.</strong></td></tr><tr><td><strong>Modules</strong></td><td><strong>import RtlabApi</strong></td></tr></tbody></table>

Document generated by Confluence on Apr 13, 2026 17:11

[Atlassian](http://www.atlassian.com/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/automation-api-and-scripting/rt-lab-api/python-rtlab-api-reference/introduction-to-functions_143429297/createalias_144251280.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
