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

Online Help

All Products    Maple    MapleSim


PackageTools

  

Create

  

create a workbook file

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Create( package )

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

Parameters

package

-

string

files

-

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

recurse

-

(optional) truefalse

embedmla

-

(optional) truefalse

Description

• 

The Create command creates an empty workbook file.  The filename package should have the extension .maple.

• 

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 will be 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 contain variables and/or procedures, and are treated specially by this command.  By default the variables inside a .mla are unpacked from the .mla and stored directly into the workbook file.  This process can only be done for a single .mla, and will abort with an error if more .mla files are specified in the calling sequence.  To attach .mla files without unpacking them use the option embedmla=false.

Examples

withPackageTools:

If no filepath is specified, a new workbook is created in the current directory. Note that the current directory must be writable, otherwise the Create command will not be able to create a new file.

currentdir

Createmypack.maple

To add preexisting content from the current directory to a new workbook, supply additional files as the arguments to the Create command:

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

To customize the titles of any added content:

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

It is possible to use the Create command to script the creation of package workbooks. In order to make a package workbook that has been built using a script updatable, it is required to set the "X-CloudId" and "X-CloudXId" metadata properties. To set a property of a created workbook, use the SetProperty command:

SetPropertymypack.maple,X-CloudId,1234567890

SetPropertymypack.maple,X-CloudXId,12345

Compatibility

• 

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

• 

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

See Also

Creating a New Package Workbook

PackageTools

The Workbook File Format