GetModelica - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

GetModelica

get the Modelica description of the MapleSim model

 

Calling Sequence

Parameters

Returns

Options

Description

Notes

Examples

Calling Sequence

A := MapleSim:-LinkModel();

A:-GetModelica(options)

Parameters

options

-

(optional) equation(s) of the form name = value

Returns

• 

string : Modelica description of the model or active subsystem

Options

• 

flat: true or false

  

Specifies whether to return the flatten record of the active subsystem.  Default is false.

• 

core: true or false

  

If set to true the returned Modelica represents the core Modelica that describes the behavior of the model: all annotations including the experiment settings are removed; the timestamp when the Modelica was generated is not added; if any attachments are used in the model only their filenames are specified. Default is false. If the model to which the ModelObject is linked is a Modelica file (the LinkModel command was called with the modelica option) GetModelica returns the Modelica string provided in the file regardless of the setting of the core option.

Description

• 

A:-GetModelica returns the Modelica description of the entire model.

• 

The A := MapleSim:-LinkModel() statement needs to be run prior to successfully using any of the ModelObject A's export functions.

Notes

• 

The returned Modelica has MapleSim specific annotations in it and may not display correctly in other tools.

Examples

Linking to a MapleSim model (located in .msim file):

Getting the Modelica description of the model:

(1)

Getting the core Modelica description of the model:

(2)

See Also

MapleSim

MapleSim[LinkModel]

 


Download Help Document