P. Rosegger Posted December 13, 2008 Report Share Posted December 13, 2008 Hello, I could need some input on this problem: I want to set any kind of property (specified by name or similar) of some (found via label) of the controls that are found via the "Controls[]" property of the front panel without having to manually specify a Class Specifier Constant depending on the Class Name of the control and without having to put each and every Property Node that I would ever want to use in a huge Case Structure. Reason: I want to have front panel elements registered under their name (label) automatically when loading various VIs and then be able to change properties of those front panel elements from another VI just by specifying the name of the control or indicator. Perhaps the attached screenshot can explain better what I'm trying to achieve... Edit: The black VI in the middle of the screenshot should do all the magic, as dynamically as possible TiA, pro Quote Link to comment
BrokenArrow Posted December 13, 2008 Report Share Posted December 13, 2008 QUOTE (P. Rosegger @ Dec 12 2008, 08:27 AM) Hello,I could need some input on this problem: I want to set any kind of property (specified by name or similar) of some (found via label) of the controls that are found via the "Controls[]" property of the front panel without having to manually specify a Class Specifier Constant depending on the Class Name of the control and without having to put each and every Property Node that I would ever want to use in a huge Case Structure. Reason: I want to have front panel elements registered under their name (label) automatically when loading various VIs and then be able to change properties of those front panel elements from another VI just by specifying the name of the control or indicator. Perhaps the attached screenshot can explain better what I'm trying to achieve... Edit: The black VI in the middle of the screenshot should do all the magic, as dynamically as possible TiA, pro http://lavag.org/old_files/monthly_12_2008/post-12249-1229088031.png' target="_blank"> I don't know how you're going to set the property of each and every control without either having each property node exist first, or a strictly typed reference to each and every control that feeds a strict node through a selector case. I would be very interested to see if anyone can post a dynamic solution. Quote Link to comment
jg69 Posted December 13, 2008 Report Share Posted December 13, 2008 Here's a small example that might be helpful: Jens Quote Link to comment
Aristos Queue Posted December 13, 2008 Report Share Posted December 13, 2008 QUOTE (P. Rosegger @ Dec 12 2008, 07:27 AM) I could need some input on this problem: I want to set any kind of property (specified by name or similar) of some (found via label) of the controls that are found via the "Controls[]" property of the front panel without having to manually specify a Class Specifier Constant depending on the Class Name of the control and without having to put each and every Property Node that I would ever want to use in a huge Case Structure. To the best of my knowledge, there is nothing in LV that will let you do what you're looking for. If you don't want to drop the case structure, etc, yourself, the only solution that I see is to pay someone else to laboriously write the VI and then use theirs. And pay them to maintain those VIs for every new version of LV, of course. Quote Link to comment
vugie Posted December 16, 2008 Report Share Posted December 16, 2008 There are "Get Property" and "Sete Property" private methods in Generic class. They looks like they set/get properties via property index and using variant type. But you have to know these indices. First several thousands (from 0) does not work for simple digital control Maybe any of our "rusty nailers" knows sth more? Quote Link to comment
BrokenArrow Posted December 16, 2008 Report Share Posted December 16, 2008 QUOTE (vugie @ Dec 15 2008, 05:55 AM) There are "Get Property" and "Sete Property" private methods in Generic class. They looks like they set/get properties via property index and using variant type. But you have to know these indices. First several thousands (from 0) does not work for simple digital control Maybe any of our "rusty nailers" knows sth more? Sounds like a great hidden implentation method. I wonder if that works anything like setting the properties of similar decorations? Just guess at which one it might be until... Viola! Then you delete that and add a few more, and.... 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.