Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
LuisMa
Contributor II
Contributor II

Macro to turn Auto Minimize on/off

Hello!

This is my first question in this community. Sorry in advance if I make any formatting mistake.

I hope someone can help me with this: I have 4 buttons in my report, each one of them changes the way the user can view the charts.

1st button: "Maximizes" all charts, allowing the user to see only 1 chart at a time (in any given sheet).

2nd button: splits all charts and resizes them so the user can compare 2 charts. This button splits the charts vertically.

3rd button: splits all charts and resizes them so the user can compare 2 charts. This button splits the charts horizontally.

4th button: splits all charts and resizes them so the user can compare 4 charts.

 

So far, this works well but...

All charts have the option "Auto Minimize" turned ON. Yes, I can turn it off for every single chart but in case the user is viewing the info one chart at a time (with the first button), charts could get one in front of another.

 

What I want to know is:

Is  there a property of the object to turn auto minimize on/off through macro?

 

 

So far I've tried things like:

set xObject = ActiveDocument.GetSheetObject("Tick_Ch_TickM")
xObject.autominimize = false  

But had no success.

 

Thanks in advance! I don't think I need to share the file, because all I want is to turn on/off autominimize for a chart, through a macro.

 

Labels (3)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Example code from the API Guide:

rem ** Set auto-minimize flag for a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
gp.GraphLayout.Frame.AutoMinimize = true
g.SetProperties gp

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Example code from the API Guide:

rem ** Set auto-minimize flag for a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
gp.GraphLayout.Frame.AutoMinimize = true
g.SetProperties gp

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

LuisMa
Contributor II
Contributor II
Author

Worked like a charm!

Thank you, Rob.

In case I need to set another object property with macros and don't want to bother the community with another post, where could I find a list with the property code names?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The current API Guide should  be downloadable here https://help.qlik.com/en-US/qlikview-developer/November2018/Content/QV_HelpSites/APIsAndSDKs.htm under "QlikView COM API reference". However, this link downloads an old V10 document.  I've reported the problem in a feedback. 

In the meantime, I'm attaching the V11 doc which is the latest I have. 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

LuisMa
Contributor II
Contributor II
Author

Thanks again, Rob!
Kind regards,