Jump to content

***Experimental*** Control References XNode


Recommended Posts

Neat concept.  One of those reuseable functions I've had for a while can get all references to controls on the FP given a VI reference, and the name of the control.  This works alright, but the control references are of the control class and not the more specific class like String Control.  I improved on this with an XNode that still does searching for controls based on their labels, but you can specify the control class to cast it to.  Still in some cases I think I like yours better.  If I needed to do an operation on all booleans I'd use mine since it returns an array of references, but yours is pretty damned simple.

Link to comment
  • 3 months later...

Hello to both of you.

I have a old project where I need to extend the code and in my opinion I would like to rebuild everything fromnew scratch but I am not allowed to. My problem looks like this:

Crap.png

 

So I searched for a neat solution to reduce all this reference crap in the begining. After I found this cool xnode of yours I thought I have a cool solution, but I isn't there a way to handover a textfile or something to the xnode which than will only get the control references according to a list of Labelnames from within this textfile?

From specific controls like :
Tab Control
Add Button
Infos

Then the xnode only adds the reference of these specific Controls to its cluster?

Peace,
Neelex

Link to comment

Neelex,

You're right, there isn't a way to do what you're looking for as it is. I'm in the middle of a big project right now, but next time I have the chance I'll see if there's a nice way to get that kind of functionality in there (may not be 'til after summer).

Link to comment
On 7/2/2017 at 11:53 PM, iNeelex said:

So I searched for a neat solution to reduce all this reference crap in the begining. After I found this cool xnode of yours I thought I have a cool solution, but I isn't there a way to handover a textfile or something to the xnode which than will only get the control references according to a list of Labelnames from within this textfile?

It looks like most of those references are identically named to the cluster in which they are stored. You can pretty easily use the data type parsing VIs to take each cluster, get all the element names out, then get all front panel control references and just match the strings. I'm not sure how you'd get the generic control reference back to the specific types in the cluster but I bet you could type cast or use ->tovariant->variant-to-data-> to accomplish it.

Link to comment
  • 2 weeks later...

Hey yo Tylor and smith,

@Tylor:
No problem if I get some time as well I will try this on my own, but this might be at the end of the year :D...

@smith:
Your right, I was already experimenting with the data type parsing VIs. But I wasn't able to create a completly dynamical functionallity to parse throughout all the ClusterOfReferences from my Project to create one single VariantClusterOfReferences. But I just  parse through each TypeDef and bundle all in the end. Would be nicer to be able to handover the big typdef and get it out instead of go through every single typdef cluster and bundle each at the end together to the big one.

 

xNode_Init.png

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.