LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Class Hierarchy

I am working on a LabVIEW 7.1 application where I have Charts, Graphs, XY Graphs, and Waveform Graphs on one front panel using a tab control. I want to be able to change the background color of all of these charts and graphs from one place. One way is to create individual references and set properties, but this takes up too much space and is too confusing.

I am trying to make it work using references and properties. I can get a reference to the vi, then to the front panel, then to controls[], but the ClassName for the controls[] do not sem to get specific enough to tell what is what on the front panel. It returns names such as numeric, digital, string, ... but no chart or graph.

What is the best way to set properties on these charts and graph
s??
0 Kudos
Message 1 of 6
(3,434 Views)
Use the ClassID property. Every Class has a different one. For a list of Class ID check out this topic:
Where can i find the classID list for Labview 7.0

Note: This list is for LV7.0, but it will most likely work for LV7.1. I will compile a new list sometime in the near future.


  


vipm.io | jki.net

Message 2 of 6
(3,434 Views)
PJM,

I could not make your control work for anything that is placed on a tab control. Please take a look at these two examples. I took the charts.vi that comes with LabVIEW and modified it slightly. The one without the tab control finds all charts on the frontpanel without any problem. The one with the tab control doesn't find the charts. I need to be able to find charts and graphs that are on a tab control.

Thanks for any help you can provide,

dgw
Download All
0 Kudos
Message 3 of 6
(3,434 Views)
DGW

This has nothing to do with the provided enum. What's is happening is that when you get VI>Panel>Controls[] you get only "one" layer of control. So in your case you get everything included the tabcontrol. But if you want to get the controls inside the tab you have to do a similar operation that you did for the VI (this is true for EVERY controls that can contains others controls such as cluster, arrays...). In the Tabcontrols case you need to acsess the pages[] reference properties then CtlsOnPage[] then you can get the CIDs.

Attached is a very rough example. Do remember to close every ref you open or you will get memory leak sooner or later.

PJM

Note: I diconnect the enum (CID Name) from its type def, you might want to re
place it by the original type def (dont forget the constant as well)


  


vipm.io | jki.net

0 Kudos
Message 4 of 6
(3,434 Views)
PJM,

Thanks for the help. That gets me exactly where I need to be.

Is there some documentation on LabVIEW hierarchy? The help file shows a high level diagram, but nothing to this detail.

dgw
0 Kudos
Message 5 of 6
(3,434 Views)
dgw

I have not check recently in the last version of labview (7.0&7.1), but the diagram you are mentioning is the only one I remember (From LV6.1).

PJM


  


vipm.io | jki.net

0 Kudos
Message 6 of 6
(3,434 Views)