# how to get current position of the program pointer to Error message

**URL:** <https://tech-community.robotics.abb.com/t/how-to-get-current-position-of-the-program-pointer-to-error-message/10721>\
**Category:** RobotStudio\
**Tags:** robot-studio, robotstudio-sdk, abb, error-handling\
**Created:** [May 9, 2022, 7:15am UTC](https://tech-community.robotics.abb.com/t/how-to-get-current-position-of-the-program-pointer-to-error-message/10721 "2022-05-09T07:15:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mejfju](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@mejfju](https://tech-community.robotics.abb.com/u/mejfju)\
**Post date:** [May 9, 2022, 7:15am UTC](https://tech-community.robotics.abb.com/t/how-to-get-current-position-of-the-program-pointer-to-error-message/10721/1 "2022-05-09T07:15:24Z")

</div>

Hello.

I need to put postion of program pointer to a error message box. Is there any easy way to do it?

I saw there is an option to do it via PC SDK with class ProgramPosition.

> **[Class ProgramPosition](https://developercenter.robotstudio.com/api/pcsdk/api/ABB.Robotics.Controllers.RapidDomain.ProgramPosition.html)**

If there is no easy way, is there ability to write a small c# code to return position of a pointer, or I’d need a whole c# code to run robot.
