Aristos Queue Posted July 10, 2008 Report Share Posted July 10, 2008 I have a VI that is reentrant. I save the real VI at coordinates X, Y. On the block diagram, I put an FP:Open method call. When the clones run, they open up their FP, but the windows are staggered from the original VI position. I can see how this helps with debugging most reentrant panels, but in my case, I'm trying to put together a user interface where the clones all open stacked up on each other -- playing with transparency to fade windows in and out on top of each other. Does anyone know of an easy way to say, "Hey, dumb clone, open your FP in the same place as your original"? Quote Link to comment
Omar Mussa Posted July 10, 2008 Report Share Posted July 10, 2008 QUOTE (Aristos Queue @ Jul 8 2008, 07:48 PM) Does anyone know of an easy way to say, "Hey, dumb clone, open your FP in the same place as your original"? Just set the VI.FrontPanel.Position property prior to invoking FrontPanel.Open method within the VI. I think that if you don't do this, you'll always get the staggered behavior. Quote Link to comment
LAVA 1.0 Content Posted July 10, 2008 Report Share Posted July 10, 2008 QUOTE (Omar Mussa @ Jul 9 2008, 05:07 AM) Just set the VI.FrontPanel.Position property prior to invoking FrontPanel.Open method I think this will get you an error, because the FP is not open. If that's the case use FP.Open(Hidden), FP.Position, FP.State(Open). Ton Quote Link to comment
LAVA 1.0 Content Posted July 10, 2008 Report Share Posted July 10, 2008 QUOTE (Aristos Queue @ Jul 9 2008, 04:48 AM) I have a VI that is reentrant. I save the real VI at coordinates X, Y. On the block diagram, I put an FP:Open method call. When the clones run, they open up their FP, but the windows are staggered from the original VI position. I can see how this helps with debugging most reentrant panels, but in my case, I'm trying to put together a user interface where the clones all open stacked up on each other -- playing with transparency to fade windows in and out on top of each other. Does anyone know of an easy way to say, "Hey, dumb clone, open your FP in the same place as your original"? I'm not sure this can help but I think that sometimes the "call chain" primitive gives you what you would expect from "current VI path" primitive. I think I saw that in LV 6 or 7 with vit. Quote Link to comment
Omar Mussa Posted July 10, 2008 Report Share Posted July 10, 2008 QUOTE (Ton @ Jul 8 2008, 09:34 PM) I think this will get you an error, because the FP is not open. I think you're right Ton! I should've done a test first. QUOTE (Antoine @ Jul 8 2008, 10:59 PM) I'm not sure this can help but I think that sometimes the "call chain" primitive gives you what you would expect from "current VI path" primitive. I think I saw that in LV 6 or 7 with vit. If you're trying to use the call chain to get the reference to the current VI, you should use the VI Server Reference - 'ThisVI' constant from the Application Control Palette. It will work with re-entrant VI s to get the reference of the current instance (I use this a lot). Quote Link to comment
Jim Kring Posted July 10, 2008 Report Share Posted July 10, 2008 QUOTE (Aristos Queue @ Jul 8 2008, 07:48 PM) I have a VI that is reentrant [....] I'm trying to put together a user interface where the clones all open stacked up on each other [...] Now, there's your problem: Reentrant VI clones weren't designed to be used for user interfaces. You should be using VI Templates Next thing you know, you'll be asking to http://forums.lavag.org/Error-1446-Can-not-change-tip-strip-of-control-on-reenrant-instance-t10354.html' target="_blank">programmatically change FP control tip strips [just jabbing at you... sorry for not actually helping] Quote Link to comment
Aristos Queue Posted July 10, 2008 Author Report Share Posted July 10, 2008 QUOTE (Jim Kring @ Jul 9 2008, 10:57 AM) Now, there's your problem: Reentrant VI clones weren't designed to be used for user interfaces. You should be using VI Templates The irony here is that in this case, I'm wishing my clone was exactly like my original. I'm not looking for customization. :-) Quote Link to comment
Norm Kirchner Posted July 10, 2008 Report Share Posted July 10, 2008 Haven't you realized after years of Sci-fi movies, Clones will never be perfect replicates of the original. There will always be some kind of flaw on purpose or by accident. I prefer the failsafe kind of flaws, like engineered cancer!! Quote Link to comment
Justin Goeres Posted July 10, 2008 Report Share Posted July 10, 2008 QUOTE (Norm Kirchner @ Jul 9 2008, 01:35 PM) Haven't you realized after years of Sci-fi movies, Clones will never be perfect replicates of the original. There will always be some kind of flaw on purpose or by accident. Just ask http://www.blacksheep-themovie.com/' rel='nofollow' target="_blank">New Zealand. Quote Link to comment
Michael Aivaliotis Posted July 11, 2008 Report Share Posted July 11, 2008 AQ, Did Ton's solution work for you? Quote Link to comment
Jim Kring Posted July 11, 2008 Report Share Posted July 11, 2008 QUOTE (Aristos Queue @ Jul 9 2008, 10:54 AM) The irony here is that in this case, I'm wishing my clone was exactly like my original. I'm not looking for customization. :-) http://lavag.org/old_files/monthly_07_2008/post-17-1215654921.jpg' target="_blank"> Quote Link to comment
Aristos Queue Posted July 11, 2008 Author Report Share Posted July 11, 2008 SOLUTION!!! If you set the Window Run-time Position in the VI Properties dialog, the clones will all follow suit and appear in the set location. Unfortunately, my really cool idea for using a stack of semi-transparent VIs won't work... I can't make the panel color itself transparent, so the stacked effect of the panel gray is enough to completely hide the furthest back window, even with the palest of transparency settings. A bit of research found that this is a limitation of the operating system until very recently (in Windows at least) and nothing in LV will let me set the panel to transparent. *sigh* Quote Link to comment
LAVA 1.0 Content Posted July 11, 2008 Report Share Posted July 11, 2008 QUOTE (Aristos Queue @ Jul 10 2008, 07:07 AM) SOLUTION!!! If you set the Window Run-time Position in the VI Properties dialog, the clones will all follow suit and appear in the set location. You know using dialogs is generally considered cheating? QUOTE Unfortunately, my really cool idea for using a stack of semi-transparent VIs won't work... I can't make the panel color itself transparent, so the stacked effect of the panel gray is enough to completely hide the furthest back window, even with the palest of transparency settings. A bit of research found that this is a limitation of the operating system until very recently (in Windows at least) and nothing in LV will let me set the panel to transparent. *sigh* So frontpanel transaparency only works one layer? Ton Quote Link to comment
Yair Posted July 11, 2008 Report Share Posted July 11, 2008 QUOTE (Ton @ Jul 10 2008, 08:26 AM) So frontpanel transaparency only works one layer? No, but they reinforce each other. QUOTE (Aristos Queue @ Jul 10 2008, 08:07 AM) Unfortunately, my really cool idea for using a stack of semi-transparent VIs won't work... I can't make the panel color itself transparent If you don't mind a Windows only solution, I have an option. If you use the VI I posted here and set the background color to pure white, the background will disappear when you run the VI. You can even set the slide to 255, which means no transparency and it will still work - anything which is pure white is made completely transparent. You can get the window name using the FP Window.Title property. The catch is that I don't know if this is intentional behavior or not. It might be a bug. QUOTE (Yair @ Jul 10 2008, 09:47 PM) The catch is that I don't know if this is intentional behavior or not. It might be a bug. OK, looks like it's not a bug. According to the http://msdn.microsoft.com/en-us/library/ms633540.aspx' rel='nofollow' target="_blank">documentation, the second parameter sets a color which will be completely transparent. Quote Link to comment
shoneill Posted July 12, 2008 Report Share Posted July 12, 2008 Yair, you kinda threw me by quoting yourself within your own post. I was trying to find the hidden reference somewhere....... Shane. Quote Link to comment
Yair Posted July 12, 2008 Report Share Posted July 12, 2008 When you reply, the system quotes by default. When you post two successive posts in a given timeframe, it concatenates them into a single post. Result - I quote myself within my own post. I'll edit it so that it doesn't confuse others. Quote Link to comment
shoneill Posted July 12, 2008 Report Share Posted July 12, 2008 QUOTE (Yair @ Jul 11 2008, 11:58 AM) When you reply, the system quotes by default. When you post two successive posts in a given timeframe, it concatenates them into a single post. Result - I quote myself within my own post. I'll edit it so that it doesn't confuse others. Ah that makes sense. I did notice the concatenation "feature" before. That would of course be a perfect explanation, even if the result was slightly confusing.... Shane 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.