Menu

PPTX IMPORT

Provides a tag for inserting slides from other PPTX presentations into composed PPTX documents.

Tags of this library may only be used in PPTX document logic.

importPPTX

Imports selected slides from the specified PPTX presentation to the current presentation. If the specified presentation is a Dynamo template, it is evaluated before the slides are imported.

This tag produces a local variable context that will be the active context for the evaluation of the imported presentation.  

Attributes

data

Required
Value type
EL-evaluated
Yes File Yes
Defines the PPTX presentation that provides the slides to import. The resolved File should therefore be a PPTX file.
range

Required
Value type
EL-evaluated
No String Yes
This attribute can be used to specify which slides are imported. The resolved String should list numbers of the slides separated by commas (eg. "1,3,5,6,7"). Instead of slide number a slide range may also be specified by having the start and end numbers of the range with a hyphen between them (eg. "1,3,5-7").

If not defined, all slides of the presentation are imported.
adaptive

Required
Value type
EL-evaluated
No Boolean, String Yes
Defines how slide layouts and slide masters associated with the imported slides are handled. If the resolved value is true, the imported slide tries to "adapt" to the base presentation by using one its layouts and masters instead of the original layout and master of the slide being imported with it. The adaptation is done using the following logic.

First,the base presentation is searched for a slide layout whose own name and whose slide master's name matches with the names of the layout and master of the imported slide in its own presentation. If a layout like that is found, the imported slide will be modified to use that layout.

If a layout with matching name was not found, the imported slide's layout will be imported along with the slide. The base presentation is then searched for a slide master whose name is the same as the name of the layout's master in its own presentation. If a slide master with a matching name is found, the layout is modified to become a part of that master.

If neither of the above modifications happen due to there being no matching layout and master names, both the slide's layout and master (and the theme associated with the master) will be imported along with the slide. This is also what will always happen if the resolved value of this attribute is false. If imported, a slide master will be modified to not have any layouts that are not used by any of the imported slides.

There is also a third possible setting, but using it is not recommended in most cases due to possibly unpredictable results. If the attribute's value resolves to override, the results are similar to as if the value was true with one exception. When searching for a suitable slide master in the base presentation, the first found master is picked regardless of its name. Thus the result is either that the imported slide adapts an existing layout, or the slide's original layout is imported and attached to the picked master. The slide's original master will not get imported in any case.

If left undefined, the value of true is used.
insertTo

Required
Value type
EL-evaluated
No Integer, String Yes
This attribute can be used to place the imported slides at a specific point at the presentation. There are two ways to specify the point: slide number and slide ID.

If the resolved value is an Integer, it is used as a slide number. For example, a value of "1" would make the imported slide the presentation's first slide. An existing slide at that position is moved into a position following the imported slides, and all following existing slides are moved ahead accordingly. Note that previously imported slides can get moved in this way as well. For example, if slides 1B and 2B are imported into a presentation with slides 1A, 2A and 3A with insertTo as "2", the end result would be 1A, 2B, 1B, 2A and 3A (if the tag importing 1B is evaluated first).

If the resolved value is a String with the prefix "ID", it is interpreted as the ID of a slide. For example, "ID256" specifies the slide with the ID "256". The slides are then imported into the specified slide's position and the process works exactly as if the resolved attribute value was the specified slide's number at the time of evaluation.

If left undefined, the slides are imported to the end of the presentation. This is also the case if this attribute's value is higher than the total number of slides in the base presentation or if a non-existent slide ID is specified.
position

Required
Value type
EL-evaluated
No Integer No
This attribute can be used to define the order in which the PPTX importing tags are evaluated, should there be more than one of them in the document. The smaller the value, the earlier the tag is evaluated. If more than one tag define the same position, the order in which they are evaluated is defined by the order of the tags.

The evaluation order can have a notable effect on the composed document. For example, there may be two importPPTX tags with insertTo of 2, one importing slide 1B and another importing slide 1C, into a presentation with slides 1A and 2A. Depending on the evaluation order, the end result will either be 1A, 1B, 1C and 2A, or 1A, 1C, 1B and 2A, due to the import tags competing for the same slide position.

If this attribute is left undefined, the tag is evaluated after all tags that had their position defined. With more than one positionless tag, the order is defined by the order of the tags.
removeFooter

Required
Value type
EL-evaluated
No Boolean Yes
Defines if placeholder shapes of certain type that typically form a footer are removed from the imported slides. If the resolved value is true, all shapes of types "dt" (Date and Time), "ftr" (Footer text) and "sldNum" (Slide Number) are removed.

If left undefined, the value of false is used and any footer shapes remain in the imported content.
test

Required
Value type
EL-evaluated
No Boolean Yes
Defining this attribute makes the import a conditional process. If defined and the resolved value is false, nothing is imported. If the resolved value is true, or if the attribute is not defined, the import happens normally.  
replaceExisting

Required
Value type
EL-evaluated
No Boolean Yes
If the resolved value of this attribute is true and the insertTo attribute also has a defined value, any slide that would normally get moved ahead to make way for an imported slide will get removed instead.

If not defined or the resolved value is false, no existing slides are removed when slides are imported.

Restrictions

The importPPTX tag may evaluated up to 20 times within a single evaluation process.

Comments

0 comments