08-22-2022 11:51 PM
Environment
Problem
Attempting to manipulate the Value of a map with multiple keys using an Inplace Element Structure will not work.
Obviously the wrong type of terminal is displayed, as shown in the screenshot below.
Also, the last element's Value terminal is displayed incorrectly, for example, it is sticking out from the bottom.
Background
See below for how exactly I am trying to use this.
I'm trying to transpose elements between maps that have the same structure.
Maps are nested in combination with classes, and the desired map can be accessed by specifying a key.
Currently I have the following code to deal with this, but I believe it will probably create an extra copy.
I really don't want to create an extra copy, so I want to access both elements with in-place nodes.
Solved! Go to Solution.
08-23-2022 01:28 AM
My gut feeling is that the map access IPE probably wasn't designed to be re-sizeable and it might be just an omission that they can be resized.
The LabVIEW compiler is very good at avoiding data copies and I am not sure why you think you even need an IPE. Especially if you are adding elements to a map, it cannot really "in place" anyway, because the size changes.
Sorry, I don't quite get the logic of what you are trying to do. Can you attach a more specific example?
08-23-2022 02:51 PM
@yubeshi wrote:
Environment
- Windows 10
- LabVIEW 20.0.1 f1 (32-bit) / LabVIEW 21.0 (32-bit)
Upon further testing, everything works correctly in LabVIEW 2022, so this is definitely a bug in earlier version. 😄
08-25-2022 11:05 PM
@altenbach さんは書きました:The LabVIEW compiler is very good at avoiding data copies and I am not sure why you think you even need an IPE. Especially if you are adding elements to a map, it cannot really "in place" anyway, because the size changes.
Thank you for your comment.
As you point out, I am not using IPE effectively.
I will consider reviewing it.
I thought there was a possibility that a copy of the data could be made here.
But, when we view the buffer assignments, it appears that no copies have been made here.
Sorry, I don't quite get the logic of what you are trying to do. Can you attach a more specific example?
This is off topic for this topic, but I'll explain a little more about my application.
I am creating a tool to translate some software into Japanese for myself.
In the software to be translated, there is a mechanism that can be translated by reading the "translation file".
There is also a "master file" that stores the original text before translation for translators.
The figure below shows the relationship between these files reflected in the data structure in LabVIEW.
I need to edit files, compare values between files, transcribe, transcribe to a keylist that should be ignored, etc.
I wanted to be able to perform these operations between arbitrary files by specifying a key, so I made this data structure.
Fortunately, since the tool is dedicated to me, it is not so much of a problem, but I would like to consider improving it, since I think it is not a good usage in terms of performance and efficiency.
08-25-2022 11:08 PM
Upon further testing, everything works correctly in LabVIEW 2022, so this is definitely a bug in earlier version. 😄
Thank you for your research.
I had not used LabVIEW2022 yet.
I will install it as soon as possible.
08-30-2022 12:39 PM
Too many things get lost when translating LabVIEW code to a flat rectangular array of color pixels (i.e. an image). Do you have a small example set of VIs with some typical data.