Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 20:57:18 +0000



Post From: Iterating over user drawn chart objects

[2014-04-08 11:09:07]
onnb - Posts: 661
Can I use GetChartDrawing to iterate over user drawn chart objects?

Can I do something like this?

s_UseTool drawing;
while (sc.GetChartDrawing(0, DRAWING_LINE, drawing, 0) != 0)
{
// do something
}
If not, is there a way to iterate over user drawnings?


And some questions about the docs/api

1. "Note that when chart drawings are returned through this function, the DrawingType member is set and not the Tool member." - not clear on what circumstances the drawing variable above would not be filled.

2. The docs say on one hand "Only user drawn drawings can be retrieved. Not drawings added by Advanced Custom Studies."

and on the other "The ChartDrawing.LineNumber parameter member is set after calling this function and if a chart drawing is returned. Since user drawn chart drawings have a LineNumber of 0, you can see the last user inputed text by finding the last text with a line number of 0."

I'm not sure from this if the method returns acsil + user drawings or just user drawings. If it return only user drawings, why the comment on testing the LineNumber?
Date Time Of Last Edit: 2014-04-08 11:09:34