>Hi! > >I need to add an additional output to my import module that >reflects the time of the data, ideally this should be a vector >as I have physical time, model time and iterations. What kind >of object is appropriate for such data and how can I generate it? >(I assume just allocatin a DXVec and passing it to out[i] does not >work) For now I generate an additional field with an array containing >only one item, but even describe complains about missing dep >component (well, it doesnt depend on anything...). > >So whats recommended in this case (I need time as an input for >compute). > >Richard. >
You do like to do it the hard way! How about appending an Attribute (see the DX docs) to the field object when you create the data (I assume you know the time values prior to import), then use the Attribute module to extract that attribute's value, Compute to cut the vector into parts or to calculate on their values, Format to turn the numbers into strings and Caption to display the strings (for example)? Users can make up their own attributes willy-nilly as long as you don't try to use a keyname like "element type" or "dep" as the name of the attribute where DX expects those to have a certain meaning and type. Since Attributes can attach to any level of the object hierarchy (fields, groups, or components of fields), be sure you are accessing the correct object when you request the Attribute (you may or may not need to do some Select and Extract operations to get that object out of a complex object). BTW, you can also make up, give value to, and append attributes within the DX data flow using Options module; for example, I'll often write one net to preprocess user data then Export it to be used within another net that does the viz. Attributes can be read or generated and attached during the preprocessing. Chris Pelkie Vice President/Scientific Visualization Producer Conceptual Reality Presentations, Inc. 30 West Meadow Drive Ithaca, NY 14850 [EMAIL PROTECTED]
