Support Board
Date/Time: Wed, 12 Mar 2025 21:25:53 +0000
Post From: possible bugs? 2 things - sc.GetLineNumberOfSelectedUserDrawnDrawing - @ usetool issue
[2022-05-04 19:15:38] |
JohnR - User831573 - Posts: 319 |
For those following along. My quest started here. Cut drawing object-2 items->1 UI & 1 ACSIL - one general tool request - One Doc update I've made progress. For the "Cut" - when dealing with pitchforks, SC uses Tool.FourthIndex as the value of the bar # for the cut to take place. Placing a PF on the chart, set up some code to "get drawing by line #, step step some code and look at data returned into Tool structure. return to UI, Cut the drawing, repeat debug to see updated data in Tool. On each new cut, FourthIndex did change to the bar # confirmed on the screen as the end of tool visually. On to the next steps. I changed my test code. It still "gets by line #" the desire object, again confirmed by looking at structure in debugger. I change the value of Tool.FourthIndex, Then call JOR_Success = UseTool (Tool).; Stepping through the code I see I change the value and the UseTool call is successful, but the object on the screen does not move the cut point. verified by message log. Chart: ESM22_FUT_CME[M]/MESM22_FUT_CME[M] 5 Min #1 | Study: JOR Get Existing Pitchfork | Start of Event Code of JOR_DGL | 2022-05-04 14:26:55.460 * Chart: ESM22_FUT_CME[M]/MESM22_FUT_CME[M] 5 Min #1 | Study: JOR Get Existing Pitchfork | PitchFork >>> -12 <<< Fourth index--> 710 | 2022-05-04 14:26:55.461 * Chart: ESM22_FUT_CME[M]/MESM22_FUT_CME[M] 5 Min #1 | Study: JOR Get Existing Pitchfork | PF#-> -12 4th Idx-> 720 Success-> 1 | 2022-05-04 14:26:55.461 * Chart: ESM22_FUT_CME[M]/MESM22_FUT_CME[M] 5 Min #1 | Study: JOR Get Existing Pitchfork | PF#-> -12 4th Idx-> 690 Success-> 1 | 2022-05-04 14:26:55.461 * Chart: ESM22_FUT_CME[M]/MESM22_FUT_CME[M] 5 Min #1 | Study: JOR Get Existing Pitchfork | PF#-> -12 4th Idx-> 740 Success-> 1 | 2022-05-04 14:26:55.461 * Documentation states to set Tool.AddMethod = UTAM_ADD_OR_ADJUST; and only change the fields/properties you want to change. DOC -> Set the other members of the s_UseTool structure that you want to modify. The structure members that you do not want to change need to be left unset. For more information, refer to AddMethod. If the drawing is adjusted, then only the s_UseTool structure members specified will be updated in the existing Chart Drawing, the others will be left as is. Another thing I have not been able to solve, is the function JOR_LineNum = sc.GetLineNumberOfSelectedUserDrawnDrawing(). What state of things constitutes a selected drawing? How do I get a line # to be returned. I have tried left / right / click / press and hold / release button. I have tried both within debugger and without, as the pointer switches back and forth as I step in code, thinking that might be the issue. I have also tried all 3 receive pointer event types. I do see the property Tool.IsSelected, but I am not sure how to use that. My code in its current state has the get selected line function commented out, to work on one issue at a time. Anyone - pointers (pun intended), help or knowledge would be greatly appreciated. JohnR |
![]() |