// // time: Wed Apr 9 15:26:04 1997 // // version: 3.1.1 (format), 3.1.4 (DX Beta) // // // MODULE main // // comment: This visual program shows how you can use data-driven selector interactors. A non-data-driven selector interactor chooses whether you import a general import format data file or a data explorer format file. In each case, the imported object is a group. This group is passed to a data-driven selector interactor, which uses the names of the members of the group to label the interactor. Notice that if you change between "General Import file" and "Data Explorer file", the labels on the other Selector interactor change (after the next execution). // comment: // comment: Because the general import wind data contain invalid data values (data values whose x or y components are greater than a value of 100 signify invalid data), the Include module is used conditionally (only if this is the data under consideration). // comment: // comment: Inquire is used to determine if the data is two- or three-dimensional. If it is three-dimensional, a plane is taken using MapToPlane. // page assignment: caption order=4, windowed=0, showing=0 // page assignment: display order=6, windowed=0, showing=0 // page assignment: import order=2, windowed=0, showing=1 // page assignment: maptoplane order=5, windowed=0, showing=0 // page assignment: select order=3, windowed=0, showing=0 // workspace: width = 581, height = 531 // layout: snap = 0, width = 50, height = 50, align = UL // macro main( ) -> ( ) { // // node Selector[2]: x = 0, y = 100, inputs = 7, label = Selector // input[1]: defaulting = 0, visible = 0, type = 32, value = "Selector_2" // input[2]: defaulting = 0, visible = 0, type = 32, value = "General Import file" // input[3]: defaulting = 0, visible = 0, type = 29, value = 2 // input[4]: defaulting = 1, visible = 1, type = 16777248, value = { "Data Explorer file" "General Import file" } // input[5]: defaulting = 1, visible = 0, type = 16777245, value = { 1 2 } // output[1]: visible = 1, type = 29, value = 2 // output[2]: visible = 1, type = 32, value = "General Import file" // page group: import // // // node Import[1]: x = 109, y = 148, inputs = 6, label = Import // input[1]: defaulting = 0, visible = 1, type = 32, value = "storm_data" // page group: import // main_Import_1_out_1 = Import( main_Import_1_in_1, main_Import_1_in_2, main_Import_1_in_3, main_Import_1_in_4, main_Import_1_in_5, main_Import_1_in_6 ) [instance: 1, cache: 1]; // // node Import[2]: x = 207, y = 147, inputs = 6, label = Import // input[1]: defaulting = 0, visible = 1, type = 32, value = "temp_wind.general" // input[3]: defaulting = 1, visible = 1, type = 32, value = "general" // page group: import // main_Import_2_out_1 = Import( main_Import_2_in_1, main_Import_2_in_2, main_Import_2_in_3, main_Import_2_in_4, main_Import_2_in_5, main_Import_2_in_6 ) [instance: 2, cache: 1]; // // node Switch[1]: x = 23, y = 351, inputs = 3, label = Switch // page group: import // main_Switch_1_out_1 = Switch( main_Selector_2_out_1, main_Import_1_out_1, main_Import_2_out_1 ) [instance: 1, cache: 1]; // // node Transmitter[5]: x = 36, y = 469, inputs = 1, label = imported // page group: import // imported = main_Switch_1_out_1; // // node Receiver[8]: x = 373, y = 103, inputs = 1, label = imported // page group: display // main_Receiver_8_out_1[cache: 0] = imported; // // node AutoCamera[1]: x = 316, y = 342, inputs = 9, label = AutoCamera // page group: display // main_AutoCamera_1_out_1 = AutoCamera( main_Receiver_8_out_1, main_AutoCamera_1_in_2, main_AutoCamera_1_in_3, main_AutoCamera_1_in_4, main_AutoCamera_1_in_5, main_AutoCamera_1_in_6, main_AutoCamera_1_in_7, main_AutoCamera_1_in_8, main_AutoCamera_1_in_9 ) [instance: 1, cache: 1]; // // node Receiver[6]: x = 91, y = 111, inputs = 1, label = imported // page group: select // main_Receiver_6_out_1[cache: 0] = imported; // // node Selector[1]: x = 301, y = 204, inputs = 7, label = Selector // input[1]: defaulting = 0, visible = 0, type = 32, value = "Selector_1" // input[2]: defaulting = 0, visible = 0, type = 32, value = "wind_velocity" // input[3]: defaulting = 0, visible = 0, type = 29, value = 1 // input[4]: defaulting = 1, visible = 1, type = 16777248, value = { "temperature" "wind_velocity" } // input[5]: defaulting = 1, visible = 0, type = 16777245, value = { 0 1 } // output[1]: visible = 1, type = 29, value = 1 // output[2]: visible = 1, type = 32, value = "wind_velocity" // page group: select // main_Selector_1_out_1[cache: 2], main_Selector_1_out_2[cache: 2] = Selector( main_Selector_1_in_1, main_Selector_1_in_2, main_Selector_1_in_3, main_Receiver_6_out_1, main_Selector_1_in_5, main_Selector_1_in_6, main_Selector_1_in_7 ) [instance: 1, cache: 1]; // // node Select[1]: x = 204, y = 234, inputs = 3, label = Select // page group: select // main_Select_1_out_1 = Select( main_Receiver_6_out_1, main_Selector_1_out_1, main_Select_1_in_3 ) [instance: 1, cache: 1]; // // node Inquire[2]: x = 45, y = 348, inputs = 3, label = Inquire // input[2]: defaulting = 0, visible = 1, type = 32, value = "is scalar + 1" // page group: select // main_Inquire_2_out_1 = Inquire( main_Select_1_out_1, main_Inquire_2_in_2, main_Inquire_2_in_3 ) [instance: 2, cache: 1]; // // node Include[2]: x = 170, y = 344, inputs = 6, label = Include // input[2]: defaulting = 0, visible = 1, type = 8, value = [-100 -100] // input[3]: defaulting = 0, visible = 1, type = 8, value = [100 100] // page group: select // main_Include_2_out_1 = Include( main_Select_1_out_1, main_Include_2_in_2, main_Include_2_in_3, main_Include_2_in_4, main_Include_2_in_5, main_Include_2_in_6 ) [instance: 2, cache: 1]; // // node Switch[3]: x = 220, y = 444, inputs = 3, label = Switch // page group: select // main_Switch_3_out_1 = Switch( main_Inquire_2_out_1, main_Include_2_out_1, main_Select_1_out_1 ) [instance: 3, cache: 1]; // // node Transmitter[6]: x = 214, y = 534, inputs = 1, label = ready // page group: select // ready = main_Switch_3_out_1; // // node Receiver[7]: x = 169, y = 91, inputs = 1, label = ready // page group: maptoplane // main_Receiver_7_out_1[cache: 0] = ready; // // node Inquire[1]: x = 143, y = 184, inputs = 3, label = Inquire // input[2]: defaulting = 0, visible = 1, type = 32, value = "is 3d positions" // page group: maptoplane // main_Inquire_1_out_1 = Inquire( main_Receiver_7_out_1, main_Inquire_1_in_2, main_Inquire_1_in_3 ) [instance: 1, cache: 1]; // // node Compute[7]: x = 142, y = 256, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0+1" // page group: maptoplane // expression: value = a+1 // name[2]: value = a // main_Compute_7_out_1 = Compute( main_Compute_7_in_1, main_Inquire_1_out_1 ) [instance: 7, cache: 1]; // // node MapToPlane[1]: x = 313, y = 199, inputs = 3, label = MapToPlane // page group: maptoplane // main_MapToPlane_1_out_1 = MapToPlane( main_Receiver_7_out_1, main_MapToPlane_1_in_2, main_MapToPlane_1_in_3 ) [instance: 1, cache: 1]; // // node Switch[2]: x = 224, y = 347, inputs = 3, label = Switch // page group: maptoplane // main_Switch_2_out_1 = Switch( main_Compute_7_out_1, main_Receiver_7_out_1, main_MapToPlane_1_out_1 ) [instance: 2, cache: 1]; // // node AutoColor[1]: x = 226, y = 438, inputs = 10, label = AutoColor // page group: maptoplane // main_AutoColor_1_out_1, main_AutoColor_1_out_2 = AutoColor( main_Switch_2_out_1, main_AutoColor_1_in_2, main_AutoColor_1_in_3, main_AutoColor_1_in_4, main_AutoColor_1_in_5, main_AutoColor_1_in_6, main_AutoColor_1_in_7, main_AutoColor_1_in_8, main_AutoColor_1_in_9, main_AutoColor_1_in_10 ) [instance: 1, cache: 1]; // // node Transmitter[2]: x = 200, y = 467, inputs = 1, label = label1 // page group: import // label1 = main_Selector_2_out_2; // // node Receiver[2]: x = 139, y = 152, inputs = 1, label = label1 // page group: caption // main_Receiver_2_out_1[cache: 0] = label1; // // node Transmitter[3]: x = 368, y = 527, inputs = 1, label = label2 // page group: select // label2 = main_Selector_1_out_2; // // node Receiver[3]: x = 202, y = 150, inputs = 1, label = label2 // page group: caption // main_Receiver_3_out_1[cache: 0] = label2; // // node List[1]: x = 185, y = 229, inputs = 2, label = List // page group: caption // main_List_1_out_1 = List( main_Receiver_2_out_1, main_Receiver_3_out_1 ) [instance: 1, cache: 1]; // // node Caption[2]: x = 157, y = 313, inputs = 9, label = Caption // page group: caption // main_Caption_2_out_1 = Caption( main_List_1_out_1, main_Caption_2_in_2, main_Caption_2_in_3, main_Caption_2_in_4, main_Caption_2_in_5, main_Caption_2_in_6, main_Caption_2_in_7, main_Caption_2_in_8, main_Caption_2_in_9 ) [instance: 2, cache: 1]; // // node Transmitter[7]: x = 221, y = 521, inputs = 1, label = maptoplane // page group: maptoplane // maptoplane = main_AutoColor_1_out_1; // // node Receiver[9]: x = 66, y = 102, inputs = 1, label = maptoplane // page group: display // main_Receiver_9_out_1[cache: 0] = maptoplane; // // node Transmitter[4]: x = 161, y = 396, inputs = 1, label = caption // page group: caption // caption = main_Caption_2_out_1; // // node Receiver[4]: x = 210, y = 101, inputs = 1, label = caption // page group: display // main_Receiver_4_out_1[cache: 0] = caption; // // node Collect[4]: x = 156, y = 392, inputs = 2, label = Collect // page group: display // main_Collect_4_out_1 = Collect( main_Receiver_9_out_1, main_Receiver_4_out_1 ) [instance: 4, cache: 1]; // // node Display[2]: x = 234, y = 510, inputs = 8, label = Display // page group: display // depth: value = 24 // window: position = (0.3953,0.0664), size = 0.5109x0.5117 // main_Display_2_out_1[cache: 2] = Display( main_Collect_4_out_1, main_AutoCamera_1_out_1, main_Display_2_in_3, main_Display_2_in_4, main_Display_2_in_5, main_Display_2_in_6, main_Display_2_in_7, main_Display_2_in_8 ) [instance: 2, cache: 1]; // // decorator Annotate pos=(81,35) size=500x44 style(Label), font=bold, value = // annotation user_begin: 92 // annotation user: this page imports one of two data sets, depending on the setting of the // annotation user: selector interactor. // annotation user_end: // resource *decorator.alignment:XmALIGNMENT_BEGINNING // page group: import // // decorator Annotate pos=(80,26) size=587x76 style(Label), font=bold, value = // annotation user_begin: 306 // annotation user: This page contains the data driven Selector interactor which presents the // annotation user: field names to the user to choose from. Also, because the vector data in the // annotation user: general array format file contains some invalid values, Include is used conditionally // annotation user: to remove them. The result is ready to be passed on to other modules. // annotation user_end: // resource *decorator.alignment:XmALIGNMENT_BEGINNING // page group: select // // decorator Annotate pos=(69,29) size=296x28 style(Label), font=bold, value = // annotation user_begin: 40 // annotation user: This page creates an appropriate caption // annotation user_end: // page group: caption // // decorator Annotate pos=(22,37) size=566x44 style(Label), font=bold, value = // annotation user_begin: 121 // annotation user: This page passes the data through to AutoColor, unless it is three-dimensional, // annotation user: in which case MapToPlane is called first. // annotation user_end: // resource *decorator.alignment:XmALIGNMENT_BEGINNING // page group: maptoplane // // decorator Annotate pos=(78,24) size=437x28 style(Label), font=bold, value = // annotation user_begin: 61 // annotation user: This page displays the maptoplane collected with the caption. // annotation user_end: // page group: display // network: end of macro body } main_Selector_2_in_1 = "Selector_2"; main_Selector_2_in_2 = "General Import file" ; main_Selector_2_in_3 = 2 ; main_Selector_2_in_4 = NULL; main_Selector_2_in_5 = NULL; main_Selector_2_in_6 = NULL; main_Selector_2_in_7 = NULL; main_Selector_2_out_1 = 2 ; main_Selector_2_out_2 = "General Import file" ; main_Import_1_in_1 = "storm_data"; main_Import_1_in_2 = NULL; main_Import_1_in_3 = NULL; main_Import_1_in_4 = NULL; main_Import_1_in_5 = NULL; main_Import_1_in_6 = NULL; main_Import_1_out_1 = NULL; main_Import_2_in_1 = "temp_wind.general"; main_Import_2_in_2 = NULL; main_Import_2_in_3 = NULL; main_Import_2_in_4 = NULL; main_Import_2_in_5 = NULL; main_Import_2_in_6 = NULL; main_Import_2_out_1 = NULL; main_Switch_1_out_1 = NULL; main_Transmitter_5_out_1 = NULL; main_Receiver_8_out_1 = NULL; main_AutoCamera_1_in_2 = NULL; main_AutoCamera_1_in_3 = NULL; main_AutoCamera_1_in_4 = NULL; main_AutoCamera_1_in_5 = NULL; main_AutoCamera_1_in_6 = NULL; main_AutoCamera_1_in_7 = NULL; main_AutoCamera_1_in_8 = NULL; main_AutoCamera_1_in_9 = NULL; main_AutoCamera_1_out_1 = NULL; main_Receiver_6_out_1 = NULL; main_Selector_1_in_1 = "Selector_1"; main_Selector_1_in_2 = "wind_velocity" ; main_Selector_1_in_3 = 1 ; main_Selector_1_in_5 = NULL; main_Selector_1_in_6 = NULL; main_Selector_1_in_7 = NULL; main_Selector_1_out_1 = 1 ; main_Selector_1_out_2 = "wind_velocity" ; main_Select_1_in_3 = NULL; main_Select_1_out_1 = NULL; main_Inquire_2_in_2 = "is scalar + 1"; main_Inquire_2_in_3 = NULL; main_Inquire_2_out_1 = NULL; main_Include_2_in_2 = [-100 -100]; main_Include_2_in_3 = [100 100]; main_Include_2_in_4 = NULL; main_Include_2_in_5 = NULL; main_Include_2_in_6 = NULL; main_Include_2_out_1 = NULL; main_Switch_3_out_1 = NULL; main_Transmitter_6_out_1 = NULL; main_Receiver_7_out_1 = NULL; main_Inquire_1_in_2 = "is 3d positions"; main_Inquire_1_in_3 = NULL; main_Inquire_1_out_1 = NULL; main_Compute_7_in_1 = "$0+1"; main_Compute_7_out_1 = NULL; main_MapToPlane_1_in_2 = NULL; main_MapToPlane_1_in_3 = NULL; main_MapToPlane_1_out_1 = NULL; main_Switch_2_out_1 = NULL; main_AutoColor_1_in_2 = NULL; main_AutoColor_1_in_3 = NULL; main_AutoColor_1_in_4 = NULL; main_AutoColor_1_in_5 = NULL; main_AutoColor_1_in_6 = NULL; main_AutoColor_1_in_7 = NULL; main_AutoColor_1_in_8 = NULL; main_AutoColor_1_in_9 = NULL; main_AutoColor_1_in_10 = NULL; main_AutoColor_1_out_1 = NULL; main_Transmitter_2_out_1 = NULL; main_Receiver_2_out_1 = NULL; main_Transmitter_3_out_1 = NULL; main_Receiver_3_out_1 = NULL; main_List_1_out_1 = NULL; main_Caption_2_in_2 = NULL; main_Caption_2_in_3 = NULL; main_Caption_2_in_4 = NULL; main_Caption_2_in_5 = NULL; main_Caption_2_in_6 = NULL; main_Caption_2_in_7 = NULL; main_Caption_2_in_8 = NULL; main_Caption_2_in_9 = NULL; main_Caption_2_out_1 = NULL; main_Transmitter_7_out_1 = NULL; main_Receiver_9_out_1 = NULL; main_Transmitter_4_out_1 = NULL; main_Receiver_4_out_1 = NULL; main_Collect_4_out_1 = NULL; main_Display_2_in_3 = "X24,,"; main_Display_2_in_4 = NULL; main_Display_2_in_5 = NULL; main_Display_2_in_6 = NULL; main_Display_2_in_7 = NULL; main_Display_2_in_8 = NULL; Executive("product version 3 1 4"); $sync main();