//
// time: Thu Mar  6 10:20:28 1997
//
// version: 3.1.1 (format), 3.1.4 (DX Beta)
//
//
// MODULE main
// page assignment: check_conn	order=5, windowed=0, showing=0
// page assignment: d_or_v	order=3, windowed=0, showing=0
// page assignment: describe	order=8, windowed=0, showing=1
// page assignment: dim	order=6, windowed=0, showing=0
// page assignment: group	order=4, windowed=0, showing=0
// page assignment: import	order=2, windowed=0, showing=0
// page assignment: run_net	order=7, windowed=0, showing=0
// workspace: width = 266, height = 447
// layout: snap = 0, width = 25, height = 25, align = NN
//
macro main(
) -> (
) {
    // 
    // node DXLInput[1]: x = 25, y = 125, inputs = 1, label = test_file
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "/usr/lpp/dx/samples/data/cloudwater.dx"
    // page group: import
    //
    main_DXLInput_1_out_1 = test_file;
    // 
    // node DXLInput[2]: x = 175, y = 125, inputs = 1, label = test_format
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "dx"
    // page group: import
    //
    main_DXLInput_2_out_1 = test_format;
    // 
    // node Import[1]: x = 94, y = 265, inputs = 6, label = Import
    // page group: import
    //
main_Import_1_out_1[cache: 0] = 
    Import(
    main_DXLInput_1_out_1,
    main_Import_1_in_2,
    main_DXLInput_2_out_1,
    main_Import_1_in_4,
    main_Import_1_in_5,
    main_Import_1_in_6
    ) [instance: 1, cache: 1];
    // 
    // node Transmitter[1]: x = 81, y = 422, inputs = 1, label = imported_data
    // page group: import
    //
imported_data = main_Import_1_out_1;
    // 
    // node Receiver[9]: x = 25, y = 0, inputs = 1, label = imported_data
    // page group: group
    //
main_Receiver_9_out_1[cache: 0] = imported_data;
    // 
    // node Inquire[16]: x = 50, y = 150, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "is generic group +1"
    // page group: group
    //
main_Inquire_16_out_1[cache: 0] = 
    Inquire(
    main_Receiver_9_out_1,
    main_Inquire_16_in_2,
    main_Inquire_16_in_3
    ) [instance: 16, cache: 1];
    // 
    // node Select[4]: x = 300, y = 150, inputs = 3, label = Select
    // page group: group
    //
main_Select_4_out_1[cache: 0] = 
    Select(
    main_Receiver_9_out_1,
    main_Select_4_in_2,
    main_Select_4_in_3
    ) [instance: 4, cache: 1];
    // 
    // node Switch[3]: x = 250, y = 250, inputs = 3, label = Switch
    // page group: group
    //
main_Switch_3_out_1[cache: 0] = 
    Switch(
    main_Inquire_16_out_1,
    main_Receiver_9_out_1,
    main_Select_4_out_1
    ) [instance: 3, cache: 1];
    // 
    // node Inquire[17]: x = 350, y = 300, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "is series  +1"
    // page group: group
    //
main_Inquire_17_out_1[cache: 0] = 
    Inquire(
    main_Switch_3_out_1,
    main_Inquire_17_in_2,
    main_Inquire_17_in_3
    ) [instance: 17, cache: 1];
    // 
    // node Select[5]: x = 450, y = 325, inputs = 3, label = Select
    // page group: group
    //
main_Select_5_out_1[cache: 0] = 
    Select(
    main_Switch_3_out_1,
    main_Select_5_in_2,
    main_Select_5_in_3
    ) [instance: 5, cache: 1];
    // 
    // node Switch[4]: x = 400, y = 400, inputs = 3, label = Switch
    // page group: group
    //
main_Switch_4_out_1[cache: 0] = 
    Switch(
    main_Inquire_17_out_1,
    main_Switch_3_out_1,
    main_Select_5_out_1
    ) [instance: 4, cache: 1];
    // 
    // node Transmitter[7]: x = 450, y = 475, inputs = 1, label = single_member
    // page group: group
    //
single_member = main_Switch_4_out_1;
    // 
    // node Receiver[2]: x = 0, y = 0, inputs = 1, label = single_member
    // page group: check_conn
    //
main_Receiver_2_out_1[cache: 0] = single_member;
    // 
    // node Inquire[11]: x = 1, y = 157, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "has component"
    // input[3]: defaulting = 0, visible = 1, type = 32, value = "connections"
    // page group: check_conn
    //
main_Inquire_11_out_1[cache: 0] = 
    Inquire(
    main_Receiver_2_out_1,
    main_Inquire_11_in_2,
    main_Inquire_11_in_3
    ) [instance: 11, cache: 1];
    // 
    // node Transmitter[3]: x = 5, y = 306, inputs = 1, label = has_connections
    // page group: check_conn
    //
has_connections = main_Inquire_11_out_1;
    // 
    // node Receiver[12]: x = 81, y = 108, inputs = 1, label = has_connections
    // page group: dim
    //
main_Receiver_12_out_1[cache: 0] = has_connections;
    // 
    // node Inquire[14]: x = 151, y = 157, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "is 2D positions"
    // page group: check_conn
    //
main_Inquire_14_out_1[cache: 0] = 
    Inquire(
    main_Receiver_2_out_1,
    main_Inquire_14_in_2,
    main_Inquire_14_in_3
    ) [instance: 14, cache: 1];
    // 
    // node Transmitter[4]: x = 145, y = 306, inputs = 1, label = has_2D_pos
    // page group: check_conn
    //
has_2D_pos = main_Inquire_14_out_1;
    // 
    // node Receiver[13]: x = 202, y = 107, inputs = 1, label = has_2D_pos
    // page group: dim
    //
main_Receiver_13_out_1[cache: 0] = has_2D_pos;
    // 
    // node Inquire[19]: x = 301, y = 157, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "is 2D connections "
    // page group: check_conn
    //
main_Inquire_19_out_1[cache: 0] = 
    Inquire(
    main_Receiver_2_out_1,
    main_Inquire_19_in_2,
    main_Inquire_19_in_3
    ) [instance: 19, cache: 1];
    // 
    // node Transmitter[9]: x = 292, y = 306, inputs = 1, label = has_2d_conn
    // page group: check_conn
    //
has_2d_conn = main_Inquire_19_out_1;
    // 
    // node Receiver[14]: x = 306, y = 112, inputs = 1, label = has_2d_conn
    // page group: dim
    //
main_Receiver_14_out_1[cache: 0] = has_2d_conn;
    // 
    // node Compute[1]: x = 255, y = 225, inputs = 4, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 ? ( $2 ? 2 : 3) : ($1 ? 2 : 3)"
    // page group: dim
    // expression: value = has_connections ? ( has_2d_conn ? 2 : 3) : (has_2d_pos ? 2 : 3)
    // name[2]: value = has_connections
    // name[3]: value = has_2d_pos
    // name[4]: value = has_2d_conn
    //
main_Compute_1_out_1[cache: 0] = 
    Compute(
    main_Compute_1_in_1,
    main_Receiver_12_out_1,
    main_Receiver_13_out_1,
    main_Receiver_14_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Transmitter[10]: x = 270, y = 297, inputs = 1, label = dimensionality
    // page group: dim
    //
dimensionality = main_Compute_1_out_1;
    // 
    // node Receiver[18]: x = 539, y = 93, inputs = 1, label = dimensionality
    // page group: run_net
    //
main_Receiver_18_out_1[cache: 0] = dimensionality;
    // 
    // node Compute[2]: x = 532, y = 387, inputs = 2, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 == 2 ? 1 : 0"
    // page group: run_net
    // expression: value = dimensionality == 2 ? 1 : 0
    // name[2]: value = dimensionality
    //
main_Compute_2_out_1[cache: 0] = 
    Compute(
    main_Compute_2_in_1,
    main_Receiver_18_out_1
    ) [instance: 2, cache: 1];
    // 
    // node Receiver[17]: x = 436, y = 77, inputs = 1, label = dimensionality
    // page group: run_net
    //
main_Receiver_17_out_1[cache: 0] = dimensionality;
    // 
    // node Compute[4]: x = 480, y = 163, inputs = 2, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0==2 ? 2 : 4"
    // page group: run_net
    // expression: value = dimensionality==2 ? 2 : 4
    // name[2]: value = dimensionality
    //
main_Compute_4_out_1[cache: 0] = 
    Compute(
    main_Compute_4_in_1,
    main_Receiver_17_out_1
    ) [instance: 4, cache: 1];
    // 
    // node Transmitter[6]: x = 50, y = 250, inputs = 1, label = is_group
    // page group: group
    //
is_group = main_Inquire_16_out_1;
    // 
    // node Receiver[15]: x = 345, y = 82, inputs = 1, label = is_group
    // page group: run_net
    //
main_Receiver_15_out_1[cache: 0] = is_group;
    // 
    // node Compute[5]: x = 467, y = 271, inputs = 3, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 == 2 ? $1+1 : $1"
    // page group: run_net
    // expression: value = is_group == 2 ? selector+1 : selector
    // name[2]: value = is_group
    // name[3]: value = selector
    //
main_Compute_5_out_1[cache: 0] = 
    Compute(
    main_Compute_5_in_1,
    main_Receiver_15_out_1,
    main_Compute_4_out_1
    ) [instance: 5, cache: 1];
    // 
    // node Receiver[16]: x = 304, y = 292, inputs = 1, label = has_connections
    // page group: run_net
    //
main_Receiver_16_out_1[cache: 0] = has_connections;
    // 
    // node Compute[6]: x = 440, y = 358, inputs = 3, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 ? $1 : $1 + 4"
    // page group: run_net
    // expression: value = has_connections ? selector : selector + 4
    // name[2]: value = has_connections
    // name[3]: value = selector
    //
main_Compute_6_out_1[cache: 0] = 
    Compute(
    main_Compute_6_in_1,
    main_Receiver_16_out_1,
    main_Compute_5_out_1
    ) [instance: 6, cache: 1];
    // 
    // node DXLInput[3]: x = 125, y = 175, inputs = 1, label = DescribeOrVisualize
    // input[1]: defaulting = 0, visible = 1, type = 29, value = 2
    // page group: d_or_v
    //
    main_DXLInput_3_out_1 = DescribeOrVisualize;
    // 
    // node Transmitter[2]: x = 150, y = 275, inputs = 1, label = dov_flag
    // page group: d_or_v
    //
dov_flag = main_DXLInput_3_out_1;
    // 
    // node Receiver[4]: x = 40, y = 143, inputs = 1, label = dov_flag
    // page group: run_net
    //
main_Receiver_4_out_1[cache: 0] = dov_flag;
    // 
    // node StringList[1]: x = 140, y = 143, inputs = 0, label = StringList
    // output[1]: visible = 1, type = 16777248, value = { "Basic3D.net", "Basic2D.net", "Gridded_2D_1var_notseries.net", "Gridded_2D_2ormorevar_notseries.net", "Gridded_3D_1var_notseries.net", "Gridded_3D_2ormorevar_notseries.net", "UnGridded_2D_1var_notseries.net", "UnGridded_2D_2ormorevar_notseries.net", "UnGridded_3D_1var_notseries.net", "UnGridded_3D_2ormorevar_notseries.net", "FacesLoopsEdges.net" }
    // page group: run_net
    //
    // 
    // node Inquire[20]: x = 426, y = 157, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "has component + 1"
    // input[3]: defaulting = 0, visible = 1, type = 32, value = "faces"
    // page group: check_conn
    //
main_Inquire_20_out_1[cache: 0] = 
    Inquire(
    main_Receiver_2_out_1,
    main_Inquire_20_in_2,
    main_Inquire_20_in_3
    ) [instance: 20, cache: 1];
    // 
    // node Transmitter[11]: x = 427, y = 306, inputs = 1, label = has_faces
    // page group: check_conn
    //
has_faces = main_Inquire_20_out_1;
    // 
    // node Receiver[19]: x = 472, y = 468, inputs = 1, label = has_faces
    // page group: run_net
    //
main_Receiver_19_out_1[cache: 0] = has_faces;
    // 
    // node Transmitter[8]: x = 225, y = 450, inputs = 1, label = is_series
    // page group: group
    //
is_series = main_Inquire_17_out_1;
    // 
    // node Receiver[10]: x = 311, y = 410, inputs = 1, label = is_series
    // page group: run_net
    //
main_Receiver_10_out_1[cache: 0] = is_series;
    // 
    // node Switch[5]: x = 395, y = 470, inputs = 3, label = Switch
    // page group: run_net
    //
main_Switch_5_out_1[cache: 0] = 
    Switch(
    main_Receiver_10_out_1,
    main_Compute_6_out_1,
    main_Compute_2_out_1
    ) [instance: 5, cache: 1];
    // 
    // node Switch[6]: x = 506, y = 541, inputs = 3, label = Switch
    // input[3]: defaulting = 0, visible = 1, type = 67108863, value = 10
    // page group: run_net
    //
main_Switch_6_out_1[cache: 0] = 
    Switch(
    main_Receiver_19_out_1,
    main_Switch_5_out_1,
    main_Switch_6_in_3
    ) [instance: 6, cache: 1];
    // 
    // node Select[3]: x = 263, y = 539, inputs = 3, label = Select
    // page group: run_net
    //
main_Select_3_out_1[cache: 0] = 
    Select(
    main_StringList_1_out_1,
    main_Switch_6_out_1,
    main_Select_3_in_3
    ) [instance: 3, cache: 1];
    // 
    // node Route[6]: x = 129, y = 431, inputs = 2, outputs = 2, label = Route
    // page group: run_net
    //
main_Route_6_out_1[cache: 0],
main_Route_6_out_2[cache: 0] = 
    Route(
    main_Receiver_4_out_1,
    main_Select_3_out_1
    ) [instance: 6, cache: 1];
    // 
    // node DXLOutput[1]: x = 111, y = 532, inputs = 2, label = net_to_run
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "net_to_run"
    // page group: run_net
    //
    DXLOutput(
    main_DXLOutput_1_in_1,
    main_Route_6_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Receiver[3]: x = 49, y = 99, inputs = 1, label = dov_flag
    // page group: describe
    //
main_Receiver_3_out_1[cache: 0] = dov_flag;
    // 
    // node Receiver[1]: x = 124, y = 99, inputs = 1, label = imported_data
    // page group: describe
    //
main_Receiver_1_out_1[cache: 0] = imported_data;
    // 
    // node Route[5]: x = 124, y = 199, inputs = 2, outputs = 2, label = Route
    // page group: describe
    //
main_Route_5_out_1[cache: 0],
main_Route_5_out_2[cache: 0] = 
    Route(
    main_Receiver_3_out_1,
    main_Receiver_1_out_1
    ) [instance: 5, cache: 1];
    // 
    // node Describe[2]: x = 208, y = 322, inputs = 2, label = Describe
    // page group: describe
    //
    Describe(
    main_Route_5_out_2,
    main_Describe_2_in_2
    ) [instance: 2, cache: 1];
    // 
    // node Format[1]: x = 54, y = 295, inputs = 3, label = Format
    // input[1]: defaulting = 0, visible = 1, type = 32, value = ""
    // page group: describe
    //
main_Format_1_out_1 = 
    Format(
    main_Format_1_in_1,
    main_Route_5_out_2,
    main_Format_1_in_3
    ) [instance: 1, cache: 1];
    // 
    // node Echo[1]: x = 66, y = 387, inputs = 1, label = Echo
    // page group: describe
    //
    Echo(
    main_Format_1_out_1
    ) [instance: 1, cache: 1];
    //
    // decorator Annotate	pos=(0,25) size=376x54 style(Label), value = <NULL>
    // annotation user_begin: 192
    // annotation user: There are 3 DXLInputs: Name of data file, type of data file, a
    // annotation user: flag which is either 1 or 2 which says to Describe the data or
    // annotation user: return  a  net  name   to   run  in  order to  visualize the data.
    // annotation user_end: <NULL>
    // page group: import
// network: end of macro body
}
test_file = "/usr/lpp/dx/samples/data/cloudwater.dx";
test_format = "dx";
main_Import_1_in_2 = 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_Transmitter_1_out_1 = NULL;
main_Receiver_9_out_1 = NULL;
main_Inquire_16_in_2 = "is generic group +1";
main_Inquire_16_in_3 = NULL;
main_Inquire_16_out_1 = NULL;
main_Select_4_in_2 = NULL;
main_Select_4_in_3 = NULL;
main_Select_4_out_1 = NULL;
main_Switch_3_out_1 = NULL;
main_Inquire_17_in_2 = "is series  +1";
main_Inquire_17_in_3 = NULL;
main_Inquire_17_out_1 = NULL;
main_Select_5_in_2 = NULL;
main_Select_5_in_3 = NULL;
main_Select_5_out_1 = NULL;
main_Switch_4_out_1 = NULL;
main_Transmitter_7_out_1 = NULL;
main_Receiver_2_out_1 = NULL;
main_Inquire_11_in_2 = "has component";
main_Inquire_11_in_3 = "connections";
main_Inquire_11_out_1 = NULL;
main_Transmitter_3_out_1 = NULL;
main_Receiver_12_out_1 = NULL;
main_Inquire_14_in_2 = "is 2D positions";
main_Inquire_14_in_3 = NULL;
main_Inquire_14_out_1 = NULL;
main_Transmitter_4_out_1 = NULL;
main_Receiver_13_out_1 = NULL;
main_Inquire_19_in_2 = "is 2D connections ";
main_Inquire_19_in_3 = NULL;
main_Inquire_19_out_1 = NULL;
main_Transmitter_9_out_1 = NULL;
main_Receiver_14_out_1 = NULL;
main_Compute_1_in_1 = "$0 ? ( $2 ? 2 : 3) : ($1 ? 2 : 3)";
main_Compute_1_out_1 = NULL;
main_Transmitter_10_out_1 = NULL;
main_Receiver_18_out_1 = NULL;
main_Compute_2_in_1 = "$0 == 2 ? 1 : 0";
main_Compute_2_out_1 = NULL;
main_Receiver_17_out_1 = NULL;
main_Compute_4_in_1 = "$0==2 ? 2 : 4";
main_Compute_4_out_1 = NULL;
main_Transmitter_6_out_1 = NULL;
main_Receiver_15_out_1 = NULL;
main_Compute_5_in_1 = "$0 == 2 ? $1+1 : $1";
main_Compute_5_out_1 = NULL;
main_Receiver_16_out_1 = NULL;
main_Compute_6_in_1 = "$0 ? $1 : $1 + 4";
main_Compute_6_out_1 = NULL;
DescribeOrVisualize = 2;
main_Transmitter_2_out_1 = NULL;
main_Receiver_4_out_1 = NULL;
main_StringList_1_out_1 = { "Basic3D.net", "Basic2D.net", "Gridded_2D_1var_notseries.net", "Gridded_2D_2ormorevar_notseries.net", "Gridded_3D_1var_notseries.net", "Gridded_3D_2ormorevar_notseries.net", "UnGridded_2D_1var_notseries.net", "UnGridded_2D_2ormorevar_notseries.net", "UnGridded_3D_1var_notseries.net", "UnGridded_3D_2ormorevar_notseries.net", "FacesLoopsEdges.net" };
main_Inquire_20_in_2 = "has component + 1";
main_Inquire_20_in_3 = "faces";
main_Inquire_20_out_1 = NULL;
main_Transmitter_11_out_1 = NULL;
main_Receiver_19_out_1 = NULL;
main_Transmitter_8_out_1 = NULL;
main_Receiver_10_out_1 = NULL;
main_Switch_5_out_1 = NULL;
main_Switch_6_in_3 = 10;
main_Switch_6_out_1 = NULL;
main_Select_3_in_3 = NULL;
main_Select_3_out_1 = NULL;
main_Route_6_out_1 = NULL;
main_DXLOutput_1_in_1 = "net_to_run";
main_Receiver_3_out_1 = NULL;
main_Receiver_1_out_1 = NULL;
main_Route_5_out_2 = NULL;
main_Describe_2_in_2 = NULL;
main_Format_1_in_1 = "";
main_Format_1_in_3 = NULL;
main_Format_1_out_1 = NULL;
Executive("product version 3 1 4");
$sync
// This network contains DXLink tools.  Therefore, the following line(s)
// that would cause an execution when run in script mode have been 
// commented out.  This will facilitate the use of the DXLink routines
// exDXLLoadScript() and DXLLoadVisualProgram() when the DXLink
// application is connected to an executive.
// main();
