Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Set Object ID using Macro

HI everyone,

I have written following macro for creating new chart

sub Create_Chart


set Graph = ActiveDocument.Sheets("Main").CreateLineChart
Graph.AddDimension "OrderDate"
Graph.AddExpression "sum({BM1}Total)"


end sub

But i dont know how can i set or change the object id of this chart...

If anyone can help me, that will be a valuable help to me..

Thanks in advance..

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
1 Solution

Accepted Solutions
Not applicable

Hi,

Add the following to your macro, it should do the trick

Dim gProps

gProps = Graph.GetProperties

gProps.GraphLayout.Frame.ObjectID = "NewChart"

Graph.SetProperties gProps

Thanks

Nick



View solution in original post

4 Replies
Not applicable

Hi,

Add the following to your macro, it should do the trick

Dim gProps

gProps = Graph.GetProperties

gProps.GraphLayout.Frame.ObjectID = "NewChart"

Graph.SetProperties gProps

Thanks

Nick



kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Hi NIck,

Thanks for your valuable help..

It worked for me..

Hey NICK i want to ask you one more thing is API guide is available in PDF format... ?

If yes pls let me know the Download link..

Thanks

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable

Hi,

As far as I am aware there is no PDF version of the API Guide. There is a pdf reference that is installed with the SDK but it is not as in depth.

Thanks

Nick

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP
Author

Thanks NIck for your valuable time and support..

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!