** Copyright SIMetrix Technologies Ltd 2005. All rights reserved ** ** getmeas.sxscr script. ** Created 25.4.2005 ** ** This script has been developed as an example for demonstration purposes ** No support or warranty is offered. ** You may do anything with this script except sell it. ** ** DESCRIPTION ** =========== ** ** Write curve measurements to the clipboard as they are displayed ** This script uses the GetLegendProperties function ** to retrieve the measurements displayed in the legend panel ** ** INSTALLATION ** ============ ** ** To install, copy to your script directory. This is located at: ** ** Windows ** prog_files_dir/SIMetrixnn/script ** where nn is the version you are using ** prog_files_dir is typically c:\Program Files ** ** Linux ** $HOME/simetrix/script ** ** OPERATION ** ========= ** ** Type name of script without sxscr extension at the command line ** ** SUPPORTED VERSIONS ** ================== ** ** Tested with 5.1 only. ** Expected to work with 3.1 onwards ** First get curves: Let curves = GetAllCurves() Let numCurves = Length(curves) if numCurves=0 then Echo "There are no curves available" endif Let curveIndex=0 ** Iterate through curve properties and count how many ** lines we need to allocate for idx=0 to numCurves-1 Let curveIndex = curveIndex + 2 Let crvid = curves[idx] Let propValues = GetLegendProperties(crvid, 'values') Let numPropValues = Length(propValues) Let curveIndex = curveIndex + numPropValues next idx ** Allocate string array for result Let lines = MakeString(curveIndex) ** Now compile the array Let curveIndex=0 for idx=0 to numCurves-1 Let crvid = curves[idx] Let name = GetCurveName(crvid) Let lines[curveIndex] = name Let curveIndex = curveIndex +1 Let propNames = GetLegendProperties(crvid) Let propValues = GetLegendProperties(crvid, 'values') Let numPropValues = Length(propValues) for propIdx = 0 to numPropValues-1 Let lines[curveIndex] = propNames[propIdx] & ' ' & propValues[propIdx] Let curveIndex = curveIndex + 1 next propIdx Let curveIndex = curveIndex + 1 next idx ** Output result to clipboard ** Edit this line if instead you want the result to ** go to a file. Use: ** Show /plain /file filename lines ** Show /plain /clipboard lines