PCL Examples > Preference Functions > Graphics Preferences
   
Graphics Preferences
This section contains examples of some of the functions used to govern some of the preferences used to control how graphics are displayed to the user.
 
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function bar_elem_color()
#
#                      This illustration opens a new database and
#                      creates two nodes in it. Then it creates a bar
#                      element and changes its colour.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function bar_elem_color() has the following arguments:
#  bar_elem_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_node__nodes_creat[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Create two points
i_return_value =                                 @
   asm_const_grid_xyz( "",                       @
   "[0 0 0][10 0 0]", "Coord 0",                 @
   sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create two nodes
i_return_value =                                 @
   fem_create_nodes( "Coord 0", "Coord 0",       @
      TRUE, "1", "Point 1 2 ",                   @
      sv_fem_create_node__nodes_creat )
dump i_return_value
 
#  Show the label of bar element
bar_elem_label(TRUE)
 
#  Create a beam element
i_return_value =                                 @
   fem_create_elems( "Bar ", "Bar2",             @
      "1", "Standard",                           @
      TRUE, "Node 2 ", "Node 1 ",                @
      "", "", "", "", "", "",                    @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
 
#  Set the colour of the beam element to Red
i_color_value = 1
 
bar_elem_color                                   @
   (  i_color_value )
 
#  Observe the colour.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the beam element to BLUE
i_color_value = 4
 
bar_elem_color                                   @
   (  i_color_value )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_fem_create_node__nodes_creat )
sys_free_string( sv_fem_create_elemen_elem_creat )
#--------------------------------------------------------------------- 
   
()
#
#  Purpose          :  This file provides an example of two calls to
#                      the function bar_elem_label()
#
#                      This illustration opens a new database and
#                      creates two nodes in it. Then it creates a bar
#                      element and sets its label on and off.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function bar_elem_label() has the following arguments:
#
#  bar_elem_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_node__nodes_creat[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Create two points
i_return_value =                                 @
   asm_const_grid_xyz( "",                       @
   "[0 0 0][10 0 0]", "Coord 0",                 @
   sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create two nodes
i_return_value =                                 @
   fem_create_nodes( "Coord 0", "Coord 0",       @
      TRUE, "1", "Point 1 2 ",                   @
      sv_fem_create_node__nodes_creat )
dump i_return_value
 
#  Create a beam element
i_return_value =                                 @
   fem_create_elems( "Bar ", "Bar2",             @
      "1", "Standard",                           @
      TRUE, "Node 2 ", "Node 1 ",                @
      "", "", "", "", "", "",                    @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
#---------------------------------------------------------------------
#  Set the label of the beam element.
l_label_status = TRUE
 
bar_elem_label                                   @
   (  l_label_status )
 
#  Observe the label.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set off the label of the beam element.
l_label_status = FALSE
 
bar_elem_label                                   @
   (  l_label_status )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_fem_create_node__nodes_creat )
sys_free_string( sv_fem_create_elemen_elem_creat )
#--------------------------------------------------------------------- 
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function body_color()
#
#                      This illustration opens a new database and
#                      creates a B-Rep solid in it. It changes its
#                      colour to Red and then Blue.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function body_color() has the following arguments:
#
#  body_color
#     (  colour_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_colour_value
INTEGER  i_return_value
LOGICAL  l_label_status
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING   sv_sgm_create_solid_br_creat_id[VIRTUAL]
STRING   sv_asm_delete_any_deleted_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Create 6 patches.
i_return_value =                                 @
   asm_const_patch_xyz( "", "<1 1 0><1 0 1>"//   @
      "<0 1 1><0 1 1><1 0 1><1 1 0>",            @
      "[0 0 0][0 0 0][0 0 0][1 0 0]" //          @
      "[0 1 0][0 0 1]", "Coord 0",               @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
i_return_value =                                 @
   sgm_construct_solid_brep( "1", "Surface 1:6", @
      FALSE, sv_sgm_create_solid_br_creat_id )
dump i_return_value
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
#  Set the body label ON
l_label_status = TRUE
 
i_return_value =                                 @
   body_label                                    @
      (  l_label_status )
dump i_return_value
 
# Delete the Surfaces
i_return_value =                                 @
   asm_delete_surface( "Surface 1:6 ",           @
      sv_asm_delete_any_deleted_ids )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the body colour to Red (Colour value = 1)
#
i_colour_value = 1
 
i_return_value =                                 @
   body_color                                    @
      (  i_colour_value )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the body colour to BLUE (Colour value = 4)
#
i_colour_value = 4
 
i_return_value =                                 @
   body_color                                    @
      (  i_colour_value )
dump i_return_value
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_sgm_create_solid_br_creat_id )
sys_free_string( sv_asm_delete_any_deleted_ids )
#---------------------------------------------------------------------  
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function body_label()
#
#                      This illustration opens a new database and
#                      creates a B-Rep solid in it. It changes its 
#                      label ON and OFF.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function body_label() has the following arguments:
#  body_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING   sv_sgm_create_solid_br_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Create 6 patches.
i_return_value =                                 @
   asm_const_patch_xyz( "", "<1 1 0><1 0 1>"//   @
      "<0 1 1><0 1 1><1 0 1><1 1 0>",            @
      "[0 0 0][0 0 0][0 0 0][1 0 0]" //          @
      "[0 1 0][0 0 1]", "Coord 0",               @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
i_return_value =                                 @
   sgm_construct_solid_brep( "1", "Surface 1:6", @
      FALSE, sv_sgm_create_solid_br_creat_id )
dump i_return_value
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the body label ON
#
l_label_status = TRUE
 
i_return_value =                                 @
   body_label                                    @
      (  l_label_status )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the body label OFF
#
l_label_status = FALSE
 
i_return_value =                                 @
   body_label                                    @
      (  l_label_status )
dump i_return_value
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_sgm_create_solid_br_creat_id )
#--------------------------------------------------------------------- 
   
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function curve_color()
#
#                      This illustration opens a new database and
#                      creates a Curve in it. Then the colour  of
#                      the Curve is changed.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function curve_color() has the following arguments:
#
#  curve_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the Curves
curve_label(TRUE)
 
#  Create a line
i_return_value =                                 @
   asm_const_line_xyz( "1", "<1 0 0>",           @
   "[0 0 0]", "Coord 0",                         @
   sv_asm_create_line_xyz_creat_id )
dump i_return_value
#---------------------------------------------------------------------
#  Set the curve colour to Red
i_color_value = 1
 
curve_color                                      @
   (  i_color_value )
 
#  Observe the colour.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
# Set the Curve colour to Green
i_color_value = 11
 
curve_color                                      @
   (  i_color_value )
 
sys_free_string( sv_asm_create_line_xyz_creat_id )
#--------------------------------------------------------------------- 
   
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function curve_label()
#
#                      This illustration opens a new database and
#                      creates a Curve in it. Then the label  of
#                      the Curve is set on and off.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function curve_label() has the following arguments:
#
#  curve_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Create a line
i_return_value =                                 @
   asm_const_line_xyz( "1", "<1 0 0>",           @
   "[0 0 0]", "Coord 0",                         @
   sv_asm_create_line_xyz_creat_id )
dump i_return_value
#---------------------------------------------------------------------
#  Set the curve label
l_label_status = TRUE
 
curve_label                                      @
   (  l_label_status )
 
#  Observe the colour.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set OFF the curve label
l_label_status = FALSE
 
curve_label                                      @
   (  l_label_status )
 
sys_free_string( sv_asm_create_line_xyz_creat_id )
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function display_deformations()
#
#                      In this example a field.db is opened and the
#                      deform plot is initialized. Then the function
#                      is called to switch off the deform plot.
#
#                      Before running this session file run field.ses
#                      to create field.db. Follow the instruction in
#                      the field.ses file for analysis.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#
#  The function display_deformation()
#  has the following arguments:
#
#  display_deformations
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "field.db"
uil_file_open.go("field.db")
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
#---------------------------------------------------------------------
#  Initialize for deform plot.
 
i_return_value =                                                @
   res_init_deform_plot(  )
dump i_return_value
 
i_return_value =                                                @
   res_create_deform_plot_rec2( 1, 2, 1, 3,                     @
      [27, 28, 29, 0, 0, 0], 1, 1, 0., 8,                       @
      0, 1, 0, [0., 0., 0.] )
dump i_return_value
 
i_return_value =                                                @
   res_make_deform_plot( 1, [1], [1], [""], [0.], [             @
      "Default, Static Subcase: Displacements,"//               @
      " Translational -MSC.Nastran"] )
dump i_return_value
 
i_return_value =                                                @
   res_deinit_deform_plot(  )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
#  Switch off the display of deformation
#
l_label_status = FALSE
 
i_return_value =                                                @
   display_deformations                                         @
      (  l_label_status )
dump i_return_value
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function display_fa_vectors()
#
#                      In this example a new database is opened and 
#                      a patch is created. An LBC is created over the
#                      patch. Then the function is called to switch 
#                      off the display of functional assignment 
#                      vectors. Again, the vectors are displayed.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function display_fa_vectors() has the following arguments:
#  display_fa_vectors
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
#  Create a Patch.
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0",   @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create a LBC.
i_return_value =                                                @
   loadsbcs_create( "New", "Displacement", "Nodal", "",         @
      "Static", ["Surface 1"],                                  @
      "Geometry", "Coord 0", 1.,                                @
      ["<  0 0 0   >", "<  0 0 0   >"], ["", ""] )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Switch OFF the display of functional assignment vectors.
l_label_status = FALSE
 
i_return_value =                                                @
   display_fa_vectors                                           @
      (  l_label_status )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Switch ON the display of functional assignment vectors.
l_label_status = TRUE
 
i_return_value =                                                @
   display_fa_vectors                                           @
      (  l_label_status )
dump i_return_value
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function display_result_vectors()
#
#                      In this example a field.db is opened and the
#                      vector plot is initialized. Then the function
#                      is called to switch off the vector plot.
#
#                      Before running this session file run field.ses
#                      to create field.db. Follow the instruction in
#                      the field.ses file for analysis.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function display_result_vectors()
#  has the following arguments:
#
#  display_result_vectors
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "field.db"
uil_file_open.go("field.db")
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
#---------------------------------------------------------------------
#  Create Vector plot with default options
i_return_value =                                                @
   ga_range_create( "vector_range", 15 )
dump i_return_value
 
i_return_value =                                                @
   ga_viewport_range_set( "", "vector_range" )
dump i_return_value
 
i_return_value =                                                @
   res_init_vector_plot(  )
dump i_return_value
 
i_return_value =                                                @
   res_create_vector_plot_rec( 1, 2, 3,                         @
      [27, 28, 29, 0, 0, 0], [1, 1, 1], 1, 1,                   @
      0, 0, 1, 0., 2, 1, 1, 1 )
dump i_return_value
 
i_return_value =                                                @
   res_make_vector_plot( 1, [1], [2], [""], [0.], [             @
      "Default, Static Subcase: Displacements,"//               @
      " Translational -MSC.Nastran"] )
dump i_return_value
 
i_return_value =                                                @
   res_deinit_vector_plot(  )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Switch the vector plot OFF.
#
l_label_status = FALSE
 
i_return_value =                                                @
   display_result_vectors                                       @
      (  l_label_status )
dump i_return_value
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function hex_elem_color()
#
#                      This illustration opens a new database and
#                      creates a hyperpatch in it.It creates mesh seed
#                      and meshes with Hexagonal elements. Later it
#                      sets its clour to Red and Blue.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function hex_elem_color() has the following arguments:
#  hex_elem_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
INTEGER  i_fem_create_mesh_solid_nu_node
INTEGER  i_fem_create_mesh_solid_nu_elem
STRING   sv_fem_create_mesh_s_node_creat[VIRTUAL]
STRING   sv_fem_create_mesh_s_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
ui_exec_function( "mesh_seed_display_mgr", "init" )
 
i_return_value =                                 @
   mesh_seed_create( "Solid 1.1.3 1.1.4"//       @
      " 1.2.1 1.2.2 1.1.1 1.1.2 1.2.3 1.4.1 1"// @
      ".4.3 1.2.4 1.3.1 1.3.3 ", 1, 2, 0., 0., 0. )
dump i_return_value
 
i_return_value =                                 @
   fem_create_mesh_sol_3( "IsoMesh", 0,          @
      "Solid 1 ", 1, [0.1], "Hex8", "1", "1",    @
      "Coord 0", "Coord 0",                      @
      i_fem_create_mesh_solid_nu_node,           @
      i_fem_create_mesh_solid_nu_elem,           @
      sv_fem_create_mesh_s_node_creat,           @
      sv_fem_create_mesh_s_elem_creat )
dump i_return_value
 
#  Set the labels of the hexagonal elements ON
 
i_return_value =                                 @
   hex_elem_label                                @
      (  TRUE )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the hexagonal elements to Red (Colour value = 1)
#
i_color_value = 1
 
i_return_value =                                 @
   hex_elem_color                                @
      (  i_color_value )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the hexagonal elements to Blue (Colour value = 4)
#
i_color_value = 4
 
i_return_value =                                 @
   hex_elem_color                                @
      (  i_color_value )
dump i_return_value
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
sys_free_string( sv_fem_create_mesh_s_node_creat )
sys_free_string( sv_fem_create_mesh_s_elem_creat )
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function hex_elem_label()
#
#                      This illustration opens a new database and
#                      creates a hyperpatch in it.It creates mesh seed
#                      and meshes with Hexagonal elements. Later it
#                      sets its label ON and OFF. 
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function hex_elem_label() has the following arguments:
#  hex_elem_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
INTEGER  i_fem_create_mesh_solid_nu_node
INTEGER  i_fem_create_mesh_solid_nu_elem
STRING   sv_fem_create_mesh_s_node_creat[VIRTUAL]
STRING   sv_fem_create_mesh_s_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
ui_exec_function( "mesh_seed_display_mgr", "init" )
 
i_return_value =                                 @
   mesh_seed_create( "Solid 1.1.3 1.1.4"//       @
      " 1.2.1 1.2.2 1.1.1 1.1.2 1.2.3 1.4.1 1"// @
      ".4.3 1.2.4 1.3.1 1.3.3 ", 1, 2, 0., 0., 0. )
dump i_return_value
 
i_return_value =                                 @
   fem_create_mesh_sol_3( "IsoMesh", 0,          @
      "Solid 1 ", 1, [0.1], "Hex8", "1", "1",    @
      "Coord 0", "Coord 0",                      @
      i_fem_create_mesh_solid_nu_node,           @
      i_fem_create_mesh_solid_nu_elem,           @
      sv_fem_create_mesh_s_node_creat,           @
      sv_fem_create_mesh_s_elem_creat )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the labels of the hexagonal elements ON
#
l_label_status = TRUE
 
i_return_value =                                 @
   hex_elem_label                                @
      (  l_label_status )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the labels of the hexagonal elements OFF
#
l_label_status = FALSE
 
i_return_value =                                 @
   hex_elem_label                                @
      (  l_label_status )
dump i_return_value
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
sys_free_string( sv_fem_create_mesh_s_node_creat )
sys_free_string( sv_fem_create_mesh_s_elem_creat )
#--------------------------------------------------------------------- 
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function mpc_color()
#
#                      In this example a mpc.db is opened and the
#                      the colour of the MPCs present in the database
#                      is changed to Red and then Blue.
#
#                      Before running this session file run mpc.ses
#                      to create mpc.db. The mpc.db contains one MPC.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function mpc_color() has the following arguments:
#  mpc_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "mpc.db"
uil_file_open.go("mpc.db")
 
#  Set the label of the MPCs ON.
i_return_value =                                 @
   mpc_label                                     @
      (  TRUE )
dump i_return_value
 
#  Session file paused. Press "Resume" to contnue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of MPC to Red (Colour value 1)
i_color_value = 1
 
i_return_value =                                 @
   mpc_color                                     @
      (  i_color_value )
dump i_return_value
 
#  Session file paused. Press "Resume" to contnue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of MPC to Blue (Colour value 4)
i_color_value = 4
 
i_return_value =                                 @
   mpc_color                                     @
      (  i_color_value )
dump i_return_value
#--------------------------------------------------------------------- 
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function mpc_label()
#
#                      In this example a mpc.db is opened and the
#                      the label of the MPCs present in the database
#                      is set ON and OFF.
#
#                      Before running this session file run mpc.ses
#                      to create mpc.db. The mpc.db contains one MPC.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function mpc_label() has the following arguments:
#  mpc_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "mpc.db"
uil_file_open.go("mpc.db")
 
#  Set the label of the MPCs ON.
#
l_label_status = TRUE
 
i_return_value =                                 @
   mpc_label                                     @
      (  l_label_status )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the label of the MPCs OFF.
#
l_label_status = FALSE
 
i_return_value =                                 @
   mpc_label                                     @
      (  l_label_status )
dump i_return_value
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function node_color()
#
#                      This illustration opens a new database and
#                      creates a Point in it. Then it creates a node
#                      on it and changes its colour.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function node_color() has the following arguments:
#  node_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_nodes__node_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the nodes.
node_label(TRUE)
 
i_return_value =                                 @
   asm_const_grid_xyz( "1", "[0 0 0]",           @
      "Coord 0",                                 @
      sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create a node
i_return_value =                                 @
   fem_create_nodes( "Coord 0", "Coord 0",       @
      TRUE, "1", "Point 1 ",                     @
      sv_fem_create_nodes__node_creat )
dump i_return_value
#---------------------------------------------------------------------
#  Set the colour of node to Red
i_color_value = 1
 
node_color                                       @
   (  i_color_value )
 
#  Observe the colour.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of node to Blue
i_color_value = 4
 
node_color                                       @
   (  i_color_value )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_fem_create_nodes__node_creat )
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function node_label()
#
#                      This illustration opens a new database and
#                      creates a Point in it. Then it creates a node
#                      on the point and changes its label on and off.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function node_label() has the following arguments:
#  node_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_nodes__node_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
i_return_value =                                 @
   asm_const_grid_xyz( "1", "[0 0 0]",           @
      "Coord 0",                                 @
      sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create a node
i_return_value =                                 @
   fem_create_nodes( "Coord 0", "Coord 0",       @
      TRUE, "1", "Point 1 ",                     @
      sv_fem_create_nodes__node_creat )
dump i_return_value
#---------------------------------------------------------------------
#  Set the label of node.
l_label_status = TRUE
 
node_label                                       @
   (  l_label_status )
 
#  Observe the label.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set OFF, the label of node.
l_label_status = FALSE
 
node_label                                       @
   (  l_label_status )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_fem_create_nodes__node_creat )
#--------------------------------------------------------------------- 
 
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function point_elem_color()
#
#                      This illustration opens a new database and
#                      creates a Point in it. Then it creates a point
#                      element and changes its colour.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function point_elem_color() has the following arguments:
#
#  point_elem_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_nodes__node_creat[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the point elements.
point_elem_label(TRUE)
 
i_return_value =                                 @
   asm_const_grid_xyz( "1", "[0 0 0]",           @
      "Coord 0",                                 @
      sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create a node
i_return_value =                                 @
   fem_create_nodes( "Coord 0", "Coord 0",       @
      TRUE, "1", "Point 1 ",                     @
      sv_fem_create_nodes__node_creat )
dump i_return_value
 
#  Create a point element
i_return_value =                                 @
   fem_create_elems( "Point ", "Point",          @
      "1", "Standard", TRUE, "Node 1 ",          @
      "", "",  "", "", "", "", "",               @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
#---------------------------------------------------------------------
#  Set the colour of point element to Red
i_color_value = 1
 
point_elem_color                                 @
   (  i_color_value )
 
#  Observe the colour.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of point element to Blue
i_color_value = 4
 
point_elem_color                                 @
   (  i_color_value )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_fem_create_nodes__node_creat )
sys_free_string( sv_fem_create_elemen_elem_creat )
#--------------------------------------------------------------------- 
   
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function point_color()
#
#                      This illustration opens a new database and
#                      creates a Point in it. Then the colour  of
#                      the point is changed.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function point_color() has the following arguments:
#  point_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the points
point_label(TRUE)
 
i_return_value =                                 @
   asm_const_grid_xyz( "1", "[0 0 0]",           @
      "Coord 0",                                 @
      sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Set the point color to Red
i_color_value = 1
 
point_color                                      @
   (  i_color_value )
 
#  Observe the colour.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
# Set the point color to Green
i_color_value = 11
 
point_color                                      @
   (  i_color_value )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
#----------------------------------------------------------------------  
 
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function point_elem_label()
#
#                      This illustration opens a new database and
#                      creates a Point in it. Then it creates a point
#                      element and changes its label on and off.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function point_elem_label() has the following arguments:
#  point_elem_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_nodes__node_creat[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
i_return_value =                                 @
   asm_const_grid_xyz( "1", "[0 0 0]",           @
      "Coord 0",                                 @
      sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create a node
i_return_value =                                 @
   fem_create_nodes( "Coord 0", "Coord 0",       @
      TRUE, "1", "Point 1 ",                     @
      sv_fem_create_nodes__node_creat )
dump i_return_value
 
#  Create a point element
i_return_value =                                 @
   fem_create_elems( "Point ", "Point",          @
      "1", "Standard", TRUE, "Node 1 ",          @
      "", "",  "", "", "", "", "",               @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
#---------------------------------------------------------------------
#  Set the label of the point element.
l_label_status = TRUE
 
point_elem_label                                 @
   (  l_label_status )
 
#  Observe the label.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set OFF, the label of the point element.
l_label_status = FALSE
 
point_elem_label                                 @
   (  l_label_status )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_fem_create_nodes__node_creat )
sys_free_string( sv_fem_create_elemen_elem_creat )
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function point_label()
#
#                      This illustration opens a new database and
#                      creates a Point in it. Then the label  of
#                      the point is changed.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function point_label() has the following arguments:
#
#  point_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
i_return_value =                                 @
   asm_const_grid_xyz( "1", "[0 0 0]",           @
      "Coord 0",                                 @
      sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Show the labels of the points
l_label_status = TRUE
 
point_label                                      @
   (  l_label_status )
 
#  Observe the label.
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Erase the labels of points
l_label_status = FALSE
 
point_label                                      @
   (  l_label_status )
 
sys_free_string( sv_asm_create_grid_xyz_creat_id )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function pref_graphics_set()
#
#                      This function gets the graphic preference 
#                      parameters. This file opens a new database
#                      "new.db" and creates a point and node.
#                      Then it gets the graphic preference
#                      parameters.Later it changes the preference
#                      for grid size and node size and finally gets
#                      the graphic preference again.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function pref_graphics_set() has the following arguments:
#
#  pref_graphics_set
#     (  disp_meth,
#        p_color,
#        s_color,
#        e_color,
#        extend,
#        fit_view,
#        center,
#        hard_rend,
#        anti_alias,
#        td_vector,
#        rt_display,
#        s_light,
#        p_marker,
#        s_marker,
#        m_color,
#        m_size,
#        gm_size,
#        nm_size,
#        l_format,
#        nsigd )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_disp_meth
INTEGER  i_p_color
INTEGER  i_s_color
INTEGER  i_e_color
LOGICAL  l_extend
LOGICAL  l_fit_view
LOGICAL  l_center
LOGICAL  l_hard_rend
LOGICAL  l_anti_alias
LOGICAL  l_td_vector
LOGICAL  l_rt_display
LOGICAL  l_s_light
INTEGER  i_p_marker
INTEGER  i_s_marker
INTEGER  i_m_color
INTEGER  i_m_size
INTEGER  i_gm_size
INTEGER  i_nm_size
INTEGER  i_l_format
INTEGER  i_nsigd
LOGICAL  l_set_flag(20)
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
STRING   sv_fem_create_nodes_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Create a Point and Node.
i_return_value =                                  @
   asm_const_grid_xyz( "1", "[0 0 0]", "Coord 0", @
      sv_asm_create_grid_xyz_created )
dump i_return_value
 
i_return_value =                                  @
   fem_create_nodes( "Coord 0", "Coord 0", TRUE,  @
      "1", " [0 0 0]",                            @
      sv_fem_create_nodes_created )
dump i_return_value
 
i_return_value =                                  @
   pref_graphics_get                              @
      (  i_disp_meth,                             @
         i_p_color,                               @
         i_s_color,                               @
         i_e_color,                               @
         l_extend,                                @
         l_fit_view,                              @
         l_center,                                @
         l_hard_rend,                             @
         l_anti_alias,                            @
         l_td_vector,                             @
         l_rt_display,                            @
         l_s_light,                               @
         i_p_marker,                              @
         i_s_marker,                              @
         i_m_color,                               @
         i_m_size,                                @
         i_gm_size,                               @
         i_nm_size,                               @
         i_l_format,                              @
         i_nsigd )
dump i_return_value
 
#  Display method is
dump  i_disp_meth
#  Primary color is
dump  i_p_color
#  Secondary color is
dump  i_s_color
#  Error color is
dump  i_e_color
#  Autoextend Flag is
dump  l_extend
#  Autofitview Flag is
dump  l_fit_view
#  Autocenter Flag is
dump  l_center
#  Hardware rendering Flag is
dump  l_hard_rend
#  Anti-Alias flag is
dump  l_anti_alias
#  3-D vector Display Flag is
dump  l_td_vector
#  Result Title Display Flag is
dump  l_rt_display
#  Symmetric Light Flag is
dump  l_s_light
#  Primary marker is
dump  i_p_marker
#  Secondary marker is
dump  i_s_marker
#  Marker color is
dump  i_m_color
#  Marker size is
dump  i_m_size
#  Grid marker size is
dump  i_gm_size
#  Node marker size is
dump  i_nm_size
#  Results label format is
dump  i_l_format
#  Number of significant results digits are
dump  i_nsigd
 
#  Session file paused. Press "Resume" to continue...
sf_pause()
 
l_set_flag(17) = TRUE
l_set_flag(18) = TRUE
i_gm_size = 25
i_nm_size = 50
i_return_value =                                  @
   pref_graphics_set                              @
      (  l_set_flag,                              @
         i_disp_meth,                             @
         i_p_color,                               @
         i_s_color,                               @
         i_e_color,                               @
         l_extend,                                @
         l_fit_view,                              @
         l_center,                                @
         l_hard_rend,                             @
         l_anti_alias,                            @
         l_td_vector,                             @
         l_rt_display,                            @
         l_s_light,                               @
         i_p_marker,                              @
         i_s_marker,                              @
         i_m_color,                               @
         i_m_size,                                @
         i_gm_size,                               @
         i_nm_size,                               @
         i_l_format,                              @
         i_nsigd )
dump i_return_value
 
#  Reset the values
i_gm_size = 0
i_nm_size = 0
i_return_value =                                  @
   pref_graphics_get                              @
      (  i_disp_meth,                             @
         i_p_color,                               @
         i_s_color,                               @
         i_e_color,                               @
         l_extend,                                @
         l_fit_view,                              @
         l_center,                                @
         l_hard_rend,                             @
         l_anti_alias,                            @
         l_td_vector,                             @
         l_rt_display,                            @
         l_s_light,                               @
         i_p_marker,                              @
         i_s_marker,                              @
         i_m_color,                               @
         i_m_size,                                @
         i_gm_size,                               @
         i_nm_size,                               @
         i_l_format,                              @
         i_nsigd )
dump i_return_value
 
#  Grid marker size is
dump  i_gm_size
#  Node marker size is
dump  i_nm_size
SYS_FREE_STRING( sv_asm_create_grid_xyz_created )
SYS_FREE_STRING( sv_fem_create_nodes_created )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function quad_elem_color()
#
#                      This illustration opens a new database and
#                      creates a patch in it. It creates mesh seed
#                      and meshes with quad elements. Later it
#                      sets the colour of the quad elements Red and
#                      then Blue.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function quad_elem_color() has the following arguments:
#  quad_elem_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
INTEGER  i_fem_create_mesh_surfa_nu_node
INTEGER  i_fem_create_mesh_surfa_nu_elem
STRING   sv_fem_create_mesh_s_node_creat[VIRTUAL]
STRING   sv_fem_create_mesh_s_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
ui_exec_function( "mesh_seed_display_mgr", "init" )
 
i_return_value =                                 @
   mesh_seed_create( "Surface 1.1 1.2 1.3 1.4 ", @
      1, 2, 0., 0., 0. )
dump i_return_value
 
i_return_value =                                 @
   fem_create_mesh_surf_2( "IsoMesh", 0,         @
      "Surface 1 ", 1, [0.1], "Quad4", "1",      @
      "1", "Coord 0", "Coord 0",                 @
      i_fem_create_mesh_surfa_nu_node,           @
      i_fem_create_mesh_surfa_nu_elem,           @
      sv_fem_create_mesh_s_node_creat,           @
      sv_fem_create_mesh_s_elem_creat )
dump i_return_value
 
#  Set the labels of the Quad elements ON
i_return_value =                                 @
   quad_elem_label                               @
      (  TRUE )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the quad element to Red (Colour value = 1)
#
i_color_value = 1
 
i_return_value =                                 @
   quad_elem_color                               @
      (  i_color_value )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the quad element to Blue (Colour value = 4)
#
i_color_value = 4
 
i_return_value =                                 @
   quad_elem_color                               @
      (  i_color_value )
dump i_return_value
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_fem_create_mesh_s_node_creat )
sys_free_string( sv_fem_create_mesh_s_elem_creat )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function quad_elem_label()
#
#                      This illustration opens a new database and
#                      creates a patch in it. It creates mesh seed
#                      and meshes with quad elements. Later it
#                      sets its label ON and OFF.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function quad_elem_label() has the following arguments:
#
#  quad_elem_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
INTEGER  i_fem_create_mesh_surfa_nu_node
INTEGER  i_fem_create_mesh_surfa_nu_elem
STRING   sv_fem_create_mesh_s_node_creat[VIRTUAL]
STRING   sv_fem_create_mesh_s_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
ui_exec_function( "mesh_seed_display_mgr", "init" )
 
i_return_value =                                 @
   mesh_seed_create( "Surface 1.1 1.2 1.3 1.4 ", @
      1, 2, 0., 0., 0. )
dump i_return_value
 
i_return_value =                                 @
   fem_create_mesh_surf_2( "IsoMesh", 0,         @
      "Surface 1 ", 1, [0.1], "Quad4", "1",      @
      "1", "Coord 0", "Coord 0",                 @
      i_fem_create_mesh_surfa_nu_node,           @
      i_fem_create_mesh_surfa_nu_elem,           @
      sv_fem_create_mesh_s_node_creat,           @
      sv_fem_create_mesh_s_elem_creat )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the labels of the Quad elements ON
#
l_label_status = TRUE
 
i_return_value =                                 @
   quad_elem_label                               @
      (  l_label_status )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the labels of the Quad elements OFF
#
l_label_status = FALSE
 
i_return_value =                                 @
   quad_elem_label                               @
      (  l_label_status )
dump i_return_value
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_fem_create_mesh_s_node_creat )
sys_free_string( sv_fem_create_mesh_s_elem_creat )
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function renderstyle()
#
#                      This illustration opens a new database and
#                      creates a solid in it. It then shades it .
#                      Then render style is changed to "Hidden Line"
#                      and finally "Shaded flat"
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function renderstyle() has the following arguments:
#
#  renderstyle
#     (  style )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_style[128]
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
#  Shade the solid
uil_toolbar.shaded_smooth(  )
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Change the Renderstyle to "Hidden Line"
#
s_style = "Hidden Line"
 
i_return_value =                                 @
   renderstyle                                   @
      (  s_style )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Change the Renderstyle to "Shaded/Flat"
#
s_style = "Shaded/Flat"
 
i_return_value =                                 @
   renderstyle                                   @
      (  s_style )
dump i_return_value
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function shade_color()
#
#                      This illustration opens a new database and
#                      creates a solid in it. It then shades it in 
#                      different colours.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function shade_color() has the following arguments:
#  shade_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Set the view
i_return_value =                                 @
   ga_view_aa_set                                @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
#  Shade the solid
uil_toolbar.shaded_smooth(  )
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the shade color to Red (Colour value = 1)
#
i_color_value = 1
 
i_return_value =                                 @
   shade_color                                   @
      (  i_color_value )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the shade color to Blue (Colour value = 4)
#
i_color_value = 4
 
i_return_value =                                 @
   shade_color                                   @
      (  i_color_value )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Set the shade color to Cyan (Colour value = 14)
#
i_color_value = 14
 
i_return_value =                                 @
   shade_color                                   @
      (  i_color_value )
dump i_return_value
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function solid_color()
#
#                      In this example a new database is opened and
#                      a solid is created. Then the function is called
#                      to change the colour of solid to Red and then 
#                      Blue.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function solid_color() has the following arguments:
#  solid_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0",    @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
#  Set the solid label ON
solid_label( TRUE )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the solid colour to Red (Colour value = 1)
#
i_color_value = 1
 
solid_color (  i_color_value )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the solid colour to Blue (Colour value = 4)
#
i_color_value = 4
 
solid_color (  i_color_value )
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function solid_label()
#
#                      In this example a new database is opened and
#                      a solid is created. Then the function is called
#                      to set the solid label to ON and OFF.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function solid_label() has the following arguments:
#  solid_label
#     (  label_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_value
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0",    @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the solid label ON
#
l_label_value = TRUE
 
solid_label (  l_label_value )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the solid label OFF
#
l_label_value = FALSE
 
solid_label (  l_label_value )
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
#--------------------------------------------------------------------- 
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function surface_color()
#
#                      In this example a new database is opened and
#                      a surface is created. Then the function is 
#                      called to change the colour of surface to Red 
#                      and then Blue.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function surface_color() has the following arguments:
#  surface_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view.
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
#  Create a Patch
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0",   @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Set the surface label ON
surface_label (  TRUE )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the surface to Red.
#
i_color_value = 1
 
surface_color (  i_color_value )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the surface to Blue.
#
i_color_value = 4
 
surface_color (  i_color_value )
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function surface_label()
#
#                      In this example a new database is opened and
#                      a surface is created. Then the function is
#                      called to set the surface label ON and OFF.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function surface_label() has the following arguments:
#  surface_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view.
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
#  Create a Patch
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0",   @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the surface label ON
#
l_label_status = TRUE
 
surface_label (  l_label_status )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the surface label OFF
#
l_label_status = FALSE
 
surface_label (  l_label_status )
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function tet_elem_color()
#
#                      In this example a new database is opened and
#                      a solid is created. A tetrahedral element is 
#                      created inside the solid.Then the function is 
#                      called to change the colour of element to Red
#                      and then Blue.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function tet_elem_color() has the following arguments:
#
#  tet_elem_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0",    @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
i_return_value =                                                @
   fem_create_elems( "Tet ", "Tet4", "1", "Standard",           @
      TRUE, "Point 1 ", "Point 3 ", "Point 8 ",                 @
      "Point 4 ", "", "", "", "",                               @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
 
#  Set the tetrahedral element label ON
tet_elem_label (  TRUE )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of Tetrahedral element to Red.
#
i_color_value = 1
 
tet_elem_color (  i_color_value )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of Tetrahedral element to Blue.
#
i_color_value = 4
 
tet_elem_color (  i_color_value )
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
sys_free_string( sv_fem_create_elemen_elem_creat )
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function tet_elem_label()
#
#                      In this example a new database is opened and
#                      a solid is created. A tetrahedral element is
#                      created inside the solid.Then the function is
#                      called to set the label of tetrahedral element
#                      ON and OFF
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function tet_elem_label() has the following arguments:
#  tet_elem_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0",    @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
i_return_value =                                                @
   fem_create_elems( "Tet ", "Tet4", "1", "Standard",           @
      TRUE, "Point 1 ", "Point 3 ", "Point 8 ",                 @
      "Point 4 ", "", "", "", "",                               @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the tetrahedral element label ON
#
l_label_status = TRUE
 
tet_elem_label (  l_label_status )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the tetrahedral element label OFF
#
l_label_status = FALSE
 
tet_elem_label (  l_label_status )
dump i_return_value
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
sys_free_string( sv_fem_create_elemen_elem_creat )
#--------------------------------------------------------------------
-
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function tri_elem_color()
#
#                      In this example a new database is opened and
#                      a surface is created. A triangular element is
#                      created inside the surface.Then the function is
#                      called to change the colour of element to Red 
#                      and then Blue.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function tri_elem_color() has the following arguments:
#  tri_elem_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
#  Create a Patch.
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0",   @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create a Tria element.
i_return_value =                                                @
   fem_create_elems( "Tri ", "Tria3", "1", "Standard",          @
      TRUE, "Point 1 ", "Point 4 ", "Point 3 ", "",             @
      "", "", "", "", sv_fem_create_elemen_elem_creat )
dump i_return_value
 
#  Set the Triangular element label ON
tri_elem_label (  TRUE )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the Triangular element to Red.
#
i_color_value = 1
 
tri_elem_color (  i_color_value )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of the Triangular element to Blue.
#
i_color_value = 4
 
tri_elem_color (  i_color_value )
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_fem_create_elemen_elem_creat )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function tri_elem_label()
#
#                      In this example a new database is opened and
#                      a surface is created. A triangular element is
#                      created inside the surface.Then the function is
#                      called to set the label of Triangular element
#                      ON and OFF
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function tri_elem_label() has the following arguments:
#  tri_elem_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
#  Create a Patch.
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0",   @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create a Tria element.
i_return_value =                                                @
   fem_create_elems( "Tri ", "Tria3", "1", "Standard",          @
      TRUE, "Point 1 ", "Point 4 ", "Point 3 ", "",             @
      "", "", "", "", sv_fem_create_elemen_elem_creat )
dump i_return_value
 
#  Set the colour of the Triangular element to Red(Colour value 1).
tri_elem_color (  1 )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the Triangular element label ON
#
l_label_status = TRUE
 
tri_elem_label (  l_label_status )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the Triangular element label OFF
#
l_label_status = FALSE
 
tri_elem_label (  l_label_status )
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_fem_create_elemen_elem_creat )
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function trim_surface_color()
#
#                      In this example a new database is opened and
#                      2 surfaces are created. One surface is trimmed
#                      from other to create a new trimmed surface.
#                      Then the colour of that surface is changed to
#                      Red and then Blue.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function trim_surface_color() has the following arguments:
#  trim_surface_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
INTEGER  i_sgm_creat_curv_aut_segment_id
STRING   sv_sgm_create_cur_creat_curv_id[VIRTUAL]
STRING   sv_sgm_surfac_trimmed__creat_id[VIRTUAL]
STRING   sv_asm_delete_surface_delet_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Create two patches.
i_return_value =                                 @
   asm_const_patch_xyz( "", "<1 1 0><0.5 0.5 0>",@
      "[0 0 0][0.25 0.25 0]", "Coord 0",         @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create chain curve
i_return_value =                                 @
   sgm_create_curve_chain_v1( "1",               @
      " Surface 1.2 Surface 1.3 Surface 1.4"//   @
      " Surface 1.1", TRUE,                      @
      i_sgm_creat_curv_aut_segment_id,           @
      sv_sgm_create_cur_creat_curv_id )
dump i_return_value
 
#  Create chain curve
i_return_value =                                 @
   sgm_create_curve_chain_v1( "2",               @
      " Surface 2.2 Surface 2.3 Surface 2.4"//   @
      " Surface 2.1", TRUE,                      @
      i_sgm_creat_curv_aut_segment_id,           @
      sv_sgm_create_cur_creat_curv_id )
dump i_return_value
 
#  Create trimmed surface
i_return_value =                                 @
   sgm_create_surface_trimmed_v1( "3",           @
      "Curve 1 ", "Curve 2 ", "Surface 1",       @
      TRUE, TRUE, TRUE, TRUE,                    @
      sv_sgm_surfac_trimmed__creat_id )
$? YES 38000217
$? YES 38000217
$? YES 38000219
dump i_return_value
 
#  Delete old surface
i_return_value =                                 @
   asm_delete_surface( "Surface 2 ",             @
      sv_asm_delete_surface_delet_ids )
dump i_return_value
 
#  Set the trimmed surface label ON
trim_surface_label (  TRUE )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of Trimmed surface to RED.
#
i_color_value = 1
 
trim_surface_color (  i_color_value )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of Trimmed surface to BLUE.
#
i_color_value = 4
 
trim_surface_color (  i_color_value )
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_sgm_create_cur_creat_curv_id )
sys_free_string( sv_sgm_surfac_trimmed__creat_id )
sys_free_string( sv_asm_delete_surface_delet_ids )
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function trim_surface_label()
#
#                      In this example a new database is opened and
#                      2 surfaces are created. One surface is trimmed
#                      from other to create a new trimmed surface.
#                      Then the label of that  surface is switched
#                      ON and OFF.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function trim_surface_label() has the following arguments:
#  trim_surface_label
#     (  label_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
INTEGER  i_sgm_creat_curv_aut_segment_id
STRING   sv_sgm_create_cur_creat_curv_id[VIRTUAL]
STRING   sv_sgm_surfac_trimmed__creat_id[VIRTUAL]
STRING   sv_asm_delete_surface_delet_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Create two patches.
i_return_value =                                 @
   asm_const_patch_xyz( "", "<1 1 0><0.5 0.5 0>",@
      "[0 0 0][0.25 0.25 0]", "Coord 0",         @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create a chain curve
i_return_value =                                 @
   sgm_create_curve_chain_v1( "1",               @
      " Surface 1.2 Surface 1.3 Surface 1.4"//   @
      " Surface 1.1", TRUE,                      @
      i_sgm_creat_curv_aut_segment_id,           @
      sv_sgm_create_cur_creat_curv_id )
dump i_return_value
 
#  Create a chain curve
i_return_value =                                 @
   sgm_create_curve_chain_v1( "2",               @
      " Surface 2.2 Surface 2.3 Surface 2.4"//   @
      " Surface 2.1", TRUE,                      @
      i_sgm_creat_curv_aut_segment_id,           @
      sv_sgm_create_cur_creat_curv_id )
dump i_return_value
 
#  Create trimmed surface
i_return_value =                                 @
   sgm_create_surface_trimmed_v1( "3",           @
      "Curve 1 ", "Curve 2 ", "Surface 1",       @
      TRUE, TRUE, TRUE, TRUE,                    @
      sv_sgm_surfac_trimmed__creat_id )
$? YES 38000217
$? YES 38000217
$? YES 38000219
dump i_return_value
 
#  Delete old surface
i_return_value =                                 @
   asm_delete_surface( "Surface 2 ",             @
      sv_asm_delete_surface_delet_ids )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the trimmed surface label ON
#
l_label_status = TRUE
 
trim_surface_label (  l_label_status )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the trimmed surface label OFF
#
l_label_status = FALSE
 
trim_surface_label (  l_label_status )
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_sgm_create_cur_creat_curv_id )
sys_free_string( sv_sgm_surfac_trimmed__creat_id )
sys_free_string( sv_asm_delete_surface_delet_ids )
#--------------------------------------------------------------------- 
 
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function wedge_elem_color()
#
#                      In this example a new database is opened and
#                      a solid is created. A wedge element is created
#                      over the solid. Then the function is called
#                      to change the colour of wedge to Blue and then
#                      Red.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function wedge_elem_color() has the following arguments:
#  wedge_elem_color
#     (  color_value )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_color_value
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0",    @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
i_return_value =                                                @
   fem_create_elems( "Wed ", "Wedge6", "1",                     @
      "Standard", TRUE, "Point 1 ",                             @
      "Point 4 ", "Point 3 ", "Point 5 ", "Point 8 ",           @
      "Point 7 ", "", "",                                       @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
 
#  Set the wedge element label ON
wedge_elem_label (  TRUE )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of Wedge Element to Blue.
#
i_color_value = 4
 
wedge_elem_color (  i_color_value )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the colour of Wedge Element to Red.
#
i_color_value = 1
 
wedge_elem_color (  i_color_value )
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
sys_free_string( sv_fem_create_elemen_elem_creat )
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function wedge_elem_label()
#
#                      In this example a new database is opened and
#                      a solid is created. A wedge element is created
#                      over the solid. Then the function is called
#                      to set the label of Wedge element ON and OFF.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function wedge_elem_label() has the following arguments:
#  wedge_elem_label
#     (  label_status )
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_label_status
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
STRING   sv_fem_create_elemen_elem_creat[VIRTUAL]
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Set the view
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  -67., 0., -34. )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0",    @
      sv_asm_create_hpat_xyz_creat_id )
dump i_return_value
 
i_return_value =                                                @
   fem_create_elems( "Wed ", "Wedge6", "1",                     @
      "Standard", TRUE, "Point 1 ",                             @
      "Point 4 ", "Point 3 ", "Point 5 ", "Point 8 ",           @
      "Point 7 ", "", "",                                       @
      sv_fem_create_elemen_elem_creat )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the wedge element label ON
#
l_label_status = TRUE
 
wedge_elem_label (  l_label_status )
 
#  Session file paused. Press "Resume" to continue ...
sf_pause()
#---------------------------------------------------------------------
#  Set the wedge element label OFF
#
l_label_status = FALSE
 
wedge_elem_label (  l_label_status )
 
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
sys_free_string( sv_fem_create_elemen_elem_creat )
#---------------------------------------------------------------------