Support Board
Date/Time: Fri, 23 May 2025 17:07:34 +0000
Visual Studio custom studies development
View Count: 70
[2025-05-22 20:17:40] |
User20615 - Posts: 21 |
Hello, I have two questions regarding Sierra Chart custom studies development (ACSIL development). • In my studies I often add items to Chart Shortcut Menu (sc.AddACSChartShortcutMenuItem function). When building DLL, I use Sierra Chart functionality to unload locked study DLL file – I can build without having to close and reopen Sierra Chart (menu Analysis > Build Custom Studies DLL > Build > Release All (Single) DLLs and Deny Load). DLL is unloaded and reloaded (Allow Load DLLs) without issues. Unfortunately, after build all my custom Chart Shortcut Menu items disappear. I have to remove studies from all charts and add studies back or reload the Chartbook to get my menu items back. Is there faster way to restore these menu items after process of DLL unloading - building - reloading? • For development I use Microsoft Visual Studio debugger. In Auto/Locals/Watch window I can display content of all variables and C++ arrays (syntax “MyArray[10]”, “MyArray,20”, “My Array+10,100”,…). But this syntax does now work for Sierra Chart built in subgraphs and arrays (SCSubgraphRef, SCFloatArrayRef,…). My question is, how to directly display values at index of these arrays in VS debugger (without creating special variables just for debugging purpose e.g. float MyStop = Stop[sc.Index])? Thank you very much, regards Jan |
[2025-05-22 22:57:44] |
Sierra_Chart Engineering - Posts: 19684 |
In my studies I often add items to Chart Shortcut Menu (sc.AddACSChartShortcutMenuItem function). When building DLL, I use Sierra Chart functionality to unload locked study DLL file – I can build without having to close and reopen Sierra Chart (menu Analysis > Build Custom Studies DLL > Build > Release All (Single) DLLs and Deny Load). DLL is unloaded and reloaded (Allow Load DLLs) without issues. Unfortunately, after build all my custom Chart Shortcut Menu items disappear. I have to remove studies from all charts and add studies back or reload the Chartbook to get my menu items back. Is there faster way to restore these menu items after process of DLL unloading - building - reloading?
We think the problem is you are calling this:sc.RemoveACSChartShortcutMenuItem When this is true: sc.LastCallToFunction This is something you need to solve in your own study function. We do not know: • For development I use Microsoft Visual Studio debugger. In Auto/Locals/Watch window I can display content of all variables and C++ arrays (syntax “MyArray[10]”, “MyArray,20”, “My Array+10,100”,…). But this syntax does now work for Sierra Chart built in subgraphs and arrays (SCSubgraphRef, SCFloatArrayRef,…). My question is, how to directly display values at index of these arrays in VS debugger (without creating special variables just for debugging purpose e.g. float MyStop = Stop[sc.Index])?
Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-05-23 09:03:03] |
User20615 - Posts: 21 |
I have made quick tests, there is no difference with or without sc.RemoveACSChartShortcutMenuItem call when sc.LastCallToFunction is true – in both cases custom menu items disappear after build. Thank you for helping me. |
[2025-05-23 10:44:23] |
User431178 - Posts: 687 |
I have made quick tests, there is no difference with or without sc.RemoveACSChartShortcutMenuItem call when sc.LastCallToFunction is true – in both cases custom menu items disappear after build.
Are you also resetting the persistent variables used to store the menu item IDs? For development I use Microsoft Visual Studio debugger. In Auto/Locals/Watch window I can display content of all variables and C++ arrays (syntax “MyArray[10]”, “MyArray,20”, “My Array+10,100”,…). But this syntax does now work for Sierra Chart built in subgraphs and arrays (SCSubgraphRef, SCFloatArrayRef,…). My question is, how to directly display values at index of these arrays in VS debugger (without creating special variables just for debugging purpose e.g. float MyStop = Stop[sc.Index])?
Look into natvis, you can use it to provide the debugger with information about custom classes etc. |
[2025-05-23 14:41:53] |
User20615 - Posts: 21 |
Good point, I wasn't doing that, sc.ClearAllPersistentData() solved my menu problem, thank you very much!
|
To post a message in this thread, you need to log in with your Sierra Chart account: