Click or drag to resize

TaskSaveProgramToFile Method

Saves the current program at the provided location.

Namespace:  ABB.Robotics.Controllers.RapidDomain
Assembly:  ABB.Robotics.Controllers (in ABB.Robotics.Controllers.dll) Version: 6.5.129.0
Syntax
C#
public void SaveProgramToFile(
	string stDirPath
)

Parameters

stDirPath
Type: SystemString
Path to the directory where the program should be saved.
Exceptions
ExceptionCondition
GeneralExceptionA General Exception has occurred.
ArgumentNullExceptionfilename is null or empty.
Remarks
When a program is saved a folder, named as the program, will be created and in this folder the program file (pgf-file) and the modules of the program will be stored.
Examples
This example sets the name of the program and saves the program in the home directory of the current system.
private void btnSavePrg_Click(object sender,EventArgs e)
{
    try
    {
        // Set program name
        myTask.ProgramName = textBox1.Text;

        // Save program at home directory
        myTask.SaveProgramToFile(stHomePath);
    }
    catch (System.Exception ee)
    {
        // Handle any error here
    }
}
See Also