02-15-2023 03:48 PM
I open a subvi by clicking a button in the main vi. When I open it for the first time, the front panel controls are empty as I expect them. After completing the subvi it closes and vanishes. I donot save anything explicitly. However, when I open the subvi again from the main vi, without exiting from the main vi, it opens in the state I closed it the last time I used it. Is there something I have to do programmatically to reset the controls before closing the subvi?
Thank you.
Girish
02-15-2023 04:21 PM
Because your sub VI is a dependency of the main VI, it remains in memory as long as the main VI is in memory. Thus, even though the sub VI's front panel closes, it is still in memory, and retains its state, including the values of the controls.
You probable want to use this: