Support Board
Date/Time: Tue, 26 Nov 2024 13:46:23 +0000
UseTool
View Count: 339
[2023-12-03 17:22:37] |
User895355 - Posts: 55 |
I currently have a custom tool that, on mouse click, draws a LineTool and multiple TextTools. Is there any way to "group" the Tools together so that when I "Erase Drawing" they delete as one, rather than having to delete each separately?
|
[2023-12-03 17:37:27] |
User719512 - Posts: 264 |
Keep track of all the IDs for the user drawings you create as a "group". On each loop in your code, at the end of the loop, run through your groups, and if any items is a group is no longer present, delete the others. See: GetUserDrawnDrawingByLineNumber UserDrawnChartDrawingExists DeleteUserDrawnACSDrawing Will prob need to use some persistent storage to a <list> (list of lists?) to manage your groups. |
[2023-12-04 05:18:01] |
User895355 - Posts: 55 |
Thank you for your response. I'm still trying to visualize this. Given that each of my custom drawings has 8 Tools/LineNumbers. As I place them on the chart and then go back to an earlier drawing, I don't see how "Erase Drawing" will know which set of LineNumbers to delete. Also, is "Erase Drawing" even exposed to ASCIL? I'll have to research/think on this some more.
|
[2023-12-04 21:29:30] |
User719512 - Posts: 264 |
You created the drawings, you know the IDs, you can store them (perhaps in a list). You need to scan your list, and for every drawing/Tool/LineNumber, call UserDrawnChartDrawingExists and see if one/some/all are missing? If one is missing, remove the others. For all removed (by your code, or the user) drawings...remove them from your tracking list.
|
[2023-12-04 23:09:17] |
User895355 - Posts: 55 |
Right, so what about the built-in "Erase Drawing"? It seems like I'll have to create my own "delete drawing" that I can customize to loop the list/Map
|
To post a message in this thread, you need to log in with your Sierra Chart account: