12-08-2011 12:20 PM
Thanks - I looked through the examples and did not see anything on dealing with clusters and the bundlers...
I'll take a look at the supplied links and info and maybe add my experiences so others can seearch and find it.
Dan
12-08-2011 01:07 PM
Hi Dan,
Have a look at this example.It uses Label.Text property from the Control class to extract the names on the controls from a cluster.
12-08-2011 01:55 PM
Alright, I have the bundle by name now displaying the names:
This is a code snipit of a new place that I'm having problems.... After I replace the bundler with the named bundler (pretty slick btw) I then try to get the names of the terminals so that I can ensure that the connectors from the method will connect to the bundler correctly. (see the attached VI to see what I'm talking about. This is one of the VIs that I am so far able to create (to this point).
Overall, I think this is going pretty good so far. I really appreciate all the help and guidance.
Dan
12-08-2011 02:00 PM
Forgot to ask my question.
How best to connect the terminals of the method outputs to the inputs of the bundle by name?
I was thinking for security that I would want to get the names of each and match them on the corresponding object... if they match wire them, if they don't then try again.
BUT on the code snipit that I posted, the code gets to the property:Bundler:Terms[] and then says "Object Reference is invalid." I tried casting to the named bundle, but it gave the same error.
12-08-2011 02:02 PM
After the replace operation you have to use the output reference (Replace), the reference you wired is no longer valid.
12-08-2011 02:08 PM
Got it...
I had tried that (pretty much instinct knowing that the ref was now a new one), but then my property node broke... THAT's where I needed the cast to more specific class!!!!
I just had not put both steps together.
Thanks,
Dan
12-08-2011 02:39 PM
Good NEWS!!
I have succeeded in connecting all versions of the outputs!!!
If there are no outputs, the code that wires that is skipped. If there is one output it is connected to the 2nd connector down on the output side of the connector pane (the top is used for the .NETRefOut). If there are 2 outputs, then the 2nd is placed on the connector pane just below where the 1st is placed. If there are 3 or more, they are all collected into a cluster, then wired to the bundle output cluster term, a constant is created and wired to the bundle input cluster term, the outputs of the .NET method are then connected to the named inputs of the bundle function and finally the output cluster is connected to the 2nd down from the top output on the connector pane!!!!
Thank you ALL so much for your comments and suggestions.
Dan
12-08-2011 05:04 PM
Got the inputs working....
This is SO COOL!!!
I can now build 100's of labVIEW interop VIs in a matter of minutes that will interface with our released (and proven to work) C# drivers freeing up our LV programmers to focus on the hard stuff rather than recreate the wheel every time!!!!
Thanks again for the help.
I need to clean things up and then I can post examples. Where is a good place to post examples of like how to work with clusters etc.... things with limited references (other than you)?
Dan
12-08-2011 05:14 PM
Hi Dan,
I'm glad you figured everyting out. You can upload your example code to the NI Developer Community Examples Database.