# Saving program to file

**URL:** <https://tech-community.robotics.abb.com/t/saving-program-to-file/3769>\
**Category:** Developer Tools\
**Created:** [August 26, 2010, 2:30pm UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769 "2010-08-26T14:30:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilindza](https://avatars.discourse-cdn.com/v4/letter/n/e9bcb4/32.png) [@nilindza](https://tech-community.robotics.abb.com/u/nilindza)\
**Post date:** [August 26, 2010, 2:30pm UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769/1 "2010-08-26T14:30:22Z")

</div>

Hi all.

I’m developing PC application (PC SDK) with Visual Studio 2008 and Robot Studio 5.12.03 virtual controller for creating basic control functions over IRB 140 typeC; 6kg; 0,81m.

Problem description:

Problem occurs with:  
**Task.SaveProgramToFile(SaveDir)** method with following error:

**SYS\_CTRL\_E\_NO\_PROGRAM\_NAME**

I know that parameter **programName** needs to be different from **nothing** value or **“”** , but i don’t understand how to change it, because **PC SDK- Task** class doesn’t have **programName type:**

**Public member ‘ProgramName’ on type ‘Task’ not found.**

I red in Manual-Robot Application Builder-3HAC028083-001 Revision: D ,  
on page **246; section 7 Using PC SDK; 7.5.6. Working with RAPID modules and programs** next example of code:

Dim TaskCol As Task() = AController.Rapid.GetTasks()  
Dim AnObject As Object  
For Each AnObject in TaskCol  
ATask = DirectCast(AnObject, Task)  
**ATask.ProgramName = ATask.Name**  
ATask.SaveProgramToFile(SaveDir)  
ATask.DeleteProgram()  
Next

I also red FlexPedant SDK, and noticed that i can change this property, but that’s developing FlexPedant application.

I’m new at this, and little confused, so please explain me where I’m making errors and how can i solve above described problem. :stuck\_out\_tongue:

Thank you in advanced, with respect Milan Delic

---

<div class="post-metadata">

**Author:** ![Niklas\_Skoglund](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Niklas\_Skoglund](https://tech-community.robotics.abb.com/u/Niklas_Skoglund)\
**Post date:** [August 26, 2010, 10:41pm UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769/2 "2010-08-26T22:41:22Z")

</div>

Hi,

the property Task.Name does not exists in PC SDK.  
The latest PC SDK Application Manual, which is included in RobotStudio, does not mention this property.

You must make sure that the program has a name before trying to save it, by user interaction, or by loading a .pgf file which specifies a program name.

I understand this was a bit confusing.

This property will be added in PC SDK 5.14.

Thanks.

---

<div class="post-metadata">

**Author:** ![nilindza](https://avatars.discourse-cdn.com/v4/letter/n/e9bcb4/32.png) [@nilindza](https://tech-community.robotics.abb.com/u/nilindza)\
**Post date:** [August 27, 2010, 8:14am UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769/3 "2010-08-27T08:14:26Z")

</div>

Thank you for quick and thorough reply.

With respect, Milan Delic.

---

<div class="post-metadata">

**Author:** ![Niklas\_Skoglund](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Niklas\_Skoglund](https://tech-community.robotics.abb.com/u/Niklas_Skoglund)\
**Post date:** [August 27, 2010, 8:19am UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769/4 "2010-08-27T08:19:58Z")

</div>

No problem, it was a reply:stuck\_out\_tongue\_winking\_eye:, but not what you hoped for.

Is his stopping you from what you are trying to accomplish?

---

<div class="post-metadata">

**Author:** ![nilindza](https://avatars.discourse-cdn.com/v4/letter/n/e9bcb4/32.png) [@nilindza](https://tech-community.robotics.abb.com/u/nilindza)\
**Post date:** [August 30, 2010, 11:32am UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769/5 "2010-08-30T11:32:49Z")

</div>

I’m working on a project with experts in CAM concept, factory automation, mechatronics and robotics.

My primary field of interest is IT implementation and support of quality management system processes via software solutions, so this is my **first** assignment on a project with this type of nature (still confused :stuck\_out\_tongue:).

The main goal of a project is manipulator integration with existing IS.  
Term existing means that we have distributed DB structure and **all programs** for manipulator should exist **only** in DB tables, until manipulator needs them (This request is explicitly define in software specification).

In a moment of use (when manipulator operator (one worker) receives “work order” type of document), manipulator receives program (or programs) for specific operations, correspondent to operations defined in “work order” (send by manipulator operator to controller via my application). After use, programs should be erased for controller memory.

So, as i understand it (maybe I’m doing something wrong :stuck\_out\_tongue:), my application is integration node between DB structure and manipulator. One of many required application functions is that application can manage programs on controller of manipulator.  
If so, **task.ProgramName()** is parameter that i tryed to manage and support with software application.  
I understand what you wrote, and i can say that I’m **satisfied** with your answer 😉. Because their job (rest of team) is to name **properly** programs if they want them to be upload in DB and further, on controller manipulator. That’s a technical restriction, at the moment and it’s fine by me 😉.

With respect, Milan Delic

---

<div class="post-metadata">

**Author:** ![nilindza](https://avatars.discourse-cdn.com/v4/letter/n/e9bcb4/32.png) [@nilindza](https://tech-community.robotics.abb.com/u/nilindza)\
**Post date:** [August 30, 2010, 11:43am UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769/6 "2010-08-30T11:43:08Z")

</div>

Oh, sorry, I forgot to say that this is only pilot-project (of course). if we actuality manage to do something productive, then, this collaboration potentially may become serious project 😉.

With respect, Milan Delic

---

<div class="post-metadata">

**Author:** ![Niklas\_Skoglund](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@Niklas\_Skoglund](https://tech-community.robotics.abb.com/u/Niklas_Skoglund)\
**Post date:** [August 30, 2010, 12:41pm UTC](https://tech-community.robotics.abb.com/t/saving-program-to-file/3769/7 "2010-08-30T12:41:16Z")

</div>

Hi Milan,

thanks for giving the background and context of your application.  
Good that you can treat the non existing “task.ProgramName” as fact and technical restriction and not a problem for the time being.

I’ll record it as an improvement for the next major release (5.14).

Good luck!
