Jump to content

bessire

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by bessire

  1. I think I ran into this issue in a very similar situation without using classes. I'm actually rewriting code that I initially made using some class hierarchies into using C style interfaces. I'm passing a cluster containing a strict, non static VI reference as an argument to a call by reference node calling the contained VI reference. No help information appears for any wires containing the cluster probably because it is a recursive type. This is in LV2025.
  2. I did see that "Save:To Buffer" method. I also haven't seen a method for loading the output of that. All of the VI server methods I've seen so far have required a file path. I have only briefly looked at the ones visible on an invoke node with a lot of extra ini tokens, so there are probably some deprecated or hidden ones to go through still. I looked through all of the Call Library Function Nodes in code shipping with LabVIEW 2025 and a few extra modules, but nothing seemed promising. The Application Builder code has some interesting calls but I think they only work with a built application, which I haven't tried. There are some other methods in various DLLs that do seem promising such as "NormalVILoadProc", "NormalVIInitProc", and "NormalVIDisposeProc", I just don't know how to call them yet. I'll take a look at all of the property and invoke nodes next, but I doubt there's anything exposed there that doesn't involve passing in a file path.
  3. Is there any way to create a strictly typed VI refnum to some regular labview code without having that code saved as it's own file? I'm okay with even the hackiest solutions/ideas that are not likely to break with every new release. Ideally, I'd be using this in an XNode to have a resizable structure, define the code in the lambda, and capture variables as well. One thing I thought about is getting LabVIEW to compile a temporary VI at edit time, storing the compiled code in a buffer on the block diagram, and finding some method to load VI's from memory if one exists. That way it can be used in an executable. Unfortunately, I don't know of any such methods. For context, I am trying to create anonymous functions in LabVIEW to facilitate some basic functional programming concepts. I already have malleable VIs made using Call By Reference for things like map, filter, and reduce that accept a strict VI ref and an iterable (map, array, set, etc.). I also have a quick drop plugin that automates stuffing code selected from a block diagram into a new, automatically generated VI with an obfuscated name, replacing the code on the original block diagram with a strict SVR to the new VI, and saving the new VI in a top level virtual folder called "lambdas" out of the way. My current goal is to eliminate the need to have the VI saved on disk and still be able to build executables and define the referenced code on the block diagram of the VI that will use it. I recently learned about XNodes and thought I could make a working version of the closure structure with them, but they appear to be just like vim's with VI scripting. Ultimately, they seem no better than my quick drop plugin for this.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.