Login Page - Create Account

Support Board


Date/Time: Wed, 30 Apr 2025 07:37:57 +0000



sc.UseTool Error

View Count: 63

[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)
{
  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
}
The same code works with DRAWING_LINE.
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
[2025-04-25 04:28:14]
Sierra_Chart Engineering - Posts: 19383
This will be solved in the next release.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account