Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 22:12:50 +0000



Post From: Saving Subgraph.DrawStyle to a variable to be updated within ACSIL study

[2023-10-19 23:42:37]
ForgivingComputers.com - Posts: 960
//Here is an example to illustrate what I'm trying to achieve:

if (sc.SetDefaults)
{

Subgraph_01.Name = "01";
Subgraph_01.DrawStyle = DRAWSTYLE_DASH;

return;

}

// Do Processing


SET A VAR as my_Drawstyle

// Save Original DrawStyle
int Orig_DrawStyle;
if (sc.Index == 0)
  Orig_DrawStyle = Subgraph_01.DrawStyle;  

if(Set_Drawstyle == 1)
{
//Subgraph_01.DrawStyle = DRAWSTYLE_POINT; ... This would lose, or change the default.
my_Drawstyle = DRAWSTYLE_POINT;
}
else if(Set_Drawstyle == 2)
{
//Subgraph_01.DrawStyle = DRAWSTYLE_HIDDEN; ... This would lose, or change the default.
my_Drawstyle = DRAWSTYLE_HIDDEN;
}
else
{
  // Use the saved value of the default drawstyle
  my_Drawstyle = Orig_DrawStyle; // This would reset my Subgraph_01.DrawStyle parameters to the default setting.
}

// Now set Subgraph_01.DrawStyle to the selected DrawStyle.

Subgraph_01.DrawStyle = my_Drawstyle;


Date Time Of Last Edit: 2023-10-19 23:50:56