Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Contributor II

Macro that shows Dimension of a chart

Hello QlikView Community,

I am trying to develop a macro that shows some property of a chart.

It works great for expressions, but i can't get it to work to display what is the dimension.

I used the API Guide QVW to find out most of the properties, but i can't find anything that shows the Dimension.

Can someone help me please? I attached my example file.

Here is the Macro I use:

sub chartinfo()

    'Display Object Name

    set obj = ActiveDocument.GetSheetObject("CH01")


    'Count number of Expressions

    set chart = ActiveDocument.GetSheetObject("CH01")

    set cp = chart.GetProperties

    x = cp.Expressions.Item(0).Count

    msgbox x


    'Expression and Expression Label

    set chart = ActiveDocument.GetSheetObject("CH01")

    set p = chart.GetProperties

    set expr = p.Expressions.Item(0).Item(0).Data.ExpressionData

    msgbox expr.Definition.v '= "sum(Amount)"

    set expr = p.Expressions.Item(0).Item(0).Data.ExpressionVisual

    msgbox expr.Label.v '= "Sales"



    set dims = p.Dimensions

    msgbox dims(0).Title.v

    msgbox dims(0).Comment.v

    'how can i get the actual dimension field?

end sub

Regards from Germany,


I attached my qvw Nachricht geändert durch Fabian Heidenstecker

Tags (3)
1 Reply
Honored Contributor III

Re: Macro that shows Dimension of a chart

Hi Fabian,

Requesting you to share your application.



Community Browser