Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 06:49:29 +0000



Post From: Detect if Chartbook is Open from ACSIL

[2024-01-03 04:14:01]
User462086 - Posts: 196
I ended up using a global variable that was set by a study in the "child" chartbook after it was opened, and checked by a study in the "parent" chartbook. Both studies needed to be in the same file. There are plenty of posts on this support board regarding "global variables" if you get stuck.

For my use case, it was enough to increment an integer, but an SCString could also probably be stored in a global variable (not tested) & then compared with the name of the chartbook just opened. Psuedo-code would be something like:

SCString global_ChartbookName = "";

ParentStudy{
// 1) open chartbook with name "chartbookName"
// 2) on subsequent code executions,
// - check global variable for value
// - if value exists, check for match with "chartbookName"
// - if match, do something...
}

ChildStudy{
// set global variable to chartbook's name
}