Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 21:37:41 +0000



Post From: New to SC! Help with horizontal line

[2024-02-10 19:24:20]
User504477 - Posts: 26
The following code doesn't draw any lines. What am I missing?

for (const auto& val : calcs["ES_F"])
{
int& r_LineNumber = sc.GetPersistentInt(1);

s_UseTool Tool;

Tool.ChartNumber = sc.ChartNumber;
Tool.DrawingType = DRAWING_HORIZONTALLINE;
Tool.DisplayHorizontalLineValue = 1;
Tool.Region = 0;
Tool.LineStyle = LINESTYLE_DASH;

if (r_LineNumber != 0)
Tool.LineNumber = r_LineNumber;

Tool.BeginValue = val;
Tool.Color = RGB(255, 0, 255); // Magenta
Tool.LineWidth = 1;
Tool.AddMethod = UTAM_ADD_OR_ADJUST;

sc.UseTool(Tool);

r_LineNumber = Tool.LineNumber;//Remember line number which has been automatically set
}
Date Time Of Last Edit: 2024-02-10 20:58:05