.

ConfigLoadPropertyStatusEventArgs.PercentageDone

The PercentageDone property determines what percentage of the operation has been completed.

Version History

Introduced in MPX 2.0.

Type

Uint32 (read only)

Visual Basic

Syntax

Property PercentageDone() As UInteger

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

uint PercentageDone { 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

 

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