Probably the easiest thing to do is divide your module into two: one which
reads the input enough to create the string list of variable names and feed
the selector, and another that actually reads the data, given a variable
name.   Precede the string list with "(none)".  In the second, if it
receives "(none)" as the variable name, it produces NULL.  Otherwise, it
reads the named variable from the file.  Now protect the rest of the
network from the first execution with Route:

           dataset name
                       |
             +-----+----------------------+
              |                      ReadVariableNames
              |                                       |
              |                                Selector
              |             +-----------------+
   ReadDataVariable
              |
             +-----------+
   Inquire              |
"is not null"         |
          +--+     +----+
             Route
                  |

That should work - I think the Selector outputs the first in the list -
"(none)" - on the first execution, so nothing should happen until the
second execution, triggered when the user selects a variable.

Greg




                                                                                
                                                          
                      "Mike H. Miller"                                          
                                                          
                      <[EMAIL PROTECTED]>                   To:       
[email protected]                                   
                      Sent by:                             cc:                  
                                                          
                      [EMAIL PROTECTED]        Subject:  [opendx-users] 
"Faking" cyclic connections-- using a module's output 
                      son.ibm.com                           as input            
                                                          
                                                                                
                                                          
                                                                                
                                                          
                      07/17/2002 08:46 AM                                       
                                                          
                      Please respond to                                         
                                                          
                      opendx-users                                              
                                                          
                                                                                
                                                          
                                                                                
                                                          




Hi,
I just built a module to read in some datasets (the HDF5 one I've been
asking about lately), and I'm not sure how to hook it up to a selector
properly. The HDF5 format we're using contains multiple data values per
node, and the user should have the option of selecting which among them
to read. (As an aside, the exact same thing applies to time steps).
Right now, I have an output creating a string list of all the labels,
which I then feed to a selector, a setglobal, a getglobal, and back to
the input. At first I thought this was working just fine-- until I
realized there's a 1 step "lag"-- I assume b/c the *global functions
store and hold data to _prevent_ cyclic connections. Is there any way I
can have it output a string list, let me select among it, and send that
_right back_ in without having to change it? I.e., if I click on val 1,
nothing happens (well, the default loads). Then, I go to value 2, and
value 1 loads. Then value 5, and value 2 loads, etc...

My other option is to figure out how to put a read "button" or something
to force a load, I suppose... but that sounds kinda inelegant. Is there
an easy DX solution to this?

--
Mike Miller
[EMAIL PROTECTED] ->
[EMAIL PROTECTED]


#### signature.asc has been removed from this note on July 17 2002 by
Gregory D Abram



Reply via email to