The Macro object is an element of the Macros collection and contains all the information stored about each defined macro in the model.
The number of terms in the macro. (Integer Property - Read Only)
The name of the macro. (String Property - Read Only)
The computed value of the macro. (Double Property - Read Only)
Visual Basic Example:
Dim MPL As OptiMax Dim planModel As Model Dim mac As Macro Set MPL = New OptiMax MPL.Solvers.Add("CPLEX") Set planModel = MPL.Models.Add("Planning.mpl") MPL.WorkingDirectory = "c:\mplwin4" Result = planModel.ReadModel(planModel.Name) Result = planModel.Solve For Each mac In planModel.Macros Debug.Print mac.Name & " = " & mac.Value & " (" & mac.Count & ")" Next mac