NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

StationGlobals.ini has been modified outside of the sequence editor do you want to reload it

 

 

As my subject says, I have heavily modified the uutdlg.c and modelpannels.uir because I need to have StationGlobals.ini with different uut part numbers. Is there a way to programmatically do this so that my operators will not have to respond to this prompt?

 

 

Thanks in advance

 

Michael

0 Kudos
Message 1 of 9
(4,517 Views)

Can you describe what you are doing to StationGlobals.ini in those modifications?  There might be a better approach.

0 Kudos
Message 2 of 9
(4,513 Views)

Changing the uut part number

0 Kudos
Message 3 of 9
(4,510 Views)

Can you describe how you are doing this?  UUT Part Number is not a default variable set in here.  Are you modifying the file directly?  Are you using the TestStand API to change it?

0 Kudos
Message 4 of 9
(4,507 Views)

 AllenP Wrote: Can you describe how you are doing this? I have heavily modified the uutdlg.c and modelpannels.uir because I need to have StationGlobals.ini with different uut part

 

 

AllenP Wrote: Are you modifying the file directly? Yes

 

AllenP Wrote: Are you using the TestStand API to change it? No

0 Kudos
Message 5 of 9
(4,502 Views)

Can you give any more detail on how you are actually modifying the file?  Are you forcing it to be saved?  Are you changing the ini file directly?  If you are just using the TestStand API to modify a Station Global, you would not get this dialog.  I would recommend investigating why this is happening rather than trying to work around the problem.  It may be as simple as the file being saved in the dialog (which is not necessary if you are using the same Engine to modify the values).

 

However, if you wish to disable this option, you can set the ApplicationMgr.AutomaticallyReloadModifiedFiles property.  You would have to get the ApplicationMgr ...

0 Kudos
Message 6 of 9
(4,496 Views)

AllenP wrote: Can you give any more detail on how you are actually modifying the file? I open the ini file in "C" parse till I find the part number key. if it doesn't match what the operator clicked on I reopen the file and save it. I'm using TestStand 3.0 and I have tried to find an examples of how to do this with the TestSand API with no luck. The examples I have found aren't compatibale with 3.0 & can't up grade company will not pay for it.

0 Kudos
Message 7 of 9
(4,480 Views)

If you are using 3.0, the suggestion about using ApplicationMgr will not work as the 3.0 Sequence Editor did not use this control.

 

The best way to avoid the problem is to use the API to change the variable values.  I would not recommend directly editing the INI file.  Instead, you will need a SequenceContext passed into your code.  If you have modified the default model code, chances are a SequenceContext was passed in to the entry point you are using.  From there, you will need to call SetValNumber or SetValString or similar function to set the value you wish.  That API was available in 3.0 and will allow you to not have to save the StationGlobals.ini file.  If you are having trouble, a small example or description of the problem you are getting would be helpful.

0 Kudos
Message 8 of 9
(4,468 Views)

 

 

I figured it out.  A simple example would have helped ie:

 

  int      error = 0;
  ERRORINFO    errorInfo;
  ErrMsg   errMsg = {'\0'};
    
    int flag = 0;
    char *stringVal = NULL;
               
    tsErrChk (TS_PropertyGetValString(context, &errorInfo, "StationGlobals.MYUUT_PN", 0, &stringVal));

 

   if ( strcmp(stringVal,stringFromPanel) != 0 )

           tsErrChk (TS_PropertySetValString(context, &errorInfo, "StationGlobals.MYUUT_PN", 0, stringFromPanel));

 

 

 

 

0 Kudos
Message 9 of 9
(4,427 Views)