ListAttachments - MapleSim Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : MapleSim : MapleSim Application Programming Interface : API Commands : MapleSim/LinkModel/ListAttachments

ListAttachments

list the attachments of the linked MapleSim model

 Calling Sequence A := MapleSim:-LinkModel(options); A:-ListAttachments(options)

Parameters

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

Returns

 • list : list of the attachments in the linked model

Options

 • showcategories = true or false
 True means each element in the returned list is a sublist containing the name of the attachment and its category. False means each element is the name of the attachment. The default is false.

Description

 • A:-ListAttachments returns the list of names of the existing attachments in the linked model A.
 • 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):$

Set the attachment to the linked MapleSim model.

 > $\mathrm{data}≔"this will be the ship"$
 ${\mathrm{data}}{:=}{"this will be the ship"}$ (1)
 > $A:-\mathrm{SetAttachment}\left("data.txt",\mathrm{data},'\mathrm{category}'="other"\right)$

List the attachments of the linked MapleSim model.

 > $A:-\mathrm{ListAttachments}\left(\right)$
 $\left[{"data.txt"}\right]$ (2)

List the attachments with the categories.

 > $A:-\mathrm{ListAttachments}\left(\mathrm{showcategories}\right)$
 $\left[\left[{"data.txt"}{,}{"other"}\right]\right]$ (3)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam