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.
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.
10-15-2018 08:31 AM
Hello all,
When crating a function panel, I remember that there's some way to partially populate it automatically based on the documentation tags (HIFN, HIPAR...) but I can't seem to find the way to do it. Or is it the other way around, creating function prototypes and documentation tags from a newly created FP ?!?
Thanks
10-15-2018 10:38 AM
If you open a header file that contains documentation tags Options>>Generate Function Tree is what you need.
You can also have a look on this tutorial about documentation tags
10-16-2018 09:46 AM
Hmmm, that's what I'd tried and the link you provide at least gave me a working example. When used on a DLL header, it's really picky as to what it will covert to a FP. For instance:
export int DLLEXPORT fn1(int a);
// Unknown data type error
DLLEXPORT export int fn2(int a);
// fails silently
export DLLEXPORT int fn3(int a);
// Unknown data type error
DLLEXPORT int fn4(int a);
// Fails silently
int DLLEXPORT fn5(int a);
// Success at long last !!!
I'd file this as a bug report...
10-16-2018 09:53 AM
Also the syntax is actually quite different from the documentation tags: HIFN, HIPAR, HIRET etc become HFUN, HPAR and many more. Is there a reason for that ? Maybe the former are supposed to be used in the.c file and the latter in the .h, but then it's double the work to document your code !
10-16-2018 12:16 PM
Hi
Did you mention this: http://www.ni.com/tutorial/6502/en/ Using Source Code Tags to Enhance LabWindows™/CVI™ Code Documentation ?
10-17-2018 02:13 AM
Absolutely. Why two sets of tags for what will eventually be the same comments ?
10-17-2018 11:13 AM
In the documentation it says: The following tags might appear similar to the tags you use to generate a function panel from a .h file. However, you can use the following tags only in .c files for the purpose of adding information that appears in tooltips. You can use header file tags only in .h files for the purpose of defining a function tree structure.
10-18-2018 05:08 AM
And yet, using the following in your header file DOES work in creating a FP (note the use of parameter position instead of parameter name...):
/// HIFN Add two numbers /// HIPAR 1/First number to add /// HIPAR 2/2nd number to add /// HIRET Sum of a and b int DLLEXPORT Cmpt_AddI(int a, int b);