Support Board
Date/Time: Wed, 30 Apr 2025 11:12:23 +0000
Post From: sc.UseTool Error
[2025-04-24 23:48:26] |
ForgivingComputers.com - Posts: 1052 |
This fails to add the text to the drawing: https://www.sierrachart.com/image.php?Image=1745538433767.png SCSFExport scsf_DrawNonUserRayWithText(SCStudyInterfaceRef sc)
The same code works with DRAWING_LINE.{ if (sc.SetDefaults) { sc.GraphName = "Draw Non-User Ray with Text"; sc.AutoLoop = 0; return; } s_UseTool Tool; Tool.Clear(); Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_RAY; Tool.BeginIndex = sc.ArraySize - 20; Tool.BeginValue = sc.Close[sc.ArraySize - 20]; Tool.EndIndex = sc.ArraySize - 1; Tool.EndValue = sc.Close[sc.ArraySize - 1]; Tool.Color = RGB(255, 0, 0); Tool.LineWidth = 2; Tool.Text = "Ray"; Tool.AddAsUserDrawnDrawing = 0; Tool.Region = 0; sc.UseTool(Tool); // Draw the ray } https://www.sierrachart.com/image.php?Image=174553835614.png Similar issue with DRAWING_ARROW. Date Time Of Last Edit: 2025-04-24 23:50:45
|