Popular Post jcarmody Posted August 8, 2009 Popular Post Report Share Posted August 8, 2009 Name: CaseSelect Submitter: jcarmody Submitted: 08 Aug 2009 File Updated: 03 Jan 2011 Category: JKI Right-Click Framework Plugins LabVIEW Version: 8.2 License Type: BSD (Most common) Copyright @ 2010, Jim Carmody All rights reserved. Author: Jim Carmody jim@jamescarmody.com CaseSelect is a plugin for the JKI Right-Click Framework for LabVIEW and is distributed as a VIPM package. Introduction I make State Machines with many, many states; perhaps you do, too. I don't like scrolling through long lists of states and have wanted to have a scroll bar on the drop-down list. This plug-in launches a new panel with a Tree control (one that has a scroll bar) containing each of the Case names. Features Select a case in the CaseSelect window and it comes to the front in your Block Diagram JKI State Machine states are indented in the Tree control CaseSelect window floats and can be resized Open multiple CaseSelect windows at the same time to work with more than one Case Structure Select a case with the mouse or navigate the Tree using arrow keys Insert & delete states with Insert/Delete keys or context menu (Insert suggests new name based on section header) Reorder cases with drag/drop Ctrl+drag/drop to duplicate a case (suggests new name based on section header) Collapse/expand all tree elements with context menu Sort cases alphabetically (preserving the section headers of a JKI State Machine) New in 2.0.1I'm pretty bad at keeping track, but here are a few... Renaming a case triggers a search-and-replace for all instances of the old name in all String Constants Select a String Constant in your VI and double-click a case in CaseSelect and that will be appended to the String Constant - build macros quickly New in 3.0.0.4 (currently only for LabVIEW 2010) I'm still pretty bad at keeping track, but I made a new package. Added navigation buttons to move back and forth through the states you've visited (history) ~ still buggy The original discussion of this can be found here. Click here to download this file 3 Quote Link to comment
Ton Plomp Posted August 27, 2009 Report Share Posted August 27, 2009 I downloaded the VIP, and VIPM tells me it is 8.6 and up... Is that correct? EDIT: I found an 8.2 version, could the CR version be updated? And while i am at it, some ideas: Show/hide label (and edit) of the case structure Auto-hide and show the dialog when the owning VI is not the top-level BD anymore. Ton 1 Quote Link to comment
jcarmody Posted August 31, 2009 Author Report Share Posted August 31, 2009 I downloaded the VIP, and VIPM tells me it is 8.6 and up... Is that correct? EDIT: I found an 8.2 version, could the CR version be updated? I meant to have the VIP in 8.2 but ran into a snag. I need to try repackaging it. Auto-hide and show the dialog when the owning VI is not the top-level BD anymore. I tried to implement this idea but couldn't figure out how to do it. Any ideas? Quote Link to comment
Ton Plomp Posted September 1, 2009 Report Share Posted September 1, 2009 I tried to implement this idea but couldn't figure out how to do it. Any ideas? There is a 'VI Activation' event that you could use, however it has been a while since I used it. Ton 1 Quote Link to comment
PJM_labview Posted September 1, 2009 Report Share Posted September 1, 2009 There is a 'VI Activation' event that you could use, however it has been a while since I used it. Yes, this is what you need. This is actually what the RCF is using. PJM 1 Quote Link to comment
jcarmody Posted September 2, 2009 Author Report Share Posted September 2, 2009 Auto-hide and show the dialog when the owning VI is not the top-level BD anymore. Here's what I came up with. I'm having trouble making an 8.2 version that works, but I have a long weekend coming up . CaseSelect.zip Quote Link to comment
jcarmody Posted September 14, 2009 Author Report Share Posted September 14, 2009 Here's another 8.6 version with a "Rename Case" option. The .llb is version 8.2. I'd appreciate it if someone could test it and tell me if it works. I'd then be able to make a new VIP and update the main download. Thanks, Jim CaseSelect.zip _jdc_lib_rcf_caseselect.llb Quote Link to comment
Ton Plomp Posted September 14, 2009 Report Share Posted September 14, 2009 The .llb is version 8.2. I'd appreciate it if someone could test it and tell me if it works. Nope, you set the reentrant type of the deamon VI, however LabVIEW 8.2 only supports plain reentrancy (reallocate), so you need to remove this property from you 8.2 version (I don't see any real harm done by creating a specific clone per structure, it is in a VI always active, and it will be killed when the VI is closed (I hope). However I couldn't find the rename option (8.2), how should I do a rename? I was hoping for F2, or a right click option. Ton 1 Quote Link to comment
jcarmody Posted September 15, 2009 Author Report Share Posted September 15, 2009 However I couldn't find the rename option (8.2), how should I do a rename? I was hoping for F2, or a right click option. It's a right-click menu option on mine. What do you see? Here's an 8.6 version implementing the F2 to rename. I used the reentrancy I did because I was having trouble making a VIPM package that would call the vi dynamically. Perhaps I won't be able to do that for 8.2 Thanks for your help. Jim _jdc_lib_rcf_caseselect.llb Quote Link to comment
jcarmody Posted September 18, 2009 Author Report Share Posted September 18, 2009 Here's another version (for LV8.6) that sizes the panel to the size of the tree (based on the number of frames in the Case Structure) or the height of the screen, whichever is smaller. I like this so I don't have to resize it once it opens. _jdc_lib_rcf_caseselect.llb Quote Link to comment
Michael Aivaliotis Posted September 18, 2009 Report Share Posted September 18, 2009 Here's another version (for LV8.6) that sizes the panel to the size of the tree (based on the number of frames in the Case Structure) or the height of the screen, whichever is smaller. I like this so I don't have to resize it once it opens. Can you update your official downloadto reflect your latest and greatest changes? Or is it not ready for prime time yet? Quote Link to comment
jcarmody Posted September 18, 2009 Author Report Share Posted September 18, 2009 Can you update your official downloadto reflect your latest and greatest changes? Or is it not ready for prime time yet? I'll do that when I have time to update the description with the new features. What I really want to do is make a VIP but I'm struggling to make it work in LV8.2. I've killed LabVIEW on my home computer so I can't work on it until next week. The discussion about my troubles is a few posts up. I believe I can make it work in 8.2 but the VIP won't, or, at least that's how I remember the trouble I had making the first package. Quote Link to comment
jcarmody Posted October 31, 2009 Author Report Share Posted October 31, 2009 Â [...] I'm struggling to make it work in LV8.2. I've tweaked the version for LV 8.2 but am not happy with it; it has fewer functions than the 8.6 version. Drag-and-drop of cases doesn't work. Â The image below shows how I rearrange cases; it works in 8.6 but doesn't do anything in 8.2. Insert and rename a case work, but delete doesn't. Â Attempting it causes an error. Â I've attached an llb for 8.2. Â I think I'm done developing this for 8.2 unless someone can help... Â Please? Â Thanks. caseselect.llb Quote Link to comment
Ton Plomp Posted January 4, 2010 Report Share Posted January 4, 2010 It would be nice if we could drag and drop a case name into the VI. For instance by selecting a case with the 'ctrl' down. This would not show the case, but allow for a drag and drop of the case name. If you drop this into a string constant it would contain the name of the case you selected. Ton Quote Link to comment
jcarmody Posted January 4, 2010 Author Report Share Posted January 4, 2010 It would be nice if we could drag and drop a case name into the VI. For instance by selecting a case with the 'ctrl' down. This would not show the case, but allow for a drag and drop of the case name. If you drop this into a string constant it would contain the name of the case you selected. Ton I think I understand.  It's an interesting idea that I'd probably use myself.  It would be neater, perhaps, to drop it as a String constant instead of into one (unless you're building a macro).  I've added it to my list; lemme see what I can do.  I've never tried to control a drag-drop operation from one VI into another.  Could be fun.  Quote Link to comment
Jim Kring Posted January 8, 2010 Report Share Posted January 8, 2010 Has there been any thought given to supporting the Event Structure, in addition to Case Structures? I'd like to be able to use this tool to display and navigate Event Structures, too -- that would be cool I love this tool! Quote Link to comment
jcarmody Posted January 9, 2010 Author Report Share Posted January 9, 2010 Has there been any thought given to supporting the Event Structure, in addition to Case Structures? I started with plans to include all multi-frame structures but immediately eliminated support for Stacked Sequences and soon found that an Event Structure's frame names aren't accessible. Â I asked a question about this on NI's API community here, and it was added to a list of desired access to properties/methods here. Â I thought there was another discussion with more comments, but I haven't been able to find anything. Â I don't know if anything new was exposed in LV2009 because I don't have it yet. Â It's on my list of features to add. Quote Link to comment
Jim Kring Posted January 9, 2010 Report Share Posted January 9, 2010 I started with plans to include all multi-frame structures but immediately eliminated support for Stacked Sequences and soon found that an Event Structure's frame names aren't accessible. I asked a question about this on NI's API community here, and it was added to a list of desired access to properties/methods here. I thought there was another discussion with more comments, but I haven't been able to find anything. I don't know if anything new was exposed in LV2009 because I don't have it yet. It's on my list of features to add. Cool, thanks for the update -- I hope NI does add this to the Scripting APIs. Also -- just a thought -- It might be worthwhile to include a Roadmap section on the main page for the this tool, so that users (like me) can see what's in the works and any related info about why certain features are not possible due to scripting limitations. Cheers, Quote Link to comment
jcarmody Posted April 27, 2010 Author Report Share Posted April 27, 2010 It would be nice if we could drag and drop a case name into the VI. For instance by selecting a case with the 'ctrl' down. This would not show the case, but allow for a drag and drop of the case name. If you drop this into a string constant it would contain the name of the case you selected. Ton Ton, I tried this but gave up when it didn't fall into place quickly, but I have uploaded CaseSelect 2.0.0 which contains my interpretation of your suggestion. It works by selecting the String Constant you want to add new cases to, you then double-click cases in CaseSelect to add them to the String Constant. I think it's faster this way than do drag-n-drop; it sure was easier to implement. It does switch cases as you click, but you can use the right-click context menu to highlight the selected String Control when you're done. I've also added a feature to the renaming function. It finds all instances of the case being renamed and replaces them with the new name. Jim Quote Link to comment
jcarmody Posted September 18, 2010 Author Report Share Posted September 18, 2010 I've uploaded version 3.0.0.4. I'll make a screen cast at the intersection of free time and a functioning home computer. Quote Link to comment
jcarmody Posted January 3, 2011 Author Report Share Posted January 3, 2011 At long last, I've added the ability to work with Event Structures to my CaseSelect JKI RCF plug-in. I haven't gotten as far as packaging it for 8.2, but I've attached a zip if you have LV2010 and want to try it. CaseSelect.zip Quote Link to comment
xcite10 Posted August 9, 2011 Report Share Posted August 9, 2011 At long last, I've added the ability to work with Event Structures to my CaseSelect JKI RCF plug-in. I haven't gotten as far as packaging it for 8.2, but I've attached a zip if you have LV2010 and want to try it. I've tried running your latest version of CaseSelect to work with Event Structures and i cant seem to make it work. Every time I click on an event Structure I get the CaseSelect window with nothing in it and get stuck in an endless loop. I ultimately need to kill the process to exit labview 2010 SP1. Can you help?. Quote Link to comment
jcarmody Posted August 9, 2011 Author Report Share Posted August 9, 2011 I've tried running your latest version of CaseSelect to work with Event Structures and i cant seem to make it work. Every time I click on an event Structure I get the CaseSelect window with nothing in it and get stuck in an endless loop. I ultimately need to kill the process to exit labview 2010 SP1. Can you help?. [edit] Are you running the version from the post above yours, or did you download it from the download page?[/edit] I can't tell what's happening yet. I thought it might be a required something that I have in my development environment and you don't, but I can't find anything that isn't called from the plugin's directory. Would you try running my Abort.vi when you get stuck in the endless loop and let me know which VIs it says are running? The Abort.vi is often useful to stop this kind of loop without ditching your entire process. You may be the only one to try the Event Structure feature or you may have a unique situation. Quote Link to comment
SteveChandler Posted August 22, 2011 Report Share Posted August 22, 2011 First of all I want to say the Case Select tool is awesome! I hope this is the right place to post about potential bugs. Something, either the Case Select plugin or the RCF is messing with my code. When I activate the tool some of the string constants in my cases get resized to one character. The size to text setting is still checked. This does not always happen but seems to happen when I activate the tool with a "section" separator selected. I am using LabVIEW 2011, Case Select 3.0.0.4 and RCF 1.0.2.208-1 on Windows 7. Test Case Select.vi Quote Link to comment
jcarmody Posted August 23, 2011 Author Report Share Posted August 23, 2011 Thank you for the kind word and bug report. I've noticed the String constant behavior but have blamed it on 2011. I didn't experience before 2011 so it's definitely associated with the new version. CaseSelect examines every String constant when renaming cases; perhaps something is amiss in that operation. I'll have to try working on a VI without using it to see if it's in my plugin. I can't duplicate this with your attachment. Can you list the steps required to cause this issue? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.