GetFilename

Returns

 • string : path to the linked MapleSim model

Options

 • directory = truefalse
 True means returns the directory in which the file is located. The default is false.

Description

 • A:-GetFilename returns the absolute path of the filename of the linked MapleSim model as a string.
 • An error is raised if the MapleSim file has not been created (saved to disk).
 • The A := MapleSim:-LinkModel() statement needs to be run prior to successfully using any of the ModelObject A's export functions.

Examples

Link to a MapleSim model (located in .msim file).

 > $A≔\mathrm{MapleSim}:-\mathrm{LinkModel}\left('\mathrm{filename}'=\mathrm{cat}\left(\mathrm{kernelopts}\left('\mathrm{toolboxdir}'=\mathrm{MapleSim}\right),"/data/examples/RLCcircuit.msim"\right)\right):$

 > $A:-\mathrm{GetFilename}\left(\right)$
 > $A:-\mathrm{GetFilename}\left('\mathrm{directory}'\right)$