Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi .
I have this code to create a table:
set Graph = ActiveDocument.Sheets("Main").CreateStraightTable
id = Graph.GetObjectId
msgbox "Chart Name = " & id
, so I know the chart ID ( say "Document\CH07) , but I want to rename it to CH01. I suspect this my be through the getproperties, but assistance please!
The macro is similar to this:
sub changeID
rem ** Change unique ID of a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
GP.GRAPHLAYOUT.Frame.ObjectId = "MyChart"
g.SetProperties gp
end sub
You can also check my attachment.
(After you click, the ID will change, the second time it will fail, ok?)
Regards,
Erich
The macro is similar to this:
sub changeID
rem ** Change unique ID of a chart **
set g = ActiveDocument.GetSheetObject("CH01")
set gp = g.GetProperties
GP.GRAPHLAYOUT.Frame.ObjectId = "MyChart"
g.SetProperties gp
end sub
You can also check my attachment.
(After you click, the ID will change, the second time it will fail, ok?)
Regards,
Erich
Many thanks Eric, this is exactly what I needed!
Is there a reference document (or the api) avauilable where I can find details of the object properties?
Yes, you can use the API Guide.qvw
It's located at:
C:\Program Files\QlikView\Documentation
You can also read the QV Automation reference.pdf.
There is a lot of examples in the .qvw
I think it`s not so clear how to follow it... for example, when i used:
.GRAPHLAYOUT
You get get more details by understanding the object iGraphLayout and so on...
Hope this helps,
Erich