LabVIEW Idea Exchange

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

Option for Diagram Cleanup Exclusion reset/override/tracking

Status: Declined

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

A diagram cleanup option for resetting all excluded sections or single-use overrides could be nice to have, as the current cleanup may causes unnecessary dispersion of objects due to some 'out of view' excluded sections that can render the block diagram unreadable. 

 

Master reset for the "Exclude from Diagram Cleanup" resets the entire BD back to be included in cleanup, can be included as a Reset All button in Tools>Options>Block Diagram>Block Diagram Cleanup;

 

Single-use overrides to include everything for 1 time cleanup only, can be included as a One-Time Include All button in the same options menu.

 

Last but not least, a list of sections flagged for exclusion, which is navigable across the active BD and highlight upon selection, similar to existing Find and Replace function, perhaps included as Diagram Cleanup Exclusions under Edit menu.

 

Any improvement would be nice and highly appreciated. Thanks

CY (expired CLAD)
8 Comments
AristosQueue (NI)
NI Employee (retired)

There's a lot of text in the idea. Here's a summary:

------------------------------

LV gives users the ability to right-click on any structure node and select "Exclude From Diagram Cleanup", which makes code inside that structure not change during cleanup. This idea is asking for four things:

  1. a way to turn off that exclusion on all structures.
  2. a way to enable exclusion but only for the immediate next cleanup
  3. a way to force a cleanup that ignores the exclusion but leaves the exclusion setting in place for future cleanups.
  4. a view (similar to Find) of all structures that currently have exclusion enabled.

-------------------------------------

All of these seem useful to me except #3. I wouldn't expect users to turn on exclusion except for code that they've manually cleaned up and need to stay fixed. Ignoring the setting for one cleanup means that all that work is lost and now the diagram is in an auto cleaned state but won't participate in future autocleanings, which is the worst of all possible worlds -- you'd be retaining node movements that made sense under one auto optimization when applying the next optimization.

 

For #4, would it suffice if the structure nodes decorated themselves visually on the diagram when exclusion is enabled? There's a return-on-investment issue with #4... the amount of code needed to build up a UI for that sort of thing is high (as any UI generally is), but the usefulness of this seems rare (very useful when you need it, but not a common thing). Just annotating the structures with a glyph that shows the exclusion is far less development effort and more likely to be implemented.

 

#1 can be written with G code today and added to the Tools menu just by saving the VI into the "project" subdirectory of LabVIEW, if you don't want to wait for NI.

cy...
Active Participant

@AQ: thanks for the summary, much appreciated

 

#2 however is more like: a way to include exclusion but only for the immediate next cleanup, cos the current clean-up scheme already ignoring all exclusions, and the term enable may be misunderstood as enabling "exclude from diagram cleanup" property instead

 

allow me to elaborate on #3, it is proposed based on the fixed position nature of tunnels/registers, with respect to the excluded structure. this results in the inability of cleanup to rearrange the exclusion tunnels/registers with consideration of the un-excluded sections of the diagram. a clean microview of the exclusion may look good, but a clean fit of the exclusion in the overall picture may look even better. this may be applicable to address the occasional swelling of the BD after cleanup

 

with regards to #4, wouldn't expect new glyphs or any special distinctive indicators to be developed to highlight the selected exclusion from the list, just a "double-clicking on the search results and highlights the item", item in this case being the excluded structure, would do. it can be highlighted as darkened background and dashed lines around the structure (as in during mouse.click select)

CY (expired CLAD)
cy...
Active Participant

 

1 can be written with G code today and added to the Tools menu just by saving the VI into the "project" subdirectory of LabVIEW, if you don't want to wait for NI.


@AQ: I am new to this, can you guide me how to turn off all exclusions programmatically, as in #1? is it something like getting references of front panel controls by using property node, and then set the controls' properties using another property node? or something entirely different?

CY (expired CLAD)
AristosQueue (NI)
NI Employee (retired)

cy:

Any VI that you add to the \project subdirectory gets added to the Tools menu (it's VI title shows up as the name of the menu item).

 

So you write a VI "IncludeAll.vi". In that VI, you can call this subVI:

       vi.lib\VIServer\Menu Launch VI Information.vi

to get the name of the user VI that launched that menu item.

 

Then IncludeAll.vi can do whatever you want to the user's VI using scripting. In your case, you'd want to find all the structure nodes and set the "Fix Contents" property to false.

cy...
Active Participant

Lots of thanks, AQ.

 

I somewhat tried using VIScripting>Traverse and noticed that 1-4 is somewhat possible... only possible, but it could be way better if there is a way to check if a reference have certain property dynamically instead of knowing beforehand in edit mode... is there such a way?

 

*p/s: I wanted to kudo your suggestions, but the buttons are missing...

«þ

CY (expired CLAD)
wiebe@CARYA
Knight of NI

>but it could be way better if there is a way to check if a reference have certain property dynamically instead of knowing beforehand in edit mode... is there such a way?

 

 

Spoiler

AFAIK, that's only possible with a brown node. Get Property does that, but you need the property index. You can get that with scripting Smiley Very Happy. Note that even though a property looks exactly the same for different references, the property index might be different.

 

Alternatively, you can script a VI that gets the reference's class name, and then for each class that has the property, you script a case that casts to the specific class and calls the property. (sigh)

 

So are ways, but it's not trivial.

For this use case, I'd simply cast (to more specific) to Structure and set the property. Also cast to FlatSequence and set the property. Ignore the error(s), or pass the error if both fail. That should cover all nodes that have the "Autosize To Fit Content?" property.

cy...
Active Participant

@wiebe: thanks for the input Smiley Wink, I actually did that this before my last post, nested another conditional for loop to include more class specifiers in case it fails when going to more specific, but it got messy very quickly, and considering for version compatibility and future... that's when I try to lookup for alternative dynamic ways to try to make it work more gracefully... think I need some time to digest the spoilers... but my guts kinda whispered to me just now: wait for the R&D... 

 

CY (expired CLAD)
Darren
Proven Zealot
Status changed to: Declined

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