PCL Examples > Basic Functions > Group Menu
   
Group Menu
This section contains examples of functions that are used to create, delete, modify and transform groups of geometric and finite element model entities stored in the database.
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_clear()
#
#                      This function clears a group of all of its
#                      members.
#
#                      In this example, the spool database is opened
#                      and group "fem_model" is posted. Then all the
#                      entities associated with group "fem_model" 
#                      are cleared using this function.
#                      Then the same group is posted for viewing in 
#                      default viewport.
#
#                      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 ga_group_clear()
#  has the following arguments:
#
#  ga_group_clear
#     (  group_name )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Post the "fem_model"
uil_viewport_post_groups.posted_groups           @
   (  "default_viewport",                        @
      1, ["fem_model"] )
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Clear group "fem_model" of all its member
s_group_name = "fem_model"
i_return_value =                                 @
   ga_group_clear                                @
      (  s_group_name )
dump i_return_value
 
#  Post the "fem_model"
uil_viewport_post_groups.posted_groups           @
   (  "default_viewport",                        @
      1, ["fem_model"] )
 
#  It can be observed that no entity appearing on the default view- 
#  port as the group "fem_model" is freed of all the its members
#---------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_create()
#
#                      This function creates an empty group in the
#                      database
#
#                      In this example, the spool database is opened
#                      and a new group("new_group") is created. List
#                      of groups present in database is verified
#                      before and after creation.
#
#                      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 ga_group_create() has the following arguments:
#
#  ga_group_create
#     (  group_name )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   sa_groups[32](3)
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Get the list of groups
i_return_value =                                          @
   ga_group_groups_get ( sa_groups )
dump i_return_value
dump sa_groups
 
#  Create "new_group"
s_group_name = "new_group"
i_return_value =                                          @
   ga_group_create                                        @
      (  s_group_name )
dump i_return_value
 
#  Get the list of groups
i_return_value =                                          @
   ga_group_groups_get ( sa_groups )
dump i_return_value
dump sa_groups
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_current_set()
#
#                      This function sets up the current group for
#                      receiving newly created entities, and also
#                      posts the specified group to current viewport.
#
#                      In this example, the spool database is opened
#                      and id of the current group is obtained. Then
#                      "default_group" is set as the current-group
#                      using this function. The id of the current-
#                      group is once again obtained for verification.
#
#                      Groups present in spool.db are "default_group"
#                      ( id = 1 ) and "fem_model"( id = 2 ).
#
#                      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 ga_group_current_set() has the following arguments:
#
#  ga_group_current_set
#     (  group_name )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
INTEGER  i_group_id
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Get the current group id
i_return_value =                                 @
   db_get_current_group_id                       @
      (  i_group_id )
dump i_return_value
dump i_group_id
 
#  Set "default_group" as current group
s_group_name = "default_group"
i_return_value =                                 @
   ga_group_current_set                          @
      (  s_group_name )
dump i_return_value
 
#  Get the current group id
i_return_value =                                 @
   db_get_current_group_id                       @
      (  i_group_id )
dump i_return_value
dump i_group_id
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_delete()
#
#                      This function deletes a group from the database
#
#                      In this example, the spool database is opened
#                      and then "default_group" is deleted using this
#                      function. The list of groups present in
#                      database is verified before and after deletion.
#
#                      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 ga_group_delete() has the following arguments:
#
#  ga_group_delete
#     (  group_name )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   sa_groups[32](2)
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Get the list of groups
i_return_value =                                 @
   ga_group_groups_get ( sa_groups )
dump i_return_value
dump sa_groups
 
#  Delete the group
s_group_name = "default_group"
i_return_value =                                 @
   ga_group_delete                               @
      (  s_group_name )
dump i_return_value
 
#  Re-initialization of sa_groups
sa_groups(1) = ""
sa_groups(2) = ""
 
#  Get the list of groups
i_return_value =                                 @
   ga_group_groups_get ( sa_groups )
dump i_return_value
dump sa_groups
 
#  It can be observed that all geometric entities disappear
#  from the screen, as default_group was consisting of geomeric
#  entities only.
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_display_set()
#
#                      This function changes the current display prop-
#                      erty list associated with a group and posts the
#                      group to the current viewport.
#
#                      In this example the spool.db is opened and
#                      display property of group, "fem_model" is
#                      obtained using the function,
#                      ga_group_display_get(). Then the display prope-
#                      rty of "fem_model" is changed to "simple" using
#                      this function. The change in display property
#                      of "fem_model" is verified in the end.
#
#                      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 ga_group_display_set()
#  has the following arguments:
#
#  ga_group_display_set
#     (  group_name,
#        display_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_display_list[32]
INTEGER  i_return_value
STRING   s_display_property[32]
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Post "fem_model"
uil_viewport_post_groups.posted_groups           @
   (  "default_viewport", 1, ["fem_model"] )
 
#  Group name
s_group_name = "fem_model"
 
#  Get the display property "fem_model"
i_return_value =                                 @
   ga_group_display_get                          @
      (  s_group_name,                           @
         s_display_property )
dump i_return_value
dump s_display_property
 
#  Set current display property associated with a group
s_display_list = "simple"
i_return_value =                                 @
   ga_group_display_set                          @
      (  s_group_name,                           @
         s_display_list )
dump i_return_value
 
#  Get the display property "fem_model"
i_return_value =                                 @
   ga_group_display_get                          @
      (  s_group_name,                           @
         s_display_property )
dump i_return_value
dump s_display_property
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_entity_add()
#
#                      This function adds a list of entities as
#                      members to a group.
#
#                      In this example, the spool database is opened
#                      and a new group("new_group") is created and
#                      posted for viewing. After a pause, geometric
#                      entities are added to the group and viewed
#                      again. The list of members present in
#                      "new_group" is also checked, 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 ga_group_entity_add()
#  has the following arguments:
#
#  ga_group_entity_add
#     (  group_name,
#        entities )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_entities[128]
INTEGER  i_return_value
STRING   sv_members[VIRTUAL]
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Create "new_group"
i_return_value =                                          @
   ga_group_create                                        @
      (  "new_group" )
dump i_return_value
 
#  Post "new_group"
uil_viewport_post_groups.posted_groups                    @
   (  "default_viewport", 1, ["new_group"] )
 
#  Get the list of all members of group
i_return_value =                                          @
   uil_group_members_get                                  @
      (  "new_group" , sv_members )
dump i_return_value
dump sv_members
 
#  It can be observed that entities not appearing on the default view-
#  port as a newly created group is empty.
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Add all geometric entities to "new_group"
s_group_name   = "new_group"
s_entities     = "Point 6:7 4:5 8:10 Curve 3 1:2 Surface 1:6"
i_return_value =                                          @
   ga_group_entity_add                                    @
      (  s_group_name,                                    @
         s_entities )
dump i_return_value
 
#  Get the list of all members of group
i_return_value =                                          @
   uil_group_members_get                                  @   
      (  "new_group" , sv_members )
dump i_return_value
dump sv_members
 
#  Free allocated memory
sys_free_string ( sv_members )
#---------------------------------------------------------------------
  
()
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_entity_remove()
#
#                      This function removes a list of entities from
#                      a group.
#
#                      In this example, the spool database is opened
#                      and "default_group" is posted for viewing.
#                      After a pause, surfaces 1 to 3 are removed
#                      from "default_group". The list of members
#                      present in "default_group" is also checked,
#                      before and after the removal 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 ga_group_entity_remove()
#  has the following arguments:
#
#  ga_group_entity_remove
#     (  group_name,
#        entities )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_entities[32]
INTEGER  i_return_value
STRING   sv_members[VIRTUAL]
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Post "default_group"
uil_viewport_post_groups.posted_groups                    @
   (  "default_viewport", 1, ["default_group"] )
 
#  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
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Remove surfaces 1 to 3 from "default_group"
s_group_name = "default_group"
s_entities = "Surface 1:3"
i_return_value =                                          @
   ga_group_entity_remove                                 @
      (  s_group_name,                                    @
         s_entities )
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
 
#  It can be observed that surfaces-1,2,3 disappearing from the
#  view-port because of their removal from the "default_group"
 
#  Free allocated memory
sys_free_string ( sv_members )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_members_delete()
#
#                      This function deletes the entities associated
#                      with a group from the database.
#
#                      In this example, the spool database is opened
#                      and members (fem entities) associated with
#                      group "fem_model" is deleted by calling this
#                      function. The default display view-port is
#                      then refreshed.
#
#                      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 ga_group_members_delete() has the following arguments:
#
#  ga_group_members_delete
#     (  group_name )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Delete members of "fem_model"
s_group_name = "fem_model"
i_return_value =                                 @
   ga_group_members_delete                       @
      (  s_group_name )
dump i_return_value
 
#  Patran generating list of deleted entities can also be seen from
#  the history window.
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_precision_set()
#
#                      This function sets the precision of the rende-
#                      ring for a specified group.
#
#                      In this example the spool.db is opened and the
#                      precision for rendering of group "fem_model" is
#                      obtained using the function, ga_group_precision
#                      _get (). Then the precision of "fem_model" is
#                      changed to 1 using this function. The change in
#                      precision is verified in the end.
#
#                      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 ga_group_precision_set()
#  has the following arguments:
#
#  ga_group_precision_set
#     (  group_name,
#        precision_status )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[128]
INTEGER  i_precision_status
INTEGER  i_precision_status_get
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Post "fem_model"
uil_viewport_post_groups.posted_groups           @
   (  "default_viewport", 1, ["fem_model"] )
 
#  Group name
s_group_name = "fem_model"
 
#  Get the display property "fem_model"
i_return_value =                                 @
   ga_group_precision_get                        @
      (  s_group_name,                           @
         i_precision_status_get )
dump i_return_value
dump i_precision_status_get
 
#  Set current display property associated with a group
i_precision_status = 1
i_return_value =                                 @
   ga_group_precision_set                        @
      (  s_group_name,                           @
         i_precision_status )
dump i_return_value
 
#  Get the display property "fem_model"
i_return_value =                                 @
   ga_group_precision_get                        @
      (  s_group_name,                           @
         i_precision_status_get )
dump i_return_value
dump i_precision_status_get
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_rename()
#
#                      This function renames the specified group.
#
#                      In this example, the spool database is opened
#                      and the group "fem_model" is renamed to 
#                      "fem_renamed". The list of groups present in
#                      the database is checked before and after
#                      renaming.
#
#                      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 ga_group_rename()
#  has the following arguments:
#
#  ga_group_rename
#     (  original_name,
#        new_name )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_original_name[32]
STRING   s_new_name[32]
STRING   sa_groups[32](2)
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database "spool.db"
uil_file_open.go("spool.db")
 
#  Get the list of groups
i_return_value =                                          @
   ga_group_groups_get ( sa_groups )
dump i_return_value
dump sa_groups
 
#  Rename group "fem_model" to "fem_renamed"
s_original_name = "fem_model"
s_new_name = "fem_renamed"
i_return_value =                                          @
   ga_group_rename                                        @
      (  s_original_name,                                 @
         s_new_name )
dump i_return_value
 
#  Get the list of groups
i_return_value =                                          @
   ga_group_groups_get ( sa_groups )
dump i_return_value
dump sa_groups
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_mirror()
#
#                      This function creates a new set of entities
#                      which are a mirror of the entities contained
#                      in the named group.
#
#                      In this example a new database is opened and a
#                      cube is created. After a pause, this function
#                      is called to create a new set of entities which
#                      are mirror of entities(cube) present in 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 ga_group_transform_mirror()
#  has the following arguments:
#
#  ga_group_transform_mirror
#     (  group_name,
#        plane,
#        offset,
#        delete_original,
#        use_original_labels,
#        reverse )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_plane[32]
REAL     r_offset
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
LOGICAL  l_reverse
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Plane for mirroring
s_plane = "Coord 0.3"
 
#  Offset distance between mirrored entities
r_offset = 5
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Do not reverse curves and surfaces of mirrored entities
l_reverse = FALSE
 
#  Create a new set of entities by mirroring.
i_return_value =                                 @
   ga_group_transform_mirror                     @
      (  s_group_name,                           @
         s_plane,                                @
         r_offset,                               @
         l_delete_original,                      @
         l_use_original_labels,                  @
         l_reverse )
dump i_return_value
 
#  Free allocated memory
sys_free_string ( sv_hpat_ids )
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_mirror2()
#
#                      This function creates a new set of entities
#                      which are a mirror of the entities contained
#                      in the named group.
#
#                      In this example a new database is opened and a
#                      cube with an lbc("force_1") is created. After a
#                      pause, this function is called to create a new
#                      set of entities which are mirror of entities
#                      and present in default_group. The lbcs are cop-
#                      ied without co-ordinate transformation to the
#                      mirrored 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 ga_group_transform_mirror2()
#  has the following arguments:
#
#  ga_group_transform_mirror2
#     (  group_name,
#        plane,
#        offset,
#        delete_original,
#        use_original_labels,
#        reverse,
#        lbc_copy_sets,
#        lbc_transform_sets,
#        prop_copy_sets,
#        prop_transform_sets )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_plane[32]
REAL     r_offset
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
LOGICAL  l_reverse
STRING   sa_lbc_copy_sets[16](2)
STRING   sa_lbc_transform_sets[16](2)
STRING   sa_prop_copy_sets[16](2)
STRING   sa_prop_transform_sets[16](2)
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create lbc
i_return_value =                                 @
   loadsbcs_create                               @
      (  "force_1", "Force", "Nodal", "",        @
         "Static", ["Point 7"], "Geometry",      @
         "Coord 0", 1., ["<0 -100 0     >",      @
         "<    >"], ["", ""] )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Plane for mirroring
s_plane = "Coord 0.3"
 
#  Offset distance between mirrored entities
r_offset = 2
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Do not reverse curves and surfaces of mirrored entities
l_reverse = FALSE
 
#  Names of LBCs to be copied without co-ordinate transformation.
sa_lbc_copy_sets(1) = "$ALL"
sa_lbc_copy_sets(2) = ""
 
#  Create a new set of entities by mirroring
i_return_value =                                 @
   ga_group_transform_mirror2                    @
      (  s_group_name,                           @
         s_plane,                                @
         r_offset,                               @
         l_delete_original,                      @
         l_use_original_labels,                  @
         l_reverse,                              @
         sa_lbc_copy_sets,                       @
         sa_lbc_transform_sets,                  @
         sa_prop_copy_sets,                      @
         sa_prop_transform_sets )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
 
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_pivot()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group pivoted around a point defined
#                      in space.
#
#                      In this example a new database is opened and a
#                      cuboid is created. After a pause, this function
#                      is called to create a new set of entities with
#                      [0 0 0] as pivot-point . 
#
#                      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 ga_group_transform_pivot()
#  has the following arguments:
#
#  ga_group_transform_pivot
#     (  group_name,
#        pivot_point,
#        start_point,
#        end_point,
#        delete_original,
#        use_original_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_pivot_point[32]
STRING   s_start_point[32]
STRING   s_end_point[32]
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cuboid of dimension of 10*1*5
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<10 1 5>", "[0 0 0]", "Coord 0",  @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Points definition
s_pivot_point = "[0 0 0]"
s_start_point = "Point 8"
s_end_point = "Point 7"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Create a new set of entities by pivot transformation method
i_return_value =                                 @
   ga_group_transform_pivot                      @
      (  s_group_name,                           @
         s_pivot_point,                          @
         s_start_point,                          @
         s_end_point,                            @
         l_delete_original,                      @
         l_use_original_labels )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_pivot2()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group pivoted around a point defined
#                      in space.
#
#                      In this example a new database is opened and a
#                      cuboid with an lbc("force_1") is created. After
#                      a pause, this function is called to create a
#                      new set of entities with [0 0 0]as pivot point.
#                      The lbcs are copied without co-ordinate transf-
#                      ormation to the transformed 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 ga_group_transform_pivot2()
#  has the following arguments:
#
#  ga_group_transform_pivot2
#     (  group_name,
#        pivot_point,
#        start_point,
#        end_point,
#        delete_original,
#        use_original_labels,
#        lbc_copy_sets,
#        lbc_transform_sets,
#        prop_copy_sets,
#        prop_transform_sets )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_pivot_point[32]
STRING   s_start_point[32]
STRING   s_end_point[32]
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
STRING   sa_lbc_copy_sets[32](2)
STRING   sa_lbc_transform_sets[32](2)
STRING   sa_prop_copy_sets[32](2)
STRING   sa_prop_transform_sets[32](2)
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cuboid of dimension of l0*1*5
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<10 1 5>", "[0 0 0]", "Coord 0",  @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create lbc
i_return_value =                                 @
   loadsbcs_create                               @
      (  "force_1", "Force", "Nodal", "",        @
         "Static", ["Point 7"], "Geometry",      @
         "Coord 0", 1., ["<0 -100 0     >",      @
         "<     >"], ["", ""] )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Points definition
s_pivot_point = "[0 0 0]"
s_start_point = "Point 8"
s_end_point = "Point 7"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Names of LBCs to be copied without co-ordinate transformation
sa_lbc_copy_sets(1) = "$ALL"
sa_lbc_copy_sets(2) = ""
 
#  Create a new set of entities by pivot transformation method
i_return_value =                                 @
   ga_group_transform_pivot2                     @
      (  s_group_name,                           @
         s_pivot_point,                          @
         s_start_point,                          @
         s_end_point,                            @
         l_delete_original,                      @
         l_use_original_labels,                  @
         sa_lbc_copy_sets,                       @
         sa_lbc_transform_sets,                  @
         sa_prop_copy_sets,                      @
         sa_prop_transform_sets )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_position()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group by rigid body positional and
#                      rotational translation in space.
#
#                      In this example a new database is opened and a
#                      cube is created. After a pause, this function
#                      is called to create a new set of entities after
#                      specification of origin and destination points.
#
#                      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 ga_group_transform_position()
#  has the following arguments:
#
#  ga_group_transform_position
#     (  group_name,
#        start_point_1,
#        start_point_2,
#        start_point_3,
#        end_point_1,
#        end_point_2,
#        end_point_3,
#        delete_original,
#        use_original_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_start_point_1[32]
STRING   s_start_point_2[32]
STRING   s_start_point_3[32]
STRING   s_end_point_1[32]
STRING   s_end_point_2[32]
STRING   s_end_point_3[32]
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Points definitions
s_start_point_1 = "Point 1 "
s_start_point_2 = "Point 4 "
s_start_point_3 = "Point 8 "
s_end_point_1 = "[0 3 0]"
s_end_point_2 = "[0 3 1]"
s_end_point_3 = "[1 3.1 1]"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Create a new set of entities by position transformation method
i_return_value =                                 @
   ga_group_transform_position                   @
      (  s_group_name,                           @
         s_start_point_1,                        @
         s_start_point_2,                        @
         s_start_point_3,                        @
         s_end_point_1,                          @
         s_end_point_2,                          @
         s_end_point_3,                          @
         l_delete_original,                      @
         l_use_original_labels )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_position2()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group by rigid body positional and
#                      rotational translation in space.
#
#                      In this example a new database is opened and a
#                      cube with an lbc("force_1") is created. After a
#                      pause, this function is called to create a new
#                      set of entities after specification of origin
#                      and destination points. The lbcs are copied
#                      without co-ordinate transformation to the tran-
#                      sformed 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 ga_group_transform_position2()
#  has the following arguments:
#
#  ga_group_transform_position2
#     (  group_name,
#        start_point_1,
#        start_point_2,
#        start_point_3,
#        end_point_1,
#        end_point_2,
#        end_point_3,
#        delete_original,
#        use_original_labels,
#        lbc_copy_sets,
#        lbc_transform_sets,
#        prop_copy_sets,
#        prop_transform_sets )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_start_point_1[32]
STRING   s_start_point_2[32]
STRING   s_start_point_3[32]
STRING   s_end_point_1[32]
STRING   s_end_point_2[32]
STRING   s_end_point_3[32]
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
STRING   sa_lbc_copy_sets[32](2)
STRING   sa_lbc_transform_sets[32](2)
STRING   sa_prop_copy_sets[32](2)
STRING   sa_prop_transform_sets[32](2)
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create lbc
i_return_value =                                 @
   loadsbcs_create                               @
      (  "force_1", "Force", "Nodal", "",        @
         "Static", ["Point 7"], "Geometry",      @
         "Coord 0", 1., ["<0 -100 0     >",      @
         "<    >"], ["", ""] )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Points definitions
s_start_point_1 = "Point 1 "
s_start_point_2 = "Point 4 "
s_start_point_3 = "Point 8 "
s_end_point_1 = "[0 3 0]"
s_end_point_2 = "[1 3 0]"
s_end_point_3 = "[1 3.1 1]"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Names of LBCs to be copied without co-ordinate transformation.
sa_lbc_copy_sets(1) = "$ALL"
sa_lbc_copy_sets(2) = ""
 
#  Create a new set of entities by position transformation method
i_return_value =                                 @
   ga_group_transform_position2                  @
      (  s_group_name,                           @
         s_start_point_1,                        @
         s_start_point_2,                        @
         s_start_point_3,                        @
         s_end_point_1,                          @
         s_end_point_2,                          @
         s_end_point_3,                          @
         l_delete_original,                      @
         l_use_original_labels,                  @
         sa_lbc_copy_sets,                       @
         sa_lbc_transform_sets,                  @
         sa_prop_copy_sets,                      @
         sa_prop_transform_sets )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_rotate()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group by rigid body rotational
#                      translation in space.
#
#                      In this example a new database is opened and a
#                      cube is created. After a pause, this function
#                      is called to create a new set of entities with
#                      an rotational translation of 45 degrees along
#                      Z axis.
#
#                      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 ga_group_transform_rotate()
#  has the following arguments:
#
#  ga_group_transform_rotate
#     (  group_name,
#        coordinate_frame_id,
#        rotation_axis,
#        rotation_angle,
#        offset_angle,
#        delete_original,
#        use_original_labels,
#        repeat_count )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_coordinate_frame_id[32]
STRING   s_rotation_axis[32]
REAL     r_rotation_angle
REAL     r_offset_angle
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_repeat_count
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Rotation details
s_coordinate_frame_id = "CoordinateFrame 0"
s_rotation_axis = "Coord 0.3"
r_rotation_angle = 45.0
r_offset_angle = 0.0
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Number of times to repeat the transformation
i_repeat_count = 1
 
#  Create a new set of entities by rotation transformation method
i_return_value =                                 @
   ga_group_transform_rotate                     @
      (  s_group_name,                           @
         s_coordinate_frame_id,                  @
         s_rotation_axis,                        @
         r_rotation_angle,                       @
         r_offset_angle,                         @
         l_delete_original,                      @
         l_use_original_labels,                  @
         i_repeat_count )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------e
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_rotate2()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group by rigid body rotational
#                      translation in space.
#
#                      In this example a new database is opened and a
#                      cube with an lbc("force_1") is created. After a
#                      pause, this function is called to create a new
#                      set of entities with an rotational translation
#                      of 45 degrees along Z axis. The lbcs are copied
#                      without co-ordinate transformation to the tran-
#                      sformed 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 ga_group_transform_rotate2()
#  has the following arguments:
#
#  ga_group_transform_rotate2
#     (  group_name,
#        coordinate_frame_id,
#        rotation_axis,
#        rotation_angle,
#        offset_angle,
#        delete_original,
#        use_original_labels,
#        repeat_count,
#        lbc_copy_sets,
#        lbc_transform_sets,
#        prop_copy_sets,
#        prop_transform_sets )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_coordinate_frame_id[32]
STRING   s_rotation_axis[32]
REAL     r_rotation_angle
REAL     r_offset_angle
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_repeat_count
STRING   sa_lbc_copy_sets[32](2)
STRING   sa_lbc_transform_sets[32](2)
STRING   sa_prop_copy_sets[32](2)
STRING   sa_prop_transform_sets[32](2)
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create lbc
i_return_value =                                 @
   loadsbcs_create                               @
      (  "force_1", "Force", "Nodal", "",        @
         "Static", ["Point 7"], "Geometry",      @
         "Coord 0", 1., ["<0 -100 0     >",      @
         "<     >"], ["", ""] )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Rotation details
s_rotation_axis  = "Coord 0.3"
r_rotation_angle = 45.0
r_offset_angle   = 0.0
s_coordinate_frame_id = "CoordinateFrame 0"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Number of times to repeat the transformation
i_repeat_count = 1
 
#  Names of LBCs to be copied without co-ordinate transformation.
sa_lbc_copy_sets(1) = "$ALL"
sa_lbc_copy_sets(2) = ""
 
#  Create a new set of entities by rotation transformation method
i_return_value =                                 @
   ga_group_transform_rotate2                    @
      (  s_group_name,                           @
         s_coordinate_frame_id,                  @
         s_rotation_axis,                        @
         r_rotation_angle,                       @
         r_offset_angle,                         @
         l_delete_original,                      @
         l_use_original_labels,                  @
         i_repeat_count,                         @
         sa_lbc_copy_sets,                       @
         sa_lbc_transform_sets,                  @
         sa_prop_copy_sets,                      @
         sa_prop_transform_sets )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_scale()
#
#                      This function creates a new set of entities
#                      which are a scaled-copy of the entities contai-
#                      ned in the named group.
#
#                      In this example a new database is opened and a
#                      cube is created. After a pause, this function
#                      is called to create a new set of entities which
#                      are twice the size (scale_factor = 2 along x,y,
#                      z axis) of the original.
#
#                      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 ga_group_transform_scale()
#  has the following arguments:
#
#  ga_group_transform_scale
#     (  group_name,
#        coordinate_frame_id,
#        origin_point,
#        scale_factors,
#        delete_original,
#        use_original_labels,
#        repeat_count )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_coordinate_frame_id[32]
STRING   s_origin_point[32]
REAL     ra_scale_factors(3)
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_repeat_count
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Scaling details
s_coordinate_frame_id = "CoordinateFrame 0"
s_origin_point        = "[0 0 0]"
ra_scale_factors      = [2.0, 2.0, 2.0]
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Number of times to repeat the transformation
i_repeat_count = 1
 
#  Create a new set of entities by scale transformation method
i_return_value =                                 @
   ga_group_transform_scale                      @
      (  s_group_name,                           @
         s_coordinate_frame_id,                  @
         s_origin_point,                         @
         ra_scale_factors,                       @
         l_delete_original,                      @
         l_use_original_labels,                  @
         i_repeat_count )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_scale2()
#
#                      This function creates a new set of entities
#                      which are a scaled-copy of the entities contai-
#                      ned in the named group.
#
#                      In this example a new database is opened and a
#                      cube with an lbc("force_1") is created. After a
#                      pause, this function is called to create a new
#                      set of entities which are twice the size 
#                      (scale_factor = 2 along x,y, z axis) of the 
#                      original. The lbcs  are copied  without  coord-
#                      inate transformation to the transformed
#                      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 ga_group_transform_scale2()
#  has the following arguments:
#
#  ga_group_transform_scale2
#     (  group_name,
#        coordinate_frame_id,
#        origin_point,
#        scale_factors,
#        delete_original,
#        use_original_labels,
#        repeat_count,
#        lbc_copy_sets,
#        lbc_transform_sets,
#        prop_copy_sets,
#        prop_transform_sets )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_coordinate_frame_id[32]
STRING   s_origin_point[32]
REAL     ra_scale_factors(3)
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_repeat_count
STRING   sa_lbc_copy_sets[32](2)
STRING   sa_lbc_transform_sets[32](2)
STRING   sa_prop_copy_sets[32](2)
STRING   sa_prop_transform_sets[32](2)
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create lbc
i_return_value =                                 @
   loadsbcs_create                               @
      (  "force_1", "Force", "Nodal", "",        @
         "Static", ["Point 7"], "Geometry",      @
         "Coord 0", 1., ["<0 -100 0     >",      @
         "<    >"], ["", ""] )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Scaling details
s_origin_point   = "[0 0 0]"
ra_scale_factors = [2.0, 2.0, 2.0]
s_coordinate_frame_id = "CoordinateFrame 0"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Number of times to repeat the transformation
i_repeat_count = 1
 
#  Names of LBCs to be copied without co-ordinate transformation.
sa_lbc_copy_sets(1) = "$ALL"
sa_lbc_copy_sets(2) = ""
 
#  Create a new set of entities by scale transformation method
i_return_value =                                 @
   ga_group_transform_scale2                     @
      (  s_group_name,                           @
         s_coordinate_frame_id,                  @
         s_origin_point,                         @
         ra_scale_factors,                       @
         l_delete_original,                      @
         l_use_original_labels,                  @
         i_repeat_count,                         @
         sa_lbc_copy_sets,                       @
         sa_lbc_transform_sets,                  @
         sa_prop_copy_sets,                      @
         sa_prop_transform_sets )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_translate()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group by movement or translation in
#                      space according to the translation vector.
#
#                      In this example a new database is opened and a
#                      cube is created. After a pause, this function
#                      is called to create a new set of entities with
#                      <3,3,3> as translation vector.
#
#                      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 ga_group_transform_translate()
#  has the following arguments:
#
#  ga_group_transform_translate
#     (  group_name,
#        coordinate_frame_id,
#        translation_vector,
#        delete_original,
#        use_original_labels,
#        repeat_count )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_coordinate_frame_id[32]
STRING   s_translation_vector[32]
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_repeat_count
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Linear translation details
s_coordinate_frame_id = "CoordinateFrame 0"
s_translation_vector = "<3 3 3>"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Number of times to repeat the transformation
i_repeat_count = 1
 
#  Create a new set of entities by vector transformation method
i_return_value =                                 @
   ga_group_transform_translate                  @
      (  s_group_name,                           @
         s_coordinate_frame_id,                  @
         s_translation_vector,                   @
         l_delete_original,                      @
         l_use_original_labels,                  @
         i_repeat_count )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_group_transform_translate2()
#
#                      This function creates a new set of entities
#                      which are a copy of the entities  contained in
#                      the named group by movement or translation in
#                      space according to the translation vector.
#
#                      In this example a new database is opened and a
#                      cube with an lbc("force_1") is created. After a
#                      pause, this function is called to create a new
#                      set of entities with <3,3,3> as translation 
#                      vector. The lbcs are copied without 
#                      co-ordinate transformation to the transformed 
#                      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 ga_group_transform_translate2()
#  has the following arguments:
#
#  ga_group_transform_translate2
#     (  group_name,
#        coordinate_frame_id,
#        translation_vector,
#        delete_original,
#        use_original_labels,
#        repeat_count,
#        lbc_copy_sets,
#        lbc_transform_sets,
#        prop_copy_sets,
#        prop_transform_sets )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   s_coordinate_frame_id[32]
STRING   s_translation_vector[32]
LOGICAL  l_delete_original
LOGICAL  l_use_original_labels
INTEGER  i_repeat_count
STRING   sa_lbc_copy_sets[32](2)
STRING   sa_lbc_transform_sets[32](2)
STRING   sa_prop_copy_sets[32](2)
STRING   sa_prop_transform_sets[32](2)
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create lbc
i_return_value =                                 @
   loadsbcs_create                               @
      (  "force_1", "Force", "Nodal", "",        @
         "Static", ["Point 7"], "Geometry",      @
         "Coord 0", 1., ["<0 -100 0     >",      @
         "<    >"], ["", ""] )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Name of the group
s_group_name = "default_group"
 
#  Linear translation details
s_coordinate_frame_id = "CoordinateFrame 0"
s_translation_vector  = "<3 3 3>"
 
#  Do not delete original entities
l_delete_original = FALSE
 
#  Do not set same labels to the new entities as that of original
l_use_original_labels = FALSE
 
#  Number of times to repeat the transformation
i_repeat_count = 1
 
#  Names of LBCs to be copied without co-ordinate transformation.
sa_lbc_copy_sets(1) = "$ALL"
sa_lbc_copy_sets(2) = ""
 
#  Create a new set of entities by vector transformation method
i_return_value =                                 @
   ga_group_transform_translate2                 @
      (  s_group_name,                           @
         s_coordinate_frame_id,                  @
         s_translation_vector,                   @
         l_delete_original,                      @
         l_use_original_labels,                  @
         i_repeat_count,                         @
         sa_lbc_copy_sets,                       @
         sa_lbc_transform_sets,                  @
         sa_prop_copy_sets,                      @
         sa_prop_transform_sets )
dump i_return_value
 
#  Free allocated memory
sys_free_string(sv_hpat_ids)
 
#  Copy of created entities can be seen in the display
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function uil_group_members_get()
#
#                      This function gets the list of all members of
#                      a group.
#
#                      In this example a new database is opened and
#                      this function is called to get the list of
#                      members in "default_group". A cube is then
#                      created. This cube forms the member of the
#                      current group i.e "default_group". Then this
#                      function is called once again to get the list
#                      of members in "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 uil_group_members_get()
#  has the following arguments:
#
#  uil_group_members_get
#     (  group_name,
#        members )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_group_name[32]
STRING   sv_members[VIRTUAL]
INTEGER  i_return_value
STRING   sv_hpat_ids[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("", "new.db")
$? YES 36000002
 
#  Get the list of all members of group
s_group_name = "default_group"
i_return_value =                                 @
   uil_group_members_get                         @
      (  s_group_name,                           @
         sv_members )
dump i_return_value
dump sv_members
 
#  Create cube of dimension of 1*1*1
i_return_value =                                 @
   asm_const_hpat_xyz                            @
      (  "1", "<1 1 1>", "[0 0 0]", "Coord 0",   @
         sv_hpat_ids )
dump i_return_value
 
#  Set ISO-1 viewing
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Get the list of all members of group
s_group_name = "default_group"
i_return_value =                                 @
   uil_group_members_get                         @
      (  s_group_name,                           @
         sv_members )
dump i_return_value
dump sv_members
 
#  Free allocated memory
sys_free_string(sv_members)
sys_free_string(sv_hpat_ids)
 
#  It can be found that list showing "Point 1:8 Solid 1" after the
#  creation of the solid
#---------------------------------------------------------------------