# How to get Step Name atribute programmatically

**URL:** <https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057>\
**Category:** Technical\
**Created:** [July 18, 2024, 1:39pm UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057 "2024-07-18T13:39:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakub](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jakub](https://forum.opentap.io/u/jakub)\
**Post date:** [July 18, 2024, 1:39pm UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057/1 "2024-07-18T13:39:08Z")

</div>

Hello.  
Is this attribute part of the Keysight editor?  
I would like to somehow get the “Step Name” into my c# program and store the string in a variable.

I usually write the attributes by myself with a description and some settings in my c# program.

The problem is that in my whole c# solution I can’t find this attribute and also I didn’t write the description so I don’t know where it is.

Can someone please help me with this?

Thank you very much, Jakub.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/7/7aa76a7771f199ec222567b1bd31ffc67093c95e.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/a/abfed45277a1d34f29034cb5ad01520833578f81.png)

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [July 18, 2024, 8:29pm UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057/2 "2024-07-18T20:29:07Z")

</div>

Hi @jakub ,

You should be able to call TestStep.Name or TestStep.GetFormattedName(), depending on if you want before or after formatting.

Do you have access to the TestStep instance?

---

<div class="post-metadata">

**Author:** ![jakub](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jakub](https://forum.opentap.io/u/jakub)\
**Post date:** [July 19, 2024, 7:07am UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057/3 "2024-07-19T07:07:08Z")

</div>

Problem solved, thank you very much @rolf_madsen🙂

---

<div class="post-metadata">

**Author:** ![scottri](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@scottri](https://forum.opentap.io/u/scottri)\
**Post date:** [April 22, 2026, 9:13pm UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057/4 "2026-04-22T21:13:18Z")

</div>

@rolf_madsen, I noticed that although my test step shows the parameter with units, e.g. step name contains “({voltage})” suffix and displays as “(36 V)” in PathWave, when calling GetFormattedName() from a TestStep I only get “(36)”, which is missing “V”. My use case: I want to use the formatted step name as part of the filename of an artifact that is generated from steps in a sweep, but the “V” is not included.

If this is a bug and you do not want to change the existing behavior, I guess you could add an optional parameter to GetFormattedName to enable inclusion of units.

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [April 23, 2026, 7:01am UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057/5 "2026-04-23T07:01:13Z")

</div>

Hi @scottri,

Strange, when I try this it seems to work.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/b/b33a01b290744100fd63f972bf8c50e127d74c05.png)

Could you let me know which version of the OpenTAP and Editor package you are using? Is there anything special about your setup?

---

<div class="post-metadata">

**Author:** ![scottri](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@scottri](https://forum.opentap.io/u/scottri)\
**Post date:** [April 23, 2026, 1:52pm UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057/6 "2026-04-23T13:52:18Z")

</div>

Rolf, I apologize as I am not able to reproduce now, but I think I had confused a few log results on steps that did not specify Units with ones that did and they were named the same. My bad.

FWIW, thank you for being responsive to these technical forums.

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [April 24, 2026, 6:46am UTC](https://forum.opentap.io/t/how-to-get-step-name-atribute-programmatically/2057/7 "2026-04-24T06:46:44Z")

</div>

Hi @scottri, no worries. Thanks for posting about your struggles! 🙂
