Getting full paths for traces in one graph

Hi, I have graph with traces, whose wave name is identical but in different path as follows:

root:'a.Newdata':EDOPE3:'1Encap':C10R3:Transfer_Lin:IDS
root:'a.Newdata':EDOPE3:'1Encap':C8R3:Transfer_Lin:IDS
root:'a.Newdata':EDOPE3:'1Encap':C6R8:Transfer_Lin:IDS
root:'a.Newdata':EDOPE3:'1Encap':C6R3:Transfer_Lin:IDS
root:'a.Newdata':EDOPE3:'1Encap':C4R4:Transfer_Lin:IDS
root:'a.Newdata':EDOPE3:'1Encap':C2R4:Transfer_Lin:IDS

To get the full path for those traces, I started with getwavedatafolder, but it doesn't work because the wavename is identical.
Is there any possible way to get the full pathes of those traces?

Thank you
Hi,

Checkout

TraceNameToWaveRef(graphNameStr, traceNameStr )
The TraceNameToWaveRef function returns a wave reference to the Y wave corresponding to the given trace in the graph window or subwindow named by graphNameStr.
Parameters
graphNameStr can be "" to refer to the top graph window.
When identifying a subwindow with graphNameStr, see Subwindow Syntax for details on forming the window hierarchy.
The trace is identified by the string in traceNameStr, which could be a string determined using TraceNameList. Note that the same trace name can refer to different waves in different graphs.
Use Instance Notation to choose from traces in a graph that represent waves of the same name. For example, if traceNameStr is "myWave#2", it refers to the third instance of a wave named "myWave" in the graph ("myWave#0" or just "myWave" is the first instance).

Andy
Have a look at
displayhelptopic "User-defined Trace Names"
as well.

string ExpName="C2R4"
appendtograph root:'a.Newdata':EDOPE3:'1Encap':$(PossiblyQuoteName(ExpName)):Transfer_Lin:IDS /TN=$(PossiblyQuoteName(ExpName))

HJ
Thanks Andy,

I tried as you suggested, but tracenametowaveRef returns for all the wave identical wavename of "IDN" because traces are from waves with same name but in different pathes.


hegedus wrote:
Hi,

Checkout

TraceNameToWaveRef(graphNameStr, traceNameStr )
The TraceNameToWaveRef function returns a wave reference to the Y wave corresponding to the given trace in the graph window or subwindow named by graphNameStr.
Parameters
graphNameStr can be "" to refer to the top graph window.
When identifying a subwindow with graphNameStr, see Subwindow Syntax for details on forming the window hierarchy.
The trace is identified by the string in traceNameStr, which could be a string determined using TraceNameList. Note that the same trace name can refer to different waves in different graphs.
Use Instance Notation to choose from traces in a graph that represent waves of the same name. For example, if traceNameStr is "myWave#2", it refers to the third instance of a wave named "myWave" in the graph ("myWave#0" or just "myWave" is the first instance).

Andy

Thanks Andy,

I tried as you suggested, but tracenametowaveRef returns for all the wave identical wavename of "IDN" because traces are from waves with same name but in different pathes.


hegedus wrote:
Hi,

Checkout

TraceNameToWaveRef(graphNameStr, traceNameStr )
The TraceNameToWaveRef function returns a wave reference to the Y wave corresponding to the given trace in the graph window or subwindow named by graphNameStr.
Parameters
graphNameStr can be "" to refer to the top graph window.
When identifying a subwindow with graphNameStr, see Subwindow Syntax for details on forming the window hierarchy.
The trace is identified by the string in traceNameStr, which could be a string determined using TraceNameList. Note that the same trace name can refer to different waves in different graphs.
Use Instance Notation to choose from traces in a graph that represent waves of the same name. For example, if traceNameStr is "myWave#2", it refers to the third instance of a wave named "myWave" in the graph ("myWave#0" or just "myWave" is the first instance).

Andy

But GetWavesDataFolder(TraceNameToWaveRef(tracename), 2) will return a string that includes the full path, including the part that is different amongst the various traces.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Oh, It works!!
I do appreciate your helpful comment!

johnweeks wrote:
But GetWavesDataFolder(TraceNameToWaveRef(tracename), 2) will return a string that includes the full path, including the part that is different amongst the various traces.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com