09-13-2012 10:35 AM
A nice new feature in 2012 is being able to select multiple terminals (or controls) and create local variables for the group. If I drop a numeric control and then use control+click to copy it a couple times, creating a column:
Then lasso the column and Create->Local Variable, ther resulting variables are created in the opposite order:
Direction of lasso doesn't matter (top to bottom or bottom to top). It would be nice if the lasso option created them in the same vertical order.
(If I individually select the terminals they are created from top to bottom in the order they were selected.)
09-13-2012 10:43 AM
Very odd - if you weren't careful, you could end up wiring the wrong ones to the wrong place.
09-13-2012 10:44 AM - edited 09-13-2012 10:46 AM
Probably based on the z-order of the controls if you select multiple items at the same time.
Try reordering the controls on the block diagram (move forward, move backward, move to front, move to back) before selecting them at one time and see if that changes the results.
Since numeric 5 was probably created after 4, which was created after 3, 5 is probably more on top in the z-order compared to 4, then compare to 3, .....
09-13-2012 11:07 AM
It does appear to be driven by the z order. Re-ordering the terminals changed the order of the local variables. But I think it should be creating from 'back to front' instead of 'front to back'. Having to reorder is not a practical solution.
I suppose I could get used to created controls/indicators in the 'opposite order', but shouldn't tools make life easier? Is there a coherent design reason for the current behavior?
09-13-2012 11:39 AM
@DAD wrote:
Is there a coherent design reason for the current behavior?
Probably not. This behavior (the order of the selection list) predates this new feature by many years and when it was first implemented the specs for it probably weren't that good, since it was probably a private property. I'm guessing it's just an accident.
Incidentally, the reverse Z order thing is for each group in the selection, so if you shift-select a bunch of control and then shift-select a few others, you'll get two groups sorted by reverse Z order. I agree that it's annoying, but I don't think anything's ever been done about it. I suggest an idea exchange entry if one doesn't already exist.
09-13-2012 03:27 PM
I think there is a logical reason why the highest z-order item gets picked first. Imagine you were just trying to pick one object out of several that were laying on top of each other. Of course you'd expect the one on top, the one the users sees, to be the one picked. You wouldn't want an underneath one to be selected. You might not even see that it was selected if it was completely hidden.
The selection mode for multiple items in a selection box is probably just an extrapolation of a single item selection.
Of course this doesn't give you the results that you want or expect for this create local variable menu choice. As tst said, the methods of selecting objects predates the recent methods of creating new objects on a multiple selection.
Probably what should happen is that the new variables be created and positioned in an order relative to the X and Y coordinates of the selected objects on the screen rather than the z-order.
09-13-2012 04:14 PM
Perhaps you are being sent a subliminal message about mass-creating local variables.