LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
xdaf

quickly reduce size of array constants

Status: New

If you have, for example, an 8-elements array, you can easily increase its dimension to 16 elements by left clicking its bottom line, and dragging it downwards. Then, simply enter a value on the 16th position (and enter all other new values according to your needs).

But if you have to perform the opposite operation, you must right click all the elements to delete one-by-one, and select "data operations -> delete element".

That can be really annoying: I'd like to see implemented the possibility to select multiple elements, and to delete them at once (or at least, to see an option like as "data operations -> delete all elements after/before").

 

10 Comments
grubin698
Member

This does exist, sort of.

In the Index box, enter the first index you want to delete.  Right click>Advanced>Start Selection.  

In the Index box, enter the last index you want to delete.  Right click>Advanced>End Selection.

To confirm you've selected the right stuff, Right click>Advanced>Show Selection.

Right click>Data Operations>Cut data.

 

All these right clicks have to be on the index box, not on the array itself.

grubin698
Member

<rant>

Do people actually read these comments?  I posted that the capability already exists, and since then, there have been 5 kudos for this suggestion.

Granted, the current capability is not a single-click solution, but it does what the OP requested.

</rant>

 

RavensFan
Knight of NI

I read your comments and it was something I had never heard of before.  You gave a useful tip.  I tried it right away, but it wasn't working quite right for me for some reason.  I'll have to play more with it when I have some time.  Thank you for posting.

 

Remember though that the kudoes are a way to vote for the original idea and are in no way an indicator a quality of the comments in the thread.  Are you ranting that you think there should be more kudoes because of the tip you gave, or that there shouldn't be kudoes for the original idea because the capability already exists?

 

I for one did not know that your tip existed, so I would kudo your comment if possible as appreciation for sharing it with us.  That said, I think the original idea deserves a kudo because even if the capability is already there, I bet most people don't know about it.  If it is buried and poorly implemented, then it should be improved upon in a way that is more obvious and equivalent to the way of adding elements.

 

Perhaps the option should be elevated in the shortcut menus so that along with a Delete Element, there is also a "Delete Element and All Following Elements".  (Wording should be changed of course so it is short enough to fit on the menu. Smiley Wink

Darin.K
Trusted Enthusiast

This idea could probably combine forces with this one.

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Easier-way-to-insert-and-delete-element-in-array/idc-p...

 

<rant>

I have known about the Start/End selection for years, but I hate it and 999 times out of a thousand I would rather empty an array constant and start over than use it.  At least they should let you start and stop the selection by right-clicking on an element as opposed to using the index control.  Useless as-is IMO and ignorance would be bliss.

</rant>

Mark_Yedinak
Trusted Enthusiast
I also have known about the Start/End selection on arrays but have found it very cumbersome to use. I think this is an area that definitely could be improved.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
JackDunaway
Trusted Enthusiast

My preferred way to delete a sub array would be click on the first element, Shift+Click on the last element, and either hit Backspace or Delete key.

 

Alternatively, CTRL+Clicking elements would allow nonconsecutive selection, and Delete or Backspace would wax 'em.

 

These two operations are consistent with the standards common in nearly every application I have used. They also are the method Dany originally proposed that Darin.K links to two posts above.

 

...and grubin... an arcane or circuitous method might as well not exist, and needs to be revamped through voting on an idea. By not 'kudoing' this idea, we agree that we like to make that many clicks to perform a simple task.

Message Edited by JackDunaway (mechelecengr) on 09-16-2009 09:11 PM
grubin698
Member

Sorry for the rant.  I was ranting primarily because I was having frustrating afternoon , but also because what the OP wants ("I'd like to see implemented the possibility to select multiple elements, and to delete them at once") has existed for years.  But maybe NI will see this and realize that the current method is cumbersome.

I'm also not faulting him for posting the original idea; I'm sure there are many LV IDE features of which I am also unaware. 

xdaf
Active Participant

Hi grubin,

and thanks for the suggestion (I was unaware of that possibility).

Nevertheless (as stated by other users), I'd love to see implemented the possibilty of selectioning multiple elements by few clicks (as suggested by ravensfan, or by Jackdunaway, or simply by "area selection" with the mouse).

Regards

altenbach
Knight of NI

The idea is fine and the capability does not currently exist.

 

(I don't really consider a method that need four lines of instructions and uses tedious entering of indices and a handful of right-clicks a valid alternative.)

 

In addition, there should be a way to set the array size (which would pad with zeroes or truncate the existing array). It would also help if we had a tip strip that shows us the index when we hover over an element in edit mode.

BPerlman
Member

Hi grubin.

 

Thanks for the instructions.  They really helped me today.  I didn't know how to do this and couldn't figure out where in the help to find it!

 

I still kudoed the idea; it would be nice if it were streamlined.

 

B.