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.

LabVIEW 2021 Public Beta

cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG(s)] Call Library Function Node Scripting Problems

Full disclosure:  The request to nuke old versions of LV is a showstopper when it comes to installing the current beta, the following is in LV20SP1, so I am 99 44/100% sure the bugs are still present.  Hopefully they can be fixed in the spirit of improving interoperation with other languages.

 

I automatically wrap hundreds upon hundreds of functions using the CLFN, and I prefer to have the names visible in the final VI.

 

Bug/Nuisance (1) :  There is no exposed property to change the name format of the CLFN, I have to use a bit of voodoo to get it done.

 

Big Bad Bug (2): When you update the Parameter Info while scripting the CLFN, the name of the return parameter becomes blank.  If you double-click the CLFN and then click ok, it changes the blank value into the default 'return type'

 

See the following code:

 

UpdateCLFN.png

 

The effect on the BD of the SimpleCLFN.vi is as follows (notice I am simply rewriting the current value)

 

BlankCLFN.png

Once is annoying, I wind up with hundreds of cases like this with some libraries.  Plus, my code automatically cleans up the BD, but when the return value name is long, the node does not have the proper width until I manually change the name.

Download All
Message 1 of 4
(1,569 Views)

There must be some trick to do it or the Import Library Wizard would have the same problem with an empty return parameter. What does the CallLib:ParamInfo read return? Is its "Parameter Name" string empty for some reason? Would be a bug but can be easily fixed by making sure there is a string in it.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(1,370 Views)

@rolfk wrote:

There must be some trick to do it or the Import Library Wizard would have the same problem with an empty return parameter. What does the CallLib:ParamInfo read return? Is its "Parameter Name" string empty for some reason? Would be a bug but can be easily fixed by making sure there is a string in it.


Last I checked (which may well be LV2012), the Import Library Wizard displays the same behavior.  The VIs it creates do not show the names, but if you change one of the CLFN to show the names then you get the same behavior.  I had hoped that there was some secret sauce in there, but was quickly disappointed.

 

Here is another VI I used at some point to report this:

 

CLFN_bug_BD.png

 

And here is the result:

 

CLFN_bug_FP.png

Note the name before and after the write operation.

Download All
0 Kudos
Message 3 of 4
(1,363 Views)

Never mind. Scripting error.

 

Does the import wizard not have this problem?

 

As far as I can tell (I didn't actually try 🙄), it generates 'no name' CLFN's, and switching it to 'name' doesn't show the return value's name.

 

I assumed \resource\importtools\sharedlib\VI\Block Diagram\Call Library Node\Method\Create.vi is used. It will run after setting the FGVs (Path.vi, Parameter Info.vi, Reentrant.vi, Calling Convention.vi, Function Name.vi) in resource\importtools\sharedlib\VI\Block Diagram\Attribute\ 

0 Kudos
Message 4 of 4
(1,343 Views)