[Ch...] Posted September 25, 2019 Share Posted September 25, 2019 I need some help. I want to keep a running log of features that report out of tolerance for selected programs. The goal is to add a line to a text file every time a characteristic reports out of tolerance. I have had success using addtofile inside of an individual characteristic to accomplish this. For example, placing the PCM in the post settings of the characteristic. The problem is copying this code to every single characteristic is too labor intensive. I know I can do this using an end.bat file or in the postsettings of the program, but I can't figure out the syntax that I need. Can anyone help me? Link to comment Share on other sites More sharing options...
[Me...] Posted September 25, 2019 Share Posted September 25, 2019 One possibility that creates a file in the results folder. myFile=getRESULTS()+"\"+"Failed Characteristics.txt" cfList=baseSystem().machine.inspection.allControlFeatureNames.asList for i = 1 to cfList.size myName=getParameterNamed(cfList,i) if text(getActual(myName).toleranceState) == "outOfTolerance" addToFile(myFile,myName) endif next i Link to comment Share on other sites More sharing options...
[Ch...] Posted September 26, 2019 Author Share Posted September 26, 2019 Thank you Phillip. .toleranceState was exactly what I needed. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in