08-20-2015 02:49 PM
@G-IV wrote:
Hi X.
I'm not sure what you are asking. Are you asking if the number of iterations is wired, or why the number of iterations is wired to 1?
Sorry for the conciseness.
It has become a kind of semi-private exchange between Darren and me, as it appears...
This being said, you are most welcome to publish your own questions and suggestions for Darren on this thread.
09-05-2015 05:22 PM
A neat feature would be to be able to use Ctrl-Space Ctrl-R to delete specific elements in an array constant.
In the example below, the selected element needs a Right-Click >> Data Operations >> Delete Element action to be removed.
The action needs to be repeated as many times as elements that need to be removed.
Unfortunately, it is currently impossible to select more than one element at a time, but obviously this would be even more powerful if/when multiselection were/will be supported.
09-08-2015 01:20 PM
@X. wrote:
A neat feature would be to be able to use Ctrl-Space Ctrl-R to delete specific elements in an array constant.
I agree, but I'm not seeing a way in VI Server to determine the index of the selected element in an array constant. Let me know if you find a way.
09-08-2015 01:45 PM
@Darren wrote:
I agree, but I'm not seeing a way in VI Server to determine the index of the selected element in an array constant. Let me know if you find a way.
I don't believe there is a way that works consistently. One option could be to read the value of the selected element (using the element reference) then compare it to the array of values the array constant returns and look for the one that is equal. Of course this won't work right if you have two elements with the same value.
Another hacky solution is to use the coordinates of the selected object, then have that corresponde to an index in the array. You'll need to calculate the size of each element, and of course taking into account the value of the index.
Beyond that I don't think there is a native G solution because each element in an array only varies by value.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-08-2015 02:04 PM
Even that is not enough as you would have to check the array index (if the number of displayed elements in the constant is smaller than the array size).
There are quite a few problems with array controls already. Maybe this is a good time to escalate them internally and add a request for the same events to be supported on the BD?
Provide an "Array Index"output for the"insert" and "delete element from array" events
Bug or Feature? Array Custom Contextual Menu Destroys "Delete" and "Insert" Element!
Update the list of Application Item Tags for Shortcut Menus in the Help
selecting multiple elements in the array to delete
Array Index Values Property Read Only
Why is this "Operation not valid for strict type definition instance"?
etc...
10-02-2015 06:48 PM
If I do Ctrl-Space Ctrl-R on a reshape array like so:
I get this:
while I was hoping to get that:
10-02-2015 07:17 PM
In your top image, your graph is a 2-D array. In your bottom image, you want the graph to be a 1-D array.
Why do you expect the Ctrl-Space Ctrl-R to not only remove and rewire something, but also change the datatype of the resulting terminal?
10-02-2015 08:28 PM
Magic?
Like here:
gives this:
10-04-2015 06:47 AM
I don't think you are comparing the same functionality. In your example, the cosine function is polymorphic. You can wire up a scalar, array, etc, control and the function can handle the datatype accordingly. However, if you add a 2-D arrray indicator at the output of the cosine function, you get a broken wire on the output terminal. The Ctrl-Space_Ctrl_R does not change the datatype of the resulting terminal. IMO for this example, it is working as expected.
Before
After
10-05-2015 10:38 AM
The data types normally must match exactly (except for numeric coercion). The reason the Sine example above works is because it's a unary function, and Remove and Rewire treats those special...it will try to wire the input to the output no matter what the data types are if there are only one of each...this is a feature we discussed years ago in this very thread.
So a workaround to the current issue would be to delete the two index input wires to the Reshape Array before using Remove and Rewire. It's the best I've got at this time. Perhaps a future improvement would be to see if the sink terminal that would be wired is a graph, and if so, relax the array dimensionality matching requirement, since graphs can be 1D or 2D.