The Mpl Option Object

The MplOption object is an element of the MplOptions collection and contains all the information stored about each option for the MPL.

Properties for the MplOption Object

Changed

Specifies if the option has been changed. (Boolean Property - Read Only)

DefaultValue

The default value for the MPL option. (Variant Property - Read Only)

MaxValue

The maximum value of the MPL option. (Variant Property - Read Only)

MinValue

The minimum value of the MPL option. (Variant Property - Read Only)

Name

The name of the MPL option. (String Property - Read Only)

Value

The current value of the MPL option. (Variant Property - Read/Write)

Visual Basic Example:


    Dim MPL As OptiMax
    Dim mplOpt As MplOption

    Set MPL = New OptiMax

    MPL.ReadProjectFile ("mplwin.mpj")
    MPL.Options("DatafileInputDir").Value = "c:\mplwin4\tutorial"
    MPL.Options("MaxVarLen").Value = 15

    ' Display all Numeric options for MPL
    For Each mplOpt In MPL.Options
        If IsNumeric(mplOpt.Value) Then
            Debug.Print "MPLNUM: " & mplOpt.Name & ": val=" & mplOpt.Value
        End If
    Next mplOpt

    ' Display all String options for MPL
    For Each mplOpt In MPL.Options
        If VarType(mplOpt.Value) = vbString Then
            Debug.Print "MPLSTR: " & mplOpt.Name & ": str='" & mplOpt.Value & "'"
        End If
    Next mplOpt

    MPL.WriteProjectFile ("mplwinNew.mpj")

        

Back To Top | Maximal Home Page | Table of Contents | Previous Page | Next Page