LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out our VI Scripting Code Repository Files and visit the LabVIEW Wiki VI Scripting article


Tags
(This content has not been tagged yet)
2 Pages V   1 2 >  
Reply to this topic Start new topic
> Scripting Named Unbundler Selection, How do I script unbundling of an element from a sub-cluster?
jaegen
post Sep 1 2006, 08:27 PM
Post #1


Very Active
***

Member
Posts: 129
Joined: 29-October 04
From: Vancouver, B.C.
Member No.: 932
Using LabVIEW Since:1998
LV:8.5.1 ,7.1.1 ,.
Canada ca_british_columbia Nothing Selected


As far as I can see, the only property we have for selecting which cluster element is unbundled in a named unbundler is the "Element Names[]" property. But this doesn't seem to work for selecting elements out of a sub-cluster.

I've attached 2 VIs which demonstrate what I'm talking about. Open both of them and run "Test Unbundle Script.vi" - it doesn't seem to work.

Anyone have ideas?

Jaegen
Attached File(s)
Attached File  Test_Unbundle.vi ( 12.68K ) Number of downloads: 208
Attached File  Test_Unbundle_Script.vi ( 37.32K ) Number of downloads: 198
 

--------------------
"Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Sep 1 2006, 08:27 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
martin@aerodynam...
post Nov 17 2006, 10:20 PM
Post #2


Very Active
***

Premium Member
Posts: 179
Joined: 19-January 05
From: Switzerland
Member No.: 1396
Using LabVIEW Since:1998
LV:8.20 ,8.0.1 ,7.1.1
Switzerland Switzerland Switzerland


QUOTE (jaegen @ Sep 1 2006, 09:27 PM) *
As far as I can see, the only property we have for selecting which cluster element is unbundled in a named unbundler is the "Element Names[]" property. But this doesn't seem to work for selecting elements out of a sub-cluster.

I've attached 2 VIs which demonstrate what I'm talking about. Open both of them and run "Test Unbundle Script.vi" - it doesn't seem to work.

Anyone have ideas?

Jaegen


Hello it does Work!?!

Attached Image


You can easy change the number of unbundle Elements and you can easy change their values (if they are maching to the "default" cluster)

beer_mug.gif

--------------------

Happy Wiring! (User defined "Swiss Wire Class" for neutral data only!!!)


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jaegen
post Nov 17 2006, 11:27 PM
Post #3


Very Active
***

Member
Posts: 129
Joined: 29-October 04
From: Vancouver, B.C.
Member No.: 932
Using LabVIEW Since:1998
LV:8.5.1 ,7.1.1 ,.
Canada ca_british_columbia Nothing Selected


Hmmm, maybe it only works in the German language version. biggrin.gif

Here's what I get: (I made some minor mods to make mine look like yours)

Attached Image


Note: I'm using LabVIEW 7.1.1 (though it doesn't seem to work in 8.2 as well)

Jaegen

--------------------
"Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
martin@aerodynam...
post Nov 18 2006, 06:42 PM
Post #4


Very Active
***

Premium Member
Posts: 179
Joined: 19-January 05
From: Switzerland
Member No.: 1396
Using LabVIEW Since:1998
LV:8.20 ,8.0.1 ,7.1.1
Switzerland Switzerland Switzerland


QUOTE (jaegen @ Nov 18 2006, 12:27 AM) *
Hmmm, maybe it only works in the German language version. biggrin.gif

Here's what I get: (I made some minor mods to make mine look like yours)

Note: I'm using LabVIEW 7.1.1 (though it doesn't seem to work in 8.2 as well)

Jaegen


Hello It doesn't work any more frusty.gif throwpc.gif

since I played around with the Methode Node (Resize, Add Output, Remove Output)

But I don't now why, it's strange.

But I am still able to select the elements in the Main Cluster (Sub 1 and Sub 2) when I then add a second unbundler to Sub 1 or to Sub 2 I am also able to select A or B. But I can't anymor directly a "Subcluster"..

--------------------

Happy Wiring! (User defined "Swiss Wire Class" for neutral data only!!!)


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Mike Ashe
post Nov 18 2006, 09:46 PM
Post #5


Instant Human, just add coffee
****

Premium Member
Posts: 889
Joined: 31-January 03
From: Waterford, CT USA
Member No.: 45
Using LabVIEW Since:1992
LV:8.2.1 ,7.1 ,8.0.1
United States us_connecticut us_washington


QUOTE (halohase @ Nov 18 2006, 01:42 PM) *
Hello It doesn't work ... it's strange.

But I am still able to select the elements in the Main Cluster (Sub 1 and Sub 2) when I then add a second unbundler to Sub 1 or to Sub 2 I am also able to select A or B. But I can't anymor directly a "Subcluster"..

Ditto here. Sometimes I was able to get to a subcluster directly, but mostly only at the same time as resizing. After a short while it doesn't seem to work except for the main cluster elements. Oh well, at least we have some part working. I might try to add all the elements with a resize next, then selectively delete the ones I don't want to try to arrive at the final desired configuration.

--------------------
*************************************************************
"Always listen to the experts, they'll tell you what can't be done, and why.
Then go do it."
~The Notebooks of Lazarus Long (by Robert Heinlein)
*************************************************************


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jaegen
post Nov 19 2006, 06:56 AM
Post #6


Very Active
***

Member
Posts: 129
Joined: 29-October 04
From: Vancouver, B.C.
Member No.: 932
Using LabVIEW Since:1998
LV:8.5.1 ,7.1.1 ,.
Canada ca_british_columbia Nothing Selected


QUOTE
Hello It doesn't work any more
Shoot, there goes my theory that it actually had something to do with German vs. English, or ANSI vs. Unicode, or the like. biggrin.gif

QUOTE (Mike Ashe @ Nov 18 2006, 01:46 PM) *
... I might try to add all the elements with a resize next, then selectively delete the ones I don't want to try to arrive at the final desired configuration.

I thought of this, but I don't think there's a way to do this that handles everything - it has to do with the way LabVIEW handles resizes of an unbundle node in general. If you wire an unbundle by name and drag down, it automatically fills with all of the elements in the cluster, but doesn't drill down into sub clusters until you get to the end (i.e. if your last element is a sub cluster, then it starts automatically filling with the elements of that cluster - I'd love it if they changed this by the way). So, with scripting you could work out a way to get into the last sub cluster, but not any others.

Are you guys sure that you actually had this working? The end result is very dependent on which values are in the unbundle before you run, and which values you're asking for. Another annoying thing is that it doesn't return an error if you ask for something that doesn't exist.

Should I file a bug report for this??? biggrin.gif biggrin.gif biggrin.gif (Or is scripting in its entirety a "bug" in NI's world biggrin.gif ).

Jaegen

--------------------
"Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Barrie
post Nov 20 2006, 06:32 AM
Post #7


Very Active
***

Member
Posts: 85
Joined: 4-September 04
From: Canada
Member No.: 658
Using LabVIEW Since:1992
LV:8.20 ,7.1.1 ,8.0.1
Canada ca_alberta Nothing Selected


QUOTE (jaegen @ Nov 18 2006, 11:56 PM) *
Are you guys sure that you actually had this working? The end result is very dependent on which values are in the unbundle before you run, and which values you're asking for. Another annoying thing is that it doesn't return an error if you ask for something that doesn't exist.

Should I file a bug report for this??? biggrin.gif biggrin.gif biggrin.gif (Or is scripting in its entirety a "bug" in NI's world biggrin.gif ).

Jaegen


This is really bugging me. frusty.gif The timing is such that I was just about to start on a sub VI that needs to do exactly this.

I'm not sure if I ever got the sample VI to work, so, not calling anyone a liar, can someone confirm that it did work consistently, at least for a while? smile.gif if so, I can start working backwards to try to figure out what's going wrong. any other clues would be greatly appreciated. (Fresh copy of LabVIEW, window minimized, first run only etc.) It appears a reference is getting trashed, or some data is non-persistent, but that should create an error.

The only way I have been able to do this reliably, is really clunky. I create a tree of unbundles to get the item I want and then I wire the final unbundle to the original cluster and delete the intermediate unbundles. Not for the faint of heart.

I agree, no feedback (error) for non-existent items is a real pain. As for a bug report, I remember Jeff K. saying something about "It's ok to use scripting, just don't expect us to support it", so that's a non starter. sad.gif

Scripting: The final Frontier. smile.gif

--------------------
There are 10 kinds of people in the world; those that understand binary, and those that don't.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jaegen
post Nov 20 2006, 08:40 AM
Post #8


Very Active
***

Member
Posts: 129
Joined: 29-October 04
From: Vancouver, B.C.
Member No.: 932
Using LabVIEW Since:1998
LV:8.5.1 ,7.1.1 ,.
Canada ca_british_columbia Nothing Selected


QUOTE (Barrie @ Nov 19 2006, 10:32 PM) *
The only way I have been able to do this reliably, is really clunky. I create a tree of unbundles to get the item I want and then I wire the final unbundle to the original cluster and delete the intermediate unbundles. Not for the faint of heart.

Very clever - I'd given up on this being possible at all (not that this is really a realistic solution though).

Joking about bug reports aside, perhaps we need someone with access to the "source code" to at least give some insight into this ... biggrin.gif

Jaegen

--------------------
"Duck was a neutral party, so he brought the ultimatum to the cows." -- Click, Clack, Moo: Cows That Type


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
MikaelH
post Nov 24 2006, 11:33 AM
Post #9


Very Active
***

Premium Member
Posts: 150
Joined: 1-November 04
From: Sydney
Member No.: 941
Using LabVIEW Since:1995
LV:8.5.1 ,8.6 ,.
Sweden Australia Nothing Selected


Confirming!!



It worked for me yesterday perfect.

But today, it doesn't sad.gif , I can't select items in sub-clusters anymore...

This post has been edited by MikaelH: Nov 24 2006, 11:47 AM

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
MikaelH
post Nov 29 2006, 11:21 AM
Post #10


Very Active
***

Premium Member
Posts: 150
Joined: 1-November 04
From: Sydney
Member No.: 941
Using LabVIEW Since:1995
LV:8.5.1 ,8.6 ,.
Sweden Australia Nothing Selected


Hi scripting lovers.

Since bundle and unbundle of clusters in cluster don't work, I've had to do it in an diffrent way.

(See attached project-LV8.2).

The application is not nice written, it's just a proof of concept smile.gif



Cheers,



Mikael
Attached File(s)
Attached File  Bundle.zip ( 174.56K ) Number of downloads: 127
 

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Mike Ashe
post Nov 29 2006, 02:03 PM
Post #11


Instant Human, just add coffee
****

Premium Member
Posts: 889
Joined: 31-January 03
From: Waterford, CT USA
Member No.: 45
Using LabVIEW Since:1992
LV:8.2.1 ,7.1 ,8.0.1
United States us_connecticut us_washington


Interesting way to walk down the tree. I'm going to try this, and then disconnect the bottom most unbundle and rewire it to the top cluster and see if it maintains the low level unbundle. If so, then we can then delete the intermediate unbundles.

--------------------
*************************************************************
"Always listen to the experts, they'll tell you what can't be done, and why.
Then go do it."
~The Notebooks of Lazarus Long (by Robert Heinlein)
*************************************************************


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
crelf
post Nov 29 2006, 02:05 PM
Post #12


I'm a LAVA, not a fighter.
******

V I Engineering, Inc.
Posts: 3759
Joined: 13-October 03
From: Michigan, USA
Member No.: 181
Using LabVIEW Since:1993
LV:8.5 ,. ,.
Australia United States Nothing Selected My Blog


QUOTE (MikaelH @ Nov 29 2006, 09:21 PM) *
Since bundle and unbundle of clusters in cluster don't work, I've had to do it in an diffrent way.

That's pretty neat Mike - consider the concept prooved smile.gif

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
jaegen
post Nov 29 2006, 05:24 PM
Post #13


Very Active
***

Member
Posts: 129
Joined: 29-October 04
From: Vancouver, B.C.
Member No.: 932
Using LabVIEW Since:1998
LV:8.5.1 ,7.1.1 ,.
Canada ca_british_columbia Nothing Selected


QUOTE (Mike Ashe @ Nov 29 2006, 06:03 AM)