MPGet Statement

Application
Mass Property Object MP#

Description
This is used when obtaining the value of the properties of the Mass Property Object.

Usage
MPGet Object.Property, Var

  • Object
    Object name
    The object is specified as either of MP (numerical value) or MP (label).

  • Property
    The name of the property for which the value is to be acquired

  • Var
    The variable that shows a returned value and format differ according to the property.

Detailed Explanation
This is used when obtaining the value of the properties of the Mass Property Object.

Usage Example
This example sets the value of the Mass Property Object, then acquires that value and displays it.

Function MPTest

  Integer iVar
  String sVar$

  'Set each property
  MPSet MP1.Label, "MP1_Label"
  MPSet MP1.Description, "MP1_Description"
  MPSet MP1.Mass, 1
  MPSet MP1.GravityCenter, 0, 0, 100

  'Acquires the number
  MPGet MP(MP1_Label).Number, iVar
  Print iVar

  'Acquires the label
  MPGet MP((iVar)).Label, sVar$
  Print sVar$
Fend

See Also
FSet