Tutorial Toolkit Function Descriptions > Group > FEM
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
FEM
Utilities for manipulating nodes, elements and MPCs in a group or groups.
  
db_get_groups_using_mpc
(nmpc, mpcid, maxgrp, ngroup, gid)
Description:
Returns a list of all groups which refer to the specified MPC.
Input:
INTEGER
nmpc
The number of MPCs ids for which the information is being requested.
INTEGER
mpcid()
The ids of the MPCs for which the information is being requested.
INTEGER
maxgrp
The maximum number of groups which may be returned per MPC.
Output:
INTEGER
ngroup()
The number of groups using each MPC.
INTEGER
gid()
The ids of the groups for each MPC.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000142
The MPC was not found in the database.
13000154
The list of Groups for one or more of the MPCs is longer than MAXGRP.
External Dependencies and Side Effects:
Accesses records in the mpc_in_group table in the database.
Example:
Please see db_get_groups_using_mpc (p. 422) in the MSC Acumen Toolkit - Code Examples.
  
db_count_groups_using_mpc
(nmpc, mpcid, ngroup, flag)
Description:
Returns the number of groups which refer to the specified MPCs.
Input:
INTEGER
nmpc
The number of MPCs ids for which the information is being requested.
INTEGER
mpcid()
The ids of the MPCs for which the information is being requested.
Output:
INTEGER
ngroup()
The number of groups using each MPC.
INTEGER
flag
An error flag indicating that one or more of the MPCs was not found.
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
13000142
The MPC was not found in the database.
External Dependencies and Side Effects:
Accesses records in the mpc_in_group table in the database.
Example:
See example for db_get_groups_using_mpc, 153. See also db_count_groups_using_mpc (p. 409) in the MSC Acumen Toolkit - Code Examples.
  
db_count_orphan_mpcs
(count)
Description:
Returns the number of entities not in a group.
Input:
none
Output:
INTEGER
count
The number of entities not in a group.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000086
No Records Found
External Dependencies and Side Effects:
This routine accesses records in the mpc & mpc_in_group tables in the database.
Example:
Please see db_count_orphan_mpcs (p. 415) in the MSC Acumen Toolkit - Code Examples.
 
db_get_orphan_mpcs
(count, entity_id)
 
Description:
Gets the entities not in a group.
Input:
INTEGER
count
The number of entities not in a group.
Output:
INTEGER
entity_id()
Array of orphan entity ids.
INTEGER
<Return Value>
Returns the success or failure of the routine.
Error Conditions:
13000086
No Records Found
External Dependencies and Side Effects:
This routine accesses records in the mpc & mpc_in_group tables in the database.
Example:
See example for db_count_orphan_mpcs, 154. See also db_get_orphan_mpcs (p. 425) in the MSC Acumen Toolkit - Code Examples.
 
count_orphan_elements
(count)
  
Description:
This function will count all of the elements that do not belong to any group. It will build a list of these elements in the process and this list will be saved for a subsequent call to get_orphan_elements, 156.
Input:
none
Output:
INTEGER
count
The number of elements not associated with any group.
INTEGER
<Return Value>
0 = Successful Completion.
Example:
See example for get_orphan_elements, 156. See also count_orphan_elements (p. 401) in the MSC Acumen Toolkit - Code Examples.
 
count_orphan_nodes
(count)
 
Description:
This function will count all of the nodes that do not belong to any group. It will build a list of these nodes in the process and this list will be saved for a subsequent call to
get_orphan_nodes, 156.
Input:
none
Output:
INTEGER
count
The number of nodes not associated with any group.
INTEGER
<Return Value>
0 = Successful Completion.
Example:
See example for get_orphan_nodes, 156. Please see count_orphan_nodes (p. 403) in the MSC Acumen Toolkit - Code Examples.
  
get_orphan_elements
( count, idlist )
Description:
Returns the list of all of the elements that do not belong to any group. The initial list is created through a call to the function count_orphan_elements, 155.
Input:
INTEGER
count
This is the number of orphan elements.
Output:
INTEGER
idlist(count)
The number of nodes not associated with any group.
INTEGER
<Return Value>
0 if Successful.
Example:
Please see get_orphan_elements (p. 496) in the MSC Acumen Toolkit - Code Examples.
 
get_orphan_nodes
( count, idlist )
  
Description:
Returns the list of all of the elements that do not belong to any group. The initial list is created through a call to the function count_orphan_nodes, 156.
Input:
INTEGER
count
This is the number of orphan nodes.
Output:
INTEGER
idlist(count)
This is an array of orphan node ids that has ‘count’ number of members in the array.
INTEGER
<Return Value>
0 if Successful.
Example:
Please see get_orphan_nodes (p. 497) in the MSC Acumen Toolkit - Code Examples.
  
db_add_mpc_to_group
( mpc_id, gid, visible )
Description:
Add an mpc to a group.
Input:
INTEGER
mpc_id
The mpc id.
INTEGER
gid
The group id.
LOGICAL
visible
True (1) if the mpcs are to be considered visible.
Output:
INTEGER
<Return Value>
Integer indicating success or failure of the routine. If the routine failed, this value contains an indication of the reason.
Error Conditions:
 
13000142
The MPC was not found in the database.
13000008
Group not found.
13000004
Duplicate entry exists in table.
External Dependencies and Side Effects:
Creates a record in the mpc_in_group table in the database.
Example:
Please see db_add_mpc_to_group (p. 405) in the MSC Acumen Toolkit - Code Examples.