NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
VHalbur
Posts: 32
0 Kudos

Get list of plot names for given graph?

Is there a way to get a list of the plot names for a graph? I can get the count, but I want the actual names.

Member
Rohama_K
Posts: 162
0 Kudos

Re: Get list of plot names for given graph?

Hi,

 

Which graph in Measurement Studio are you working with?

Rohama K.
Applications Engineer
National Instruments
Member
VHalbur
Posts: 32
0 Kudos

Re: Get list of plot names for given graph?

Waveform Graphs

Member
Rohama_K
Posts: 162
0 Kudos

Re: Get list of plot names for given graph?

To confirm, are you are talking about the plot name I highlighted in the image?

plot name.PNG

 

If that is the case, I have not figured out how to do that. You can, however,  gain access to the individual plots by using something similar to the code snippet below:

 

sampleWaveformGraph.Plots[x];

 

where  is between 0 to sampleWaveformGraph.Plots.Count-1.

 

I have a feeling  you aren't going to be able to gain access to the plot name. Why do you need the plot name?

 

Rohama K.
Applications Engineer
National Instruments
Member
VHalbur
Posts: 32
0 Kudos

Re: Get list of plot names for given graph?

Yes, that is the plot name I am talking about. I am currently accessing the plots in the way you demonstrated, I was just hoping I could gain access to their names. My user can add as many plots as they want and then modify/delete them after that. I wanted to allow them to give them each a unique name so they instantly know what each one is, but I've worked around that. Thanks for your input. 

Member
Steve_InMA
Posts: 38
0 Kudos

Re: Get list of plot names for given graph?

I have the same question and am wondering how you worked around it.  I'm rather surprised that there is no way to access the plot names. Any graph with more than 2 or 3 plots will get very confusing if you can't somehow give the plots meaningful names.  If anyone has any ideas on how to give plots meaningful names and perhaps even tie it into a legend, it would be greatly appreciated.  Names like plot0, plot1, plot2 ... just aren't cutting it for me.  Any thoughts? 

 

Thanks. 

Member
Rohama_K
Posts: 162
0 Kudos

Re: Get list of plot names for given graph?

I have not been able to figure out how to programmaitically get access to the plot names. As for using a legend, have you seen this discussion forum about using a legend? Are you getting stuck somewhere specific?

Rohama K.
Applications Engineer
National Instruments
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page