.

ConfigLoadPropertyStatusEventArgs.PropertyPath

Gets the period-delineated path to the property that caused the error. For example:

“Controller.Axis[3].Capture[1].SourceEnable[Home]”

Version History

Introduced in MPX 2.0.

Type

String (read only)

Visual Basic

Syntax

ReadOnly Property PropertyPath() As String

Sample Code

 
' This method handles PropertyStatus events that occur while 
' loading configuration to an object.
Public Sub OnLoadPropertyStatus(ByVal loader As Mpx.ConfigLoader, 
ByVal e As Mpx.ConfigLoadPropertyStatusEventArgs)
    Dim msg As String

    ' Print the current property and the percentage done
    ' Example output:
    ' 25%: Controller.Axis[2].MotorType
    '     Current Value: Servo
    '     New Value: Stepper
    msg = e.PercentageDone.ToString()
    msg += "%: "
    msg += e.PropertyPath

    System.Console.WriteLine(msg)
End Sub


Sample Application

 

C#

Syntax

string PropertyPath { get; }

Sample Code

 

// This method handles PropertyStatus events that occur while loading
// configuration to an object.

public void OnLoadPropertyStatus(Mpx.ConfigLoader loader,
   Mpx.ConfigLoadPropertyStatusEventArgs e)
{
   if (e.NewValueText != e.CurrentValueText)
   {
      string msg;
      // Print the current property and the percentage done
      // Example output:
      // 25%: Controller.Axis[2].AmpDisableAction
      // Current Value: None
      // New Value: CmdEqAct

      msg = e.PercentageDone
         + "%: "
         + e.PropertyPath
         + "\n";

      // The property value is going to change. Display the current value
      // and the new value.

      msg += " Current Value: "
         + e.CurrentValueText
         + "\n New Value: "
         + e.NewValueText
         + "\n";
      System.Console.Write(msg);
   }
}

See Also

ConfigLoadPropertyStatusEventArgs
ConfigLoadPropertyErrorEventArgs

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering