Jump to content

Set properties of dynamically referenced objects dynamically


P. Rosegger

Recommended Posts

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

post-12249-1229088031.png?width=400

Link to comment
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.

Link to comment

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?

Link to comment

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.... :throwpc:

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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