Issue with using QuantSubcribe with proc or foreach for TCL script control

Hi,
I am looking to try and automate running simulations using the script manager and TCL however I am having some issues! I am trying to run a sweep of a variable and log some quantities however when I utilise proc or foreach in order to try and conduct the sweep I can only use the default subscribed quantities no matter where I have QuantSubscribe. I have tried a number of things

  • Placing Quantsubscribe outside the function
  • Placing Quantsubscribe inside the function
    • Only using a function with no loop
    • Only using a loop with no function

I have managed to get the Quantsubscribe to work when I am not using Proc or Foreach but as soon as I try to utilise either it no longer subscribes to the quantity. Any help would be much appreciated