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

Online Help

All Products    Maple    MapleSim


PackageTools

  

AddAttachment

  

add attachments to a workbook file

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

AddAttachment( package, file1, file2, directory1, destname=file3, destpath=directory2, ...)

Parameters

package

-

string

files

-

(optional) sequence of strings or dest=src string pairs

recurse

-

(optional) truefalse

Description

• 

The AddAttachment command adds files to an existing workbook file. If files and/or directories are specified, then they are added to the workbook.

• 

To specify a different name or path inside the workbook, specify the files in equation form. When using destname=srcname, the attachment is given the specified destname inside the workbook, but refers to srcname on disk. When specifying only the srcname part, the attachment in the workbook is placed at the root level and given the same filename as the source file.

• 

If the srcfile is a directory then all of the files contained therein are added to the workbook. Optionally, you can add the option recurse=true in order to also embed subdirectories.

• 

Maple Repositories, or .mla files, are treated as ordinary files by this command.  See PackageTools:-Create for special treatment of unpacking variables once during creation.

Examples

withPackageTools:

To add preexisting content from the current directory to an existing workbook, supply additional files as the arguments to the AddAttachment command:

AddAttachmentmypack.maple,page1.mw,page2.mw,variables.mla

To customize the titles of any added content:

AddAttachmentmypack.maple,/Intro=page1.mw,/Chapter 1=page2.mw,/Images/Thumbnail.jpg=/mypictures/thumbnail.jpg

Compatibility

• 

The PackageTools[AddAttachment] command was introduced in Maple 2017.

• 

For more information on Maple 2017 changes, see Updates in Maple 2017.

See Also

PackageTools

PackageTools:-Create

The Workbook File Format