LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
anvy1

Select area to be excluded from code cleanup

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

There is the option of selecting a structure to be excluded from code clean-up but having an option to select an area of code to be excluded from code clean-up would be great. For exampl, if there are multiple loops in the block diagram and you don't want to change the location or the wiring around a particular loop, I don't see there is any to do it. Event though you exclude the loop from code cleanup the surroundings and/or the location still change.

8 Comments
tst
Knight of NI Knight of NI
Knight of NI

The question would be how do you define the area which is not to be cleaned?

 

What you can already do today is put a structure around that area (which would be the selecting) and then exclude that structure. If you only intend on cleaning up once, you can then remove the structure after cleaning.


___________________
Try to take over the world!
anvy1
Member

Yes, using a stucture would definitely help but still the location of the structure itself may be changed. For example, if there's a producer and consumer loop, I would normally want the producer loop and it's associcated inputs and wires to be on top in the block diagram. But even after I chose to use structure around this, it may still put it down or in middle of other comsumer loops. Also, it would be an extra step to add/remove the structure or to add some other blocks or controls into it. 

 

The area can be selected the same way we are doing it now for creating SubVIs in LV2011 and above. You select an area and in the menus, there can extra option 'Exclude from Code Clean-up', just like 'Create SubVI'.

tst
Knight of NI Knight of NI
Knight of NI

The problem is that create subVI is a well defined operation. It happens at one point in time and once it happened the selection is gone. In your case you seem to want the selection to remain.

 

And even if you say that you don't want the selection to remain, but that you want it to affect only a single cleanup, what does "exclude" mean in that case? Today it means "don't modify anything in here", but you seemingly also want it to somehow affect the rest of the diagram. How does that work? How would LV know what not to do?


___________________
Try to take over the world!
anvy1
Member

The question of how to do it might be for the guys who design LV. I'm not sure how the clean-up function actually works.

 

But from what I understand, when you make a selection of code, there must be a way to capture the co-ordinates of the rectangular area of selection and store it. So, every time I use code clean-up, LV knows not to touch anything within those co-ordinates. It would be great if they could place a simple dashed-line rectangular box in that area permanently, letting the user know it's excluded from clean-up.

 

So it comes back around to the idea of using a structure, but this is slightly different where you dont have to worry about wires coming in and going out of the structure. If you drag a control into the structure, it should still have all its wires in place.

 

There could be an extra structure created, named 'Exclude from Clean-up'.

tst
Knight of NI Knight of NI
Knight of NI

Yes, but what happens if you create two such areas? Or four? What happens if you move stuff into and out of that area? How would all that affect the cleanup?

 

Personally, I don't use the cleanup on diagrams which are large enough to be affected to that degree and while I understand why you would want this, I don't think the result would be worth the development time.


___________________
Try to take over the world!
anvy1
Member

In case of multiple instances, all of them would act the same and exclude whatever's there in the structure from clean-up, and it will not clean-up whatever's moved into it and clean-up the items moved out of the boundary.

 

Even the converse of this idea could be a good addition too, if that's any easier.

 

Instead of having a structure or marking an area to be excluded, if you can select the area (as you do for 'Create Sub-VI'), and have a menu option (just like 'Create Sub-VI') to clean-up the selected code, it would be very helpful.

 

I think it would be useful in adding to or modifying a large VI.

tst
Knight of NI Knight of NI
Knight of NI

 

> Instead of having a structure or marking an area to be excluded, if you can select the area (as you do for 'Create Sub-VI'), and have a menu option (just like 'Create Sub-VI') to clean-up the selected code, it would be very helpful.

 

 

That does exist. All you have to do is select something before you clean up. I think it was added in 2011, although if I'm not mistaken it doesn't protect the rest of the code from being moved, only from being changed.


___________________
Try to take over the world!
Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.