05-03-2021 02:06 PM
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:
The effect on the BD of the SimpleCLFN.vi is as follows (notice I am simply rewriting the current value)
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.
06-17-2021 04:40 PM
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.
06-17-2021 05:47 PM - edited 06-17-2021 05:49 PM
@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:
And here is the result:
Note the name before and after the write operation.
06-18-2021 02:50 AM - edited 06-18-2021 03:39 AM
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\