Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 23:50:58 +0000



[User Discussion] - Updating text drawings drawn by sc.AddAndManageSingleTextUserDrawnDrawingForStudy()

View Count: 546

[2020-12-30 08:39:50]
ycomp - Posts: 274
I use this function sc.AddAndManageSingleTextUserDrawnDrawingForStudy() and it works well.

I do have one small problem. If I hide the study then the drawing object is not erased. If I think enable another copy of this study, the drawing object will still be the old one until I go and explicity delete the old text drawing from the Manage Drawings dialog.

Another example of this problem is if edit the text location in the inputs (I have inputs for these in my study, which are used by sc.AddAndManageSingleTextUserDrawnDrawingForStudy() for the location where to draw it) then hit Apply, it will not move the drawing from the old location. It will stay in the old location even though I specified new location in the inputs. Likewise if I hit Ok the same thing happens.

It is not until I delete the text drawing from the Manage Drawings dialog that the Text will then afterwards immediately be drawn in the new location.

Any ideas how to solve this problem? thanks

I think part of the answer I need to know is how to remove the drawing object created by sc.AddAndManageSingleTextUserDrawnDrawingForStudy() when a study is hidden
Date Time Of Last Edit: 2020-12-30 17:21:43
[2020-12-31 16:08:03]
JohnR - User831573 - Posts: 300
Hey YCOMP, I am not a pro at ACSIL but there is an SC call that will let you know if a study is hidden or visible.

https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html

sc.GetStudyVisibilityState()

Type: Function

int GetStudyVisibilityState(int StudyID);

The sc.GetStudyVisibilityState() function returns 1 if the study specified by the StudyID parameter is visible, or 0 if it is set to be hidden.

Parameters
StudyID: The unique ID of the study to get the visibility state of. For more information, refer to Unique Study Instance Identifiers.

Hope this helps.

JohnR
Date Time Of Last Edit: 2020-12-31 16:08:41
[2021-01-03 10:19:41]
ycomp - Posts: 274
I sidestepped the problem by switching to AddAndManageSingleTextDrawingForStudy()

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

Login

Login Page - Create Account