Login Page - Create Account

Support Board


Date/Time: Wed, 19 Mar 2025 14:33:25 +0000



Post From: When I adjust user drawn drawing with UseTool, it changes the drawing appearance

[2021-11-18 11:21:20]
tomna1993 - Posts: 24
I ran into a problem with UseTool. I draw retracement on chart with UseTool and when I modify the BeginIndex, EndIndex, BeginValue or EndValue it changes one of the grid level (-33%) appearance. That grid level will change its thickness to 25 from 1 (see attached picture).

Here is the code with I draw and modify the drawing:
int DrawEntryGrid(SCStudyInterfaceRef sc, int EntryGridLineNumber, float EntryGridBeginValue, float EntryGridEndValue, int EntryGridBeginIndex, int EntryGridEndIndex)
{
s_UseTool Grid;
Grid.Clear();
Grid.ChartNumber = sc.ChartNumber;
Grid.Region = sc.GraphRegion;

if(EntryGridLineNumber != 0)
Grid.LineNumber = EntryGridLineNumber;

Grid.AddAsUserDrawnDrawing = 1;

Grid.AddMethod = UTAM_ADD_OR_ADJUST;

Grid.DrawingType = DRAWING_RETRACEMENT;
Grid.UseToolConfigNum = 10;

Grid.BeginIndex = EntryGridBeginIndex;
Grid.BeginValue = EntryGridBeginValue;
Grid.EndIndex = EntryGridEndIndex;
Grid.EndValue = EntryGridEndValue;

sc.UseTool(Grid);

return Grid.LineNumber;
}

I save the LineNumber in persistent variable after returning to be able to modify the drawing.
imagefirst_drawing.png / V - Attached On 2021-11-18 11:20:50 UTC - Size: 21.7 KB - 151 views
imagemodified_drawing.png / V - Attached On 2021-11-18 11:20:57 UTC - Size: 18.52 KB - 154 views