# Is it possible to do code snippets with variables?

**URL:** https://tech-community.robotics.abb.com/t/is-it-possible-to-do-code-snippets-with-variables/12076
**Category:** RobotStudio
**Created:** [November 10, 2025, 10:55am UTC](https://tech-community.robotics.abb.com/t/is-it-possible-to-do-code-snippets-with-variables/12076 "2025-11-10T10:55:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Slokko](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/slokko/32/3431_2.png) [@Slokko](https://tech-community.robotics.abb.com/u/Slokko)
#### Post date: [November 10, 2025, 10:55am UTC](https://tech-community.robotics.abb.com/t/is-it-possible-to-do-code-snippets-with-variables/12076/1 "2025-11-10T10:55:36Z")

</div>

RS code .snippet xml files indicates the possibility to use variables in your snippets.  
For example the "Array of num, 2x4 has its name as a litteral.

name myNumArray2x4 The name of the array `

`

However. Without the possibility to make this an actual variable what is the point of it?  
According to Microsoft you should be able to to insert TM\_SELECTED\_TEXT, or ever better CLIPBOARD into the snippet. A prompt would be even more fantastic.

Is this possible? If so what syntax would RS approve?
