MapleSim/LinkModel/GetFilename - MapleSim Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : MapleSim/LinkModel/GetFilename

GetFilename

get linked MapleSim model filename

 Calling Sequence A := MapleSim:-LinkModel(); A:-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):$

Get the linked MapleSim model filename.

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

Get the directory of the linked model.

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

 See Also