Tutorial Toolkit Function Descriptions > Obsolete, Modified, and Broken Functions > Graphics (Chapter 4)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Graphics (Chapter 4)
 
ga_elem_scalar_delete
Obsolete
The function represents code that does nothing.
 
This call was removed from the documentation.
Description:
Deletes an element scalar table.
Input:
INTEGER
id
Id of element scalar table.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
11000137
The specified element scalar table was not found.
11000098
A fatal error has occurred in the database. Database is corrupted.
13000213
A database lookup failed to locate the target index key.
Examples:
#  Purpose          :  This file provides an example of a call to the
#                      function ga_elem_scalar_delete()
#
#                      This function is used to delete an element
#                      scalar table.
#
#                      Before running this session file run spool.ses
#                      to create spool.db. Follow the instructions in
#                      spool.ses and create spool.op2 and spool.jbr.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar.
#
#  The function ga_elem_scalar_delete()
#  has the following arguments:
#
#  ga_elem_scalar_delete
#     (  id )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_title[32],s_group_name[32]
INTEGER  i_ncases, iv_lcids(VIRTUAL),iv_nsub(VIRTUAL),ia_resids(5)
INTEGER  i_dtype,i_resloc,i_nbr_elems,iv_elem_ids(VIRTUAL)
INTEGER  iv_nbr_values(VIRTUAL),ia_minloc(6),ia_maxloc(6)
INTEGER  i_max_vals
INTEGER  i_id,i_old_id
INTEGER  i_index,i_return_value
REAL     rv_scalars(VIRTUAL)
#---------------------------------------------------------------------
#  Open the database “spool.db” and read the deformation results
sf_play(“spool_res.ses”)
 
#  Get the current scalar element table associated with the
#  group “fem_model”
s_group_name = “fem_model”
i_return_value =                                  @
   ga_group_elem_scalar_get                       @
      (  s_group_name,                            @
         i_old_id )
dump i_return_value
 
#  Get the number of Load cases and their IDs
i_return_value =                                  @
   res_utl_get_loadcases(i_ncases,iv_lcids,iv_nsub)
dump i_return_value
dump i_ncases,iv_lcids,iv_nsub
 
#  Extract the deformation results from the database
#  Load case ID        = iv_lcids(1)
#  Sub case ID         = 1
#  Primary Result ID   = 2             (Corresponds to deformation )
#  Secondary Result ID = 1
#  Layer ID            = 1
#  elem_list           = “Element 1:#” (All elements )
#  location            = “C”           (Centroid )
#  derivation          = “MAG”         (Magnitude: Vector to Scalar)
#  c_id                = ““
ia_resids(1) = iv_lcids(1)
ia_resids(2) = 1
ia_resids(3) = 2
ia_resids(4) = 1
ia_resids(5) = 1
i_return_value =                                                    @
   res_utl_extract_elem_results(ia_resids,”Element 1:#”,”MAG”,”C”,  @
      ““,i_dtype,i_resloc,i_nbr_elems,iv_elem_ids,iv_nbr_values,    @
      rv_scalars, ia_minloc,ia_maxloc)
 
dump i_return_value
 
#  Create a scalar table
s_title = “A Scalar Table”
i_max_vals = 1           /* Only at the Centroid */
 
i_return_value =                                  @
   ga_elem_scalar_create                          @
      (  s_title,                                 @
         i_nbr_elems,                             @
         iv_elem_ids,                             @
         iv_nbr_values,                           @
         i_max_vals,                              @
         rv_scalars,                              @
         i_id )
 
dump i_return_value, i_id
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Set the current scalar element table associated with the
#  group “fem_model”
s_group_name = “fem_model”
i_return_value =                                  @
   ga_group_elem_scalar_set                       @
      (  s_group_name,                            @
         i_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Remove the association between the group “fem_model” and
#  the new scalar table
s_group_name = “fem_model”
i_return_value =                                  @
   ga_group_elem_scalar_set                       @
      (  s_group_name,                            @
         i_old_id)
dump i_return_value
 
#  Delete the element table
i_return_value =                                  @
   ga_elem_scalar_delete                          @
      (  i_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
sys_free_array(iv_lcids)
sys_free_array(iv_nsub)
sys_free_array(iv_elem_ids)
sys_free_array(iv_nbr_values)
sys_free_array(rv_scalars)
 
#  Close the database “spool.db”
uil_file_close.go()
#---------------------------------------------------------------------
 
 
ga_elem_scalar_get
Obsolete
The function no longer exists in MSC.Patran.
 
This call was removed from the documentation.
Description:
Returns the scalar values in the scalar table.
Input:
INTEGER
id
Id of element scalar table.
INTEGER
nbr_elems
Number of elements.
INTEGER
max_val
Max number of scalars in any element.
Output:
STRING
title[]
Title of table.
INTEGER
elem_ids ( )
Array of element ids.
INTEGER
nbr_values ( )
Number of scalar values in each element.
REAL
scalars (nbr_elems, max_value)
Scalar values for all elements.
INTEGER
<Return Value>
See error conditions.
Error Conditions:
11000137
The specified element scalar table was not found.
11000098
A fatal error has occurred in the database. Database is corrupted.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_elem_scalar_get()
#
#                      This function is used to get the scalar values
#                      in an element scalar table.
#
#                      Before running this session file run spool.ses
#                      to create spool.db. Follow the instructions in
#                      spool.ses and create spool.op2 and spool.jbr.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar.
#
#  The function ga_elem_scalar_get()
#  has the following arguments:
#
#  ga_elem_scalar_get
#     (  id,
#        nbr_elems,
#        max_vals,
#        title,
#        elem_ids,
#        nbr_values,
#        scalars )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_title[32],s_group_name[32]
INTEGER  i_ncases, iv_lcids(VIRTUAL),iv_nsub(VIRTUAL),ia_resids(5)
INTEGER  i_dtype,i_resloc,i_nbr_elems,iv_elem_ids(VIRTUAL)
INTEGER  iv_nbr_values(VIRTUAL),ia_minloc(12),ia_maxloc(12)
INTEGER  i_max_vals
INTEGER  i_id
INTEGER  i_index,i_return_value
REAL     rv_scalars(VIRTUAL)
#---------------------------------------------------------------------
#  Open the database “spool.db” and read the deformation results
sf_play(“spool_res.ses”)
 
#  Get the number of Load cases and their IDs
i_return_value =                                                    @
   res_utl_get_loadcases(i_ncases,iv_lcids,iv_nsub)
dump i_return_value
dump i_ncases,iv_lcids,iv_nsub
 
#  Extract the deformation results from the database
#  Load case ID        = iv_lcids(1)
#  Sub case ID         = 1
#  Primary Result ID   = 2             (Corresponds to deformation )
#  Secondary Result ID = 1
#  Layer ID            = 1
#  elem_list           = “Element 1:#” (All elements )
#  location            = “C”           (Centroid )
#  derivation          = “MAG”         (Magnitude: Vector to Scalar)
#  c_id                = ““
ia_resids(1) = iv_lcids(1)
ia_resids(2) = 1
ia_resids(3) = 2
ia_resids(4) = 1
ia_resids(5) = 1
i_return_value =                                                    @
   res_utl_extract_elem_results(ia_resids,”Element 1:#”,”MAG”,”C”,  @
      ““,i_dtype,i_resloc,i_nbr_elems,iv_elem_ids,iv_nbr_values,    @
      rv_scalars, ia_minloc,ia_maxloc)
 
dump i_return_value
 
#  Create a scalar table
s_title = “A Scalar Table”
i_max_vals = 1           /* Only at the Centroid */
 
i_return_value =                                  @
   ga_elem_scalar_create                          @
      (  s_title,                                 @
         i_nbr_elems,                             @
         iv_elem_ids,                             @
         iv_nbr_values,                           @
         i_max_vals,                              @
         rv_scalars,                              @
         i_id )
dump i_return_value, i_id
 
#  Set the current scalar element table associated with the
#  group “fem_model”
s_group_name = “fem_model”
i_return_value =                                  @
   ga_group_elem_scalar_set                       @
      (  s_group_name,                            @
         i_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
sys_free_array(iv_elem_ids)
sys_free_array(iv_nbr_values)
sys_free_array(rv_scalars)
 
#  Get the number of elements and max number of scalars in
#  any element in the scalar table
i_return_value =                                  @
   ga_elem_scalar_number_get                      @
      (  i_id,                                    @
         i_nbr_elems,                             @
         i_max_vals )
dump i_return_value,i_nbr_elems,i_max_vals
 
sys_allocate_array(iv_elem_ids,1,i_nbr_elems)
sys_allocate_array(iv_nbr_values,1,i_nbr_elems)
sys_allocate_array(rv_scalars,1,i_nbr_elems,1,i_max_vals)
 
#  Get the values in the scalar table
s_title = ““
i_return_value =                                  @
   ga_elem_scalar_get                             @
      (  i_id,                                    @
         i_nbr_elems,                             @
         i_max_vals,                              @
         s_title,                                 @
         iv_elem_ids,                             @
         iv_nbr_values,                           @
         rv_scalars )
dump i_return_value
dump s_title,iv_elem_ids,iv_nbr_values,rv_scalars
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
sys_free_array(iv_lcids)
sys_free_array(iv_nsub)
sys_free_array(iv_elem_ids)
sys_free_array(iv_nbr_values)
sys_free_array(rv_scalars)
 
#  Close the database “spool.db”
uil_file_close.go()
#---------------------------------------------------------------------
 
ga_elem_scalar_minmax_get
Obsolete
The function represents code that does nothing.
This call was removed from the documentation.
Description:
Finds the min and max values in a scalar table.
Input:
INTEGER
id
Id of element scalar table.
Output:
REAL
min
Minimum value.
REAL
max
Maximum value.
INTEGER
<Return Value>
See error conditions.
Error Conditions:
11000137
The specified element scalar table was not found.
11000098
A fatal error has occurred in the database. Database is corrupted.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_elem_scalar_minmax_get()
#
#                      This function is used to get minimum and
#                      maximum values in an element scalar table.
#
#                      Before running this session file run spool.ses
#                      to create spool.db. Follow the instructions in
#                      spool.ses and create spool.op2 and spool.jbr.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function ga_elem_scalar_minmax_get()
#  has the following arguments:
#
#  ga_elem_scalar_minmax_get
#     (  id,
#        min,
#        max )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_title[32],s_group_name[32]
INTEGER  i_ncases, iv_lcids(VIRTUAL),iv_nsub(VIRTUAL),ia_resids(5)
INTEGER  i_dtype,i_resloc,i_nbr_elems,iv_elem_ids(VIRTUAL)
INTEGER  iv_nbr_values(VIRTUAL),ia_minloc(6),ia_maxloc(6)
INTEGER  i_max_vals
INTEGER  i_id
INTEGER  i_index,i_return_value
REAL     rv_scalars(VIRTUAL),r_min,r_max
#---------------------------------------------------------------------
#  Open the database “spool.db” and read the deformation results
sf_play(“spool_res.ses”)
 
#  Get the number of Load cases and their IDs
i_return_value =                                                    @
   res_utl_get_loadcases(i_ncases,iv_lcids,iv_nsub)
dump i_return_value
dump i_ncases,iv_lcids,iv_nsub
 
#  Extract the deformation results from the database
#  Load case ID        = iv_lcids(1)
#  Sub case ID         = 1
#  Primary Result ID   = 2             (Corresponds to deformation ) 
#  Secondary Result ID = 1
#  Layer ID            = 1
#  elem_list           = “Element 1:#” (All elements )
#  location            = “C”           (Centroid )
#  derivation          = “MAG”         (Magnitude: Vector to Scalar) 
#  c_id                = ““
ia_resids(1) = iv_lcids(1)
ia_resids(2) = 1
ia_resids(3) = 2
ia_resids(4) = 1
ia_resids(5) = 1
i_return_value =                                                    @
   res_utl_extract_elem_results(ia_resids,”Element 1:#”,”MAG”,”C”,  @ 
      ““,i_dtype,i_resloc,i_nbr_elems,iv_elem_ids,iv_nbr_values,    @
      rv_scalars, ia_minloc,ia_maxloc)
 
dump i_return_value
 
#  Create a scalar table
s_title = “A Scalar Table”
i_max_vals = 1           /* Only at the Centroid */
 
i_return_value =                                  @
   ga_elem_scalar_create                          @
      (  s_title,                                 @
         i_nbr_elems,                             @
         iv_elem_ids,                             @
         iv_nbr_values,                           @
         i_max_vals,                              @
         rv_scalars,                              @
         i_id )
dump i_return_value, i_id
 
#  Set the current scalar element table associated with the
#  group “fem_model”
s_group_name = “fem_model”
i_return_value =                                  @
   ga_group_elem_scalar_set                       @
      (  s_group_name,                            @
         i_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Get the minimum and maximum values in the scalar table
i_return_value =                                  @
   ga_elem_scalar_minmax_get                      @
      (  i_id,                                    @
         r_min,                                   @
         r_max )
dump i_return_value,r_min,r_max
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
sys_free_array(iv_lcids)
sys_free_array(iv_nsub)
sys_free_array(iv_elem_ids)
sys_free_array(iv_nbr_values)
sys_free_array(rv_scalars)
 
#  Close the database “spool.db”
uil_file_close.go()
#---------------------------------------------------------------------
 
ga_elem_scalar_number_get
Obsolete
The function represents code that does nothing.
This call was removed from the documentation.
Description:
Returns the number of elements in scalar table along with the maximum number of scalar values in any one of the elements.
Input:
INTEGER
id
Id of element scalar table.
Output:
INTEGER
nbr_elems
Number of elements to place in table.
INTEGER
max_val
Maximum number of scalar values in any element.
INTEGER
<Return Value>
See error conditions.
Error Conditions:
11000137
The specified element scalar table was not found.
11000098
A fatal error has occurred in the database. Database is corrupted.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_elem_scalar_number_get()
#
#                      This function is used to get the number of
#                      elements in the element scalar table along
#                      with the maximum number of scalar values
#                      in any one of the elements.
#
#                      Before running this session file run spool.ses
#                      to create spool.db. Follow the instructions in
#                      spool.ses and create spool.op2 and spool.jbr.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function ga_elem_scalar_number_get()
#  has the following arguments:
#
#  ga_elem_scalar_number_get
#     (  id,
#        nbr_elems,
#        max_val )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_title[32],s_group_name[32]
INTEGER  i_ncases, iv_lcids(VIRTUAL),iv_nsub(VIRTUAL),ia_resids(5)
INTEGER  i_dtype,i_resloc,i_nbr_elems,iv_elem_ids(VIRTUAL)
INTEGER  iv_nbr_values(VIRTUAL),ia_minloc(6),ia_maxloc(6)
INTEGER  i_max_vals
INTEGER  i_id
INTEGER  i_index,i_return_value
REAL     rv_scalars(VIRTUAL)
#---------------------------------------------------------------------
#  Open the database “spool.db” and read the deformation results
sf_play(“spool_res.ses”)
 
#  Get the number of Load cases and their IDs
i_return_value =                                                    @
   res_utl_get_loadcases(i_ncases,iv_lcids,iv_nsub)
dump i_return_value
dump i_ncases,iv_lcids,iv_nsub
 
#  Extract the deformation results from the database
#  Load case ID        = iv_lcids(1)
#  Sub case ID         = 1
#  Primary Result ID   = 2             (Corresponds to deformation ) 
#  Secondary Result ID = 1
#  Layer ID            = 1
#  elem_list           = “Element 1:#” (All elements )
#  location            = “C”           (Centroid )
#  derivation          = “MAG”         (Magnitude: Vector to Scalar) 
#  c_id                = ““
ia_resids(1) = iv_lcids(1)
ia_resids(2) = 1
ia_resids(3) = 2
ia_resids(4) = 1
ia_resids(5) = 1
i_return_value =                                                    @
   res_utl_extract_elem_results(ia_resids,”Element 1:#”,”MAG”,”C”,  @ 
      ““,i_dtype,i_resloc,i_nbr_elems,iv_elem_ids,iv_nbr_values,    @
      rv_scalars, ia_minloc,ia_maxloc)
 
dump i_return_value
 
#  Create a scalar table
s_title = “A Scalar Table”
i_max_vals = 1           /* Only at the Centroid */
 
i_return_value =                                  @
   ga_elem_scalar_create                          @
      (  s_title,                                 @
         i_nbr_elems,                             @
         iv_elem_ids,                             @
         iv_nbr_values,                           @
         i_max_vals,                              @
         rv_scalars,                              @
         i_id )
dump i_return_value, i_id
 
#  Set the current scalar element table associated with the
#  group “fem_model”
s_group_name = “fem_model”
i_return_value =                                  @
   ga_group_elem_scalar_set                       @
      (  s_group_name,                            @
         i_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Get the number of elements and max number of scalars in 
#  the scalar table
i_return_value =                                  @
   ga_elem_scalar_number_get                      @
      (  i_id,                                    @
         i_nbr_elems,                             @
         i_max_vals )
dump i_return_value,i_nbr_elems,i_max_vals
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
sys_free_array(iv_lcids)
sys_free_array(iv_nsub)
sys_free_array(iv_elem_ids)
sys_free_array(iv_nbr_values)
sys_free_array(rv_scalars)
 
#  Close the database “spool.db”
uil_file_close.go()
#---------------------------------------------------------------------
 
ga_vector_delete
Obsolete
The function represents code that does nothing.
This call was removed from the documentation.
Description:
Deletes a vector table.
Input:
INTEGER
id
Id of vector table.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
11000143
The specified vector result table was not found.
11000098
A fatal error has occurred in the database. Database is corrupted.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function ga_vector_delete()
#
#                      This function is used to delete a vector table.
#                      In this file the deformation results are read 
#                      from the database and a table is created and
#                      then deleted.
#
#                      Before running this session file run spool.ses
#                      to create spool.db. Follow the instructions in
#                      spool.ses and create spool.op2 and spool.jbr.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function ga_vector_delete()
#  has the following arguments:
#
#  ga_vector_delete
#     (  id )
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_title[32]
INTEGER  i_ncases, i_nbr_nodes, i_index
INTEGER  iv_lcids(VIRTUAL),iv_nsub(VIRTUAL), iv_node_ids(VIRTUAL)
REAL     rv_deform(VIRTUAL)
INTEGER  i_dtype,ia_minloc(6),ia_maxloc(6), ia_resids(5)
INTEGER  i_comp_vect_flag,i_sym_flag,i_nvectors
INTEGER  iv_vect_ent_types(VIRTUAL), iv_vect_ent_ids(VIRTUAL)
REAL     rv_vect_locs(VIRTUAL)
INTEGER  iv_vect_types(VIRTUAL), iv_anchor_styles(VIRTUAL)
INTEGER  iv_vect_colors(VIRTUAL), iv_sub_ids(VIRTUAL)
INTEGER  i_id,i_old_id, i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db” and read the results
sf_play(“spool_res.ses”)
 
#  Get the current table associated with the group “fem_model”  
i_return_value =                                  @
   ga_group_result_vector_get                     @ 
      (  “fem_model”,                             @
         i_old_id )
dump i_return_value,i_old_id
 
#  Get the number of Load cases and their IDs
i_return_value =                                                    @
   res_utl_get_loadcases(i_ncases,iv_lcids,iv_nsub)
dump i_return_value
dump i_ncases,iv_lcids,iv_nsub
 
#  Extract the stress results from the database
#  Load case ID        = iv_lcids(1)
#  Sub case ID         = 1
#  Primary Result ID   = 2 ( Corresponds to deformation ) 
#  Secondary Result ID = 1
#  Layer ID            = 1
#  node_list           = “Node 1:#” (All nodes )
#  derivation          = ““
#  coord_id            = ““
ia_resids(1) = iv_lcids(1)
ia_resids(2) = 1
ia_resids(3) = 3
ia_resids(4) = 1
ia_resids(5) = 2
i_return_value =                                                    @
   res_utl_extract_nodal_results(ia_resids,” Node 1:#”,””,””,       @
      i_dtype,i_nbr_nodes,iv_node_ids,rv_deform,ia_minloc,ia_maxloc)
 
dump i_return_value
 
#  Create a vector table
s_title = “Vector Table”
i_comp_vect_flag = 0
i_sym_flag = 0
i_nvectors = i_nbr_nodes
 
sys_allocate_array(iv_vect_ent_types,1,i_nvectors)
sys_allocate_array(iv_vect_ent_ids,1,i_nvectors)
sys_allocate_array(rv_vect_locs,1,i_nvectors,1,3)
sys_allocate_array(iv_vect_types,1,i_nvectors)
sys_allocate_array(iv_anchor_styles,1,i_nvectors)
sys_allocate_array(iv_vect_colors,1,i_nvectors)
sys_allocate_array(iv_sub_ids,1,i_nvectors)
 
FOR(i_index = 1 TO i_nvectors)
   iv_vect_ent_types(i_index) = 123        /* from dbtypes.h */
   iv_vect_ent_ids(i_index) = iv_node_ids(i_index)
   iv_vect_types(i_index) = 1
   iv_anchor_styles(i_index) = 1
   iv_vect_colors(i_index) = 0
   iv_sub_ids(i_index) = 0
END FOR
 
i_return_value =                                 @
   ga_vector_create                              @
      (  s_title,                                @
         i_comp_vect_flag,                       @
         i_sym_flag,                             @
         i_nvectors,                             @
         iv_vect_ent_types,                      @
         iv_vect_ent_ids,                        @
         rv_vect_locs,                           @
         rv_deform,                              @
         iv_vect_types,                          @
         iv_anchor_styles,                       @
         iv_vect_colors,                         @
         iv_sub_ids,                             @
         i_id )
dump i_return_value, i_id
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Associate the vector table with the group “fem_model”
i_return_value =                                  @
   ga_group_result_vector_set                     @ 
      (  “fem_model”,                             @
         i_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Remove the association between the  vector table and
#  the group “fem_model” before deleting the table
i_return_value =                                  @
   ga_group_result_vector_set                     @ 
      (  “fem_model”,                             @
         i_old_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
i_return_value =                                 @
   ga_vector_delete                              @
      (  i_id )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
sys_free_array(iv_vect_ent_types)
sys_free_array(iv_vect_ent_ids)
sys_free_array(rv_vect_locs)
sys_free_array(iv_vect_types)
sys_free_array(iv_anchor_styles)
sys_free_array(iv_vect_colors)
sys_free_array(iv_sub_ids)
sys_free_array(iv_lcids)
sys_free_array(iv_nsub)
sys_free_array(iv_node_ids)
sys_free_array(rv_deform)
 
#  Close the database “spool.db”
uil_file_close.go()
#---------------------------------------------------------------------
 
gm_animate_end
Obsolete
The function represents code that does nothing.
 
This call was removed from the documentation.
Description:
Reset the graphics manager to output graphics to the graphics device.
Input:
None.
Output:
INTEGER
<Return Value>
See error conditions.
Comments
Must be preceded by call to GmAnimateStart.
Error Conditions:
15000049
Already in animation mode.
Examples:
gm_animate_end()
 
gm_animate_loadcase_parms
Obsolete
The function represents code that does nothing.
This call was removed from the documentation.
Description:
Make results loadcase data available to the graphics manager.
Input:
INTEGER
res_type
Loadcase results derived from analysis type:
1 - Static, 2 - Modal, 3 - Transient.
STRING
lc_label[]
Loadcase independent variable label.
REAL
lc_value
Loadcase independent variable value (e.g. time).
Output:
None.
Comments
Must be preceded by call to GmAnimateStart.
Error Conditions:
15000049
Already in animation mode.
Example:
real rcparmvals();
int rctypes();
string rcvarnames[];
 /* create vector table */
 
 if ( rcparmvals(rc) == 0.0 )
 rcparmval += 1.0
 else
 rcparmval = rcparmvals(rc)
 gm_animate_loadcase_parms( rctypes[rc], rcvarnames[rc], rcparmval )
 
 
gm_animate_start
Obsolete
The function represents code that does nothing.
This call was removed from the documentation.
Description:
Set up the graphics manager to output animation files with the given sequence name.
Input:
STRING
an_name[]
Animation sequence name.
LOGICAL
new_seq
New Sequence flag: if TRUE, any animation files with the given name will be overwritten if they already exist; if FALSE, only animation result files will be written.
Output:
INTEGER
<Return Value>
See error conditions.
Comments
Must be followed by call to GmAnimateEnd.
Error Conditions:
15000049
Already in animation mode.
Example:
CLASSWIDE STRING basename[256]
CLASSWIDE LOGICAL new_seq_flag
	> gm_animate_start( basename, new_seq_flag )
 
gm_database_close
Obsolete
The function is no longer used.
 
This function has been replaced by uil_file_close.go.
Description:
Clear the current database from the graphics manager.
Input:
None.
Output:
INTEGER
<Return Value>
See error conditions.
Comments
Will set GM error level.
Error Conditions:
15000025
An error occurred during an operation on the graphics manager display list.
Examples:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_database_close()
#
#                      This function is used to clear the current 
#                      database from the graphics manager.
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function gm_database_close() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_dbname[128]
LOGICAL  l_dbexists
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Create a new databse and close it
uil_file_new.go(““,”new.db”)
$? YES 36000002
 
uil_file_close.go()
 
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Get the name of the current database posted to the
#  graphics manager
s_dbname = ““
i_return_value =                                  @ 
   gm_database_current                            @
      ( s_dbname )
dump i_return_value, s_dbname
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Load the database “new.db” into the graphics manager
s_dbname = “new.db”
i_return_value =                                  @ 
   gm_database_open                               @
      ( s_dbname )
dump i_return_value
 
#  Get the name of the current database posted to 
#  the graphics manager
s_dbname = ““
i_return_value =                                  @ 
   gm_database_current                            @
      ( s_dbname )
dump i_return_value, s_dbname
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Clear the database from the graphics manager 
i_return_value =                                  @ 
   gm_database_close()
dump i_return_value
 
#---------------------------------------------------------------------
 
gm_database_open
Obsolete
The function is no longer used.
This function has been replaced by uil_file_open.open_db and uil_file_open.go
Description:
Load the given database into the graphics manager.
Input:
STRING
dbname[]
Database name.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000027
The database name is invalid.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_database_open()
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function gm_database_open()
#  has  the following arguments.
#
#  gm_database_open
#     ( dbname )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_dbname[128],s_db_oldname[128]
LOGICAL  l_dbexists
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Create a new databse
uil_file_new.go(““,”new.db”)
$? YES 36000002
 
uil_file_close.go()
 
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Get the name of the current database
s_dbname = ““
i_return_value =                                  @ 
   gm_database_current                            @
      ( s_dbname )
dump i_return_value, s_dbname
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Load the database “new.db” into the graphics manager
#  Loading a new database will not alter 
s_dbname = “new.db”
i_return_value =                                  @ 
   gm_database_open                               @
      ( s_dbname )
dump i_return_value
 
#  Get the name of the database
db_name_get(s_dbname)
dump s_dbname
 
#  Get the name of the current database posted to 
#  the graphics manager
s_dbname = ““
i_return_value =                                  @ 
   gm_database_current                            @
      ( s_dbname )
dump i_return_value, s_dbname
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Clear the database from the graphics manager 
i_return_value =                                  @ 
   gm_database_close()
dump i_return_value
 
#---------------------------------------------------------------------
 
gm_pick
Obsolete
The function represents code that does nothing.
Removed the call from the documentation.
Description:
To pick objects from a viewport.
Input:
INTEGER
id
Viewport ID.
STRING
mod[]
Mode of picking (“APPEND,” “ERASE,” “NEW”).
STRING
type[]
Pick type ( “CLOSEST,” “RECTANGLE,” “POLYGON,” “CYCLE” ).
INTEGER
enclose
Enclosed flag.
REAL
pts ( ,3)
Pick points (not used for cycle pick).
INTEGER
npts
Number of points (not needed for closest, and rectangle).
Output:
INTEGER
<Return Value>
See error conditions.
Comments:
For geometry, the pick-list contains labels not ids. Since this routine primarily works with pick lists all references to the entities is by label.
Error Conditions:
15000028
The viewport must be posted to carry out this operation.
Example:
INTEGER viewport_id, enclosed, npoints
REAL pts(100,3)
	gm_pick_adjust_hilight()
	gm_pick( viewport_id, “APPEND”, “CLOSEST”, enclosed, pts, npoints )
 
 
gm_pick_abort
Obsolete
The function represents code that does nothing.
 
Removed the call from the documentation.
Description:
Abort the current sub-select operation and go back to the first item on the pick stack.
Input:
None.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000038
No sub-selection has been set up. Operation cannot be completed
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_pick_abort()
#
#                      This function aborts the current sub-select
#                      operation and goes back to first item on the
#                      pick-stack.
#
#                      The hilight.pcl file is used to create
#                      a single width quarter height sized form
#                      containing a select frame, a selectdatabox and
#                      a button.
#
#                      The hilight.pob file used below can be created
#                      from hilight.pcl by using the C preprocessor
#                      to expand the symbols defined in the included
#                      files. See the “Part 9: PCL and Customization”
#                      manual for more information.
#
#                      A command similar to the following can be used
#                      to generate the hilight.pob file:
#
#                 cpp -I$P3_HOME/customisation hilight.pcl hilight.pob
#
#                      Before running this session file run spool.ses
#                      to create spool.db.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar
#
#  The function gm_pick_abort() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
STRING   s_type[32]
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Compile hilight.pob to get hilight.plb
!!COMPILE hilight.pob
 
#  Add hilight.plb to library
!!LIBRARY ADD hilight.plb
 
ui_exec_function(“hilight”,”display”)
 
#  Set the filter type to curves
s_type = “CURVE”
gm_pick_filter( s_type )
 
#  Pick the whole model using rectangle pick
#  It can be seen that only curves are picked
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Abort sub-select operation
i_return_value =                              @
   gm_pick_abort()
 
dump i_return_value
 
#  Pick the whole model using rectangle pick
#  It can be seen that all the types of entities can be selected
select_focus.exit()
ui_form_hide(“hilight”)
#---------------------------------------------------------------------
 
 
gm_pick_add
Obsolete
The function represents code that does nothing.
 
Removed the call from the documentation.
Description:
To bring up a series of select menus. After data has been correctly entered into the select menus, the script_func will be called. The argument to the script function will be string data returned from the select menus.
Input:
INTEGER
nsels
Number of select menus to call.
STRING
types[]
Select menu types (prefixed with *).
STRING
prompts[]
An array of prompts for each select menu.
STRING
func[]
Script routine to call when completed.
Output:
INTEGER
<Return Value>
See error conditions.
Comments:
This function will build a pick structure and store it on the pick stack.
Error Conditions:
15000036
The maximum number of subselects per pick has been exceeded.
15000037
An incorrect sub-select type was specified.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_pick_add()
#
#                      This function calls a script function after
#                      the correct entry of data in select data box.
#                      It will pass the content of select data box 
#                      to the script function.
#                      
#                      The script function is made available in file
#                      gm_pick_add.pcl. The file is directly input
#                      during execution of session file
#
#                      Before running this session file run spool.ses
#                      to create spool.db.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar.
#
#  The function gm_pick_add()
#  has the following arguments:
#
#  gm_pick_add
#     (  nsels,
#        types,
#        prompts,
#        func )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_nsels
STRING   saa_types[16](1)
STRING   saa_prompts[16](1)
STRING   s_func[32]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Compilation of PCL file containing the script function “pick_add”
!! INPUT gm_pick_add.pcl
 
#  No of selects
#  i_nsels = 1
i_nsels = 1
 
#  Select menu type
#  saa_types(1) = “*SURFACE”
saa_types(1) = “*SURFACE”
 
#  Prompts for select menu
#  saa_prompts(1) = “*Select”
saa_prompts(1) = “*Select”
 
#  Script function to be called
#  s_func = “pick_add”
s_func = “pick_add”
 
i_return_value =                                  @
   gm_pick_add                                    @
      (  i_nsels,                                 @
         saa_types,                               @
         saa_prompts,                             @
         s_func )
 
dump i_return_value
 
#  Now select the whole model
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#---------------------------------------------------------------------
 
 
gm_pick_add_widget
Obsolete
The function represents code that does nothing.
 
Removed the call from the documentation.
Description:
To bring up a select menu. After data has been correctly entered into the select menu, the specified widget will be set.
Input:
STRING
type[]
Select menu type (prefixed with *).
STRING
prompt[]
Prompt for select menu.
widget
dbox
Widget to set.
Output:
INTEGER
<Return Value>
See error conditions.
Comments:
This function will build a pick structure and store it on the pick stack.
Error Conditions:
15000037
An incorrect sub-select type was specified.
15000025
An error occurred during an operation on the graphics manager display list.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_pick_add_widget()
#
#                      This function sends the selections made to the
#                      widget, whose id is taken as a parameter. 
#
#                      The hilight.pcl file is used to create
#                      a single width quarter height sized form
#                      containing a select frame, a selectdatabox and
#                      a button.
#
#                      The hilight.pob file used below can be created
#                      from hilight.pcl by using the C preprocessor
#                      to expand the symbols defined in the included
#                      files. See the “Part 9: PCL and Customization”
#                      manual for more information.
#
#                      A command similar to the following can be used
#                      to generate the hilight.pob file:
#
#                 cpp -I$P3_HOME/customisation hilight.pcl hilight.pob
#
#                      Before running this session file run spool.ses
#                      to create spool.db.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar.
#
#
#  The function gm_pick_add_widget()
#  has the following arguments:
#
#  gm_pick_add_widget
#     (  type,
#        prompt,
#        widget_id )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_type[32]
STRING   s_prompt[32]
WIDGET   w_widget_id
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Compile hilight.pob to get hilight.plb
!!COMPILE hilight.pob
 
#  Add hilight.plb to library
!!LIBRARY ADD hilight.plb
 
#  Invoke form “hilight”
ui_exec_function(“hilight”,”display”)
 
#  Hide the form
ui_form_hide(“hilight”)
 
#  Get the widget id
hilight.get_select_id(w_widget_id)
 
#  Set Select menu type to “surface”
s_type = “*SURFACE”
s_prompt = “Select”
 
#  Associate picking and selectdatabox of form “hilight” 
i_return_value =                                  @
   gm_pick_add_widget                             @
      (  s_type,                                  @
         s_prompt,                                @
         w_widget_id )
 
dump i_return_value
 
#  Select a part of the model
ui_form_display(“hilight”)
 
#  Session file Paused. Press “RESUME” to continue..
sf_pause()
 
#  Hide the form
select_focus.exit()
ui_form_hide(“hilight”)
 
#---------------------------------------------------------------------
 
 
gm_pick_adjust_hilight
Obsolete
The function represents code that does nothing.
Removed the call from the documentation.
Description:
Adjust what is highlighted to match contents of widget.
Input:
None.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000035
A new pick list could not be created.
Example:
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function gm_pick_adjust_hilight()
#
#                      This function is used to highlight the 
#                      entities to match the contents of a select 
#                      databox. 
#
#                      The hilight.pcl file is used to create
#                      a single width quarter height sized form
#                      containing a select frame, a select databox and
#                      a button.
#
#                      The hilight.pob file used below can be created
#                      from hilight.pcl by using the C preprocessor
#                      to expand the symbols defined in the included
#                      files. See the “Part 9: PCL and Customization”
#                      manual for more information.
#
#                      A command similar to the following can be used
#                      to generate the hilight.pob file:
#
#                 cpp -I$P3_HOME/customisation hilight.pcl hilight.pob
#
#                      Before running this session file run spool.ses
#                      to create spool.db. 
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar.
#
#  The function gm_pick_adjust_hilight() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
WIDGET   w_widget_id
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Post only “default_group” 
uil_viewport_post_groups.posted_groups(“default_viewport”,1,     @
    [“default_group”] )
 
#  Compile hilight.pob to get hilight.plb
!!COMPILE hilight.pob
 
#  Add hilight.plb to library
!!LIBRARY ADD hilight.plb
 
ui_exec_function(“hilight”,”display”)
 
#  Get the selectdatabox widget id
hilight.get_select_id(w_widget_id)
dump w_widget_id
 
#  Set the contents of select databox of form “HILIGHT”
ui_wid_set(w_widget_id,”VALUE”,”surface 1:6”)
 
#  Highlight the entities in the select databox
i_return_value = gm_pick_adjust_hilight()
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Clear the selections made
gm_hilight_clear()
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
ui_wid_set(w_widget_id,”VALUE”,”Surface 1 3 5”)
 
i_return_value = gm_pick_adjust_hilight()
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Hide the form “hilight”
select_focus.exit()
ui_form_hide(“hilight”)
#---------------------------------------------------------------------
 
gm_pick_clear
Obsolete
The function represents code that does nothing.
 
Removed the call from the documentation.
Description:
Remove all items off of pick stack.
Input:
None.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000038
No sub-selection has been set up. Operation cannot be completed.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_pick_clear()
#
#                      This function removes all the items off the pick
#                      stack.
#
#                      The hilight.pcl file is used to create
#                      a single width quarter height sized form
#                      containing a select frame, a selectdatabox and
#                      a button.
#
#                      The hilight.pob file used below can be created
#                      from hilight.pcl by using the C preprocessor
#                      to expand the symbols defined in the included
#                      files. See the “Part 9: PCL and Customization”
#                      manual for more information.
#
#                      A command similar to the following can be used
#                      to generate the hilight.pob file:
#
#                 cpp -I$P3_HOME/customisation hilight.pcl hilight.pob
#
#                      Before running this session file run spool.ses
#                      to create spool.db.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar
#
#  The function gm_pick_clear() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Compile hilight.pob to get hilight.plb
!!COMPILE hilight.pob
 
#  Add hilight.plb to library
!!LIBRARY ADD hilight.plb
 
ui_exec_function(“hilight”,”display”)
 
#  Pick the whole object using rectangle pick
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
i_return_value = gm_pick_clear()
dump i_return_value
 
#  It can be observed that NO object can be picked
#  as the picklist is cleared. 
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Hide the form “hilight”
select_focus.exit()
ui_form_hide(“hilight”)
 
#---------------------------------------------------------------------
 
gm_pick_filter
Obsolete
The function represents code that does nothing.
Removed the call from the documentation.
Description:
To establish a filter which will be used during picking.
Input:
STRING
type[]
Filter types:
“SP”
“POINTONSURFACE”
“EDGEONSURFACE”
“VERTEXONSURFACE”
“GRID”
“PTONCURVE”
“PTONSURFACE”
“LINE”
“PATCH”
“HPAT”
“POINT”
“CURVE”
“SURFACE”
“SOLID”
“VERTEX”
“EDGE”
“FACE”
“POINT_VERTEX”
“CURVE_EDGE”
“SURFACE_FACE”
SOLIDFACE_FREE”
“FREE_FACE_SOLIDS”
“ELFACE_QUAD_TRI”
“ELEDGE_BEAM”
“NODE”
“ELEMENT”
“MPC”
“ELEDGE”
“ELFACE”
“POINTELEM”
“BEAMELEM”
“TRIELEM”
“QUADELEM”
“TETELEM”
““WEDGEELEM”
 
 
“HEXELEM”
“ELFACE_FREE”
“ELEDGE_FREE”
“FREE_FACE_ELEMS”
“FREE_EDGE_ELEMS”
“FRAME”
“CID”
“CID1”
“CID2”
“CID3”
“ASM”
“GEOMETRY”
“MESH”
“FEM”
“ELEM3D”
“ELEM2D”
“GEO_SHELL”
“FEM_SHELL_BNDRY”
“GEO_BEAM”
“GEO_SOLID_BNDRY”
“GEO_SOLID”
“FEM_AND_GEO_0D”
“FEM_AND_GEO_1D”
“FEM_AND_GEO_2D”
“FEM_AND_GEO_3D”
“ALL_SWEEP”
“MESH_SWEEP”
“ELEM_SWEEP”
“ELEM2_SWEEP”
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000025
An error occurred during an operation on the graphics manager display list.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_pick_filter()
#
#                      This function establishes a filter for picking
#                      entities. 
#
#                      The hilight.pcl file is used to create
#                      a single width quarter height sized form
#                      containing a select frame, a select databox and
#                      a button.
#
#                      The hilight.pob file used below can be created
#                      from hilight.pcl by using the C preprocessor
#                      to expand the symbols defined in the included
#                      files. See the “Part 9: PCL and Customization”
#                      manual for more information.
#
#                      A command similar to the following can be used
#                      to generate the hilight.pob file:
#
#                 cpp -I$P3_HOME/customisation hilight.pcl hilight.pob
#
#                      Before running this session file run spool.ses
#                      to create spool.db.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar.
#
#
#  The function gm_pick_filter()
#  has the following arguments:
#
#  gm_pick_filter
#     (  type )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_type[32]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Post only “default_group” 
uil_viewport_post_groups.posted_groups(“default_viewport”,1,     @
    [“default_group”] )
 
#  Compile hilight.pob to get hilight.plb
!!COMPILE hilight.pob
 
#  Add hilight.plb to library
!!LIBRARY ADD hilight.plb
 
ui_exec_function(“hilight”,”display”)
 
#  Set the filter type to “curve”
s_type = “CURVE”
 
i_return_value =                                  @
   gm_pick_filter                                 @
      (  s_type )
dump i_return_value
 
#  Pick the whole object using rectangle pick
#  It can be seen that only curves can be picked
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Hide the form “hilight”
select_focus.exit()
ui_form_hide(“hilight”)
#---------------------------------------------------------------------
 
 
gm_pick_notify
Obsolete
The function represents code that does nothing.
 
Removed the call from the documentation.
Description:
Applies passed in string to current sub-select. Depending on how many sub-selects are in the current pick structure, this routine will cause processing to go on to the next sub-select or return all strings in pick structure back to the calling pick structure.
Input:
STRING
string[]
Value returned from command window or screen select.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000038
No sub-selection has been set up. Operation cannot be completed.
15000025
An error occurred during an operation on the graphics manager display list.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_pick_notify()
#
#                      This function applies passed in string to 
#                      current sub-select.
#
#                      The hilight.pcl file is used to create
#                      a single width quarter height sized form
#                      containing a select frame, a select databox and
#                      a button.
#
#                      The hilight.pob file used below can be created
#                      from hilight.pcl by using the C preprocessor
#                      to expand the symbols defined in the included
#                      files. See the “Part 9: PCL and Customization”
#                      manual for more information.
#
#                      A command similar to the following can be used
#                      to generate the hilight.pob file:
#
#                 cpp -I$P3_HOME/customisation hilight.pcl hilight.pob
#
#                      Before running this session file run spool.ses
#                      to create spool.db.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar.
#
#  The function gm_pick_notify()
#  has the following arguments:
#
#  gm_pick_notify
#     (  string )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_string[128]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Post only “default_group” 
uil_viewport_post_groups.posted_groups(“default_viewport”,1,     @
    [“default_group”] )
 
#  Compile hilight.pob to get hilight.plb
!!COMPILE hilight.pob
 
#  Add hilight.plb to library
!!LIBRARY ADD hilight.plb
 
ui_exec_function(“hilight”,”display”)
 
s_string = “surface 1:6”
 
i_return_value =                                  @
   gm_pick_notify                                 @
      (  s_string )
 
dump i_return_value
 
#  Highlight the entities in the select databox
gm_pick_adjust_hilight()
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Clear the selection
gm_hilight_clear()
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
s_string = “surface 1:3”
i_return_value =                                  @
   gm_pick_notify                                 @
      (  s_string )
 
dump i_return_value
 
gm_pick_adjust_hilight()
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Hide the form “hilight”
select_focus.exit()
ui_form_hide(“hilight”)
 
#---------------------------------------------------------------------
 
 
gm_pick_reject
Obsolete
The function represents code that does nothing.
Removed the call from the documentation.
Description:
Abort the current sub-select operation and go back to the previous pick structure on the pick stack.
Input:
None.
Output:
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000038
No sub-selection has been set up. Operation cannot be completed.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_pick_reject()
#
#                      This funtion aborts the current sub-select
#                      operation and goes back to previous pick
#                      structure  on the pick-stack.
#
#                      The hilight.pcl file is used to create
#                      a single width quarter height sized form
#                      containing a select frame, a selectdatabox and
#                      a button.
#
#                      The hilight.pob file used below can be created
#                      from hilight.pcl by using the C preprocessor
#                      to expand the symbols defined in the included
#                      files. See the “Part 9: PCL and Customization”
#                      manual for more information.
#
#                      A command similar to the following can be used
#                      to generate the hilight.pob file:
#
#                 cpp -I$P3_HOME/customisation hilight.pcl hilight.pob
#
#                      Before running this session file run spool.ses
#                      to create spool.db.
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file
#                      through the “File”,”Session”,”Play” pulldown
#                      menus on the menu bar
#
#  The function gm_pick_reject() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
STRING   s_type[32]
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Compile hilight.pob to get hilight.plb
!!COMPILE hilight.pob
 
#  Add hilight.plb to library
!!LIBRARY ADD hilight.plb
 
ui_exec_function(“hilight”,”display”)
 
#  Set the filter type to “curve”
s_type = “CURVE”
 
gm_pick_filter( s_type )
 
#  Pick the whole object using rectangle pick
#  It can be seen that only curves are picked
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Set the filter type to “surface”
s_type = “SURFACE”
gm_pick_filter( s_type )
 
#  Pick the whole object using rectangle pick
#  It can be seen that only surfaces are picked
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
i_return_value = gm_pick_reject()
dump i_return_value
 
#  Pick the whole object using rectangle pick
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Hide the form “hilight”
select_focus.exit()
ui_form_hide(“hilight”)
#---------------------------------------------------------------------
 
gm_pick_reset_level_counter
Obsolete
The function represents code that does nothing.
Removed the call from the documentation.
Description:
Reset current_level_number.
Input:
None.
Output:
INTEGER
id
Location for returned value.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Comments:
Resetting assigns the value to -1 since the first DbiPickPush() call increments.
Example:
gm_pick_reset_level_counter()
 
gm_uiwindow_create
Obsolete
The function represents code that does nothing.
Removed the call from the documentation.
 
Description:
Create a graphics (with type of UIMS) window given a UIMS widget
Input:
STRING
name[]
Name of window
widget
wid_id
UIMS widget ID.
Output:
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
gm_uiwindow_delete
Obsolete
The call no longer exists.
 
Removed the call from the documentation.
 
Description:
Delete a UIMS graphics window.
Input:
STRING
name[]
Name of window.
Output:
INTEGER
<Return Value>
See error returned.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
 
gm_viewport_auto_off
Obsolete
The call no longer exists.
 
Removed the call from the documentation.
Description:
Turn OFF auto extend/fit.
Input:
None.
Output:
INTEGER
<Return Value>
0 if successful.
Examples:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_viewport_auto_off()
#
#                      This function is used to turn OFF the auto
#                      extend or fit of viewport.
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function gm_viewport_auto_off() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Turn OFF auto extend or fit.
i_return_value = gm_viewport_auto_off()
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Change the graphics window dimensions
ga_viewport_size_set(“default_viewport”,9.0,4.0,1)
ga_viewport_location_set(“default_viewport”,0.0,3.0,1)
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Change the graphics window dimensions
ga_viewport_size_set(“default_viewport”,7.0,3.0,1)
ga_viewport_location_set(“default_viewport”,0.0,2.0,1)
#---------------------------------------------------------------------
 
gm_viewport_auto_on
Obsolete
The call no longer exists.
 
Removed the call from the documentation.
Description:
Turn ON auto extend/fit.
Input:
None.
Output:
INTEGER
<Return Value>
0 if successful.
 
Examples:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_viewport_auto_on()
#
#                      This function is used to turn ON auto 
#                      extent or fit.
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function gm_viewport_auto_on() has no arguments.
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Turn ON auto extend or fit.
i_return_value = gm_viewport_auto_on()
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Change the graphics window dimensions
ga_viewport_size_set(“default_viewport”,9.0,4.0,1)
ga_viewport_location_set(“default_viewport”,0.0,3.0,1)
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Change the graphics window dimensions
ga_viewport_size_set(“default_viewport”,7.0,3.0,1)
ga_viewport_location_set(“default_viewport”,0.0,2.0,1)
#---------------------------------------------------------------------
 
 
gm_viewport_plot
Obsolete
The call no longer exists.
 
Removed the call from the documentation.
Description:
Generate a hardcopy file from a viewport.
Input:
STRING
vp_name[]
Viewport name.
INTEGER
new_file
Whether plot should go in a new patran.hrd file or an existing one.
REAL
width_inch
Drawable horizontal area in inches.
REAL
height_inch
Drawable vertical area in inches.
INTEGER
pixels_inch
Number of pixels/inch used.
STRING
hc_file_name[]
Expanded patran.hrd file name.
INTEGER
format
0=old
1=new binary
2=new text
10=old
11=new binary
12=new text (with fit view)
Output:
INTEGER
<Return Value>
GM error status.
Example:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_viewport_plot()
#
#                      This functionis used to generate a hardcopy
#                      file from a viewport.
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function gm_viewport_plot()
#  has the following arguments:
#
#  gm_viewport_plot
#     (  name,
#        new_file,
#        width,
#        height,
#        ppi,
#        file_name,
#        format )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_id
INTEGER  i_ulx,i_uly,i_brx,i_bry,i_ppi
INTEGER  i_wtype,i_leftofs,i_rightofs,i_topofs,i_botofs
LOGICAL  l_pos_is_frame
REAL     r_width, r_height
STRING   s_name[32]
INTEGER  i_new_file
REAL     r_width
REAL     r_height
INTEGER  i_ppi
STRING   s_file_name[128]
INTEGER  i_format
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Get screen Info
uid_get_screen_info(i_ulx,i_uly,i_brx,i_bry,i_ppi)
dump i_ppi
 
#  Get border sizes
i_wtype = 1   /* graphics */
uid_get_border_sizes(i_wtype,l_pos_is_frame,     @
   i_leftofs,i_rightofs,i_topofs,i_botofs )
 
#  Get the ID of the current viewport
i_return_value =                                 @
   db_get_current_viewport_id                    @
      (  i_id )
dump i_return_value, i_id
 
#  Get the name of the current viewport
i_return_value =                                 @
   gm_viewport_id_to_name                        @
      (  i_id,                                   @
         s_name  )
dump i_return_value, s_name 
 
#  Get the width and height of the current viewport
i_return_value =                                 @
   ga_viewport_size_get                          @
      (  s_name,                                 @
         r_width,                                @
         r_height )
dump i_return_value, r_width, r_height 
 
#  Generate a hardcopy of the current viewport
i_new_file  = 1 
r_width     = r_width  - 1.0*(i_leftofs + i_rightofs)/i_ppi
r_height    = r_height - 1.0*(i_topofs  + i_botofs  )/i_ppi
s_file_name = “./spool.hrd”
i_format    = 2         /* New text */
i_return_value =                                 @
   gm_viewport_plot                              @
      (  s_name,                                 @
         i_new_file,                             @
         r_width,                                @
         r_height,                               @
         i_ppi,                                  @
         s_file_name,                            @
         i_format )
dump i_return_value
#---------------------------------------------------------------------
 
gm_window_id_get
Obsolete
The call no longer exists.
 
Removed the call from the documentation.
Description:
Get the Window ID of a graphics window.
Input:
STRING
name[]
Name of window.
Output:
INTEGER
win_id
Window ID.
INTEGER
<Return Value>
See error conditions.
Error Conditions:
15000002
The window name is invalid.
Examples:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_window_id_get()
#
#                      This function is used to get the window ID
#                      of a graphics window.
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function gm_window_id_get()
#  has the following arguments:
#
#  gm_window_id_get
#     (  name,
#        win_id )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_name[128]
INTEGER  i_win_id, i_vp_id
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Get the ID of the current viewport
i_return_value =                                 @
   db_get_current_viewport_id                    @
      (  i_vp_id )
dump i_return_value, i_vp_id
 
#  Get the name of the current viewport
i_return_value =                                 @
   gm_viewport_id_to_name                        @
      (  i_vp_id,                                @
         s_name  )
dump i_return_value, s_name 
 
#  Get the window ID of current viewport
i_return_value =                                 @
   gm_window_id_get                              @
      (  s_name,                                 @
         i_win_id )
dump i_return_value, i_win_id
 
#---------------------------------------------------------------------
 
gm_xy_plot
Obsolete
The call no longer exists.
 
Removed the call from the documentation.
Description:
Generate a hardcopy file from an XY window.
Input:
STRING
name[]
XY Window name.
INTEGER
new_file
Whether plot should go in a new patran.hrd file or an existing one.
REAL
width_inch
Drawable horizontal area in inches.
REAL
height_inch
Drawable vertical area in inches.
INTEGER
pixels_inch
Number of pixels/inch used.
STRING
hc_file_name[]
Expanded patran.hrd file name.
INTEGER
format
0=old, 1=new binary, 2=new text
Output:
INTEGER
<Return Value>
GM error status.
Examples:
#
#  Purpose          :  This file provides an example of a call to the
#                      function gm_xy_plot()
#
#                      This function is used to create a hardcopy
#                      from the XY window.
#
#                      Before running this session file run spool.ses
#                      to create spool.db
#
#                      This file can be run by starting a session of
#                      MSC.Patran, and running this session file 
#                      through the “File”,”Session”,”Play” pulldown 
#                      menus on the menu bar.
#
#  The function gm_xy_plot()
#  has the following arguments:
#
#  gm_xy_plot
#     (  name,
#        new_file,
#        width,
#        height,
#        ppi,
#        file_name
#        format )
#
#---------------------------------------------------------------------
#  Variable Declarations
INTEGER  i_ulx,i_uly,i_brx,i_bry,i_ppi,i_border
LOGICAL  l_pos_is_frame
STRING   s_name[32]
INTEGER  i_new_file
REAL     r_xloc,r_yloc,r_width, r_height
INTEGER  i_ppi
STRING   s_file_name[128]
INTEGER  i_format
INTEGER  i_border
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open the database “spool.db”
uil_file_open.go(“spool.db”)
 
#  Get screen Info
uid_get_screen_info(i_ulx,i_uly,i_brx,i_bry,i_ppi)
dump i_ppi
 
#  Create a new XY window
s_name   = “New XY Window”
r_xloc   = 0.0
r_yloc   = 3.0
r_width  = 5.0
r_height = 4.0
i_return_value =                                 @
   xy_window_create                              @
      (  s_name,                                 @
         r_xloc,                                 @
         r_yloc,                                 @
         r_width,                                @
         r_height )
dump i_return_value
 
#  Post the window and make it current
i_return_value =                                 @
   xy_window_post                                @
      ( s_name )
dump i_return_value
 
i_return_value =                                 @
   xy_window_current_set                         @
      ( s_name )
dump i_return_value
 
#  Get the window sizes
i_return_value =                                 @
   xy_window_size_get                            @
      ( s_name,                                  @
        r_width,                                 @
        r_height )
dump i_return_value,r_width, r_height
 
#  Get the border size 
i_return_value =                                 @
   xy_window_border_thickness_get                @
      ( s_name,                                  @
        i_border )
dump i_return_value, i_border
 
#  Generate a hard copy of the current XY window
#  (r_width and r_height are compensated for border size)
i_new_file  = 1
r_width     = r_width - (2.0 * i_border)/i_ppi 
r_height    = r_height- (2.0 * i_border)/i_ppi
s_file_name = “./xywindow.hrd”
i_format    = 2                            /* New Text */
i_return_value =                                 @
   gm_xy_plot                                    @
      (  s_name,                                 @
         i_new_file,                             @
         r_width,                                @
         r_height,                               @
         i_ppi,                                  @
         s_file_name,                            @
         i_format )
dump i_return_value
 
#  Session file paused. Press “Resume” to continue..
sf_pause()
 
#  Delete the XY window
i_return_value =                                 @
   xy_window_delete                              @
      ( s_name )
dump i_return_value
 
#---------------------------------------------------------------------