NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically change Results Active Configuration

Solved!
Go to solution

I'm using TestStand 2012 SP1.  I'd like to be able to configure the Active Configuration for results in the process model.  A station running our sequential model would set the Sequential Reporting configuration as the active configuaration while a station running a Batch Model would set the Batch Reporting as the active configuration.  Furthermore, if a station can do both, the application run would select the proper process model and it would then select the proper reporting configuration.

 

I've got configurations setup but need to know how to set the active configuration.  I don't want this on a  per sequence basis, but rather at the process model level so it is run once and done.  This would allow for developers to modify their configuration but still have the Batch or Sequential Reporting selected depending on what they are working on.

 

Thanks.

0 Kudos
Message 1 of 5
(3,862 Views)
Solution
Accepted by topic author Sir_Mutt

So there are a couple options here:

  1. Override the ModelOptions plugin and change the parameter for ModelPluginConfigurationToLoad to be the correct configuration.
  2. Hard code it into that callback in ModelSupport.seq.  This way if an automation ever wanted to override the functionality and call their own they could.
  3. Hard code it into Initialize Execution Entry Point just before the ModelOptions Callback gets called in ModelSupport.seq.  This way the client can still override and change it if they want to.

If it were me I'd go with option 3 for your case.  You can use Parameters.ModelData.ModelType to determine which model they are running with.  Then you just have to set Locals.ModelPluginConfigurationToLoad to the correct configuration.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(3,851 Views)

Thanks,

 

I was hoping to not touch the ModelSupport.seq but doesn't look like any way around it.  This looks to work fine in my testing.

0 Kudos
Message 3 of 5
(3,811 Views)

Glad it helped.  Unfortunately there isn't a hook from a secondary model to a main process model.  You could put a sequence call in ModelSupport that called back into the process model.  Then in each model change the value returned.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 5
(3,805 Views)

Yes, we don't want it to be test sequence dependent.  Want it to deploy to test stations automatically and not allow developers to override to guarantee uniformity.

0 Kudos
Message 5 of 5
(3,799 Views)