Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chrweber
Creator
Creator

I require an answer to locked discussion: macro dimension

Macro that shows Dimension of a chart

How can I access the DimensionExpression

Best Regards

6 Replies
sunny_talwar

May be this

vDimension = ActiveDocument.Evaluate("GetObjectField(0, 'CH01')")

msgbox vDimension

Updated the dashboard from that thread to show how it will work.

chrweber
Creator
Creator
Author

And how can I set the dimenson via macro?

I require the actual field that contains dimension string.

Von meinem Samsung Galaxy Smartphone gesendet.

sunny_talwar

I require the actual field that contains dimension string.

Not sure I understand this?

chrweber
Creator
Creator
Author

I have to define, edit the dimension of a chart using com interface, or VBA.

The sample provided in the discussion shows how to access editable field in charts, i.e. title.

The actual dimension is nowhere to be found.

I would have expected Totalstring to be the field I require, as the docu suggest s as much, but that field is empty.

Von meinem Samsung Galaxy Smartphone gesendet.

chrweber
Creator
Creator
Author

Yay, I Found the solution. And I must complain, that the necessary information is horribly hidden:

The Path is

$dimension.PseudoDef().Name ="123"

I found it by checking the generated  xml files of the *-prj folder

sunny_talwar

Superb