FME Version
Files
Introduction
The Custom (Advanced) slide type is useful when you want to control the exact positioning of your elements. This is the final tutorial in this seven-part series on Getting Started with the PowerPoint Writer. We will be creating a new workspace to create this slide, but you can continue in the same workspace that you have been using for this tutorial series.
Downloads
PowerpointWriter-6-Custom-Begin.fmwt Beginning workspace
PowerpointWriter-6-Custom-Complete.fmwt Completed workspace
Templatepowerpoint.pptx Template PowerPoint
Step-by-step Instructions
1. Create a Custom Slide
In order to use the Custom (Advanced) slide type, you need to know the name of the slide layout you wish to use, as well as the placeholder names for each of the elements on which are found in the template PowerPoint. This has already been created in the TemplatePowerPoint.pptx; you can skip to step 2 if you do not have access to Microsoft PowerPoint or do not want to create a new slide-type at this time.
Note: The following screenshots are for Microsoft PowerPoint 2010
Open up TemplatePowerPoint.pptx in Microsoft PowerPoint. Click on the View tab in the ribbon then click on Slide Master.
In the Slide Master tab, click on Insert Layout to create a new slide layout.
Right-click on the new layout slide and select Rename Layout. Rename your layout slide to something you will remember, this name will be referenced later in FME.
Note: The Rename Layout option will not be available if you are not in the Master Slide view.
Next, on the Slide Master tab in the ribbon, select Insert Placeholder, then choose whichever placeholder you want. For FME purposes, the placeholder type doesn’t matter. Then add your placeholders to the layout slide however you like.
Note: To follow along with this tutorial, you will need a placeholder for a Title, Image, Table and a Chart, four placeholders in total.
Once you are satisfied with your layout slide switch to the Home tab on the ribbon, then click on Select > Selection Pane in the Editing group.
This opens the Selection and Visibility Pane where you can rename your placeholders. Rename each of the placeholders to something you can remember because these will also be referenced in FME.
Once you have renamed all of your placeholders, close the Master Slide and then save the template file as a regular PowerPoint file (.pptx).
2. Open Template Workspace
In FME Workbench, open the PowerPointWriter-6-Custom-Begin.fmwt workspace. This workspace is a condensed version of the previous workspaces we have been working on throughout this tutorial series. You can continue in a previous workspace if you desire, but please note that the instructions are written for the PowerPointWriter-6-Custom-Begin.fmwt workspace.
We are interested in creating a statistics slide for the Soup and Sandwiches food type. We will need a title, a table, a chart and an image. Most of the workspace has already been set up for us, we just need to add in the PowerPointStyler transformers.
3. Create Title
First, we will create our Title. Add a Creator transformer to the canvas and then connect a PowerPointStyler to it. In the parameters, change the Slide Type to Custom (Advanced). For the Layout Name, either set it to AdvancedDemo if you are using the TemplatePowerPoint.pptx or set it to whatever you named your new Layout Slide that was created in Step 1.
Now set the Placeholder ID to Title if you are using TemplatePowerPoint.pptx or whatever you named one of your Placeholders in Step 1. For the Type change it to Text, then click on the Edit… button under parameters.
In the Text Parameters dialog, set the Text to Soup and Sandwich Stats and click OK.
Since we will be adding multiple features (title, table, chart, and image) to our slide we will need to set Create Slide From to Multiple Features and then set the Slide Group Id to 1.
4. Run Workspace
When working with the Custom slide-type, it is a good idea to run the workspace to ensure that you have referenced the template PowerPoint correctly. If it isn’t referenced correctly, you will get an error in the translation log.
Connect the PowerPointStyler to the existing PowerPoint Writer and run the workspace. You can inspect your output PowerPoint file if you wish, but we were mostly testing to ensure we referenced the template PowerPoint correctly at this point. If you didn’t get an error message, continue with step 5. If you do get an error, double-check you are using the correct case-sensitive names to refer to your custom layout and your placeholder names. If you are using TemplatePowerPoint.pptx it should be AdvancedDemo as the Layout Name and either RightCorner, LeftCorner, BottomStretch, or Title as the Placeholder Id.
Note: If you are using your own template PowerPoint, you will need to change the Template PowerPoint parameter in the Navigator window.
5. Create Image
Now we will create an overview image of the city, add a PowerPointStyler after the RasterBandNodataSetter transformer in the Image bookmark. In the parameters, change the Slide Type to Custom (Advanced). For the Layout Name, set it to AdvancedDemo or whatever you set it to in step 3.
Next, set the Placeholder ID to RightCorner, set the Type to Text then click on the Edit… button under parameters. In the Image Parameters dialog, set the Image Source to From Feature and click OK.
Then set the Create Slide From to Multiple Features and set the Group ID to 1. Connect the PowerPointStyler_2 to the PowerPoint Writer.
6. Create Table
Next, we will create a table containing all of the businesses that are the Soup and Sandwich Food Type. Add a PowerPointStyler after the Tester in the Table bookmark. In the parameters, change the Slide Type to Custom (Advanced). For the Layout Name, set it to AdvancedDemo or whatever you set it to in step 3. Then set the Create Slide From to Multiple Features and set the Group ID to Group.
Next, set the Placeholder ID to LeftCorner, set the Type to Table then click on the Edit… button under parameters.
In the Table Parameters dialog, set the Table Style to Medium Style 2 Accent 1. Then for Column Header set it to FoodType and the Column Values to BusinessName and then click OK. Connect the PowerPointStyler_3 to the PowerPoint Writer.
7. Create Chart
Finally, we will create a bar chart showing how many Soup and Sandwich vendors are in each district. Add a PowerPointStyler after the ListBuilder transformer in the Chart bookmark. In the parameters, change the Slide Type to Custom (Advanced). For the Layout Name, set it to AdvancedDemo or whatever you set it to in step 3.
Next, set the Placeholder ID to BottomStretch, set the Type to Chart then click on the Edit… button under parameters. In the Chart Parameters dialog, set the Chart Type to Bar and Label Data to No. Ensure that Legend is unchecked. Then set the Categories to _list{}.District and set the Series Value to _list{}.District.total_count. Click OK to close the dialog.
Then set the Create Slide From to Multiple Features and set the Group ID to 1. Connect the PowerPointStyler_4 to the PowerPoint Writer.
8. Run the Workspace
Ensure that all the PowerPointStylers are connected to the PowerPoint Writer and then run the translation.
Inspecting the output PowerPoint, you should have one slide with all four elements on it.
Note: If when you open the completed PowerPoint and it is in Master View. Click the "Close Master View" button on the ribbon.
Data Attribution
The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.
Comments
0 comments
Please sign in to leave a comment.