This article includes a code sample for moving each visualization to a separate page.
Introduction
This example shows how to "flatten" a DXP layout, so that each visualization is placed on a separate page. The example is part of a larger example on how to display a single visual from a page in a JavaScript mashup.
JavaScript mashup example
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. # Get a list of all pages in the original layout allOrigPages = [] for page in Document.Pages: allOrigPages.append(page) # Move each visual to a new page and then delete the original page once the visuals have been moved for page in allOrigPages: for viz in page.Visuals: newPageTitle = page.Title + '=' + viz.Title newPage = Document.Pages.AddNew(newPageTitle) Document.Pages.MoveVisualTo(viz,newPage) Document.Pages.Remove(page)
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.