# Curve export macro # Export Dir set exportDir "./" # Curve export list (page-, window- and curve-number) set curveList [list \ { 1 1 1 } \ ] hwi ReleaseAllHandles hwi GetSessionHandle ses ses GetProjectHandle pro foreach curveIndex $curveList { pro SetActivePage [lindex $curveIndex 0] pro GetPageHandle ap [pro GetActivePage] ap SetActiveWindow [lindex $curveIndex 1] ap GetWindowHandle aw [ap GetActiveWindow] aw GetClientHandle acl for { set i 1 } { $i <= [acl GetNumberOfCurves] } { incr i } { acl GetCurveHandle ac $i ac SetVisibility false ac ReleaseHandle } acl GetCurveHandle ac [lindex $curveIndex 2] ac SetVisibility true set nameStr p[lindex $curveIndex 0]w[lindex $curveIndex 1]c[lindex $curveIndex 2] set exportFile [file join $exportDir LsoptHistory] ses ExportCurves $exportFile "XY Data" plot ac ReleaseHandle acl ReleaseHandle aw ReleaseHandle ap ReleaseHandle } ses Close