    

 ## On this page

  

 

 # getReferencedVariable

 Last update: 30.07.2026 

public [getReferencedVariable](get-referenced-variable.md)(index: [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)): [Variable](./../-variable/index.md)

gets the specified referenced variable

#### Return

the specified variable

#### Parameters

indexthe variable index (0-based index)#### Throws

[ModelCenterException](./../-model-center-exception/index.md)public [getReferencedVariable](get-referenced-variable.md)(): [Variable](./../-variable/index.md)

Convenience method to return the referenced variable. Should only be used if there is only one reference variable.

#### Return

the specified variable

#### Throws

[ModelCenterException](./../-model-center-exception/index.md)