Jump to content

WMassey

Members
  • Posts

    220
  • Joined

  • Last visited

Everything posted by WMassey

  1. Interesting VI. I might see if I can modify it so it offers a bit more in the way of alignment options. Have you noticed that the VI which is having its labels aligned does not show up as having been edited after its labels are shifted? There are no "undo" or "revert" options either. I guess I wasn't quite expecting that from a "scripting" interface.
  2. That's one I quite honestly never have heard of or seen. I just looked for a way to set it in the VI Properties panel and didn't find it and looked for it in a VI property node and didn't see a way to set it there either. Where is it found? Never mind. I just found it under Tools > Options > Revision History and it would only seem to apply to the History window. "Help" says this: "Show revision number in titlebar
  3. Yes, I suppose you are right. I could find all the various title-bar-impacting properties of a VI and figure out how changes in each cause the title bar to change and from that build up a text string that should match. That is to say it should match just as long as the state of the VI does not change between the time when I get the state and when I get the refnum to the window. There is a small window of opportunity there for things to change. The attached VI demonstrates what you suggest I think. When I was doing this it just seemed easier to try all the various permutations and use the one that didn't return an error. Download File:post-2800-1127389150.llb
  4. No LabVIEW definitely does not give you the actual exact window title in all cases. It's close enough for a human to understand but these computers are so damned literal that sometimes it just doesn't work for them. No, not all the windows I am managing are, in every case, running. Built into the llb/routine/system I supplied is an independent hidden background routine that does cleanup (restores a no-transparency state) to any windows left partially visible if the main routine is aborted. In this case the cleanup routine will then be changing the appearance of VIs that are not running before it itself exits.
  5. A couple of the LLB subVIs need to be updated. The one that finds open subVIs was also picking up windows associated with a VI (like the block diagram window and probe windows) resulting in multiple identical entries in the array being returned. It's been fixed so now it just returns one entry per VI. The one that returns a WinAPI refnum based on a window's name has been updated to account for more variations that are possible for a LabVIEW window name. It's amazing how many of these that there are! And, for the Windows API to return a refnum, the match with what you see in the title bar has to be exact. For example, for a VI named XXX.vi the possible LabVIEW window names include: XXX.vi XXX.vi Front Panel XXX.vi * XXX.vi Front Panel * and if it has a window title of ABC too, then these variations get added: ABC ABC [XXX.vi] ABC [XXX.vi] * ABC [XXX.vi] Front Panel ABC [XXX.vi] Front Panel * The "Get Window RefNum.vi" in the "Windows API Function Utilities" referred to earlier in this thread assumes you are passing it the actual title bar text. And since, to the best of my knowledge, LabVIEW itself provides no means of providing what it actually places in the window title bar, you have to try all the various permutations. :headbang: Download File:post-2800-1127316604.vi Download File:post-2800-1127316631.vi
  6. After having found these forums and having discovered LV scripting a few weeks ago I decided that I wanted to give this scripting stuff a try. The result is the attachment to the thread shown below. Case Structures - Is it possible to set which case is displayed? The VI allows case structures to be ordered or reordered (for display only, not in fact) and the visible case changed from the reordered list. While I still think that NI should build something like this in, until they do, this will provide one means of addressing the display/selection problem.
  7. Thanks! That's just what I needed! Knowing that missing piece allowed me to put together the attached VI which will sit off to the side of another VI that is being edited and give me a more convenient way of accessing the states/cases in large case structures. This scripting is cool stuff :thumbup: Download File:post-2800-1127269489.zip
  8. I can see that I can get: a list of all the cases references to the cases a reference to the case selector for the default case, an index pointing to the case number but I have yet to see a way to set which case is the one that is currently displayed. Has anyone else noticed a way to do this?
  9. Yes, it is the Z order I was referrring to but I have to agree that being able to change the panel order programmatically would be a neat trick because it would make it so much easier to find controls to add to an event structure. Perhaps you should ask in the Scripting forum if those folks know of a way to make it happen... There's all sorts of magic going on over there.
  10. FWIW, the attached LLB has a demonstration of what I've worked out so far for this. I've only tried on two differnt systems so far and while it works on both, on one of them there seems to be a lot more flickering of the WinXP window as it makes a switch into an enhanced display properties mode that supports transparency. I suspect it may be caused by differences in how the video drivers on the two systems handle transparency. Download File:post-2800-1127195063.zip
  11. I agree that it is the developer's job to make it obvious, hence the question in the first place. But with that said it also has to be implemented using practical, understandable and maintainable code and I always assume that it will be someone other than myself who might have to provide that maintenance. Your idea of flashing the title bar is a good one. I think the link you are referring to is this one Windows API Function Utilities (32-bit) for LabVIEW (at NI). It has also occurred to me that I can tinker with the actual window title as well. I might also be able to play with window transparency using a VI I found in another area of this forum. I think if the user were to see a ghost window that included the words "no focus" in the window title then they might get the hint that they need to look somewhere else to find a button they can poke. :laugh:
  12. I can see what you suggest working for relatively simple upper and lower level processes but I suspect that if there is a moderate amount of complexity at ether level then this would either present a UI that is too complex or else too cumbersome to build and maintain. For example, one piece of the system I'm working with concerns multiple (6-to-13) motion control axes. The top-level VI/UI provides a system view of those axes and provides the means of making coordinated moves of multiple axes to selected setpoints. One of the next VI/UI levels down provides the means of operating just one axis including absolute/relative/setpoint positioning, homing, jogging, running to limits, speed adjustment, and control via a joystick. The VI/UI level below that provides means for configuring the many parameters that define how the axis is operated. I cannot even begin to imagine how I could fit all the controls and indicators associated with running this into one common UI. A tabbed display would be essential at the outset but the programming and maintenance of it would be a nightmare. There has to be a tradeoff made between the slickness of the UI and the complexity of the code behind it.
  13. Make the "Rearrange Cases" popup panel resizable or, at the very least, show more lines! It would also help if more than one item (even if they have to be adjacent) could be selected. I get so tired of scrolling up and down in this thing!
  14. I was curious what others are doing about directing the user
  15. Something I'm always having to deal with is having to find front panel controls and indicators that are currently not visible and make them visible so that I can rearrange some aspect of the front panel with consideration for the invisible objects. I thought that it would be nice if Labview had a "reveal all" option (and not just on a temporary basis like the "Find Control/Indicator" function currently works). It then occured to me that while Labview may not provide the immediate function, it does at least provide the tools to build that function. I have attached a VI that provides most of what I need for the moment. At some point I may see if I can figure out how to modify the panel order (which control is on top and which is underneath) of front panel objects so that they are not hidden under other FP objects but this is enough for the moment. One note - the attached (v7.1.1) VI assumes that target VI is already open. If that is not the case then the function provided is pretty much a No-Op. Download File:post-2800-1126642996.vi
  16. I just remembered another tip that I have read someplace and now routinely use... When inserting a two-input object (like AND or multiply) into an existing wire if you bias the mouse pointer just slightly below the wire before selecting "Insert -> (object)" then the object will be inserted with the incoming wire connected to the object's upper terminal. If you bias the mouse pointer just slightly above the wire before selecting "Insert -> (object)" then the object will be inserted with the incoming wire connected to the object's lower terminal. There really needs to be a master repository of all these tips!
  17. Vektrex has a good list of useful shortcuts & tips. The escape key will cancel a text entry, wiring change, item resize, move or other change if pressed before the mouse button is released. Use Ctrl-Z to undo changes after the mouse button is released. I sometimes find it useful to have more than just the default 8 undo steps (I have it set to 50). To change it go to Tools -> Options... -> Block Diagram and remove the check next to "Use Default" and enter your own value. Ctrl-Shift-Z is used to redo changes that have been undone. Shift Key speed boost also works with objects being moved using the arrow keys And while this has already been said "Double-clicking the "Filled Rectangle Box" puts a rectangle around the icon perimeter and fills the inside", it also provides a quick way to erase the existing icon.
  18. On a Case Structure it is possible to click on the "case selector label" and see a list of all of the available cases and then select a case from the list. The list, as displayed, is ordered in the order that the cases exist in the case structure. I would very much like to be able to press some keyboard key (Shift or spacebar or CTRL or whatever) while the list of cases is displayed and have them jump into some logical order like ASCII or alphabetical. It would make finding a particular case in a long list of cases much easier. Note that this would not actually reorder the cases within the structure, it would just reorder the displayed list.
  19. This is a very minor wish compared to some of the excellent suggestions I've seen here but it needs to be voiced anyway. The "EQUALS?" and the "NOT EQUAL?" nodes (and all the greater_than/less_than stuff too) have a comparison mode associated with them. You can either compare elements (the default) or compare aggregates. If I have an "EQUALS?" node setup to "compare aggregates" and then decide to replace it (Rt-Click/REPLACE) with a "NOT EQUAL?" node, the "NOT EQUAL?" node should really be put in place with the same "compare aggregates" mode enabled.
  20. If you have a front panel object already on your cut/paste clipboard, you know how you can select another control/indicator on your front panel and press Ctrl-V and replace the existing object with the object from the clipboard? I'd really like to be able to do this with subVI's on the block diagram. Exchange one subVI for another with a simple Ctrl-V. I'd be OK if, when this was initially implemented, the original and replacement subVIs had to have the same connector pane layouts. But eventually it would be nice if some intelligence could be built into the operation so it could deal with minor differences. It would sure beat delete/paste/rewire or right-click/replace/Select a VI/(find where-the-heck you filed it)/Open (although this second method could be made slightly less onerous if there were a way to REPEAT it a second/third/... time with something like MS Word's Ctrl-Y key function!)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.