Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

Visualization Area Size

#Get page visualization area size
visualizationAreaSize=Document.ActivePageReference.GetVisualizationAreaSize() 
print visualizationAreaSize.Height, visualizationAreaSize.Width

#Get visual bounds of active visualizaton
viz = Document.ActivePageReference.ActiveVisualReference
visualBounds=Document.ActivePageReference.GetVisualBounds(viz)
print visualBounds

#Toggles the visualization area size between 1200x1080 and fit to window
from System.Drawing import Size
height=1390
width=1030
Document.Pages.VisualizationAreaSize.Size = Size(height,width)
fitToWindow=Document.Pages.VisualizationAreaSize.FitToWindow
Document.Pages.VisualizationAreaSize.FitToWindow = not fitToWindow




1 comment:

Arthur said...

Hello,

Hope someone can help me on this.

I'm trying to achieve something quite similar to this. Where I want to set the size of a specific visual through scripting. I need 1 of my visuals to be a fixed width.

Cheers Arthur