From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the purpose of legend in \samples\userint\custctrl\legend

Bonjour

I was browsing CVI sample code directory (alway very instructive)

Can someone tell me what is the purpose of legend.c and cklengend.c files in ..\samples\userint\custctrl\legend

 

For what I understand those are instrument drivers but I believe a sample code would help understand how to use the legend.c functions

At least the other sub directories around have sample project 

Loading the legend driver in memory I get some warning on screen while clang compile the source code.

 

On the other hand cklengend.c cannot be compiled since libprot.h is missing

Here is what I get :

71, 10 fatal error: 'libprot.h' file not found

Looking at the source code of the driver did'nt help that much

 

The inclusion of libprot.h depends on __LIBPROT__ cklegend.h file

I looked around and it seems __LIBPROT__   is also used in #define in ../toolslib/cviogl.h and ../toolslib/toolbar.h

 

So my questions are :

  1. What is the purpose of legend.fp
  2. Is there a sample code using it
  3. How to bypass the libprot.h issue in cklegend.h

 

 

Many thanks in advance, Philippe

 

0 Kudos
Message 1 of 3
(4,340 Views)

I would assume that this post is still true and this instrument driver is a leftover. If so NI might consider removing it Smiley Wink

0 Kudos
Message 2 of 3
(4,336 Views)

Yes, that post is still true, and this .fp is indeed a leftover.

 

Normally we remove the examples for obsolete APIs. But, in this case, the .fp itself was installed in the examples folder (this .fp, as well as some others like piechart.fp, are essentially glorified examples that never graduated to become toolslib APIs) and because existing programs might still use this .fp, recent versions of CVI have continued installing it in the examples folder, so that those programs can continue working with newer versions of CVI.


 

Luis

0 Kudos
Message 3 of 3
(4,073 Views)