12-15-2009 05:52 PM
Hi,
Using TestSTand 4.2.0.
When the Import/Export Properties tool is changed, and then the user presses "DONE", two fields on the Import/Export Properties dialog are not remembered:
1) Decimal Point
2) Sequence
Can these be recorded in the PLPropertyLoader.ini file also?
This issue expands on Known Issue 159809 (ie this issue only raised problem with Sequence)
Solved! Go to Solution.
12-16-2009 03:22 PM
Hi Chris,
Thanks for the update on Bug 159809. I'll create a new bug report for this new issue so our developers are aware of it, but you can actually fix this yourself for your version of TestStand until a new version is released with the fix. The source code for the Property Loader (and other components) is shipped with TestStand, so we can modify the code and recompile it (if you have access to a CVI development system). Running the Property Loader tool just calls the GenericImportExport.seq file that exists in the <TestStand>\Components\Tools directory. In this sequence file, we see that it just calls a function from the TSDBComponents.dll that exists in the <TestStand>\Components\StepTypes\Database directory. This calls the DB_PLImportExportProperties function in PropertyLoader.c in the same directory as the DLL. The line of code there that we need to look at is at line 9703 in my version (TestStand 4.2.1), towards the bottom of the PLLoadDefaultCtrlSettings function:
if (!Ini_ItemExists (iniText, "MISC", "DECIMAL")) // added in v1.1, if reading option saved from 1.0, use a default
SetCtrlVal (propertyLoaderDialog->sqlStatementPanelHandle,
STATEMENT_DECIMAL, TS_DecimalPoint_UsePeriod); // fail silently
on error
else
{
errChk( Ini_GetInt (iniText, "MISC", "DECIMAL", &value));
SetCtrlVal (propertyLoaderDialog->sqlStatementPanelHandle, STATEMENT_DECIMAL, value); // fail silently on error
}
This code reads from the PLPropertyLoader.ini file and loads the DECIMAL entry in to memory. If we change the SetCtrlVal in the else case to set the value to (value+1), the Property Loader works as expected. I made this change and recompiled the DLL, and the Property Loader now preserves the Decimal Point option correctly.
12-16-2009 03:30 PM