03-16-2021 11:02 AM
I'll ask my question first, then say why I need it, and then someone hopefully tell me I'm crazy.
So I have a VIM and I want to use it to set the data type that another developer wants for some thing that will be used down the line. Think like the Obtain Queue where you define the data type, then the Dequeue knows the data type from wire of the obtain. The data type created will be a cluster which contains Maps and a couple of other things. I sorta need to reference these cluster elements by name, but this VIM defaults to the names, of the functions that created them. How can I have the data type of the cluster be dynamically set by the VIM, but have the label of the element in the cluster be a constant?
Okay so now the reason. I need to reference these cluster elements and the best way is probably by using the normal Unbundle and Bundle functions. I'd prefer using the Unbundle and Bundle by name. I thought I could live with the normal Bundle/Unbundle, but I actually need to use the In Place structure to access the cluster, since the compiler isn't smart enough to realize I'm using the same cluster, and performance tanks with large amounts of data. About 100 times slower then if I use the IPE structure. I could reference "map" in my other VIMs, but it no longer is self documenting on what "map" is what and the purpose of the data. Thanks.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
Solved! Go to Solution.
03-16-2021 11:49 AM
I don't know if there is a solution. I had a similar issue, see
https://forums.ni.com/t5/LabVIEW/Different-Results-VIM-and-subVI/td-p/4056636?profile.language=en
Names are not propagated in VIMs it appears, by choice.
mcduff
03-16-2021 12:32 PM
You can use my relabelling Xnode.
03-16-2021 01:21 PM
Here's a simplified version using my "Relabel and Default Value.xnode" and setting the output to be the default value.
03-16-2021 02:33 PM
If you've seen my Malleable Buffer experiment, I use a "Name the Buffer.vim" to fix a name for my buffer. This VIM just passes one input to one output (naming the output). This would let you name your map "Value Map".
03-17-2021 07:47 AM
Wow those are some amazing suggestions thanks guys. I tend to go with a VIM over an XNode if both can do what I want and in this case a simple VIM of input and output does the job.
However that XNode is cool and I would also give it the solution except for one issue. I can't have the XNode in a file that is inlined, and the file I want to use it in is a VIM, which needs to be inlined. Sorry Paul runner up for you.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord