NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Unused Local Variables

I have a sequence file that seems to grow over time.  As new models are introducted I just cut and paste variables to fit the product.  My question is, are there any options or applications that can detect whether a variable is un-used.  Essentially, I want to get rid of the fat, so to speak from my sequence file.
 
Tony
0 Kudos
Message 1 of 6
(3,477 Views)

Hi Tony,

Have you tried the Find in Files on the Edit menu

Regards

Ray Farmer

Regards
Ray Farmer
Message 2 of 6
(3,462 Views)

Ray,

  Thats fine when you have a few dozen local variables.  I have in the order of several hundred.

Tony

0 Kudos
Message 3 of 6
(3,461 Views)
Tony,
 
You will have to create a small utility using the API calls.
 
Or
 
Just try deleting all the variables and then run the sequence file and see what errors arise. You can switch the error dialog to ignore on the first occurance of an error and see how far it gets.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 6
(3,458 Views)

Ray,

 I like the first idea.  Where do I begin?  My programming for the past 10 years was on a Mac.  So working in the PC world has been new for the past year or so.  But, nonetheless, this seems to be the most efficient. 

Tony

0 Kudos
Message 5 of 6
(3,457 Views)

Tony,

Try the NI website first for possible examples, you are not going to find your actual requirement, but you will find examples on how to bits of it and then adapt.

try this example for getting a list of variable names

http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=BCB5C685D37F104AE034080020E74861&p_...

Regards

Ray Farmer

Regards
Ray Farmer
Message 6 of 6
(3,451 Views)