Additionally to the COMSOL API, LiveLink™ for Excel® provides its own object ComsolUtil, which contains the methods to handle operation between the COMSOL server and Excel.
ConvertToDoubleMatrix(obj, transpose As Boolean) As Double() converts the incoming object to an array of doubles in COMSOL API format.
The input object obj is either a scalar or an array, with the type string, integer (long or short) or double. The returned array will have the start index as zero, as it is requested in the COMSOL API.
If the boolean transpose is true then the input array is transposed before the output is created.
ConvertToDoubleMatrixDecimal(obj, transpose As Boolean, dec As String) As Double() converts the incoming object to an array of doubles in COMSOL API format.
The input object obj is either a scalar or an array, with the type string, integer (long or short) or double. The returned array will have the start index as zero, as it is requested in the COMSOL API.
If the boolean transpose is set to true then the input array is transposed before the output is created.
dec is a string that defines the decimal sign definition (usually "," or "."). Decimal sign definition is important to specify when converting strings to values.
ConvertToDoubleVector(obj) As Double() converts the incoming object to a vector of doubles.
The input object obj may be a scalar or a vector. The input may be of the type string, integer (long or short) or double. The returned vector will have the start index as zero, which makes it possible to send such vectors to COMSOL when vectors have to be supplied as an argument to a method in the COMSOL API.
get_port() As Integer returns the port number of the COMSOL Multiphysics server.
get_Version() As String returns the version of the ComsolCom interface.
GetRibbonUtil() As IRibbonUtil returns the IRibbonUtil object to enable COMSOL ribbon utilities.
isGraphicsServer() As Boolean returns if the COMSOL Multiphysics server is started as a graphics server.
StartComsolServer(usegraphics As Boolean) As Boolean starts a COMSOL Multiphysics server. The boolean
usegraphics is true to start the graphics server.
TimeOuthandler(on As Boolean) applies a timeout handler to Excel.
Set on to
True to apply a timeout handler to Excel in order to prevent any timeout when performing long running tasks (such as starting a server or solving large models).