Login Page - Create Account

Support Board


Date/Time: Fri, 13 Jun 2025 09:36:27 +0000



[Programming Help] - guidance - any experience with multiple draw objects with same line #

View Count: 423

[2022-11-02 21:41:06]
JohnR - User831573 - Posts: 333
According to doc around line # for drawings, it states
It is not considered acceptable practice to use the same LineNumber for different Chart Drawings added by the sc.UseTool function.

but further down, there is a function --> sc.DeleteUserDrawnACSDrawing()

Multiple Chart Drawings can be deleted if they use the same LineNumber. All chart drawings with the same LineNumber will be deleted from the chart.

It states - LineNumber: [Type: Integer] The LineNumber of the Chart Drawings to delete. >>>>Drawings is plural - confirming one to believe it can be multiple drawing objects with the same line #.

S O O !!!

I am going to code something up, which will add some lines n stuff to a chart as a visually combined object. I plan to give each drawn object with in an instance of a combined object the same line # . a Way for me to retrieve all part of the "visual object" via getting the line # of just one part.

Since the docs state, it is not a good practice - I have some questions.
1 - What are the down sides to using the same line # for multiple objects?
2 - Is it possible to have the same line # for different drawing type.-- like lines, extended lines pitchforks? or others
3 - Is there downside to having non sequential line #s, Ex 1, 2, 3, 508, 1001, 1002, 1003, 100508
3a - Is it safe to expect all user drawings will be negative line #s EX -52, -5, -348
4 - How challenging in ASCIL would it be to be notified when an object has been selected for deletion or has just been deleted. preferably from either - using delete key or right click popup menu.
4a - if not, I can create a control_bar button, and capture it press/down state, then look for a mouse click, select an object, If it is one I care about, then do some process/code with my associated objects, and then, my code delete the selected user drawn object with ACSIL code.

Any suggestions, landmines to avoid, or other help is appreciated.
JohnR
Date Time Of Last Edit: 2022-11-02 22:05:21

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

Login

Login Page - Create Account