Click or drag to resize

TaskLoadModuleFromFile Method

Loads a RAPID module to the task.

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

Parameters

filePath
Type: SystemString
Path to the file containing the RAPID module. Valid extensions for a RAPID module file are .mod and .sys.
mode
Type: ABB.Robotics.Controllers.RapidDomainRapidLoadMode
Specifies the RapidLoadMode of the operation.
Exceptions
ExceptionCondition
GeneralExceptionA General Exception has occurred.
ArgumentExceptionThe filename isn't recognized as a RAPID module file. The file extension has to be .mod or .sys
Examples
This example loads a RAPID module.
private void _gtpuopendialog_Closed(object sender,EventArgs e)
{
    try
    {
        // If OK was selected in SaveDialog
        if (_gtpuopendialog.DialogResult == System.Windows.Forms.DialogResult.OK)
        {
            // Get filename
            string stFileName = _gtpusavedialog.FileName;

            // Load module
            myTask.LoadModuleFromFile(stFileName,LoadMode.Add);
        }
    }
    catch (GeneralException ee)
    {
        // TODO: Add error handling
    }
    catch (System.Exception ee)
    {
        // TODO: Add error handling
    }
    finally
    {
        // Release resources
    }
}
See Also