LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Kevin-PTP

Better "auto numbering" in UI editor when you copy and paste a selection of controls

Status: New

If you have, say, three controls called MAX_1, MAX_2, MAX_3 arranged vertically. If I select them all, copy and paste, the new controls appear as MAX_4, MAX_5 and MAX_6 but in the wrong order to what you would expect.

i.e.

MAX_1

MAX_2

MAX_3

 

becomes

 

MAX_1

MAX_2

MAX_3

MAX_6

MAX_5

MAX_4 

 

A similar issue occurs with assigning a group of controls to a control array, they always seem to be in the wrong order, usually reversed.

1 Comment
gdargaud
Active Participant

(I did write something here yesterday but I don't see it, so here goes again)

 

Also the auto control numbering it particularly dumb. If I create a control named CTRL_00 because I expect to have many controls, the first copy/paste will be CTRL_2. Makes a lot of sense !

 

If I name the 1st one CTRL1, the 2nd one will be, wait for it, CTRL1_2 !

 

Just take the value at the end (if there's one), the number of digits, increase by one and keep the same number of digits (unless there's an overflow). And start at 0, this is C, not Pascal.