My Account     Contact Us     Cart

Updating Multiple MAPublisher Templates with FME Auto

Drawing inspiration from this Safe software blog post we have developed an FME workflow that allows the user to update multiple MAPublisher templates with additional layers using two workspaces and a workspacerunner transformer.

The folder structure for the project follows one possible standard arrangement. A data folder contains the shapefile that is being added to the existing .ai files. An output folder gathers the intermediate .ffs files generated by FME that pass the data to MAPublisher. The templates folder contains the .ai files that will have the layer added to them. Finally the workspaces folder contains the two workspaces required for the transformation.

Folder Structure
Data Files
Output Files
Templates Files
Workspaces Files

The runner workspace uses a path reader to get the filenames and paths of the .ai files. A filter is applied to make sure only files with the extension “.ai” are read. After the path reader an attribute creator adds the path for the output .ffs files as an attribute. This is dynamically calculated based on the filenames of the input .ai files.

Runner Workspace
(Click for larger version)
Attribute Creator
(Click for larger version)

The full paths to the template files and the paths to the output ffs files are passed as published parameters to the worker workspace. Two published parameters have been created in the worker workspace and linked to parameters in the MAPublisher writer. This allows the writer to take the values passed from the runner workspace. The worker workspace is run once for every file that is in the folder of ai files, and these published parameters update dynamically for each one.

Published Parameters in the Worker Workspace
Workspacerunner Parameters
(Click for larger version)

The worker workspace has a shapefile reader that reads in the layer that is going to be added to each template. At this point multiple readers or other transformers could be added to increase the complexity of the transformation.

Worker Workspace
(Click for larger version)

When the runner workspace is launched each template is opened up, the shapefile is read and added to a new MAPView in the MAPublisher document. Equally it could be added to an existing MAPView with a matching coordinate system. These documents can be left open as shown here, or with the addition of another published parameter new output .ai files could also be specified.

Output AI Files
(Click for larger version)

Useful Resources

Example files (Adobe Illustrator CC2104 and FME Desktop 2015)


Leave a Reply





Blog Archive

October 2024 (1)
September 2024 (2)
August 2024 (2)
July 2024 (2)
June 2024 (1)
May 2024 (2)
April 2024 (2)
March 2024 (2)
February 2024 (1)
January 2024 (1)
December 2023 (1)
November 2023 (2)
October 2023 (2)
September 2023 (1)
August 2023 (1)
July 2023 (3)
June 2023 (1)
February 2023 (1)
January 2023 (2)
December 2022 (1)
November 2022 (2)
October 2022 (2)
September 2022 (1)
May 2023 (1)
August 2022 (2)
July 2022 (1)
June 2022 (2)
May 2022 (1)
February 2022 (1)
January 2022 (2)
August 2022 (1)
December 2021 (3)
November 2021 (5)
October 2021 (1)
September 2021 (3)
August 2021 (2)
July 2021 (1)
June 2021 (2)
May 2021 (2)
April 2021 (2)
March 2021 (3)
April 2021 (1)
February 2021 (1)
January 2021 (1)
November 2020 (1)
October 2020 (1)
June 2020 (2)
May 2020 (1)
April 2020 (3)
March 2020 (2)
December 2019 (1)
November 2019 (2)
September 2019 (1)
August 2019 (1)
July 2019 (1)
June 2019 (3)
May 2019 (4)
April 2019 (2)
March 2019 (1)
February 2019 (2)
January 2019 (3)
December 2018 (2)
November 2018 (1)
October 2018 (1)
September 2018 (2)
August 2018 (4)
July 2018 (2)
June 2018 (1)
July 2018 (1)
June 2018 (4)
May 2018 (1)
April 2018 (2)
March 2018 (4)
February 2021 (1)
February 2018 (1)
January 2018 (1)
November 2017 (1)
October 2017 (2)
August 2017 (2)
July 2017 (1)
March 2017 (1)
February 2017 (2)
January 2017 (2)
November 2016 (1)
January 2017 (1)
November 2016 (1)
October 2016 (2)
May 2016 (1)
March 2018 (1)
April 2016 (2)
December 2015 (2)
June 2015 (1)
May 2015 (1)
April 2015 (2)
December 2014 (4)
October 2014 (2)
May 2014 (4)
February 2014 (1)
October 2013 (3)
April 2013 (1)
January 2013 (2)
August 2012 (1)
October 2012 (1)
July 2012 (3)
May 2012 (2)
January 2012 (2)
August 2011 (1)
July 2011 (2)
June 2011 (2)
May 2011 (2)
March 2011 (1)
February 2011 (1)
January 2011 (5)
December 2010 (1)
November 2010 (1)
December 2010 (1)
November 2010 (1)
October 2010 (1)
August 2010 (4)
July 2010 (2)
June 2010 (3)
May 2010 (2)
April 2010 (2)
March 2010 (2)