PCL Examples > Basic Functions > Tools Menu
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Tools Menu
This section contains examples of functions used to create and manipulate lists of geometric and finite element model entities using the list processor and the list processor format.
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_boolean_list()
#
#                      This function creates a list of entities by
#                      combining the contents of the global string
#                      "lista" and "listb" using the type of operation
#                      specified by the input string "boolean" and
#                      placing the the results in the global string
#                      "listc"
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. The string for 
#                      list "s_blist_a" and "s_blist_b" are then
#                      defined. The boolean operation carried out in
#                      this example is "and". The return list is
#                      verified after the boolean operation.
#
#                      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 list_create_boolean_list()
#  has the following arguments:
#
#  list_create_boolean_list
#     (  blist_a,
#        blist_b,
#        btype,
#        bret_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_blist_a[32]
STRING   s_blist_b[32]
STRING   s_btype[7]
STRING   sv_bret_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create boolean list
 
s_blist_a = "Point 1:4"
s_blist_b = "Point 1 2"
s_btype   = "and"
 
i_return_value =                                                @
   list_create_boolean_list                                     @
      (  s_blist_a,                                             @
         s_blist_b,                                             @
         s_btype,                                               @
         sv_bret_list )
dump i_return_value
dump sv_bret_list
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_bret_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_curve_ass_geo()
#
#                      This function creates a list of all curves
#                      associated with a list of geometric entities.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. The list of
#                      curves associated with "Surface 1" is obtained
#                      using  this  function  in  "lista"  and
#                      "sv_return_list".
#
#                      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 list_create_curve_ass_geo()
#  has the following arguments:
#
#  list_create_curve_ass_geo
#     (  entity_list,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_list[32]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all curves associated with "Surface 1 "
 
s_entity_list  = "Surface 1"
s_target       = "lista"
 
i_return_value =                                                @
   list_create_curve_ass_geo                                    @
      (  s_entity_list,                                         @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_curve_ass_group()
#
#                      This function creates a list of all curves
#                      associated with specified group.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. The list of
#                      curves associated with "default_group" is
#                      obtained  using  this  function  in  "lista"
#                      and "sv_return_list".
#
#                      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 list_create_curve_ass_group()
#  has the following arguments:
#
#  list_create_curve_ass_group
#     (  group_list,
#        number_of_groups,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   sa_group_list[32](1)
INTEGER  i_number_of_groups
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all curves present in  "default_group "
 
sa_group_list(1)   = "default_group"
i_number_of_groups = 1
s_target           = "lista"
 
i_return_value =                                                @
   list_create_curve_ass_group                                  @
      (  sa_group_list,                                         @
         i_number_of_groups,                                    @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_elem_ass_geo()
#
#                      This function creates a list of all elements
#                      associated with a list of geomeric entities.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. 2 "quad"
#                      elements are created using "Surface 1". Then
#                      the list of elements  associated with
#                      "Surface 1" is obtained using this function in
#                      "lista" and "sv_return_list".
#
#                      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 list_create_elem_ass_geo() 
#  has the following arguments:
#
#  list_create_elem_ass_geo
#     (  element_shape_code,
#        entity_list,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_element_shape_code
STRING   s_entity_list[32]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all elements associated with "Surface 1"
 
i_element_shape_code = 4
s_entity_list        = "Surface 1"
s_target             = "lista"
 
i_return_value =                                                @
   list_create_elem_ass_geo                                     @
      (  i_element_shape_code,                                  @
         s_entity_list,                                         @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_elem_ass_group()
#                      "sv_return_list".
#
#                      This function creates a list of all elements
#                      associated with specified group.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. 2 "quad"
#                      elements are created using "Surface 1". Then
#                      the list of elements  associated with
#                      "default_group" is obtained using this function
#                      in "lista" and "sv_return_list".
#
#                      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 list_create_elem_ass_group()
#  has the following arguments:
#
#  list_create_elem_ass_group
#     (  element_shape_code,
#        group_list,
#        number_of_groups,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_element_shape_code
STRING   sa_group_list[32](1)
INTEGER  i_number_of_groups
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all elements present in "default_group"
 
i_element_shape_code = 4
sa_group_list(1)     = "default_group"
i_number_of_groups   = 1
s_target             = "lista"
 
i_return_value =                                                @
   list_create_elem_ass_group                                   @
      (  i_element_shape_code,                                  @
         sa_group_list,                                         @
         i_number_of_groups,                                    @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_elem_ass_node()
#
#                      This function creates a list of all elements
#                      associated with a list of nodes.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. 2 "quad"
#                      elements are created using "Surface 1". Then
#                      the list of elements  associated with "Node 3"
#                      is obtained using this function in "lista" and
#                      and "sv_return_list".
#
#                      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 list_create_elem_ass_node()
#  has the following arguments:
#
#  list_create_elem_ass_node
#     (  element_shape_code,
#        node_list,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_element_shape_code
STRING   s_node_list[64]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all elements associated with "Node 3".
 
i_element_shape_code = 4
s_node_list          = "Node 3"
s_target             = "lista"
 
i_return_value =                                                @
   list_create_elem_ass_node                                    @
      (  i_element_shape_code,                                  @
         s_node_list,                                           @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_elem_att_fringe()
#
#                      This function creates a list of all finite
#                      element model shape with specified fringe value
#                      in a single group of geometric entities.
#
#                      In this example a field.db is opened and the
#                      fringe plots for displacement and translation
#                      are created. Then this function is called to
#                      create a list of elements between specified
#                      fringe values in "lista" and "sv_return_list".
#
#                      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 list_create_elem_att_fringe()
#  has the following arguments:
#
#  list_create_elem_att_fringe
#     (  element_shape_code,
#        fringe_limits,
#        fringe_comparison_type,
#        tolerance,
#        group_name,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_element_shape_code
REAL     ra_fringe_limits(2)
STRING   s_fringe_comparison_type[7]
REAL     r_tolerance
STRING   s_group_name[32]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "field.db"
uil_file_open.go("field.db")
 
#  Set ISO-1 viewing
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Initialize parameters for fringe plot
i_return_value =                                                @
   res_init_fringe_plot(  )
dump i_return_value
 
#  Create plot record for fringe plot
i_return_value =                                                @
   res_create_fringe_plot_rec3                                  @
      (  1,2,1,1,1,1,0,0,1.,"",1,2,3,23,1,1,0.,30,0,1 )
dump i_return_value
 
#  Create a fringe plot
i_return_value =                                                @
   res_make_fringe_plot                                         @
      (  1, [1], [1], [""], [0.], ["Default, Static Subcase:"// @
         " Displacements, Translational (VEC-MAG) -MSC.Nastran"])
dump i_return_value
 
#  Clear memory used in fringe plot and exit fringe plot module
i_return_value =                                                @
   res_deinit_fringe_plot(  )
dump i_return_value
#---------------------------------------------------------------------
#  Create a list of all elements for a specified range of fringe value
 
i_element_shape_code     = 0
ra_fringe_limits(1)      = 4.762E-05
ra_fringe_limits(2)      = 8.844E-05
s_fringe_comparison_type = "range"
r_tolerance              = 4.9999999E-10
s_group_name             = "default_group"
s_target                 = "lista"
 
i_return_value =                                                @
   list_create_elem_att_fringe                                  @
      (  i_element_shape_code,                                  @
         ra_fringe_limits,                                      @
         s_fringe_comparison_type,                              @
         r_tolerance,                                           @
         s_group_name,                                          @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_elem_att_mat()
#
#                      This function creates a list of elements of a
#                      particular finite element model shape from a
#                      list of material names.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created.  2 "quad"
#                      elements are created using "Surface 1".
#                      Material named "Aluminium" and element property
#                      set "prop_set" are created and associated with
#                      the finite elements. Then the list of elements
#                      associated with material "Aluminium" is
#                      obtained using this function in "lista" and
#                      "sv_return_list".
#
#                      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 list_create_elem_att_mat()
#  has the following arguments:
#
#  list_create_elem_att_mat
#     (  element_shape_code,
#        material_list,
#        num_materials,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_element_shape_code
STRING   sa_material_list[32](1)
INTEGER  i_num_materials
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create material - "Aluminium"
i_return_value =                                                @
   material.create                                              @
      (  "Analysis code ID",1,"Analysis type ID",1,"Aluminium", @
         0,"", "Isotropic", 1, "Directionality", 1, "Linearity",@
         1, "Homogeneous", 0, "Linear Elastic", 1,"Model Opt"// @
         "ions & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],   @
         "Active Flag", 1, "Create", 10, "External Flag", FALSE,@
         "Property IDs", ["Elastic Modulus", "Poisson Ratio",   @
         "Density"], [2, 5, 16, 0],"Property Values",["10.1E6", @
         "0.33", "0.1", ""] )
dump i_return_value
 
#  Create element property set - "prop_set"
i_return_value =                                                @
   elementprops_create                                          @
      (  "prop_set", 51, 25, 35, 1, 1, 20, [13, 20, 36, 4037,   @
         4111,4118,4119],[5, 9, 1, 1, 1, 1, 1],["m:Aluminium",  @
         "", "0.2", "", "","", ""], "Surface 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all elements with material attribute "Aluminium"
 
i_element_shape_code = 4
sa_material_list(1)  = "Aluminium"
i_num_materials      = 1
s_target             = "lista"
 
i_return_value =                                                @
   list_create_elem_att_mat                                     @
      (  i_element_shape_code,                                  @
         sa_material_list,                                      @
         i_num_materials,                                       @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_elem_att_prop()
#
#                      This function creates a list of elements of a
#                      particular finite element model shape from a
#                      list of property names.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created.  2 "quad"
#                      elements are created using "Surface 1".
#                      Material named "Aluminium" and element property
#                      set "prop_set" are created and associated with
#                      the finite elements. Then the list of elements
#                      associated with property "prop_set" is
#                      obtained  using this function in "lista" and
#                      "sv_return_list".
#
#                      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 list_create_elem_att_prop()
#  has the following arguments:
#
#  list_create_elem_att_prop
#     (  element_shape_code,
#        properties_list,
#        num_properties,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_element_shape_code
STRING   sa_properties_list[32](1)
INTEGER  i_num_properties
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create material in the database
i_return_value =                                                @
   material.create                                              @
      (  "Analysis code ID",1,"Analysis type ID",1,"Aluminium", @
         0,"", "Isotropic", 1, "Directionality", 1, "Linearity",@
         1, "Homogeneous", 0, "Linear Elastic", 1,"Model Opt"// @
         "ions & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],   @
         "Active Flag", 1, "Create", 10, "External Flag", FALSE,@
         "Property IDs", ["Elastic Modulus", "Poisson Ratio",   @
         "Density"], [2, 5, 16, 0],"Property Values",["10.1E6", @
         "0.33", "0.1", ""] )
dump i_return_value
 
#  Create element property set - "prop_set"
i_return_value =                                                @
   elementprops_create                                          @
      (  "prop_set", 51, 25, 35, 1, 1, 20, [13, 20, 36, 4037,   @
         4111,4118,4119],[5, 9, 1, 1, 1, 1, 1],["m:Aluminium",  @
         "", "0.2", "", "","", ""], "Surface 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all elements with property set "prop_set"
 
i_element_shape_code  = 4
sa_properties_list(1) = "prop_set"
i_num_properties      = 1
s_target              = "lista"
 
i_return_value =                                                @
   list_create_elem_att_prop                                    @
      (  i_element_shape_code,                                  @
         sa_properties_list,                                    @
         i_num_properties,                                      @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_ass_group()
#
#                      In this example a new database is opened and
#                      group named "NEW_GROUP" is created. Entities
#                      are created in each group. Then this function
#                      is called to obtain the entities present in
#                      the "default_group".
#
#                      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 list_create_ent_ass_group()
#  has the following arguments:
#
#  list_create_ent_ass_group
#     (  group_count,
#        group_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_group_count
STRING   sa_group_name[32](1)
INTEGER  i_entity_count
STRING   sa_entity_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Label Curves and solid
curve_label(TRUE)
solid_label(TRUE)
 
#---------------------------------------------------------------------
#  Create Entities in "default_group"
i_return_value =                                                @
   asm_const_line_2point( "1", "[0 0 0]", "[2 0 0][0 0 2]", 0,  @
   "", 50., 1, sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<0.5 0.5 0.5>", "[0 0 0]",         @
   "Coord 0", sv_ids_of_created_entities )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create "NEW_GROUP" and make it as current group.
i_return_value = ga_group_create( "NEW_GROUP" )
dump i_return_value
 
i_return_value = ga_group_current_set( "NEW_GROUP" )
dump i_return_value
 
#  Create Entities in "default_group"
i_return_value =                                                @
   asm_const_line_2point( "3", "[-1 0 -1]", "[-1 2 -1]", 0, "", @
   50., 1, sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_curve_2d_circle_v1( "4", 1, 0.5, "Coord 0.3", "",  @
   "[1 1 0]", TRUE, sv_ids_of_created_entities )
dump i_return_value
#---------------------------------------------------------------------
# Get the entities present in the "default_group".
 
i_group_count     = 1
sa_group_name (1) = "default_group"
i_entity_count    = 1
sa_entity_name(1) = "Curve"
 
i_return_value =                                                @
   list_create_ent_ass_group                                    @
      (  i_group_count,                                         @
         sa_group_name,                                         @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_ass_vp()
#
#                      In this example a new database is opened and
#                      few entities are created. Then this function
#                      is called to get the entities available in
#                      the default_viewport.
#
#                      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 list_create_ent_ass_vp()
#  has the following arguments:
#
#  list_create_ent_ass_vp
#     (  viewport_count,
#        viewport_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_viewport_count
STRING   sa_viewport_name[32](1)
INTEGER  i_entity_count
STRING   sa_entity_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Label Curves and solid
curve_label(TRUE)
solid_label(TRUE)
 
#---------------------------------------------------------------------
#  Create Entities
i_return_value =                                                @
   asm_const_line_2point( "1", "[0 0 0]", "[2 0 0][0 0 2]", 0,  @
   "", 50., 1, sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<0.5 0.5 0.5>", "[0 0 0]",         @
   "Coord 0", sv_ids_of_created_entities )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the entities present in "default_viewport"
 
i_viewport_count    = 1
sa_viewport_name(1) = "default_viewport"
i_entity_count      = 1
sa_entity_name(1)   = "Curve" 
 
i_return_value =                                                @
   list_create_ent_ass_vp                                       @
      (  i_viewport_count,                                      @
         sa_viewport_name,                                      @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
 
      
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_ep_name()
#
#                      In this example a new database is opened and a
#                      surface is created. The surface is meshed
#                      into 5 quad elements. A material(ALUMINIUM)
#                      and an element property(NEW_EP) is created
#                      and associated with Elements 1 to 3. Then
#                      this function is called to get the entities
#                      having NEW_EP as  the element.
#
#                      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 list_create_ent_att_ep_name()
#  has the following arguments:
#
#  list_create_ent_att_ep_name
#     (  ep_count,
#        ep_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_ep_count
STRING   sa_ep_name[32](1)
INTEGER  i_entity_count
STRING   sa_entity_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create a surface and mesh it.
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element property
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "Aluminium", 0, "", "Isotropic", 1, "Directionality",     @
   1, "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,    @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs", ["Elastic Modulus", "Poisson Ratio",         @
   "Density"], [2, 5, 16, 0], "Property Values", ["10E6","0.33",@
   "0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP", 51, 25, 35, 1, 1, 20, [13, 20,@
   36, 4037, 4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1],          @
   ["m:Aluminium", "", "0.2", "", "", "", ""] , "Element 1:3" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get entities associated with element properties.
 
i_ep_count        = 1
sa_ep_name(1)     = "NEW_EP"
i_entity_count    = 1
sa_entity_name(1) = "Element"
 
i_return_value =                                                @
   list_create_ent_att_ep_name                                  @
      (  i_ep_count,                                            @
         sa_ep_name,                                            @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_ep_type()
#
#                      In this example a new database is opened and
#                      a cuboid & a surface are created. They are
#                      meshed and 2 EP are created and associated
#                      with the solid and few of the finite elements.
#                      Then this function is called to get the list
#                      of entities having generic element type
#                      "Solid" & "Shell".
#
#                      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 list_create_ent_att_ep_type()
#  has the following arguments:
#
#  list_create_ent_att_ep_type
#     (  general_count,
#        general_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_general_count
STRING   sa_general_name[32](2)
INTEGER  i_entity_count
STRING   sa_entity_name[32](2)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
quad_elem_label( TRUE )
hex_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create a solid, a surface and mesh them.
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<5 1 1>", "[0 0 0]", "Coord 0",    @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 1]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1 ", 1, [1.],    @
   "Hex8", "1", "1", "Coord 0", "Coord 0", i_num_nodes,         @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.],    @
   "Quad4", "25", "6", "Coord 0", "Coord 0", i_num_nodes,       @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element property.
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "Aluminium", 0, "", "Isotropic", 1, "Directionality",     @
   1, "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,    @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs", ["Elastic Modulus", "Poisson Ratio",         @
   "Density"], [2, 5, 16, 0], "Property Values", ["10E6","0.33",@
   "0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP_1", 71, 25, 30, 1, 1, 20, [13,  @
   21, 4124, 4126, 4125], [5, 4, 4, 4, 4], ["m:Aluminium", "",  @
   "", "", ""], "Solid 1")
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP_2", 51, 25, 35, 1, 1, 20, [13,  @
   20, 36, 4037, 4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1],      @
   ["m:Aluminium", "", "0.2", "", "", "", ""] , "Elm 9:10")
dump i_return_value
 
#---------------------------------------------------------------------
#  Get List of entities having generic element type "Solid" & "Shell"
 
i_general_count     = 2
sa_general_name(1)  = "Solid"
sa_general_name(2)  = "Shell"
i_entity_count      = 2
sa_entity_name(1)   = "Element"
sa_entity_name(2)   = "Solid"
 
i_return_value =                                                @
   list_create_ent_att_ep_type                                  @
      (  i_general_count,                                       @
         sa_general_name,                                       @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_lbc_name()
#
#                      In this example a new database is opened and a
#                      surface is created. The surface is meshed
#                      into 5 quad elements. An LBC ("NEW_DISP") is
#                      created with Point 1 & 4 as application region.
#                      Then this function is called to get the
#                      entities associated with "NEW_DISP".
#
#                      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 list_create_ent_att_lbc_name()
#  has the following arguments:
#
#  list_create_ent_att_lbc_name
#     (  lbc_count,
#        lbc_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_lbc_count
STRING   sa_lbc_name[32](1)
INTEGER  i_entity_count
STRING   sa_entity_name[32](2)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
node_label (TRUE )
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create surface and FEM mesh
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create LBC "NEW_DISP"
i_return_value =                                                @
   loadsbcs_create( "NEW_DISP", "Displacement", "Nodal", "",    @
   "Static", [ "Point 1 4"], "Geometry", "Coord 0", 1.,         @
   ["< 0 0 0 >", "< 0 0 0 >"], ["" , ""] )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get list of entities associated with LBC "NEW_DISP"
 
i_lbc_count       = 1
sa_lbc_name(1)    = "NEW_DISP"
i_entity_count    = 2
sa_entity_name(1) = "Point"
sa_entity_name(2) = "Node"
 
i_return_value =                                                @
   list_create_ent_att_lbc_name                                 @
      (  i_lbc_count,                                           @
         sa_lbc_name,                                           @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_lbc_type()
#
#                      In this example a new database is opened and a
#                      surface is created. The surface is meshed
#                      into 5 quad elements. 2 LBCs "NEW_DISP" and
#                      "NEW_PRESS" are created. Then this function is
#                      called to get the entities associated with
#                      lbc type "Displacement" and "Pressure".
#
#                      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 list_create_ent_att_lbc_type()
#  has the following arguments:
#
#  list_create_ent_att_lbc_type
#     (  lbc_type_count,
#        lbc_type_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_lbc_type_count
STRING   sa_lbc_type_name[32](2)
INTEGER  i_entity_count
STRING   sa_entity_name[32](2)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
node_label (TRUE )
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create Surface and FEM mesh
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create LBCs
i_return_value =                                                @
   loadsbcs_create( "NEW_DISP", "Displacement", "Nodal", "",    @
   "Static", [ "Point 1 4"], "Geometry", "Coord 0", 1.,         @
   ["< 0 0 0 >", "< 0 0 0 >"], ["" , ""] )
dump i_return_value
 
i_return_value =                                                @
   loadsbcs_create( "NEW_PRESS", "Pressure", "Element Uniform", @
   "2D", "Static", ["Element 4 5"], "FEM", "", 1., [" 500",     @
   "", ""], ["", "", ""] )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the list of entities associated with load type Displacement
#  and Pressure.
 
i_lbc_type_count    = 2
sa_lbc_type_name(1) = "Displacement"
sa_lbc_type_name(2) = "Pressure"
i_entity_count      = 2
sa_entity_name(1)   = "Node"
sa_entity_name(2)   = "Element"
 
i_return_value =                                                @
   list_create_ent_att_lbc_type                                 @
      (  i_lbc_type_count,                                      @
         sa_lbc_type_name,                                      @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_mat_name()
#
#                      In this example a new database is opened and 2
#                      surfaces are created. A material("Aluminium")
#                      is created and associated with Surface 1.
#                      Then this function is called to get the
#                      entities associated with material "Aluminium"
#                      from the database.
#
#                      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 list_create_ent_att_mat_name()
#  has the following arguments:
#
#  list_create_ent_att_mat_name
#     (  material_count,
#        material_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_material_count
STRING   sa_material_name[32](1)
INTEGER  i_entity_count
STRING   sa_entity_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
 
#---------------------------------------------------------------------
#  Create surface
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 1 0>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element property
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "Aluminium", 0, "", "Isotropic", 1, "Directionality",     @
   1, "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,    @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs", ["Elastic Modulus", "Poisson Ratio",         @
   "Density"], [2, 5, 16, 0], "Property Values", ["10E6","0.33",@
   "0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP", 51, 25, 35, 1, 1, 20, [13, 20,@
   36, 4037, 4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1],          @
   ["m:Aluminium", "", "0.2", "", "", "", ""] , "Surface 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get list of entities associated with material name "Aluminium"
 
i_material_count    = 1
sa_material_name(1) = "Aluminium"
i_entity_count      = 1
sa_entity_name(1)   = "Surface"
 
i_return_value =                                                @
   list_create_ent_att_mat_name                                 @
      (  i_material_count,                                      @
         sa_material_name,                                      @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_mat_type()
#
#                      In this example a new database is opened and 2
#                      surfaces are created. A material("Aluminium")
#                      is created and associated with Surface 1.
#                      Then this function is called to get the
#                      entities having "isotropic" as the
#                      material-type.
#
#                      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 list_create_ent_att_mat_type()
#  has the following arguments:
#
#  list_create_ent_att_mat_type
#     (  mat_type_count,
#        mat_type_name,
#        entity_count,
#        entity_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_mat_type_count
STRING   sa_mat_type_name[32](1)
INTEGER  i_entity_count
STRING   sa_entity_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
 
#---------------------------------------------------------------------
#  Create Surface
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 1 0>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element properties.
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "Aluminium", 0, "", "Isotropic", 1, "Directionality",     @
   1, "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,    @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs", ["Elastic Modulus", "Poisson Ratio",         @
   "Density"], [2, 5, 16, 0], "Property Values", ["10E6","0.33",@
   "0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP", 51, 25, 35, 1, 1, 20, [13, 20,@
   36, 4037, 4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1],          @
   ["m:Aluminium", "", "0.2", "", "", "", ""] , "Surface 1" )
dump i_return_value
#---------------------------------------------------------------------
#  Get the entities with "Isotropic" material type.
 
i_mat_type_count    = 1
sa_mat_type_name(1) = "Isotropic"
i_entity_count      = 1
sa_entity_name(1)   = "Surface"
 
i_return_value =                                                @
   list_create_ent_att_mat_type                                 @
      (  i_mat_type_count,                                      @
         sa_mat_type_name,                                      @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string(sv_return_list)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_mat_value()
#
#                      In this example a new database is opened and 5
#                      surfaces are created with different Material
#                      properties. Then this function is called to
#                      get the list of entities whose poisson-ratio
#                      lie within a range of 0.05 to 0.25
#
#                      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 list_create_ent_att_mat_value()
#  has the following arguments:
#
#  list_create_ent_att_mat_value
#     (  entity_count,
#        entity_name,
#        mat_prop_name,
#        minimum,
#        maximum,
#        eval_at_temperature,
#        evaluation_strain,
#        evaluation_rate,
#        evaluation_time,
#        evaluation_frequency,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_entity_count
STRING   sa_entity_name[32](1)
STRING   s_mat_prop_name[32]
REAL     r_minimum
REAL     r_maximum
REAL     r_eval_at_temperature
REAL     r_evaluation_strain
REAL     r_evaluation_rate
REAL     r_evaluation_time
REAL     r_evaluation_frequency
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
 
#---------------------------------------------------------------------
#  Create Surfaces with different Material properties
i_return_value =                                                @
   asm_const_line_2point( "#", "[0 0 0][0 1 -1][0 1 -1]"//      @
   "[0 2 -2][0 2 -2][5 0 0][5 1 -1][5 1 -1][5 2 -2][5 2 -2]",   @
   "[0 0 -1][0 0 -1][0 1 -2][0 1 -2][0 2 -3][5 0 -1][5 0 -1]"// @
   "[5 1 -2][5 1 -2][5 2 -3]", 0, "", 50., 1,                   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_2curve( "#", "Curve 1:5 ", "Curve 6:10",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_1", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["10E6", "0.11", "0.1", ""])
dump i_return_value
 
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_2", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["20E6", "0.22", "0.2", ""])
dump i_return_value
 
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_3", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["30E6", "0.33", "0.3", ""])
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_1", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_1",  @
   "", "0.1", "", "", "", ""], "Surface 1" )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_2", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_2",  @
   "", "0.2", "", "", "", ""], "Surface 2 3" )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_3", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_3",  @
   "", "0.3", "", "", "", ""], "Surface 4 5" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the list of entities whose poisson ration lie within the range
#  0.05 and 0.25
 
i_entity_count         = 1
sa_entity_name(1)      = "Surface"
s_mat_prop_name        = "Poisson Ratio"
r_minimum              = 0.05
r_maximum              = 0.25
r_eval_at_temperature  = 0.0
r_evaluation_strain    = 0.0
r_evaluation_rate      = 0.0
r_evaluation_time      = 0.0
r_evaluation_frequency = 0.0
 
 
i_return_value =                                                @
   list_create_ent_att_mat_value                                @
      (  i_entity_count,                                        @
         sa_entity_name,                                        @
         s_mat_prop_name,                                       @
         r_minimum,                                             @
         r_maximum,                                             @
         r_eval_at_temperature,                                 @
         r_evaluation_strain,                                   @
         r_evaluation_rate,                                     @
         r_evaluation_time,                                     @
         r_evaluation_frequency,                                @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string(sv_return_list)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_ent_att_vp_vis()
#
#                      In this example a new database is opened and
#                      few entities are created. After a pause one
#                      of the curve is erased and this function is
#                      called to get the list of entities available
#                      in "default_viewport".
#
#                      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 list_create_ent_att_vp_vis()
#  has the following arguments:
#
#  list_create_ent_att_vp_vis
#     (  viewport_count,
#        viewport_name,
#        entity_count,
#        entity_name,
#        pick_type,
#        pick_erased,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_viewport_count
STRING   sa_viewport_name[32](1)
INTEGER  i_entity_count
STRING   sa_entity_name[32](1)
INTEGER  i_pick_type
INTEGER  i_pick_erased
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Label Curves and solid
curve_label(TRUE)
solid_label(TRUE)
 
#---------------------------------------------------------------------
#  Create 2 curves and a solid
i_return_value =                                                @
   asm_const_line_2point( "1", "[0 0 0]", "[2 0 0][0 0 2]", 0,  @
   "", 50., 1, sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<0.5 0.5 0.5>", "[0 0 0]",         @
   "Coord 0", sv_ids_of_created_entities )
dump i_return_value
 
#---------------------------------------------------------------------
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Erase Curve 1
gm_visibility_widget( "Curve 1 ", FALSE )
 
#---------------------------------------------------------------------
#  Get the list of entities in "default_viewport"
 
i_return_value =                                                @
   list_create_ent_ass_vp(  1, ["default_viewport"], 1,         @
   ["Curve"], sv_return_list )
dump i_return_value
dump sv_return_list
 
#---------------------------------------------------------------------
#  Get the list of all entities in "default_viewport" even if it
#  is erased.
 
i_viewport_count    = 1
sa_viewport_name(1) = "default_viewport"
i_entity_count      = 1
sa_entity_name(1)   = "Curve"
i_pick_type         = 1
i_pick_erased       = 1    /* Also get erased entities */
 
i_return_value =                                                @
   list_create_ent_att_vp_vis                                   @
      (  i_viewport_count,                                      @
         sa_viewport_name,                                      @
         i_entity_count,                                        @
         sa_entity_name,                                        @
         i_pick_type,                                           @
         i_pick_erased,                                         @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
 
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_fem_con_fem()
#
#                      In this example a new database is opened and
#                      a surface with 5 quad elements is created.
#                      Then this function is called to get the list
#                      of elements associated with Node 1 and
#                      element adjacent to Element 3.
#
#                      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 list_create_fem_con_fem()
#  has the following arguments:
#
#  list_create_fem_con_fem
#     (  in_list,
#        get_node_con_to_node_by_elem,
#        get_node_con_to_node_by_mpc,
#        get_node_used_by_elem,
#        get_node_used_by_mpc,
#        get_elem_using_node,
#        get_elem_adj_to_elem,
#        get_elem_adj_to_mpc,
#        get_mpc_using_node,
#        get_mpc_adj_to_elem,
#        get_mpc_adj_to_mpc,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_in_list[128]
INTEGER  i_get_node_con_to_node_by_elem
INTEGER  i_get_node_con_to_node_by_mpc
INTEGER  i_get_node_used_by_elem
INTEGER  i_get_node_used_by_mpc
INTEGER  i_get_elem_using_node
INTEGER  i_get_elem_adj_to_elem
INTEGER  i_get_elem_adj_to_mpc
INTEGER  i_get_mpc_using_node
INTEGER  i_get_mpc_adj_to_elem
INTEGER  i_get_mpc_adj_to_mpc
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
node_label (TRUE )
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create Surface with 5 elements
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the element associated with Node 1 and Elements adjacent
#  to Elm 3.
 
s_in_list                        = "Node 1 Elm 3"
i_get_node_con_to_node_by_elem   = 0
i_get_node_con_to_node_by_mpc    = 0
i_get_node_used_by_elem          = 0
i_get_node_used_by_mpc           = 0
i_get_elem_using_node            = 1
i_get_elem_adj_to_elem           = 1
i_get_elem_adj_to_mpc            = 0
i_get_mpc_using_node             = 0
i_get_mpc_adj_to_elem            = 0
i_get_mpc_adj_to_mpc             = 0
 
 
i_return_value =                                                @
   list_create_fem_con_fem                                      @
      (  s_in_list,                                             @
         i_get_node_con_to_node_by_elem,                        @
         i_get_node_con_to_node_by_mpc,                         @
         i_get_node_used_by_elem,                               @
         i_get_node_used_by_mpc,                                @
         i_get_elem_using_node,                                 @
         i_get_elem_adj_to_elem,                                @
         i_get_elem_adj_to_mpc,                                 @
         i_get_mpc_using_node,                                  @
         i_get_mpc_adj_to_elem,                                 @
         i_get_mpc_adj_to_mpc,                                  @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
sys_free_string( sv_ids_of_created_entities)
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_node_ass_elem()
#
#                      This function creates a list of all nodes
#                      associated with a list of elements.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. 2 "quad"
#                      elements are created using "Surface 1". Then
#                      the list of nodes  associated with "Element 1"
#                      is obtained using this function in "lista" and
#                      and "sv_return_list".
#
#                      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 list_create_node_ass_elem()
#  has the following arguments:
#
#  list_create_node_ass_elem
#     (  element_list,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_element_list[64]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all nodes associated with "Element 1"
 
s_element_list = "Element 1"
s_target       = "lista"
 
i_return_value =                                                @
   list_create_node_ass_elem                                    @
      (  s_element_list,                                        @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_node_ass_geo()
#
#                      This function creates a list of all nodes
#                      associated with a list of geometric entities.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. 2 "quad"
#                      elements are created using "Surface 1". Then
#                      the list of nodes  associated with "Curve 1"
#                      is obtained using this function in "lista" and
#                      and "sv_return_list".
#
#                      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 list_create_node_ass_geo()
#  has the following arguments:
#
#  list_create_node_ass_geo
#     (  geometry_list,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_geometry_list[64]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all nodes associated with "Curve 1"
 
s_geometry_list = "Curve 1"
s_target        = "lista"
 
i_return_value =                                                @
   list_create_node_ass_geo                                     @
      (  s_geometry_list,                                       @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_node_ass_group()
#
#                      This function creates a list of all nodes
#                      associated with a list of specified groups.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. 2 "quad"
#                      elements are created using "Surface 1". Then
#                      the list of nodes present in "default_group"
#                      is obtained using this function in "lista" and
#                      and "sv_return_list".
#
#                      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 list_create_node_ass_group()
#  has the following arguments:
#
#  list_create_node_ass_group
#     (  group_list,
#        number_of_groups,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   sa_group_list[32](1)
INTEGER  i_number_of_groups
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all nodes present in "default_group".
 
sa_group_list(1)   = "default_group"
i_number_of_groups = 1
s_target           = "lista"
 
i_return_value =                                                @
   list_create_node_ass_group                                   @
      (  sa_group_list,                                         @
         i_number_of_groups,                                    @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_node_att_fringe()
#
#                      This function creates a list of all nodes with
#                      specified fringe value in a single group of 
#                      geometric entities.
#
#                      In this example a field.db is opened and the
#                      fringe plots for displacement and translation
#                      are created. Then this function is called to
#                      create a list of elements between specified
#                      fringe values in "lista" and "sv_return_list".
#
#                      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 list_create_node_att_fringe()
#  has the following arguments:
#
#  list_create_node_att_fringe
#     (  fringe_limits,
#        fringe_comparison_type,
#        tolerance,
#        group_name,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
REAL     ra_fringe_limits(2)
STRING   s_fringe_comparison_type[7]
REAL     r_tolerance
STRING   s_group_name[32]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "field.db"
uil_file_open.go("field.db")
 
#  Set ISO-1 viewing
i_return_value =                                                @
   ga_view_aa_set                                               @
      (  23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Initialize parameters for fringe plot
i_return_value =                                                @
   res_init_fringe_plot(  )
dump i_return_value
 
#  Create plot record for fringe plot
i_return_value =                                                @
   res_create_fringe_plot_rec3                                  @
      (  1,2,1,1,1,1,0,0,1.,"",1,2,3,23,1,1,0.,30,0,1 )
dump i_return_value
 
#  Create a fringe plot
i_return_value =                                                @
   res_make_fringe_plot                                         @
      (  1, [1], [1], [""], [0.], ["Default, Static Subcase:"// @
         " Displacements, Translational (VEC-MAG) -MSC.Nastran"])
dump i_return_value
 
#  Clear memory used in fringe plot and exit fringe plot module
i_return_value =                                                @
   res_deinit_fringe_plot(  )
dump i_return_value
#---------------------------------------------------------------------
#  Create a list of all nodes for a specified range of fringe value
 
ra_fringe_limits(1)      = 1.361E-05
ra_fringe_limits(2)      = 7.4839998E-05 
s_fringe_comparison_type = "range"
r_tolerance              = 5.0000002E-19
s_group_name             = "default_group"
s_target                 = "lista"
 
i_return_value =                                                @
   list_create_node_att_fringe                                  @
      (  ra_fringe_limits,                                      @
         s_fringe_comparison_type,                              @
         r_tolerance,                                           @
         s_group_name,                                          @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_node_att_value()
#
#                      This function creates a list of all nodes
#                      within a given coordinate range.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. 2 "quad"
#                      elements are created using "Surface 1". Then
#                      the list of nodes with X coordinate value = 0
#                      is obtained using this function in "lista" and
#                      and "sv_return_list".
#
#                      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 list_create_node_att_value()
#  has the following arguments:
#
#  list_create_node_att_value
#     (  coord_values,
#        coord_values_active,
#        coord_comparison_type,
#        tolerance,
#        coord_name,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
REAL     ra_coord_values(6)
LOGICAL  la_coord_values_active(3)
STRING   sa_coord_comparison_type[7](3)
REAL     ra_tolerance(3)
STRING   s_coord_name[32]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_mesh_s_nodes[VIRTUAL]
STRING   sv_mesh_s_elems[VIRTUAL]
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0",               @
         "Curve 1 ", sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create FEM entities
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_mesh_s_nodes, sv_mesh_s_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all nodes with X = 0
 
ra_coord_values(1)          = 0.0
la_coord_values_active(1)   = TRUE
sa_coord_comparison_type(1) = "equal"
ra_tolerance(1)             = 0.05
s_coord_name                = "Coord 0"
s_target                    = "lista"
 
i_return_value =                                                @
   list_create_node_att_value                                   @
      (  ra_coord_values,                                       @
         la_coord_values_active,                                @
         sa_coord_comparison_type,                              @
         ra_tolerance,                                          @
         s_coord_name,                                          @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_mesh_s_nodes)
sys_free_string( sv_mesh_s_elems)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_point_ass_geo()
#
#                      This function creates a list of all points from
#                      a list of geometric entities.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. The list of
#                      points associated with "Curve 1" is obtained
#                      using  this  function  in  "lista"  and
#                      "sv_return_list".
#
#                      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 list_create_point_ass_geo()
#  has the following arguments:
#
#  list_create_point_ass_geo
#     (  entity_list,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_list[8]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all points associated with "Curve 1".
 
s_entity_list  = "Curve 1"
s_target       = "lista"
 
i_return_value =                                                @
   list_create_point_ass_geo                                    @
      (  s_entity_list,                                         @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_point_ass_group()
#
#                      This function creates a list of all points
#                      associated with specified group.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. The list of
#                      points associated with "default_group" is
#                      obtained  using  this  function  in  "lista"
#                      and "sv_return_list".
#
#                      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 list_create_point_ass_group()
#  has the following arguments:
#
#  list_create_point_ass_group
#     (  group_list,
#        number_of_groups,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   sa_group_list[32](1)
INTEGER  i_number_of_groups
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all points present in "default_group "
 
sa_group_list(1)   = "default_group"
i_number_of_groups = 1
s_target           = "lista"
 
i_return_value =                                                @
   list_create_point_ass_group                                  @
      (  sa_group_list,                                         @
         i_number_of_groups,                                    @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_surface_ass_geo()
#
#                      This function creates a list of all surfaces
#                      from a list of geometric entities.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. The list of
#                      surfaces associated with "Curve 1" is obtained
#                      using  this  function  in  "lista" and
#                      "sv_return_list".
#
#                      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 list_create_surface_ass_geo()
#  has the following arguments:
#
#  list_create_surface_ass_geo
#     (  entity_list,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_list[64]
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all surfaces from "Curve 1 "
 
s_entity_list  = "Curve 1"
s_target       = "lista"
 
i_return_value =                                                @
   list_create_surface_ass_geo                                  @
      (  s_entity_list,                                         @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_create_surface_ass_group()
#
#                      This function creates a list of all surfaces
#                      associated with specified group.
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. The list of
#                      surfaces associated with "default_group" is
#                      obtained  using  this  function  in  "lista"
#                      and "sv_return_list".
#
#                      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 list_create_surface_ass_group()
#  has the following arguments:
#
#  list_create_surface_ass_group
#     (  group_list,
#        number_of_groups,
#        target,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   sa_group_list[32](1)
INTEGER  i_number_of_groups
STRING   s_target[6]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create list of all surfaces present in  "default_group "
 
sa_group_list(1)   = "default_group"
i_number_of_groups = 1
s_target           = "lista"
 
i_return_value =                                                @
   list_create_surface_ass_group                                @
      (  sa_group_list,                                         @
         i_number_of_groups,                                    @
         s_target,                                              @
         sv_return_list )
dump i_return_value
dump sv_return_list
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
sys_free_string( sv_return_list)
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function list_create_target_list()
#
#                      This function allocates space for a string,
#                      sets the value of the allocated string using an
#                      input string and assigns the allocated string
#                      to one of two global string variables named
#                      "lista" or "listb" based on the settings of the
#                      two matching internal global variables named
#                      "lista_nomerge" and "listb_nomerge".
#
#                      In this example a new database is opened and
#                      a cube of dimension 1 X 1 X 1 is created. Then
#                      the input string "s_entity_list" is assigned a
#                      value. The string is then targeted to global
#                      string "lista" using this function. The value
#                      of the global string "lista" is checked before
#                      and after the calling of this function. Once
#                      again the string "s_entity_list" is assigned
#                      and targeted to "lista" for appending. The
#                      global variable "lista_nomerge" is assigned
#                      TRUE for not sorting the new "lista".
#
#                      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 list_create_target_list()
#  has the following arguments:
#
#  list_create_target_list
#     (  target,
#        entity_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_target[6]
STRING   s_entity_list[64]
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set IS0-1 Viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Cube of dimension 1 X 1 X 1
i_return_value =                                                @
   asm_const_hpat_xyz                                           @
      ( "1", "<1 1 1>", "[0 0 0]", "Coord 0", sv_hpat_ids )
dump i_return_value
 
#---------------------------------------------------------------------
#  Value of global string "lista" before targeting
dump lista
 
#  Target input string to "lista"
s_target       = "lista"
s_entity_list  = "Point 1 4 3"
i_return_value =                                                @
   list_create_target_list                                      @
      (  s_target,                                              @
         s_entity_list )
dump i_return_value
dump s_entity_list
 
#  Value of global string "lista" after targeting
dump lista
#---------------------------------------------------------------------
#  Dot not sort the boolean list
lista_nomerge = TRUE
 
#  Target input string to "lista" again.
s_target       = "lista"
s_entity_list  = "Point 2 5 7 8 6"
i_return_value =                                                @
   list_create_target_list                                      @
      (  s_target,                                              @
         s_entity_list )
dump i_return_value
dump s_entity_list
 
#  Value of global string "lista" after targeting
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_hpat_ids)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_elem_dim()
#
#                      In this example a new database is opened and
#                      5 quad elements with different dimensions are
#                      created.  Then this function is called to get
#                      the list of elements within a certain
#                      dimension range from an input list.
#
#                      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 list_filter_by_elem_dim()
#  has the following arguments:
#
#  list_filter_by_elem_dim
#     (  input_list,
#        criterion,
#        segment_count,
#        minimum,
#        maximum,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[32]
STRING   s_criterion[32]
INTEGER  i_segment_count
REAL     r_minimum
REAL     r_maximum
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_created_entities_list[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create quad elements
i_return_value =                                                @
   fem_create_elems( "Quad", "Quad4", "1", "Standard", TRUE,    @
   "[0 0 0][2 0 0][3 0 0][5 0 0][6 0 0]", "[2 0 0][3 0 0]"//    @
   "[5 0 0][6 0 0][9 0 0]", "[2 1 0][3 1 0][5 1 0][6 1 0]"//    @
   "[9 1 0]", "[0 1 0][2 1 0][3 1 0][5 1 0][6 1 0]", "", "", "",@
   "", sv_created_entities_list )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the list of elements whose edge lengths are in specified
#  range
 
s_input_list     = "Element 1:5"
s_criterion      = "EdgeLengthMax"
i_segment_count  = 0
r_minimum        = 1.5
r_maximum        = 2.5
 
i_return_value =                                                @
   list_filter_by_elem_dim                                      @
      (  s_input_list,                                          @
         s_criterion,                                           @
         i_segment_count,                                       @
         r_minimum,                                             @
         r_maximum,                                             @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_created_entities_list)
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_ent_shape()
#
#                      In this example a new database is opened and
#                      different types of finite elements are created.
#                      Then this function is called to get the
#                      list of curves, surfaces, beams elements,
#                      quad elements and hex elements from an input
#                      list.
#
#                      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 list_filter_by_ent_shape()
#  has the following arguments:
#
#  list_filter_by_ent_shape
#     (  input_list,
#        geometric_points,
#        geometric_curves,
#        geometric_surfaces,
#        geometric_solids,
#        element_points,
#        element_beams,
#        element_tria,
#        element_quad,
#        element_tet,
#        element_wedge,
#        element_hex,
#        node,
#        mpc,
#        any_other,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
INTEGER  i_geometric_points
INTEGER  i_geometric_curves
INTEGER  i_geometric_surfaces
INTEGER  i_geometric_solids
INTEGER  i_element_points
INTEGER  i_element_beams
INTEGER  i_element_tria
INTEGER  i_element_quad
INTEGER  i_element_tet
INTEGER  i_element_wedge
INTEGER  i_element_hex
INTEGER  i_node
INTEGER  i_mpc
INTEGER  i_any_other
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
bar_elem_label( TRUE )
tri_elem_label( TRUE )
quad_elem_label( TRUE )
hex_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create Solid and various types of elements
 
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<2 1 1>", "[0 0 0]", "Coord 0",    @
   sv_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude( "1", "<-2 0 0>", 1., 0.,          @
   "[0 0 0]", "Coord 0", "Solid 1.1.3 ", sv_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude( "2", "<0 0 -2>", 1., 0.,          @
   "[0 0 0]", "Coord 0", "Solid 1.4.1 ", sv_created_entities )
dump i_return_value
 
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 2 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Tria3", "10", "5", "Coord 0", "Coord 0", i_num_nodes,       @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1 ", 1, [1.],    @
   "Hex8", "16", "9", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   fem_create_elems( "Bar ", "Bar2", "11", "Standard", FALSE,   @
   "Node 14 ", "Node 7 ", "", "", "", "", "", "",               @
   sv_created_entities )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get entities with mentioned relations
 
s_input_list         = "Node 1:27 Elm 1:11 Point 1:12 " //      @
                        "Surface 1 2 Solid 1"
i_geometric_points   = 0
i_geometric_curves   = 1
i_geometric_surfaces = 1
i_geometric_solids   = 0
i_element_points     = 0
i_element_beams      = 1
i_element_tria       = 0
i_element_quad       = 1
i_element_tet        = 0
i_element_wedge      = 0
i_element_hex        = 1
i_node               = 0
i_mpc                = 0
i_any_other          = 0
 
i_return_value =                                                @
   list_filter_by_ent_shape                                     @
      (  s_input_list,                                          @
         i_geometric_points,                                    @
         i_geometric_curves,                                    @
         i_geometric_surfaces,                                  @
         i_geometric_solids,                                    @
         i_element_points,                                      @
         i_element_beams,                                       @
         i_element_tria,                                        @
         i_element_quad,                                        @
         i_element_tet,                                         @
         i_element_wedge,                                       @
         i_element_hex,                                         @
         i_node,                                                @
         i_mpc,                                                 @
         i_any_other,                                           @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string(sv_return_list)
sys_free_string(sv_created_entities)
sys_free_string(sv_created_nodes)
sys_free_string(sv_created_elems)
 
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_ep_type()
#
#                      In this example a new database is opened and
#                      a solid & a surface are created. The created
#                      solid and surface are meshed into hex and
#                      quad elements respectively. 2 Element
#                      properties are created and associated with
#                      some of the finite elements. Then this
#                      function is called to get entities of "Shell"
#                      type from a set of input entities.
#
#                      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 list_filter_by_ep_type()
#  has the following arguments:
#
#  list_filter_by_ep_type
#     (  input_list,
#        ep_type_count,
#        ep_type_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
INTEGER  i_ep_type_count
STRING   sa_ep_type_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
quad_elem_label( TRUE )
hex_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create solid and surface
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<5 1 1>", "[0 0 0]", "Coord 0",    @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 1]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1 ", 1, [1.],    @
   "Hex8", "1", "1", "Coord 0", "Coord 0", i_num_nodes,         @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Quad4", "25", "6", "Coord 0", "Coord 0", i_num_nodes,       @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element properties.
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "Aluminium", 0, "", "Isotropic", 1, "Directionality",     @
   1, "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,    @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs", ["Elastic Modulus", "Poisson Ratio",         @
   "Density"], [2, 5, 16, 0], "Property Values", ["10E6","0.33",@
   "0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP_1", 71, 25, 30, 1, 1, 20, [13,  @
   21, 4124, 4126, 4125], [5, 4, 4, 4, 4], ["m:Aluminium", "",  @
   "", "", ""], "Elm 1:3" )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP_2", 51, 25, 35, 1, 1, 20, [13,  @
   20, 36, 4037, 4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1],      @
   ["m:Aluminium", "", "0.2", "", "", "", ""] , "Elm 9:10")
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the list of elements having element-property as "Shell"
 
s_input_list       = "Element 1:10"
i_ep_type_count    = 1
sa_ep_type_name(1) = "Shell"
 
i_return_value =                                                @
   list_filter_by_ep_type                                       @
      (  s_input_list,                                          @
         i_ep_type_count,                                       @
         sa_ep_type_name,                                       @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string(sv_return_list)
sys_free_string(sv_ids_of_created_entities)
sys_free_string(sv_created_nodes)
sys_free_string(sv_created_elems)
 
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_ep_value()
#
#                      In this example a new database is opened and
#                      5 surface are created. The surface are meshed
#                      into quad elements. 3 different element
#                      properties (with different thickness values)
#                      are associated with different elements. Then
#                      this function is called to get the list of
#                      elements whose thickness lie between 0.15 and
#                      0.25 units from a set of input entities.
#
#                      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 list_filter_by_ep_value()
#  has the following arguments:
#
#  list_filter_by_ep_value
#     (  input_list,
#        element_property,
#        component,
#        minimum,
#        maximum,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
STRING   s_element_property[32]
INTEGER  i_component
REAL     r_minimum
REAL     r_maximum
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_node[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
quad_elem_label(TRUE)
 
#---------------------------------------------------------------------
#  Create curve, surfaces and finite elements.
i_return_value =                                                @
   asm_const_line_2point( "#", "[0 0 0][0 1 -1][0 1 -1]"//      @
   "[0 2 -2][0 2 -2][5 0 0][5 1 -1][5 1 -1][5 2 -2][5 2 -2]",   @
   "[0 0 -1][0 0 -1][0 1 -2][0 1 -2][0 2 -3][5 0 -1][5 0 -1]"// @
   "[5 1 -2][5 1 -2][5 2 -3]", 0, "", 50., 1,                   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_2curve( "#", "Curve 1:5 ", "Curve 6:10",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1:5 ", 1,     @
   [1.], "Quad4", "1", "1", "Coord 0", "Coord 0",               @
   i_num_nodes, i_num_elems, sv_created_node, sv_created_elems )
 
#---------------------------------------------------------------------
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_1", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["10E6", "0.11", "0.1", ""])
dump i_return_value
 
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_2", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["20E6", "0.22", "0.2", ""])
dump i_return_value
 
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_3", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["30E6", "0.33", "0.3", ""])
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_1", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_1",  @
   "", "0.1", "", "", "", ""], "Element 1:5" )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_2", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_2",  @
   "", "0.2", "", "", "", ""], "Element 6:15")
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_3", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_3",  @
   "", "0.3", "", "", "", ""], "Element 16:25" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get elements whose thickness lie between 0.15 and 0.25
 
s_input_list        = "Element 1:25"
s_element_property  = "Thickness"
i_component         = 0
r_minimum           = 0.15
r_maximum           = 0.25
 
i_return_value =                                                @
   list_filter_by_ep_value                                      @
      (  s_input_list,                                          @
         s_element_property,                                    @
         i_component,                                           @
         r_minimum,                                             @
         r_maximum,                                             @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
sys_free_string( sv_created_node)
sys_free_string( sv_created_elems)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_fem_type()
#
#                      In this example a new database is opened and
#                      different types of finite elements are created.
#                      Then this function is called to get the
#                      list of elements which are of type Hex8 and
#                      Bar2 from an input list.
#
#                      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 list_filter_by_fem_type()
#  has the following arguments:
#
#  list_filter_by_fem_type
#     (  input_list,
#        fem_type_count,
#        fem_type_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
INTEGER  i_fem_type_count
STRING   sa_fem_type_name[32](2)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_entities[VIRTUAL]
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
bar_elem_label( TRUE )
tri_elem_label( TRUE )
quad_elem_label( TRUE )
hex_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create different type of elments
i_return_value =                                                @
   asm_const_hpat_xyz( "1", "<2 1 1>", "[0 0 0]", "Coord 0",    @
   sv_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude( "1", "<-2 0 0>", 1., 0.,          @
   "[0 0 0]", "Coord 0", "Solid 1.1.3 ", sv_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude( "2", "<0 0 -2>", 1., 0.,          @
   "[0 0 0]", "Coord 0", "Solid 1.4.1 ", sv_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 2 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Tria3", "10", "5", "Coord 0", "Coord 0", i_num_nodes,       @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1 ", 1, [1.],    @
   "Hex8", "16", "9", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   fem_create_elems( "Bar ", "Bar2", "11", "Standard", FALSE,   @
   "Node 14 ", "Node 7 ", "", "", "", "", "", "",               @
   sv_created_entities )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get elements which are of type Hex8 and Bar2
 
s_input_list        = "Node 1:27 Elm 1:11"
i_fem_type_count    = 2
sa_fem_type_name(1) = "ElmHex8"
sa_fem_type_name(2) = "ElmBar2"
 
i_return_value =                                                @
   list_filter_by_fem_type                                      @
      (  s_input_list,                                          @
         i_fem_type_count,                                      @
         sa_fem_type_name,                                      @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_created_entities)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_lbc_type()
#
#                      In this example a new database is opened and
#                      a surface with displacement and pressure
#                      loads is created. Then this function is
#                      called to get the list of elements which have
#                      loads of type "Displacement" and "Pressure"
#                      from an input list.
#
#                      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 list_filter_by_lbc_type()
#  has the following arguments:
#
#  list_filter_by_lbc_type
#     (  input_list,
#        lbc_type_count,
#        lbc_type_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
INTEGER  i_lbc_type_count
STRING   sa_lbc_type_name[32](2)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_ids_of_created_entities[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
node_label ( TRUE )
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create Surface and LBCs
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
i_return_value =                                                @
   loadsbcs_create( "NEW_DISP", "Displacement", "Nodal", "",    @
   "Static", [ "Point 1 4"], "Geometry", "Coord 0", 1.,         @
   ["< 0 0 0 >", "< 0 0 0 >"], ["" , ""] )
dump i_return_value
 
i_return_value =                                                @
   loadsbcs_create( "NEW_PRESS", "Pressure", "Element Uniform", @
   "2D", "Static", ["Element 4 5"], "FEM", "", 1., [" 500",     @
   "", ""], ["", "", ""] )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get elements which have loads of type "Displacement" and
#  "Pressure".
 
s_input_list        = "Node 1:12 Elm 1:5"
i_lbc_type_count    = 2 
sa_lbc_type_name(1) = "Displacement"
sa_lbc_type_name(2) = "Pressure"
 
i_return_value =                                                @
   list_filter_by_lbc_type                                      @
      (  s_input_list,                                          @
         i_lbc_type_count,                                      @
         sa_lbc_type_name,                                      @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
 
#---------------------------------------------------------------------
   
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_lbc_value()
#
#                      In this example a new database is opened and
#                      a surface with Pressure LBCs of different
#                      values is created. Then this function is
#                      called to get the list of elements which have
#                      pressure values are between 150 and 250 units
#                      from an input list.
#
#                      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 list_filter_by_lbc_value()
#  has the following arguments:
#
#  list_filter_by_lbc_value
#     (  input_list,
#        load_case_name,
#        lbc_var_name,
#        component,
#        minimum,
#        maximum,
#        evaluation_time,
#        evaluation_frequency,
#        sub_entity,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
STRING   s_load_case_name[32]
STRING   s_lbc_var_name[32]
INTEGER  i_component
REAL     r_minimum
REAL     r_maximum
REAL     r_evaluation_time
REAL     r_evaluation_frequency
STRING   s_sub_entity[32]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_ids_of_created_entities[VIRTUAL]
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create Surface and finite elements
i_return_value =                                                @
   asm_const_patch_xyz( "1", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0, "Surface 1 ", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create LBCs
i_return_value =                                                @
   loadsbcs_create( "NEW_PRESS_ELEM_1", "Pressure",             @
   "Element Uniform", "2D", "Static", ["Element 1"], "FEM",     @
   "", 1., ["100", "", ""], ["", "", ""] )
dump i_return_value
 
i_return_value =                                                @
   loadsbcs_create( "NEW_PRESS_ELEM_2_3", "Pressure",           @
   "Element Uniform", "2D", "Static", ["Element 2:3"], "FEM",   @
   "", 1., ["200", "", ""], ["", "", ""] )
dump i_return_value
 
i_return_value =                                                @
   loadsbcs_create( "NEW_PRESS_ELEM_4_5", "Pressure",           @
   "Element Uniform", "2D", "Static", ["Element 4:5"], "FEM",   @
   "", 1., ["300", "", ""], ["", "", ""] )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get elements whose pressure values are between 150 and 250 units.
 
s_input_list            = "Elm 1:5"
s_load_case_name        = ""
s_lbc_var_name          = "Top Surf Pressure"
i_component             = 3
r_minimum               = 150
r_maximum               = 250
r_evaluation_time       = 0
r_evaluation_frequency  = 0
s_sub_entity            = "ANY"
 
i_return_value =                                                @
   list_filter_by_lbc_value                                     @
      (  s_input_list,                                          @
         s_load_case_name,                                      @
         s_lbc_var_name,                                        @
         i_component,                                           @
         r_minimum,                                             @
         r_maximum,                                             @
         r_evaluation_time,                                     @
         r_evaluation_frequency,                                @
         s_sub_entity,                                          @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_mat_name()
#
#                      In this example a new database is opened and
#                      2 surfaces are created. A material("Aluminium")
#                      is created and associated with surface 1.
#                      Then this function is called to get the
#                      elements having Aluminium as the material
#                      from an input list.
#
#                      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 list_filter_by_mat_name()
#  has the following arguments:
#
#  list_filter_by_mat_name
#     (  input_list,
#        mat_count,
#        mat_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
INTEGER  i_mat_count
STRING   sa_mat_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_ids_of_created_entities[VIRTUAL]
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create Surface and finite elements.
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 1 0>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0,"Surface 1 2", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element properties.
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "Aluminium", 0, "", "Isotropic", 1, "Directionality",     @
   1, "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,    @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs", ["Elastic Modulus", "Poisson Ratio",         @
   "Density"], [2, 5, 16, 0], "Property Values", ["10E6","0.33",@
   "0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP", 51, 25, 35, 1, 1, 20, [13, 20,@
   36, 4037, 4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1],          @
   ["m:Aluminium", "", "0.2", "", "", "", ""] , "Surface 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get Elements which have "Aluminium" as material.
 
s_input_list   = "Element 1:10"
i_mat_count    = 1
sa_mat_name(1) = "Aluminium"
 
 
i_return_value =                                                @
   list_filter_by_mat_name                                      @
      (  s_input_list,                                          @
         i_mat_count,                                           @
         sa_mat_name,                                           @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_mat_type()
#
#                      In this example a new database is opened and 2
#                      surfaces are created. A material (Aluminium) is
#                      created and associated with some of the
#                      elements. Then this function is called to get
#                      the elements having "isotropic" as the
#                      material-type from an input list.
#
#                      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 list_filter_by_mat_type()
#  has the following arguments:
#
#  list_filter_by_mat_type
#     (  input_list,
#        mat_type_count,
#        mat_type_name,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
INTEGER  i_mat_type_count
STRING   sa_mat_type_name[32](1)
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_ids_of_created_entities[VIRTUAL]
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
quad_elem_label(TRUE)
 
#---------------------------------------------------------------------
#  Create surface and finite elements
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 1 0>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   asm_const_patch_xyz( "#", "<5 0 1>", "[0 0 0]", "Coord 0",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0,"Surface 1 2", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create material and element property.
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "Aluminium", 0, "", "Isotropic", 1, "Directionality",     @
   1, "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,    @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs", ["Elastic Modulus", "Poisson Ratio",         @
   "Density"], [2, 5, 16, 0], "Property Values", ["10E6","0.33",@
   "0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "NEW_EP", 51, 25, 35, 1, 1, 20, [13, 20,@
   36, 4037, 4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1],          @
   ["m:Aluminium", "", "0.2", "", "", "", ""] , "Surface 1" )
dump i_return_value
#---------------------------------------------------------------------
#  Get entities with material type "Isotropic"
 
s_input_list        = "Surface 1:2 Element 4:10"
i_mat_type_count    = 1
sa_mat_type_name(1) = "Isotropic"
 
i_return_value =                                                @
   list_filter_by_mat_type                                      @
      (  s_input_list,                                          @
         i_mat_type_count,                                      @
         sa_mat_type_name,                                      @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_filter_by_mat_value()
#
#                      In this example a new database is opened and 5
#                      surfaces are created with different Material
#                      properties. The surfaces are meshed with quad
#                      elements. Then this function is called to get
#                      the list of elements whose poisson-ratio lie
#                      within a range of 0.05 to 0.25 from an input
#                      list.
#
#                      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 list_filter_by_mat_value()
#  has the following arguments:
#
#  list_filter_by_mat_value
#     (  input_list,
#        mat_prop_name,
#        minimum,
#        maximum,
#        eval_at_temperature,
#        evaluation_strain,
#        evaluation_rate,
#        evaluation_time,
#        evaluation_frequency,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
STRING   s_mat_prop_name[32]
REAL     r_minimum
REAL     r_maximum
REAL     r_eval_at_temperature
REAL     r_evaluation_strain
REAL     r_evaluation_rate
REAL     r_evaluation_time
REAL     r_evaluation_frequency
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_ids_of_created_entities[VIRTUAL]
STRING   sv_created_nodes[VIRTUAL]
STRING   sv_created_elems[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
quad_elem_label( TRUE )
 
#---------------------------------------------------------------------
#  Create 5 surface
 
i_return_value =                                                @
   asm_const_line_2point( "#", "[0 0 0][0 1 -1][0 1 -1]"//      @
   "[0 2 -2][0 2 -2][5 0 0][5 1 -1][5 1 -1][5 2 -2][5 2 -2]",   @
   "[0 0 -1][0 0 -1][0 1 -2][0 1 -2][0 2 -3][5 0 -1][5 0 -1]"// @
   "[5 1 -2][5 1 -2][5 2 -3]", 0, "", 50., 1,                   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_2curve( "#", "Curve 1:5 ", "Curve 6:10",   @
   sv_ids_of_created_entities )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2( "IsoMesh", 0,"Surface 1:5", 1, [1.], @
   "Quad4", "1", "1", "Coord 0", "Coord 0", i_num_nodes,        @
   i_num_elems, sv_created_nodes, sv_created_elems )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element properties
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_1", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["10E6", "0.11", "0.1", ""])
dump i_return_value
 
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_2", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["20E6", "0.22", "0.2", ""])
dump i_return_value
 
i_return_value =                                                @
   material.create( "Analysis code ID", 1, "Analysis type ID",  @
   1, "MAT_3", 0, "", "Isotropic", 1, "Directionality", 1,      @
   "Linearity", 1, "Homogeneous", 0, "Linear Elastic", 1,       @
   "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, 0, 0],@
   "Active Flag", 1, "Create", 10, "External Flag", FALSE,      @
   "Property IDs",["Elastic Modulus","Poisson Ratio","Density"],@
   [2, 5, 16, 0], "Property Values", ["30E6", "0.33", "0.3", ""])
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_1", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_1",  @
   "", "0.1", "", "", "", ""], "Surface 1" )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_2", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_2",  @
   "", "0.2", "", "", "", ""], "Surface 2 3" )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create( "EP_3", 51, 25, 35, 1, 1, 20, [13, 20,  @
   36, 4037, 4111, 4118, 4119], [5,9,1,1, 1, 1, 1],["m:MAT_3",  @
   "", "0.3", "", "", "", ""], "Surface 4 5" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the list of elements whose poisson-ratio lie within a
#  range of 0.05 to 0.25
 
s_input_list           = "Surface 2:5 Element 5:25"
s_mat_prop_name        = "Poisson Ratio"
r_minimum              = 0.05
r_maximum              = 0.25
r_eval_at_temperature  = 0.0
r_evaluation_strain    = 0.0
r_evaluation_rate      = 0.0
r_evaluation_time      = 0.0
r_evaluation_frequency = 0.0
 
i_return_value =                                                @
   list_filter_by_mat_value                                     @
      (  s_input_list,                                          @
         s_mat_prop_name,                                       @
         r_minimum,                                             @
         r_maximum,                                             @
         r_eval_at_temperature,                                 @
         r_evaluation_strain,                                   @
         r_evaluation_rate,                                     @
         r_evaluation_time,                                     @
         r_evaluation_frequency,                                @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string( sv_return_list)
sys_free_string( sv_ids_of_created_entities)
sys_free_string( sv_created_nodes)
sys_free_string( sv_created_elems)
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function list_filter_by_presence()
#
#                      In this example a input list and a reference
#                      list is defined. This function is called once
#                      to get the entities that are exactly
#                      referenced in both list and second time to
#                      get the entities from input_list which are
#                      parents of entities mentioned in 
#                      reference_list.
#
#                      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 list_filter_by_presence()
#  has the following arguments:
#
#  list_filter_by_presence
#     (  input_list,
#        acceptance_criteria,
#        reference_list,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
STRING   s_acceptance_criteria[7]
STRING   s_reference_list[128]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
 
s_input_list           = "Solid 1.1 1.1.4 1.6 Elm 1 1.1 2.2.2"
s_acceptance_criteria  = "exact"
s_reference_list       = "Solid 1.1 1.1.5 1.6.1 Elm 1 1.2 2.2.2 2.2.5"
 
i_return_value =                                 @
   list_filter_by_presence                       @
      (  s_input_list,                           @
         s_acceptance_criteria,                  @
         s_reference_list,                       @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
s_input_list           = "Solid 1.1 1.1.4 1.6 Elm 1 1.1 2.2 3.3"
s_acceptance_criteria  = "parent"
s_reference_list       = "Solid 1.1.5 1.6.1 Elm 1.2 2.2 2.3.5 3.3.2"
 
i_return_value =                                 @
   list_filter_by_presence                       @
      (  s_input_list,                           @
         s_acceptance_criteria,                  @
         s_reference_list,                       @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string(sv_return_list)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_intersect()
#
#                      In this example 2 input lists are defined and
#                      this function is called to get entities which
#                      are exactly referenced in both list.
#
#                      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 list_intersect()
#  has the following arguments:
#
#  list_intersect
#     (  input_list_1,
#        input_list_2,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list_1[128]
STRING   s_input_list_2[128]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
 
s_input_list_1 = "Solid 1.1 1.1.4 1.6 Elm 1 1.1 2.2.2 3.4.5.6"
s_input_list_2 = "Solid 1.1 1.1.5 1.6.1 Elm 1 1.2 2.2.2 2.2.5 3.4.5.6"
 
i_return_value =                                 @
   list_intersect                                @
      (  s_input_list_1,                         @
         s_input_list_2,                         @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string(sv_return_list)
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_rem_duplicate()
#
#                      In this example a list with duplication of
#                      entities is defined. Then this function is
#                      called to get the list without any
#                      duplication of entities.
#
#                      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 list_rem_duplicate()
#  has the following arguments:
#
#  list_rem_duplicate
#     (  input_list,
#        return_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_input_list[128]
STRING   sv_return_list[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
# Remove duplication from input list
 
s_input_list  = "Solid 1 1.1 2.2 1.1 Elm 2.1 3.3 Solid 2.2 Elm 3.3"
 
i_return_value =                                 @
   list_rem_duplicate                            @
      (  s_input_list,                           @
         sv_return_list )
dump i_return_value
dump sv_return_list
 
sys_free_string(sv_return_list)
#---------------------------------------------------------------------
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function list_save_group()
#
#                      This function adds a list of entities stored
#                      in a global string variable into a group.
#
#                      In this example, the spool database is opened
#                      and group "default_group" is posted. The global
#                      string variable "lista" is assigned a value.
#                      Then this function is called to save the
#                      entities mentioned in the string to
#                      "default_group" and posted to default viewport.
#                      The list of members present in "default_group"
#                      is verified before and after the addition of
#                      entities.
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      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 list_save_group()
#  has the following arguments:
#
#  list_save_group
#     (  target_list,
#        group_name,
#        update  )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_target_list[6]
STRING   s_group_name[32]
LOGICAL  l_update
INTEGER  i_return_value
STRING   sv_members[VIRTUAL]
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Post the "default_group"
uil_viewport_post_groups.posted_groups           @
   (  "default_viewport",                        @
      1, ["default_group"] )
 
#---------------------------------------------------------------------
#  Assign value to "lista"
i_return_value =                                 @
   list_create_target_list                       @
      (  "lista", "Element 1:192 " )
dump i_return_value
 
#---------------------------------------------------------------------
#  Get the list of all members of group
i_return_value =                                 @
   uil_group_members_get                         @
      (  "default_group",                        @
         sv_members )
dump i_return_value
dump sv_members
 
#---------------------------------------------------------------------
#  Add the list of entities in "lista" to "default_group"
s_target_list  = "lista"
s_group_name   = "default_group"
l_update       = FALSE
 
i_return_value =                                 @
   list_save_group                               @
      (  s_target_list,                          @
         s_group_name,                           @
         l_update )
 
#---------------------------------------------------------------------
#  Get the list of all members of group
i_return_value =                                 @
   uil_group_members_get                         @
      (  "default_group",                        @
         sv_members )
dump i_return_value
dump sv_members
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_members)
 
#  The newly added entities to "default_group" appear on the display
#  immediately after addition.
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_list_a.previous()
#
#                      This function will swap the contents of the
#                      global string variable "lista" with the
#                      contents of the global string "lista_reset".
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. Then global
#                      variable "lista" is assigned consecutively
#                      twice using the function
#                      list_create_target_list(). Then this function
#                      is called to get the first assignment made to
#                      "lista" and verified in the end.
#
#                      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 uil_list_a.previous() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  First assignment to global variable "lista".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "lista",                                               @
         "Curve 1" )
dump i_return_value
 
#  Second assignment to global variable "lista".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "lista",                                               @
         "Point 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Value of global string "lista" before swapping
dump lista
 
#  Set the contents of "lista_reset" to "lista"
uil_list_a.previous()
 
#  Value of global string "lista" after swapping
dump lista
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_list_b.previous()
#
#                      This function will swap the contents of the
#                      global string variable "listb" with the
#                      contents of the global string "listb_reset".
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a single curve and surface
#                      of dimension  2 X 1 is created. Then global
#                      variable "listb" is assigned consecutively
#                      twice using the function
#                      list_create_target_list(). Then this function
#                      is called to get the first assignment made to
#                      "listb" and verified in the end.
#
#                      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 uil_list_b.previous() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
STRING   sv_asm_point[VIRTUAL]
STRING   sv_asm_line[VIRTUAL]
STRING   sv_sgm_surface[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "1","[0 0 0]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_grid_xyz                                           @
      (  "2","[0 0 1]","Coord 0",sv_asm_point)
dump i_return_value
 
i_return_value =                                                @
   asm_const_line_2point                                        @
      (  "1","Point 1 ","Point 2",0,"",50., 1, sv_asm_line )
dump i_return_value
 
i_return_value =                                                @
   sgm_const_surface_extrude                                    @
      (  "1","<2 0 0>",1.,0.,"[0 0 0]","Coord 0","Curve 1 ",    @
         sv_sgm_surface )
dump i_return_value
 
#---------------------------------------------------------------------
#  First assignment to global variable "listb".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "listb",                                               @
         "Curve 1" )
dump i_return_value
 
#  Second assignment to global variable "listb".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "listb",                                               @
         "Point 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Value of global string "listb" before swapping
dump listb
 
#  Set the contents of "listb_reset" to "listb"
uil_list_b.previous()
 
#  Value of global string "listb" after swapping
dump listb
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_asm_point)
sys_free_string( sv_asm_line)
sys_free_string( sv_sgm_surface)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_list_a.clear()
#
#                      This function sets the global string
#                      "lista_reset" to the contents of the global
#                      string "lista" and then sets "lista" to a
#                      single space.
#
#                      In this example a new database is opened and
#                      global string "lista" is assigned a value. Then
#                      this function is called to set "lista_reset" to
#                      "lista" and then set a single space to "lista".
#                      The value of the global string "lista" is
#                      checked before and after the calling of this
#                      function.
#
#                      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 uil_list_a.clear() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declaration
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Assign  value to global string "lista"
i_return_value =                                                @
   list_create_target_list                                      @
      (  "lista",                                               @
         "Curve 1" )
dump i_return_value
 
#  Value of global string "lista" and "lista_reset" before clearing
dump lista
dump lista_reset
 
#  Set the contents of "lista" to a single space.
uil_list_a.clear()
 
#  Value of global string "lista" and "lista_reset" after clearing
dump lista
dump lista_reset
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_list_b.clear()
#
#                      This function sets the global string
#                      "listb_reset" to the contents of the global
#                      string "listb" and then sets "listb" to a
#                      single space.
#
#                      In this example a new database is opened and
#                      global string "listb" is assigned a value. Then
#                      this function is called to set "listb_reset" to
#                      "listb" and then set a single space to "listb".
#                      The value of the global string "listb" is
#                      checked before and after the calling of this
#                      function.
#
#                      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 uil_list_b.clear() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declaration
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Assign  value to global string "listb"
i_return_value =                                                @
   list_create_target_list                                      @
      (  "listb",                                               @
         "Curve 1" )
dump i_return_value
 
#  Value of global string "listb" and "listb_reset" before clearing
dump listb
dump listb_reset
 
#  Set the contents of "listb" to a single space.
uil_list_b.clear()
 
#  Value of global string "listb" and "listb_reset" after clearing
dump listb
dump listb_reset
 
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_list_boolean.create()
#
#                      This function creates a list of entities by
#                      combining the contents of the global strings
#                      "lista" and "listb" using the type of operation
#                      specified by the input string "boolean" and
#                      placing the results in the global string
#                      "listc".
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a cube of dimension 1x1x1
#                      is created. The global variables "lista" and
#                      "listb" are assigned using
#                      list_create_target_list(). Then this function
#                      is called to create a boolean set in global
#                      variable "listc" using "and" operation.
#
#                      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 uil_list_boolean.create()
#  has the following arguments.
#
#  uil_list_boolean.create
#     (  boolean )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
STRING   s_boolean[7]
STRING   sv_hpat_xyz_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_hpat_xyz                                           @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0", sv_hpat_xyz_ids )
dump i_return_value
 
#---------------------------------------------------------------------
#  Assignment to global variable "lista".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "lista",                                               @
         "Point 2 4" )
dump i_return_value
 
#  Assignment to global variable "listb".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "listb",                                               @
         "Point 2 3 6 7" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create a boolen set in "listc"
s_boolean = "and"
uil_list_boolean.create( s_boolean )
 
#  Value of strings "lista","listb"&"listc" after boolean operation.
dump lista
dump listb
dump listc
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_hpat_xyz_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_list_a.replace()
#
#                      This function will set the contents of the
#                      global string variable "lista_reset" to equal
#                      the contents of the global string variable
#                      "lista". It will then set the global string
#                      variable "lista" to equal the contents of the
#                      global string variable "listc"
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a cube of dimension 1x1x1
#                      is created. The global variables "lista" and
#                      "listb" are assigned using
#                      list_create_target_list(). Then the function
#                      uil_list_boolean.create() is called to create
#                      a boolean-set in global variable "listc".
#                      Finally this function is called to replace
#                      "lista" by "listc". The value of "lista" is
#                      verified before and after the replacement.
#
#                      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 uil_list_a.replace() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
STRING   s_boolean[7]
STRING   sv_hpat_xyz_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_hpat_xyz                                           @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0", sv_hpat_xyz_ids )
dump i_return_value
 
#---------------------------------------------------------------------
#  Assignment to global variable "lista".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "lista",                                               @
         "Point 2 4" )
dump i_return_value
 
#  Assignment to global variable "listb".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "listb",                                               @
         "Point 2 3 6 7" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create a boolean set in "listc"
s_boolean = "b-a"
uil_list_boolean.create( s_boolean )
 
#  Value of global string "listc" after boolean operation
dump listc
 
#---------------------------------------------------------------------
#  Value of global string "lista" and "lista_reset" before replacement
dump lista
dump lista_reset
 
#  Replace contents of "lista" by "listc"
uil_list_a.replace()
 
#  Value of global string "lista" and "lista_reset" after replacement
dump lista
dump lista_reset
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_hpat_xyz_ids)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_list_a.replace()
#
#                      This function will set the contents of the
#                      global string variable "listb_reset" to equal
#                      the contents of the global string variable
#                      "listb". It will then set the global string
#                      variable "listb" to equal the contents of the
#                      global string variable "listc"
#
#                      In this example a new database is opened. Geom-
#                      etry consisting of a cube of dimension 1x1x1
#                      is created. The global variables "lista" and
#                      "listb" are assigned using
#                      list_create_target_list(). Then the function
#                      uil_list_boolean.create() is called to create
#                      a boolean-set in global variable "listc".
#                      Finally this function is called to replace
#                      "listb" by "listc". The value of "lista" is
#                      verified before and after the replacement.
#
#                      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 uil_list_b.replace() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
STRING   s_boolean[7]
STRING   sv_hpat_xyz_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric entities
i_return_value =                                                @
   asm_const_hpat_xyz                                           @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0", sv_hpat_xyz_ids )
dump i_return_value
 
#---------------------------------------------------------------------
#  Assignment to global variable "lista".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "lista",                                               @
         "Point 2 4" )
dump i_return_value
 
#  Assignment to global variable "listb".
i_return_value =                                                @
   list_create_target_list                                      @
      (  "listb",                                               @
         "Point 2 3 6 7" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create a boolean set in "listc"
s_boolean = "b-a"
uil_list_boolean.create( s_boolean )
 
#  Value of global string "listc" after boolean operation
dump listc
 
#---------------------------------------------------------------------
#  Value of global string "listb" and "listb_reset" before replacement
dump listb
dump listb_reset
 
#  Replace contents of "listb" by "listc"
uil_list_b.replace()
 
#  Value of global string "listb" and "listb_reset" after replacement
dump listb
dump listb_reset
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_string( sv_hpat_xyz_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function mass_prop_create()
#
#                      This function calculates mass properties for a
#                      set of specified entities, plots principal axes
#                      of the inertia tensor at the center of gravity
#                      and creates and posts a coordinate frame that
#                      is aligned with the principal axes of the
#                      inertia tensor.
#
#                      In this example a new database is opened and a
#                      surface is created. It is made into finite
#                      elements and assigned with proper material
#                      properties. Then this function is called to
#                      calculate the mass properties of the geometry
#                      created.
#                      Ignore the warnings generated during the
#                      execution of this example.
#
#                      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 mass_prop_create()
#  has the following arguments:
#
#  mass_prop_create
#     (  analysis_model_type,
#        all_or_group,
#        include,
#        number_of_groups,
#        groups,
#        coordinate_frame,
#        density,
#        thickness_or_area,
#        axisymmetric_frame,
#        axisymmetric_axis,
#        other_axis,
#        plot,
#        aligned_frame,
#        mass_properties,
#        entity_list,
#        length_entities,
#        number_of_entities,
#        reject_list,
#        length_reject,
#        number_of_rejects,
#        segment_id,
#        aligned_label,
#        coordinate_label )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_analysis_model_type[15]
STRING   s_all_or_group[5]
STRING   s_include[8]
INTEGER  i_number_of_groups
STRING   sa_groups[32](1) = [""]
STRING   s_coordinate_frame[32]
STRING   s_density[22]
STRING   s_thickness_or_area[22]
STRING   s_axisymmetric_frame[32]
INTEGER  i_axisymmetric_axis
INTEGER  i_other_axis
LOGICAL  l_plot
LOGICAL  l_aligned_frame
REAL     rv_mass_properties(VIRTUAL)
STRING   sv_entity_list[VIRTUAL]
INTEGER  i_length_entities
INTEGER  i_number_of_entities
STRING   sv_reject_list[VIRTUAL]
INTEGER  i_length_reject
INTEGER  i_number_of_rejects
INTEGER  i_segment_id
INTEGER  i_aligned_label
INTEGER  i_coordinate_label
INTEGER  i_return_value
STRING   sv_patch_xy_ids[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_nodes_created[VIRTUAL]
STRING   sv_elems_created[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric and Finite Element entities
i_return_value =                                                @
   asm_const_patch_xyz                                          @
      (  "1", "<10 0 1>", "[0 0 0]", "Coord 0",sv_patch_xy_ids)
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_nodes_created, sv_elems_created )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element properties
i_return_value =                                                @
   material.create                                              @
      (  "Analysis code ID",1,"Analysis type ID", 1, "new_mat", @
         0,"", "Isotropic", 1, "Directionality", 1, "Linearity",@
         1, "Homogeneous", 0, "Linear Elastic", 1,              @
         "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, @
         0, 0], "Active Flag", 1, "Create", 10, "External Flag",@
         FALSE,"Property IDs",["Elastic Modulus",               @
         "Poisson Ratio","Density"],[2, 5, 16,0], "Property"//  @
         " Values", ["10E6","0.33","0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create                                          @
      (  "new_prop", 51, 25, 35, 1, 1, 20, [13, 20, 36, 4037,   @
         4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1], ["m:new_mat",@
         "", "1", "", "", "", ""], "Surface 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Calculate the mass properties
 
s_analysis_model_type = "2D Plane Stress"
s_all_or_group        = "All"
s_include             = "Both"
s_coordinate_frame    = "Coord 0"
s_density             = "Use Element Properties"
s_thickness_or_area   = "Use Element Properties"
l_plot                = TRUE
l_aligned_frame       = TRUE
 
i_return_value =                                                @
   mass_prop_create                                             @
      (  s_analysis_model_type,                                 @
         s_all_or_group,                                        @
         s_include,                                             @
         i_number_of_groups,                                    @
         sa_groups,                                             @
         s_coordinate_frame,                                    @
         s_density,                                             @
         s_thickness_or_area,                                   @
         s_axisymmetric_frame,                                  @
         i_axisymmetric_axis,                                   @
         i_other_axis,                                          @
         l_plot,                                                @
         l_aligned_frame,                                       @
         rv_mass_properties,                                    @
         sv_entity_list,                                        @
         i_length_entities,                                     @
         i_number_of_entities,                                  @
         sv_reject_list,                                        @
         i_length_reject,                                       @
         i_number_of_rejects,                                   @
         i_segment_id,                                          @
         i_aligned_label,                                       @
         i_coordinate_label )
dump i_return_value
 
dump rv_mass_properties
dump sv_entity_list
dump i_length_entities
dump i_number_of_entities
dump sv_reject_list
dump i_length_reject
dump i_number_of_rejects
dump i_segment_id
dump i_aligned_label
dump i_coordinate_label
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_array ( rv_mass_properties)
sys_free_string( sv_entity_list)
sys_free_string( sv_reject_list)
sys_free_string( sv_patch_xy_ids)
sys_free_string( sv_nodes_created)
sys_free_string( sv_elems_created)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function mass_prop.gen_report()
#
#                      This function will write a set of mass
#                      properties and an entity list to a report file.
#
#                      In this example a new database is opened and a
#                      surface is created. It is made into finite
#                      elements and assigned with proper material
#                      properties. Then the function
#                      mass_prop_create() is called to calculate the
#                      mass properties of the geometry and paused for
#                      user to input the file name. Finally this
#                      function is called to write mass properties to
#                      the report file.
#                      Ignore the warnings generated during the
#                      execution of this example.
#
#                      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 mass_prop.gen_report()
#  has the following arguments:
#
#  mass_prop.gen_report
#     (  file_columns,
#        mass_properties,
#        coordinate_label,
#        entity_list,
#        number_of_entities,
#        entity_list_length,
#        reject_list,
#        number_of_rejects,
#        length_reject )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_file_columns
INTEGER  i_coordinate_label
STRING   s_entity_list[128]
INTEGER  i_number_of_entities
INTEGER  i_entity_list_length
STRING   s_reject_list[128]
INTEGER  i_number_of_rejects
INTEGER  i_length_reject
INTEGER  i_return_value
REAL     rv_mass_properties(VIRTUAL)
STRING   sv_entity_list[VIRTUAL]
INTEGER  i_length_entities
STRING   sv_reject_list[VIRTUAL]
INTEGER  i_segment_id
INTEGER  i_aligned_label
STRING   sv_patch_xy_ids[VIRTUAL]
INTEGER  i_num_nodes
INTEGER  i_num_elems
STRING   sv_nodes_created[VIRTUAL]
STRING   sv_elems_created[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go( "", "new.db" )
$? YES 36000002
 
#  Set ISO-1 viewing
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Geometric and Finite Element entities
i_return_value =                                                @
   asm_const_patch_xyz                                          @
      (  "1", "<10 0 1>", "[0 0 0]", "Coord 0",sv_patch_xy_ids)
dump i_return_value
 
i_return_value =                                                @
   mesh_seed_create                                             @
      (  "Surface 1.1 1.3 ", 1, 10, 0., 0., 0. )
dump i_return_value
 
i_return_value =                                                @
   fem_create_mesh_surf_2                                       @
      (  "IsoMesh", 0, "Surface 1 ", 1, [1.], "Quad4", "1", "1",@
         "Coord 0", "Coord 0", i_num_nodes, i_num_elems,        @
         sv_nodes_created, sv_elems_created )
dump i_return_value
 
#---------------------------------------------------------------------
#  Create Material and Element properties
i_return_value =                                                @
   material.create                                              @
      (  "Analysis code ID",1,"Analysis type ID", 1, "new_mat", @
         0,"", "Isotropic", 1, "Directionality", 1, "Linearity",@
         1, "Homogeneous", 0, "Linear Elastic", 1,              @
         "Model Options & IDs", ["", "", "", "", ""], [0, 0, 0, @
         0, 0], "Active Flag", 1, "Create", 10, "External Flag",@
         FALSE,"Property IDs",["Elastic Modulus",               @
         "Poisson Ratio","Density"],[2, 5, 16,0], "Property"//  @
         " Values", ["10E6","0.33","0.1", ""] )
dump i_return_value
 
i_return_value =                                                @
   elementprops_create                                          @
      (  "new_prop", 51, 25, 35, 1, 1, 20, [13, 20, 36, 4037,   @
         4111, 4118, 4119], [5, 9, 1, 1, 1, 1, 1], ["m:new_mat",@
         "", "1", "", "", "", ""], "Surface 1" )
dump i_return_value
 
#---------------------------------------------------------------------
#  Calculate the mass properties
 
i_return_value =                                                @
   mass_prop_create                                             @
      (  "2D Plane Stress", "All", "Both", 1, [""], "Coord 0",  @
         "Use Element Properties", "Unity", "",1, 0, TRUE, TRUE,@
         rv_mass_properties, sv_entity_list,i_length_entities,  @
         i_number_of_entities,sv_reject_list,i_length_reject,   @
         i_number_of_rejects, i_segment_id, i_aligned_label,    @
         i_coordinate_label )
dump i_return_value
 
#---------------------------------------------------------------------
#  Follow the given instruction
#
#     1. Pick "File" from the menu bar
#     2. Select "Report"
#     3. Input the name of the report file,
#     4. Press "Apply" and "Cancel"
#
#  Pick "Resume" for session file play
#
#---------------------------------------------------------------------
#  Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
#  Write mass properties and entity list to a report file
 
i_file_columns       = 80
s_entity_list        = sv_entity_list
i_entity_list_length = i_length_entities
s_reject_list        = sv_reject_list
 
i_return_value =                                                @
   mass_prop.gen_report                                         @
      (  i_file_columns,                                        @
         rv_mass_properties,                                    @
         i_coordinate_label,                                    @
         s_entity_list,                                         @
         i_number_of_entities,                                  @
         i_entity_list_length,                                  @
         s_reject_list,                                         @
         i_number_of_rejects,                                   @
         i_length_reject )
dump i_return_value
 
#---------------------------------------------------------------------
#  Free allocated memory
sys_free_array ( rv_mass_properties)
sys_free_string( sv_entity_list)
sys_free_string( sv_reject_list)
sys_free_string( sv_patch_xy_ids)
sys_free_string( sv_nodes_created)
sys_free_string( sv_elems_created)
 
#  It can be observed that a new report file with the user given name
#  created in the current directory. This file contains the mass
#  properties and entity details.
#---------------------------------------------------------------------