07-03-2009 02:00 PM
Is there a method to detect unassigned/unused variables in TestStand as exists in the Visual Studio C# environment? If not, I would request that a method be made available eventually. They can accumulate and are difficult to clean up manually.
07-06-2009 08:46 AM
Russell,
There is not method that I am aware of that will do this simply. You can however write your own tool to check for unused variables using the TestStand API. It's not a trivial task, but basically, you want to determine what variables you are using as a property objects, such as Locals, Parameters, or FileGlobals. Then you can create a temporary copy of the property object adding the subproperty objects to it, and using that copy, scan through the sequence (for parameters and locals) or file (for FileGlobals), removing from your object copy any subproperties that is being used or referenced. What you have left are the unused subproperty objects, which you can either use as a reference to remove the original version or document to the developer for manual removal.
-Jack