LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Remove and Rewire" feature/bug?

Solved!
Go to solution

@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.

0 Kudos
Message 111 of 120
(1,787 Views)

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.

 

Screen Shot 2015-09-05 at 15.16.46.png

 

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.

 

 

0 Kudos
Message 112 of 120
(1,744 Views)

@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.

0 Kudos
Message 113 of 120
(1,696 Views)

@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.

0 Kudos
Message 114 of 120
(1,687 Views)

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...

0 Kudos
Message 115 of 120
(1,675 Views)

If I do Ctrl-Space Ctrl-R on a reshape array like so:

 

Screen Shot 2015-10-02 at 16.47.51.png

 

I get this:

 

Screen Shot 2015-10-02 at 16.47.59.png

 

while I was hoping to get that:

 

Screen Shot 2015-10-02 at 16.49.59.png

0 Kudos
Message 116 of 120
(1,637 Views)

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?

0 Kudos
Message 117 of 120
(1,632 Views)

Magic?

Like here:

 

Screen Shot 2015-10-02 at 18.29.07.png

 

gives this:

 

Screen Shot 2015-10-02 at 18.30.04.png

0 Kudos
Message 118 of 120
(1,619 Views)

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

before.PNG

 

After

 

after.PNG

0 Kudos
Message 119 of 120
(1,586 Views)

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.

0 Kudos
Message 120 of 120
(1,549 Views)