LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find Text not working inside of case structure

Solved!
Go to solution

The Find Text (Ctrl-F) ability has stopped working inside of a somewhat large case structure.  I am unable to find any text for comments or labels inside of the case structure; when I press the "Find" button on the Find Text dialog the Search Results dialog pops up, but the list is empty.  The VI uses the JKI state machine template, there are around 150 cases.  All text comments and labels outside of the case structure can be found as expected.  I've tried this on two different LabVIEW installations, both LabVIEW 2017 (17.0) 32-bit on Windows 10 64-bit, one with the JKI State Machine toolkit installed and one without, neither worked.  Copying and pasting the case structure to new VI does not fix the issue.

 

The issue is that have sprinkled comments throughout the case structure using a special keyword to remind that a given section is unfinished and needs work.  I was planning on using the Find Text feature to return to all these incomplete sections.

 

Any thoughts or suggestions on how to get Find Text working again?

0 Kudos
Message 1 of 6
(3,664 Views)

@DakotaD wrote:

 

The issue is that have sprinkled comments throughout the case structure using a special keyword to remind that a given section is unfinished and needs work.  I was planning on using the Find Text feature to return to all these incomplete sections.

 


Do bookmarks still work? That would probably be the preferred method to keep track of unfinished sections..

 

(Still if "find" does not work, that's a probably a bug. Can you attach a VI that shows the problem, or at least submit it to NI)

Message 2 of 6
(3,659 Views)

@altenbach wrote:

@DakotaD wrote:

 

The issue is that have sprinkled comments throughout the case structure using a special keyword to remind that a given section is unfinished and needs work.  I was planning on using the Find Text feature to return to all these incomplete sections.

 


Do bookmarks still work? That would probably be the preferred method to keep track of unfinished sections..

 

(Still if "find" does not work, that's a probably a bug. Can you attach a VI that shows the problem, or at least submit it to NI)


Thank you for pointing out the bookmark functionality, I didn't know it existed!  I will certainly be using this from now on for tracking sections of code needing work.

 

I added a couple bookmarks inside the case structure and the bookmark manager was able to find them.  If I am unable to get the Find Text feature working I guess I will have to manually go through all 150 cases and add bookmarks.

 

I just noticed that the JKI State Machine feature "Find Data Accessors" has also stopped working, I suspect it depends upon the Find Text feature.

Message 3 of 6
(3,643 Views)

I first noticed this bug in LabVIEW 2014.0.1f11 running Windows 7 Pro.  My case structure has 110 cases and I try to search for the cases that match front panel control events.  Nothing inside the case structure or the selector names can be found after the first 3 cases.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 4 of 6
(3,632 Views)

@DakotaD wrote:

The Find Text (Ctrl-F) ability has stopped working inside of a somewhat large case structure.  I am unable to find any text for comments or labels inside of the case structure; when I press the "Find" button on the Find Text dialog the Search Results dialog pops up, but the list is empty.  The VI uses the JKI state machine template, there are around 150 cases.  All text comments and labels outside of the case structure can be found as expected.  I've tried this on two different LabVIEW installations, both LabVIEW 2017 (17.0) 32-bit on Windows 10 64-bit, one with the JKI State Machine toolkit installed and one without, neither worked.  Copying and pasting the case structure to new VI does not fix the issue.

 

The issue is that have sprinkled comments throughout the case structure using a special keyword to remind that a given section is unfinished and needs work.  I was planning on using the Find Text feature to return to all these incomplete sections.

 

Any thoughts or suggestions on how to get Find Text working again?


I suspect it might be related to the number of cases. Another individual posted they had the same issue with a large case statement. This doesn't necessarily help you but it is a thought about why it might be happening. Would it be possible to break  the code down so that the case statement didn't have as many cases? I find that once code gets this big it starts to become somewhat unmanageable. Breaking it down helps to keep things in more manageable sizes.



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
Message 5 of 6
(3,620 Views)
Solution
Accepted by DakotaD

@Michael_Munroe wrote:

I first noticed this bug in LabVIEW 2014.0.1f11 running Windows 7 Pro.  My case structure has 110 cases and I try to search for the cases that match front panel control events.  Nothing inside the case structure or the selector names can be found after the first 3 cases.


Inspired by your remarks, I think I found a fix.  It turned out that the Find Text feature was still working for the first 8 cases. The 8th case was the "Data: Initialize" case where the JKI State Machine shift register data is initialized.  All cases after this did NOT work with the Find Text ability.  Making the 8th case the last case, and then moving it back to the 8th position fixed the problem.  In the "Data: Initialize" case I have quite a few large clusters and classes being bundled into the shift register cluster, I wonder if that has anything to do with this anomaly.

 

In summary, my method to fix the issue:

  1. sequentially go through the cases and find the first case where the Find Text stops working
  2. move the last case where Find Text works to the end of the case structure*
  3. move the last case back to its original position

* It may be necessary to save and close the VI and then reopen it between steps 2) and 3).

 

As a side note, the JKI State Machine "Find Data Accessors" feature that I thought might be tied to the Find Text problem is still not working.  When I attempt to Find Data Accessors nothing seems to happen, however when I go to shutdown LabVIEW it tells me that "Quitting will abort all running VIs", and pressing the Quit button causes LabVIEW to crash and triggers the LabVIEW crash reporter.

Message 6 of 6
(3,616 Views)