Methods in the RibbonUtil Class
COMSOL ribbon functionalities are also accessible using VBA commands. These commands help to manipulate the model, compute the solution and perform postprocessing operations like showing results or extracting data to the worksheet. The VBA ribbon commands are accessible from the RibbonUtil object.
To make all COMSOL ribbon utility methods available using VBA, enter:
Set RibbonUtil = ComsolUtil.GetRibbonUtil()
This returns the RibbonUtil object that implements the VBA toolbar functionality methods.
GetRibbonPreferences
GetRibbonPreferences() As IRibbonPreferences returns the IRibbonPreferences object for handling ribbon preference operations.
AutomaticParameterUpdate
AutomaticParameterUpdate(on As Boolean) sets the automatic parameter update functionality; on is a boolean that specifies if the automatic update is turned on (true) or not (false).
AutomaticParameterUpdate is accessible from the RibbonPreferences object.
BreakAllLinks
BreakAllLinks() breaks all links to the model.
Removes all COMSOL related comments from the currently active worksheet.
BreakLink
BreakLink() breaks link to the model.
Removes COMSOL related comments from the selected cells.
ClearAndEvaluateAllResults
ClearAndEvaluateAllResults() clears all currently linked results table entries and then evaluate all linked derived values.
Connect
Connect([hostname As String], [port As Integer], [username As String], [password As String]) connects the ribbon and the client for the API to a server. All arguments are optional where:
hostname is the host name where the COMSOL server is running
port is the port number the COMSOL server is listening to.
username and password are the credentials requires when connected to a COMSOL server running on a different machine.
The Connect method also connect the ModelUtil object to access the API clients from a server.
CreateEvaluationSelection
CreateEvaluationSelection() As IEvaluationSelection returns an IEvaluationSelection object to use in a point evaluation.
To set the parameter selection you can use one of the following approaches:
evalSelection.SetLoopLevelIndices(level As long, int[] levels) sets the parameter selection using the loop level one based index level and the current level one based index levels.
evalSelection.SetLoopLevelEvaluation(int[N-1][M-1] levelArray) sets the parameter selection using the integer array levelArray, where N is the number of loop levels in the solution and M the maximum number of current loop level indices to set.
evalSelection.SetLoopLevelEvaluation(Array(int[] level1, int[] level2,...)) sets the parameter selection using a dynamic array, where int1, int2,... are integer array that set the one based index for parameter 1, 2,..., respectively.
For transient studies you may want to evaluate point expression at interpolated time, use SetInterpolation to set the evalSelection object as in:
evalSelection.SetInterpolation(t As Double) where t is the time for evaluation.
See the section ResultsPointEvaluation from more information about point evaluation.
CreateSweepData
CreateSweepData() As ISweepData returns an ISweepData object that can be used in parametric sweep settings.
void ISweepData.AddParameterSweep(sweepType As String, pName As String, pValues) adds a parameter sweep. Provide an array of double values for the parameterValues argument.
Disconnect
Disconnect() disconnects the ribbon and API clients from a COMSOL server.
The COMSOL Multiphysics server also shuts down once the connection is broken.
EvaluationGroup
EvaluationGroup(tag As String) evaluates and inserts the results from the evaluation group tag at the currently active cell.
Export1DPlot
Export1DPlot(pgTag As String) exports the 1D plot group pgTag data, and creates a line chart. The data are exported at the currently selected cell and the line chart is placed on the next cell available on the right side.
void Export1DPlot(pgTag As String, featTag) exports the data of the feature featTag of the 1D plot group pgTag, and create a line chart. featTag is either a string array or an object array.
void Export1DPlot(pgTag As String, featTag, False) exports the 1D plot data without creating the line chart.
void Export1DPlot(pgTag As String, featTag,, plotPosition As String) exports the 1D plot data and create a line chart at the position specified by plotPosition, which can either be "right"(default), "left", "bottom", or "top".
void Export1DPlot(pgTag As String, featTag,, "custom", cellRange As String) exports the 1D plot data and create a line chart at the cell cellRange.
Code for use in VBA
Sub Export1DPlotExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Range("A1").Select
Set Model = RibbonUtil.OpenModel("busbar_llexcel.mph")
 
' Example 1: Export the 1D Plot data pg5 and create the chart
Range("A4").Value = "Export the 1D Plot data pg5 and create the chart"
Range("A5").Select
RibbonUtil.Export1DPlot "pg6"
 
' Example 2: Do not include the chart
Range("A20").Value = "Do not include the chart"
Range("A21").Select
RibbonUtil.Export1DPlot "pg6", , False
 
' Example 3: Include the chart below the data
Range("A28").Value = "Include the chart below the data"
Range("E29").Select
RibbonUtil.Export1DPlot "pg6", , , "bottom"
 
' Example 4: Set manually the location of the chart
Range("A50").Value = "Set manually the location of the chart"
Range("A51").Select
RibbonUtil.Export1DPlot "pg6", , , "custom", "A57"
 
End Sub
Functions
Functions(fTag As String) imports the model function defined with the tag fTag at the currently active cell.
InsertGraphics
InsertGraphics(pgTag As String) inserts the graphics from the plot group pgTag at the currently active cell.
InsertGeometryGraphics
InsertGeometryGraphics(geomTag As String) inserts the graphics of the geometry defined with the tag geomTag at the currently active cell.
InsertMeshGraphics
InsertMeshGraphics(meshTag As String) inserts the graphics of the mesh defined with the tag meshTag at the currently active cell.
IsConnected
IsConnected() As Boolean returns the connection status between the COMSOL ribbon and the server: True when connected, else False.
OpenDocumentation
OpenDocumentation() opens COMSOL Multiphysics documentation.
OpenHelp
OpenHelp() opens LiveLink™ for Excel® help.
OpenLinkedModel
OpenLinkedModel() As ModelImpl opens a mph model file from the model link in the active workbook and returns the Model object. The model link is updated when the model is opened.
OpenLinkedModel(pwd As String) As ModelImpl opens the password protected mph model file from the model link in the active workbook and returns the Model object. The model link is updated when the model is opened.
A model link is created and inserted in the active cell when the model is opened. If no connection is established for the ribbon a local COMSOL Multiphysics server is started and connected automatically.
If the model MPH file is not found at the location specified in the cell comment, OpenLinkedModel searches in the same folder where the workbook is saved.
Example
Sub OpenLinkedModelExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Set Model = RibbonUtil.OpenLinkedModel()
 
End Sub
OpenModel
OpenModel(filename As String) As ModelImpl opens the model MPH file filename and returns the Model object.
OpenModel(filename As String, pwd As String) As ModelImpl opens the password protected model MPH file filename and returns the Model object.
A model link is created and inserted in the active cell when the model is opened. If no connection is established for the ribbon a local COMSOL Multiphysics server is started and connected automatically.
In case of the filename does not include the full path, the method OpenModel search for the model MPH file in the following directories:
Code for use in VBA
Sub OpenModelExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
Range("A1").Select
Set Model = RibbonUtil.OpenModel("busbar_llexcel")
 
End Sub
Parameters
Parameters() imports all parameters from the model to a linked field with upper-left corner at the currently active cell.
Parameters(pGroupTag As String) imports parameters in the model in the parameter node group to linked field with upper-left corner at the currently active cell.
Parameters(pGroupTag As String, paramCaseTag As String) imports parameters in the model in the parameter node group and case to linked field with upper-left corner at the currently active cell.
Code for use in VBA
The following example opens the model busbar_llexcel from the Application library. Then, if the current cell is empty, returns all model parameters. If not, returns the first group parameters. You can copy the code below and paste it into the VBA editor.
Sub ParametersExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Set Model = RibbonUtil.OpenModel("busbar_llexcel")
 
' Example 1: Import all parameters
Range("A4").Value = "Import all parameters"
Range("A5").Select
RibbonUtil.Parameters
 
' Example 2: Import the group parameters par2 only
Range("A13").Value = "Import all parameters"
Range("A14").Select
RibbonUtil.Parameters "par2"
 
End Sub
ReadModelLink
ReadModelLink() As String returns the model file path found in the model link in the currently active worksheet.
If model link does not exist an empty string is returned.
Code for use in VBA
Sub ReadModelLinkExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
Range("A1").Select
Set Model = RibbonUtil.OpenModel("busbar_llexcel")
Range("A5").Value = RibbonUtil.ReadModelLink
 
End Sub
ResultsDerivedValue
ResultsDerivedValue(dtag As String) evaluates the derived values defined with the tag dtag and returns the data at the currently selected cell.
ResultsInterpolation
ResultsInterpolation(dset As String, expr As String, coord As String) evaluates an expression at an arbitrary location. Insert the linked field at the current cell.
The arguments consist in:
dset, the solution dataset tag.
expr, the expression to evaluate.
coord, the cell range where the interpolation coordinates are defined.
ResultsInterpolation(dset As String, expr As String, coord As String, header As Boolean) evaluates an expression at an arbitrary location and specify whether to include the header or not. When the boolean header is set to False the header is not included. Default value for header is True.
void ResultsInterpolation(dset As String, expr As String, coord As String, header As Boolean, coord As String, pName As String, pValue As String) evaluates expression at arbitrary location. pName, a string to define the solution parameters name and pValue, its values to use for the evaluation.
Code for use in VBA
Sub ExampleInterpolation()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Range("A1").Select
Set Model = RibbonUtil.OpenModel("busbar_llexcel")
 
Range("A4:C12").Value = 0
Range("A5").Value = 2.5e-2
Range("A6").Value = 5e-2
Range("A7:A9").Value = Range("A4:A6").Value
Range("A10:A12").Value = Range("A4:A6").Value
Range("B7:B9").Value = -1.25e-2
Range("B10:B12").Value = -1.25e-2
 
' Example 1: Data interpolation (T) at coordinates given in A4:C12
Range("A14").Value = "Data interpolation (T) at coordinates given in A4:C12"
Range("A15").Select
RibbonUtil.ResultsInterpolation "dset1", "T", "A4:C12"
 
' Example 2: Data interpolation (T) at coordinates given in A4:C12,
' including header
Range("A25").Value = "Data interpolation (T) at coordinates given in A4:C12, including header"
Range("A26").Select
RibbonUtil.ResultsInterpolation "dset1", "T", "A4:C12", True
 
' Example 3: Data interpolation (T) at coordinates given in A4:C12
' using the solution dataset dset2 and parameter wbb = 0.1
Range("A37").Value = "Data interpolation (T) at coordinates given in A4:C12 using the solution dataset dset2 and parameter wbb = 0.1"
Range("A38").Select
RibbonUtil.ResultsInterpolation "dset2", "T", "A4:C12", True, "wbb", "0.1"
 
End Sub
ResultsParameters
ResultsParameters() import all results parameters from the model to a linked field with the upper-left corner at the currently active cell.
ResultsParticleEvaluation
ResultsParticleEvaluation(dset As String, pos As Boolean, vel As Boolean, expr As String, num As Long, [t As String]) evaluates an expression along particle trajectories. Insert the linked field at the current cell.
The following arguments are supported:
dset, used to define the particle dataset tag.
pos, used to specify whether to include the particle position coordinates (true) or not (false).
vel, used to specify whether to include the particle velocity (true) or not (false).
expr, used to define the expression to evaluate.
num, used to define the number of particles to use for the evaluation.
t, used to set the time step for evaluation.
Code for use in VBA
Sub ParticleEvalExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Range("A1").Select
Set Model = RibbonUtil.OpenModel("trapped_protons")
 
' Example 1: Particle position at t = 3s
Range("A3").Value = "Particle position at t = 3s"
Range("A4").Select
RibbonUtil.ResultsParticleEvaluation "part1", True, False, "", 1, Array(3)
 
' Example 2: Particle position and velocity t = 3s
Range("A6").Value = "Particle position and velocity t = 3s"
Range("A7").Select
RibbonUtil.ResultsParticleEvaluation "part1", True, True, "", 1, Array(3)
 
' Example 3: Particle position, velocity, and the expression
' cpt.mf1.normB at t = 3s
Range("A9").Value = "Particle position, velocity, and the expression cpt.mf1.normB at t = 3s"
Range("A10").Select
RibbonUtil.ResultsParticleEvaluation "part1", True, True, "cpt.mf1.normB", 1, Array(3)
 
' Example 4: Particle position at t = 0s and t = 3s
Range("A12").Value = "Particle position at t = 0s and t = 3s"
Range("A13").Select
RibbonUtil.ResultsParticleEvaluation "part1", True, False, "", 1, Array(0, 3)
 
' Example 5
Range("A16").Value = "Particles position (two particles) at t = 3s"
Range("A17").Select
RibbonUtil.ResultsParticleEvaluation "part1", True, False, "", 2, Array(3)
 
End Sub
ResultsPointEvaluation
void ResultsPointEvaluation(dset As String, expr As String, ptInd, [evalSel As IEvaluationSelection]) evaluates an expression at a geometry point. Insert the linked field at the current cell.
The following arguments are available:
dset, used to define the solution dataset tag.
expr, used to define the expression to evaluate.
ptInd, used to define the list of the point selection for the evaluation.
evalSel, used to define the parameter selection.
The argument evalSel is optional. When it is not set, the evaluation is performed for all parameters.
See the section CreateEvaluationSelection for more information about how to set the parameter/time for evaluation.
Code for use in VBA
The first example shows how to perform point evaluation. Copy the code and paste it in the VBA editor.
Sub PointEvalExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Range("A1").Select
Set Model = RibbonUtil.OpenModel("busbar_llexcel")
 
' Example 1: Evaluate the temperature T at point 1 for parameter
' values in the dataset dset1
Range("A4").Value = "Evaluate the temperature T at point 1 for parameter values in the dataset dset1"
Range("A5").Select
RibbonUtil.ResultsPointEvaluation "dset1", "T", Array(1)
 
' Example 2: valuate the temperature T at points 1 and 5 for all
' solution steps in the dataset dset1
Range("A12").Value = "Evaluate the temperature T at points 1 and 5 for all solution steps in the dataset dset1"
Range("A13").Select
RibbonUtil.ResultsPointEvaluation "dset1", "T", Array(1, 5)
 
' Example 3: Evaluate the temperature T at point 1 for only the
' first parameter value in dataset dset1
Range("A20").Value = "Evaluate the temperature T at point 1 for only the first parameter value in dataset dset1"
Range("A21").Select
Set evaluationSelection = RibbonUtil.CreateEvaluationSelection()
evaluationSelection.SetLoopLevelIndices 1, Array(1)
RibbonUtil.ResultsPointEvaluation "dset1", "T", Array(1), evaluationSelection
 
' Example 4:Evaluate the temperature T at point 1 for the second
' and third values of parameter 1 (Vtot) and the first one of
' parameter 2 (wbb) in the dataset dset2
Range("A24").Value = "Evaluate the temperature T at point 1 for the second and third values of parameter 1 (Vtot) and the first one of parameter 2 (wbb) in the dataset dset2"
Range("A25").Select
Set evaluationSelection = RibbonUtil.CreateEvaluationSelection()
evaluationSelection.SetLoopLevelIndices 1, Array(2, 3)
evaluationSelection.SetLoopLevelIndices 2, Array(1)
RibbonUtil.ResultsPointEvaluation "dset2", "T", Array(1), evaluationSelection
 
' Example 5: Evaluate the temperature T at point 1 for the second,
' third and fourth values of parameter 1 (Vtot) and the first one
' of parameter 2 (wbb) in the dataset dset2
Range("A29").Value = "Evaluate the temperature T at point 1 for the second, third, and fourth values of parameter 1 (Vtot) and the first one of parameter 2 (wbb) in the dataset dset2"
Range("A30").Select
Set evaluationSelection = RibbonUtil.CreateEvaluationSelection()
Dim intA(1, 2) As Long
intA(0, 0) = 2
intA(0, 1) = 3
intA(0, 2) = 4
intA(1, 0) = 1
evaluationSelection.SetLoopLevelEvaluation intA
RibbonUtil.ResultsPointEvaluation "dset2", "T", Array(1), evaluationSelection
 
' Example 6: Evaluate the temperature T at point 1 for the second
' and third values of parameter 1 (Vtot) and the first one of
' parameter 2 (wbb) in the dataset dset2
Range("A35").Value = "Evaluate the temperature T at point 1 for the second and third values of parameter 1 (Vtot) and the first one of parameter 2 (wbb) in the dataset dset2"
Range("A36").Select
Set evaluationSelection = RibbonUtil.CreateEvaluationSelection()
evaluationSelection.SetLoopLevelEvaluation Array(Array(2, 3), Array(1))
RibbonUtil.ResultsPointEvaluation "dset2", "T", Array(1), evaluationSelection
 
End Sub
The second example illustrates how to perform a point evaluation at interpolated time. Copy the code and paste it in the VBA editor.
Sub PointEvalInterpTimeExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Range("A1").Select
Set Model = RibbonUtil.OpenModel("pid_control")
Set std1 = Model.get_study("std1")
std1.Run
 
' Example 1: Evaluate the concentration c at point 17 and at
' 0.125s using the solution dataset dset2
Range("A4").Value = "Evaluate the concentration c at point 17 and at 0.125s using the solution dataset dset2"
Range("A5").Select
Set evaluationSelection = RibbonUtil.CreateEvaluationSelection()
evaluationSelection.SetInterpolation Array(0.125)
RibbonUtil.ResultsPointEvaluation "dset2", "c", Array(17), evaluationSelection
 
' Example 2: Evaluate the concentration c at point 17 and at
' 0.125s and 2.37s using the solution dataset dset2
Range("A9").Value = "Evaluate the concentration c at point 17 and at 0.125s and 2.37s using the solution dataset dset2"
Range("A10").Select
Set evaluationSelection = RibbonUtil.CreateEvaluationSelection()
evaluationSelection.SetInterpolation Array("0.125 2.37")
RibbonUtil.ResultsPointEvaluation "dset2", "c", Array(17), evaluationSelection
 
' Example 3: Evaluate the concentration c at point 17 and at
' 0.125s and the second value of parameter 2 (k_P_ctrl) using the
' solution dataset dset2
Range("A16").Value = "Evaluate the concentration c at point 17 and at 0.125s and the second value of parameter 2 (k_P_ctrl) using the solution dataset dset2"
Range("A17").Select
Set evaluationSelection = RibbonUtil.CreateEvaluationSelection()
evaluationSelection.SetInterpolation Array(0.125)
evaluationSelection.SetLoopLevelIndices 2, Array(2)
RibbonUtil.ResultsPointEvaluation "dset2", "c", Array(17), evaluationSelection
 
End Sub
ResultsRayEvaluation
void ResultsRayEvaluation(dset As String, pos As Boolean, vel As Boolean, expr As String, num As Long, [t As String]) evaluates an expression along ray trajectories. Insert the linked field at the current cell.
The following arguments are available:
dset, the ray dataset tag.
pos, used to specify whether to include the ray position coordinates (true) or not (false).
vel, used to specify whether to include the velocity (true) or not (false).
expr, the list of expression to evaluate.
num, the number of rays to use for the evaluation.
t, the time step for evaluation if available.
Code for use in VBA
Sub RayEvalExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Range("A1").Select
Set Model = RibbonUtil.OpenModel("luneburg_lens")
 
' Example 1: Ray position at t = 5.8374e-9s
Range("A3").Value = "Ray position at t = 5.8374e-9s"
Range("A4").Select
RibbonUtil.ResultsRayEvaluation "ray1", True, False, "", 1, Array(5.8374e-9)
 
' Example 2: Ray position and velocity at t = 5.8374e-9s
Range("A6").Value = "Ray position and velocity at t = 5.8374e-9 s"
Range("A7").Select
RibbonUtil.ResultsRayEvaluation "ray1", True, True, "", 1, Array(5.8374e-9)
 
' Example 3: Ray position, velocity, and evaluation of gop.rrel at t = 5.8374e-9s
Range("A9").Value = "Ray position, velocity, and evaluation of gop.rrel at t = 5.8374e-9s"
Range("A10").Select
RibbonUtil.ResultsRayEvaluation "ray1", True, True, "gop.rrel", 1, Array(5.8374e-9)
 
' Example 4: Ray position at t = 3.836e-9s and t = 5.8374e-9s
Range("A12").Value = "Ray position at t = 3.836e-9s and t = 5.8374e-9s"
Range("A13").Select
RibbonUtil.ResultsRayEvaluation "ray1", True, False, "", 1, Array(3.836e-9, 5.8374e-9)
 
' Example 5: Rays position (two rays) at t = 5.8374e-9s
Range("A16").Value = "Rays position (two rays) at t = 5.8374e-9s"
Range("A17").Select
RibbonUtil.ResultsRayEvaluation "ray1", True, False, "", 2, Array(5.8374e-9)
 
End Sub
ResultsTable
ResultsTable(tblTag As String) exports the results table with the tag tblTag at the currently active cell.
Sweep
Sweep(stdTag As String, True) exports the parametric sweeps from the study stdTag at the currently active cell. study is the study node tag from where to extract the parametric sweeps.
Sweep(stdTag As String, True, False, sweepData As ISweepData) exports parametric sweeps from the study stdTag using the sweep data information set in the object ISweepData.
Sweep(stdTag As String, False, True) updates parametric sweeps from the study stdTag using the sweep data information set in the currently active cell.
Sweep(stdTag As String, False, True, sweepData As ISweepData) updates parametric sweeps from the study stdTag using the sweep data information set in the object ISweepData.
See the section CreateSweepData for more information about how to set sweep data information.
Example
Sub SweepExample()
 
Set ModelUtil = CreateObject("comsolcom.modelutil")
Set ComsolUtil = CreateObject("comsolcom.comsolutil")
Set RibbonUtil = ComsolUtil.GetRibbonUtil
 
Range("A1").Select
Set Model = RibbonUtil.OpenModel("busbar_llexcel")
 
' Example 1: Export parametric sweep set in the model
Range("A4").Value = "Export parametric sweep set in the model"
Range("A5").Select
RibbonUtil.Sweep "std1", True
 
' Example 2: Export parametric sweeps using given parameter values
Range("A9").Value = "Export parametric sweep using given parameter values"
Set sweepData = RibbonUtil.CreateSweepData
Dim param(0, 2) As Double
param(0, 0) = 0.1
param(0, 1) = 0.15
param(0, 2) = 0.2
sweepData.AddParameterSweep "param", "wbb", param
Range("A10").Select
RibbonUtil.Sweep "std1", True, , sweepData
 
' Example 3 :Update parametric sweeps using the parameter value
' linked in the current cell
Range("A14").Value = "Update parametric sweeps using the parameter value linked in the current cell"
Range("E11").Value = 0.3
Range("A15").Select
RibbonUtil.Sweep "std1", , True
 
' Example 4: Update parametric sweeps using the parameter value
' linked in the cell A10 and modify parameter values for Vtot
Range("A19").Value = "Update parametric sweeps using the parameter value linked in the current cell and given parameter values"
Range("E11").Value = 0.3
Set sweepData2 = RibbonUtil.CreateSweepData
Dim param2(0, 1) As Double
param2(0, 0) = 5
param2(0, 1) = 10
sweepData2.AddParameterSweep "stat", "Vtot", param2
Range("A10").Select
RibbonUtil.Sweep "std1", , True, sweepData2
Range("A20").Select
RibbonUtil.Sweep "std1", True
 
End Sub
UpdateAllResults
UpdateAllResults() updates all evaluated data in the current worksheet.
UpdateDefinitions
UpdateDefinitions() updates the model with linked definitions in the currently active cell.
UpdateAllDefinitions
UpdateAllDefinitions() updates the model with all linked definitions in the active worksheet.
Variables
Variables() imports all variables from the model to linked field with upper-left corner at the currently active cell.