Click or drag to resize

ModuleSaveToFile Method

Saves the RAPID module to the specified file path.

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

Parameters

filePath
Type: SystemString
Path to the file where the RAPID module should be saved.
Exceptions
ExceptionCondition
GeneralExceptionA General Exception has occurred.
Examples
This example saves a RAPID module to a file.
private void _gtpusavedialog_Closed(object sender,EventArgs e)
{
    try
    {
        // If OK was selected in SaveDialog
        if (_gtpusavedialog.DialogResult == System.Windows.Forms.DialogResult.OK)
        {
            // Get filename
            string stFileName = _gtpusavedialog.FileName;

            // Save myModule
            myModule.SaveToFile(stFileName);
        }
    }
    catch (GeneralException ee)
    {
        // TODO: Add error handling
    }
    catch (System.Exception ee)
    {
        // TODO: Add error handling
    }
    finally
    {
        // Release resources
    }
}
See Also