Professional Documents
Culture Documents
MSC.Acumen Toolkit
MSC.Acumen,
Volume
Function
Descriptions
1:
Function Descriptions MSC.Acumen Toolkit,
Function Descriptions
CHAPTER
1
Introduction ■ Introduction, 2
■ General Built-ins, 3
• is_batch, 3
• db_get_p3_version, 3
• utl_get_terse_version, 3
• utl_query_version_level, 4
■ Synchronizing with Startup, Exit, and Database Events, 5
• user_start, 5
• user_quit, 5
• user_db_new, 5
• user_db_open, 6
• user_db_close, 6
2
Model ■ General, 8
• db_get_db_version, 8
• db_get_general_field, 8
• db_get_general_field_length, 9
• db_get_model_file_suffix, 9
■ User Defined, 10
• db_create_client_data, 10
• db_count_client_labels_by_type, 11
• db_count_general_field, 11
• db_get_all_client_data, 11
• db_get_client_data, 12
• db_get_client_id_by_label, 13
• db_get_client_labels_by_type, 13
• db_get_client_label_by_id, 15
• db_get_next_client_entity_label, 15
• db_delete_client_data, 16
3
Files ■ General, 18
• file_is_directory, 18
• get_current_dir, 18
• p3_ps_get_xmt, 18
• set_current_dir, 19
Main Index
• utl_is_locked_file, 19
• utl_lock_file, 20
• utl_unlock_file, 20
• uil_file_open.open_db, 21
■ IGES and CAD Access, 22
• ugi_export_iges_v1, 22
• ugi_import_iges_v3, 22
■ Journal and Session, 25
• jou_file_write, 25
• sf_write_disable, 25
■ Neutral, 26
• neutral_export2, 26
• nf_write, 26
• nf_write2, 27
■ FrameMaker Files, 28
• ui_form_to_frame, 28
• ui_framemaker, 28
4
Graphics ■ General, 30
• ga_error, 30
• verify_boundaries_display_mgr.initialize, 30
• verify_boundaries_display_mgr.plot, 30
• verify_boundaries_display_mgr.erase, 31
■ Element Tables, 32
• ga_elem_scalar_create, 32
• ga_elem_scalar_single_create, 32
• ga_vector_create, 33
• ga_vector_get, 34
• ga_vector_number_get, 35
■ Light Source, 36
• ga_light_attenuation_get, 36
• ga_light_attenuation_set, 36
• ga_light_color_get, 36
• ga_light_color_set, 37
• ga_light_create, 37
• ga_light_delete, 38
• ga_light_direction_get, 38
• ga_light_direction_set, 38
• ga_light_icon_get, 39
• ga_light_icon_set, 39
• ga_light_intensity_get, 40
• ga_light_intensity_set, 40
• ga_light_lights_get, 40
• ga_light_location_get, 41
• ga_light_location_set, 41
• ga_light_movement_get, 42
• ga_light_movement_set, 42
• ga_light_nlights_get, 42
Main Index
• ga_light_nposted_get, 43
• ga_light_post, 43
• ga_light_posted_get, 43
• ga_light_type_get, 44
• ga_light_type_set, 44
• ga_light_unpost, 45
■ Color Look-up Tables, 46
• ga_lookup_colors_get, 46
• ga_lookup_colors_set, 46
• ga_lookup_create, 47
• ga_lookup_current_get, 47
• ga_lookup_current_set, 47
• ga_lookup_delete, 48
• ga_lookup_ncolors_get, 48
• ga_lookup_ntables_get, 49
• ga_lookup_rename, 49
• ga_lookup_tables_get, 49
■ Deformation Plots, 51
• ga_node_deform_create, 51
■ Ranges, 52
• ga_range_contour_get, 52
• ga_range_contour_set, 52
• ga_range_create, 52
• ga_range_delete, 53
• ga_range_exist_get, 53
• ga_range_nranges_get, 54
• ga_range_nvalues_get, 54
• ga_range_ranges_get, 54
• ga_range_rename, 55
• ga_range_startend_set, 55
• ga_range_threshold_set, 55
• ga_range_values_get, 56
• ga_range_values_set, 56
■ Spectrums, 58
• ga_spectrum_colors_get, 58
• ga_spectrum_colors_set, 58
• ga_spectrum_continuous_get, 59
• ga_spectrum_continuous_set, 59
• ga_spectrum_create, 59
• ga_spectrum_current_get, 60
• ga_spectrum_current_set, 60
• ga_spectrum_delete, 61
• ga_spectrum_interpolation_get, 61
• ga_spectrum_interpolation_set, 61
• ga_spectrum_ncolors_get, 62
• ga_spectrum_nspectrums_get, 62
• ga_spectrum_rename, 63
• ga_spectrum_spectrums_get, 63
■ Titles, 64
• ga_title_color_get, 64
• ga_title_color_set, 64
Main Index
• ga_title_create, 64
• ga_title_delete, 65
• ga_title_font_size_get, 65
• ga_title_font_size_set, 66
• ga_title_list_get, 66
• ga_title_loc_get, 66
• ga_title_loc_set, 67
• ga_title_nposted_get, 67
• ga_title_num_get, 68
• ga_title_posted_get, 68
• ga_title_rename, 68
■ Graphics Manager, 69
• db_get_current_viewport_id, 69
• ga_view_normal_get, 69
• gm_convert_name, 69
• gm_conv_device_to_subject, 70
• gm_database_current, 70
• gm_draw_entity, 70
• gm_fit_view, 71
• gm_fullcolor_mode, 71
• gm_graphics_off, 71
• gm_graphics_on, 72
• gm_hilight_clear, 72
• gm_hilight_entity, 72
• gm_hilight_string, 73
• gm_hilight_widget, 73
• gm_lookup_write, 73
• gm_mpeg_pause_recording, 74
• gm_mpeg_resume_recording, 74
• gm_mpeg_start_recording, 74
• gm_mpeg_stop_recording, 75
• gm_viewport_hardware_mode_get, 75
• gm_viewport_hardware_mode_set, 75
• gm_viewport_id_to_name, 76
• gm_viewport_limits_get, 76
• gm_viewport_ncolors_get, 76
• gm_viewport_refresh_off, 77
• gm_viewport_refresh_on, 77
• gm_viewport_refresh_status, 77
• gm_viewport_view_corners, 78
• gm_visibility_all, 78
• gm_visibility_widget, 78
• end_vrml_animation, 79
• gm_write_image, 79
• gm_write_vrml, 80
• start_vrml_animation, 80
■ Clipping Planes, 81
• ga_clip_plane_clip_planes_get, 81
• ga_clip_plane_create, 81
• ga_clip_plane_delete, 81
• ga_clip_plane_direction_get, 82
• ga_clip_plane_direction_set, 82
• ga_clip_plane_icon_get, 83
Main Index
• ga_clip_plane_icon_set, 83
• ga_clip_plane_location_get, 83
• ga_clip_plane_location_set, 84
• ga_clip_plane_movement_get, 84
• ga_clip_plane_movement_set, 85
• ga_clip_plane_nclip_planes_get, 85
• ga_clip_plane_nposted_get, 85
• ga_clip_plane_post, 86
• ga_clip_plane_posted_get, 86
• ga_clip_plane_unpost, 86
• ga_clip_plane_up_set, 87
• clip_plane_ar_calc, 87
• clip_plane_zoom_calc, 88
5
User Interface ■ Error Message Handling, 90
• appcode, 90
• app_db_err_msg, 90
• msg_format_string, 90
• msg_get_application, 91
• msg_string_more, 91
• msg_to_file, 91
• msg_to_string, 92
• user_message, 92
• notemessage.text, 93
■ List Processor, 94
- Include files, 94
• app_count_list, 94
• app_ids_to_vstring, 94
• app_int_array_to_vstring, 95
• asm_u_coord_global_to_local, 95
• asm_u_lp_get_entity_label, 96
• asm_u_lp_get_point, 96
• asm_u_lp_get_vector, 96
• lp_eval_cleanup, 97
• lp_geometry_text, 97
• lp_keyword_text, 98
■ General, 100
• uid_get_screen_info, 100
• uid_get_border_sizes, 100
• uid_get_font_heights, 101
• uid_set_sys_pix, 101
• uil_app_analysis.get_real_name, 101
• uil_pcntcomplete.close, 102
• uil_pcntcomplete.initlz, 102
• uil_primary.get_menubar_id, 102
• ui_sys_command, 103
• ui_sys_return, 103
• ui_text_select, 103
• ui_wid_exit, 104
• ui_wid_hide_forms, 104
Main Index
• ui_exec_command, 104
• ui_form_delete, 104
• ui_form_exists, 105
• ui_form_is_displayed, 105
• ui_graph_create, 106
• ui_is_initialized, 106
• ui_get_client, 106
• ui_get_server, 107
■ Widgets, 108
• ui_clear_focus, 108
• ui_wid_restore_widget, 108
• ui_wid_save_widget, 108
• uil_utils_listbox.select, 109
• uil_utils_listbox.select_none, 109
• uil_utils_listbox.select_list, 109
• uil_utils_listbox.create_list, 110
• uil_utils_listbox.append_list, 110
• uil_utils_listbox.get_selected, 110
• uil_utils_listbox.get_unselected, 111
• uil_utils_listbox.get_all, 111
• uil_utils_listbox.delete_item, 111
• uil_utils_listbox.delete_item_list, 112
• uil_utils_listbox.delete_selected, 112
• uil_utils_listbox.select_all, 112
■ Help, 113
• ui_get_help, 113
• ui_register_help, 113
• ui_add_help, 113
6
Group ■ General, 116
• db_get_group_name, 116
• db_count_entities_in_group, 116
• db_count_groups_for_entity, 116
• db_get_groups_for_entity, 117
• uil_entity_group_members_get, 117
■ FEM, 118
• db_get_groups_using_mpc, 118
• db_count_groups_using_mpc, 118
• db_count_orphan_mpcs, 119
• db_get_orphan_mpcs, 119
• count_orphan_elements, 120
• count_orphan_nodes, 120
• get_orphan_elements, 120
• get_orphan_nodes, 121
• db_add_mpc_to_group, 121
■ Geometry, 122
• db_count_orphan_curves, 122
• db_get_orphan_curves, 122
• db_count_orphan_points, 122
Main Index
• db_get_orphan_points, 123
• db_count_orphan_solids, 123
• db_get_orphan_solids, 123
• db_count_orphan_surfaces, 124
• db_get_orphan_surfaces, 124
• asm_db_count_asm_in_group, 124
• asm_db_get_grids_in_group, 125
• asm_db_get_hpats_in_group, 125
• asm_db_get_lines_in_group, 126
• asm_db_get_patches_in_group, 126
• sgm_db_count_iges_in_group, 127
• sgm_db_get_iges_in_group, 127
■ Graphics Application, 129
• ga_groups_load_vector_set, 129
• ga_group_color_get, 129
• ga_group_color_set, 130
• ga_group_current_get, 130
• ga_group_deform_get, 130
• ga_group_deform_set, 131
• ga_group_display_get, 131
• ga_group_elem_scalar_get, 132
• ga_group_elem_scalar_set, 132
• ga_group_entities_get, 132
• ga_group_exist_get, 133
• ga_group_groups_get, 133
• ga_group_label_get, 135
• ga_group_label_set, 135
• ga_group_load_vector_get, 135
• ga_group_load_vector_set, 136
• ga_group_nentities_get, 136
• ga_group_ngroups_get, 137
• ga_group_node_deform_set, 137
• ga_group_precision_get, 138
• ga_group_result_vector_get, 138
• ga_group_result_vector_set, 138
• ga_group_selectable_get, 139
• ga_group_selectable_set, 139
• ga_group_style_get, 140
• ga_group_style_set, 140
• ga_group_vector_load_get, 140
• ga_group_vector_load_set, 141
• ga_group_vector_result_get, 141
• ga_group_vector_result_set, 142
7
Geometry ■ General, 144
• db_get_geom_type, 144
• sgm_db_get_blob_size, 144
• sgm_db_get_company_of_origin, 145
• sgm_db_modify_entity_label, 146
• sgm_incongruent_geom_exist, 146
Main Index
• sgm_incongruent_geom_display, 146
• sgm_incongruent_geom_seg_exit, 147
• sgm_u_calc_mscale_mat, 147
• asm_u_coord_global_to_local, 147
■ Point, 149
• asm_db_create_grid, 149
• db_count_point, 149
• db_get_max_point_label, 150
• db_get_min_point_label, 150
• db_get_point_association_count, 150
• db_get_point_id, 151
• db_get_point_label, 151
• db_get_point_coo_and_type, 151
• asm_db_get_next_grid_label, 152
• sgm_db_get_point, 152
• sgm_edit_point_equivalence, 152
• sgm_get_close_points, 153
• sgm_node_on_point, 154
■ Curve, 155
• asm_db_get_curve_geo, 155
• asm_db_get_next_line_label, 155
• asm_const_curve_2d_arc2point_v2, 155
• asm_const_curve_2d_arc3point_v1, 158
• asm_const_curve_2d_circle_v1, 158
• asm_const_curve_project_v1, 159
• curve_arc_to_parm, 160
• curve_parm_to_arc, 161
• db_count_curve, 161
• db_get_curve_coo_and_type, 162
• db_get_curve_id, 162
• db_get_curve_label, 162
• db_get_max_curve_label, 163
• db_get_min_curve_label, 163
• sgm_associate_nodes_curve, 164
• sgm_const_curve_project_v1, 164
• sgm_create_curve_on_surface, 165
• sgm_curve_convert_s_to_u, 166
• sgm_curve_convert_u_to_s, 166
• sgm_curve_evaluate, 167
• sgm_db_get_curve, 168
• sgm_db_get_curve, 168
• sgm_get_arc_center_radius, 168
• sgm_get_curve_length, 169
• sgm_node_on_curve, 169
• sgm_show_angle_between_curves, 170
■ Surface, 171
• asm_db_get_next_patch_label, 171
• db_count_surface, 171
• db_get_max_surface_label, 171
• db_get_min_surface_label, 172
• db_get_surface_coo_and_type, 172
• db_get_surface_id, 172
Main Index
• db_get_surface_label, 173
• sgm_create_surface_composite_c, 173
• sgm_create_surface_comptrim_v1, 174
• sgm_create_surface_from_elems1, 175
• sgm_db_get_num_loops_face, 176
• sgm_db_get_surface, 176
• sgm_edit_surface_edge_match, 177
• sgm_edit_surface_sew, 177
• sgm_get_surface_area, 178
• sgm_node_on_surface, 178
• sgm_show_surface_normals, 179
• sgm_surface_evaluate, 180
■ Solid, 182
• db_count_solid, 182
• db_get_max_solid_label, 182
• db_get_min_solid_label, 182
• db_get_solid_coo_and_type, 183
• db_get_solid_id, 183
• db_get_solid_label, 183
• asm_db_get_next_hpat_label, 184
• sgm_construct_solid_brep, 184
• sgm_construct_solid_volume, 184
• sgm_db_get_num_vertices_body, 185
• sgm_db_get_solid, 185
• sgm_edit_brep_break_plane_v1, 186
• sgm_edit_brep_break_surface_v1, 186
• sgm_edit_solid_break, 187
• sgm_edit_solid_refit_v1, 187
• sgm_edit_solid_reverse, 188
• sgm_get_solid_volume, 188
• sgm_solid_evaluate, 188
• sgm_verify_solid_brep, 189
■ Coordinate Frame, 190
• app_db_get_ref_cid, 190
• asm_u_coord_local_to_global, 190
• db_check_coord_frame_exist, 191
• db_count_coordinate_frame, 191
• db_get_all_coord_frame_ids, 191
• db_get_next_coord_frame_ids, 192
• db_get_max_coord_label, 192
• db_get_min_coord_label, 193
• db_get_all_posted_coord, 193
• db_get_next_posted_coord, 194
• asm_db_get_next_cord_label, 194
• db_get_coord_frame_label, 195
• db_get_current_coord, 195
■ Point/Curve Relation, 196
• db_count_curves_for_point, 196
• db_get_curves_for_point, 196
• sgm_db_get_edge_vertex_ids, 196
• sgm_nearest_point_on_curve, 197
• sgm_nearest_point_on_curve_aea, 197
Main Index
• xy_curve_num_points_get, 198
■ Curve/Surface Relation, 199
• db_count_surfaces_for_edge, 199
• db_get_surfaces_for_edge, 199
• sgm_db_get_gen_face_edge_ids, 199
• sgm_db_get_gen_face_vertex_ids, 200
• sgm_db_get_num_edges_face, 200
■ Surface/Solid Relation, 201
• db_count_solids_for_surface, 201
• db_get_solids_for_surface, 201
• sgm_db_get_gen_body_face_ids, 201
• sgm_db_get_gen_body_vertex_ids, 202
• sgm_db_get_num_faces_body, 202
■ Transform, 203
• transform_pts, 203
8
Finite Element ■ Finite Elements, 206
Model • db_get_next_elem_id, 206
• db_get_min_elem_id, 206
• db_get_max_elem_id, 206
• fem_get_elem_assoc_groups, 207
• fem_get_elem_ids, 207
• fem_u_get_free_edges, 208
• fem_u_get_free_faces, 208
• db_update_elem_ids, 209
• db_count_elems_for_geo, 209
• db_update_elem_types, 210
• db_count_elem_topology_codes, 210
• db_count_elem_w_topology, 210
• db_count_nodes_for_geometry, 211
• db_get_elems, 211
• db_get_elems_by_lbc, 212
• db_get_elem_config_ntl, 212
• db_get_elem_dimens, 213
• db_get_elem_for_geo_type_and_id, 214
• db_get_elem_shape_for_id, 214
• db_get_elem_topology_codes, 215
• db_get_elem_topos_for_geom, 215
• db_get_elem_top_name, 215
• db_get_elem_verification_parms, 216
• db_get_etop_for_a_code, 216
• db_get_indep_nodes_in_sub_mpc, 217
■ MPCs, 218
• db_get_next_mpc_id, 218
• fem_get_mpc_assoc_nodes, 218
• fem_get_mpc_ids, 219
• db_count_valid_dofs_f_mpc_type, 219
• db_validate_mpc, 220
• db_count_valid_mpc_types, 220
Main Index
• db_get_all_valid_dof_f_mpc_type, 221
• db_get_nxt_valid_dof_f_mpc_type, 221
• db_get_all_valid_mpc_type, 221
• db_get_next_valid_mpc_type, 222
• db_get_dep_nodes_in_sub_mpc, 222
• db_get_dof_id, 223
• db_get_dof_name, 224
• db_get_mpc_type_id, 224
• db_get_mpc_type_name, 224
• db_get_valid_mpc_ids_in_group, 225
• fem_get_mpc_assoc_groups, 225
■ Nodes, 227
• db_get_nodal_association, 227
• db_get_node, 227
• db_get_nodes_by_lbc, 228
• db_get_nodes_for_geometry, 228
• db_get_next_node_id, 229
• db_get_min_node_id, 229
• db_get_max_node_id, 229
• fem_get_node_assoc_groups, 230
• fem_get_node_ids, 230
• db_verify_nodes_exist, 231
• db_count_unref_nodes, 231
• db_get_unreferenced_node_ids, 232
■ Mesh, 233
• fem_create_mesh_sol_3, 233
• fem_seed_display_dir_arrows, 233
• db_get_mesh_params, 234
• move_mesh, 234
• move_mesh_1, 235
■ Element/Node Relations, 236
• db_count_elems_using_node, 236
• db_count_mpcs_using_node, 236
• db_count_nodes_in_mpc, 237
• db_get_elems_using_nodes, 237
• db_get_elem_nodes, 238
• db_get_nodes_in_mpc, 238
• list_get_node_ass_el_edge, 239
• list_get_node_ass_el_face, 239
• list_get_node_ass_elem, 239
• list_get_node_ass_geo, 240
• list_get_node_ass_group, 240
• list_get_node_ass_mpc, 240
• list_get_node_att_fringe, 241
• list_get_node_att_value, 241
9
Load Cases ■ General, 244
• db_activate_load_case, 244
• db_delete_load_case, 244
Main Index
• db_find_load_case_id, 245
• db_count_load_cases, 245
• db_get_all_load_case_names, 245
• db_get_all_load_cases, 246
• db_get_next_load_case, 246
• db_get_lc_id_given_job_seq, 247
10
Element ■ General, 250
Properties • bl_create_std_beam_section, 250
• bl_get_std_beam_section_data, 250
• bl_modify_std_beam_section, 251
• blcomputeprincaxespoints, 251
• blgetalpha, 252
• blgetbuttonicon, 252
• blgetcenters, 252
• blgetdimfieldid, 253
• blgetdimvalue, 253
• blgetlabelicon, 253
• blgetlabels, 254
• blgetnumdimension, 254
• blgetnumplotpoints, 254
• blgetnumplotpointsbyid, 255
• blgetnumtypeinfo, 255
• blgetperim, 255
• blgetplotpoints, 256
• blgetplotpointsbyid, 256
• blgetplotpointsbyid2, 257
• blgetprop, 258
• blgetproplabels, 259
• blgettypeinfo, 259
• blmodifybeamdimension, 259
• db_create_selected_etype, 260
• db_count_elem_type, 261
• db_count_etop_for_a_code, 261
• db_get_all_dof_set_names, 261
• db_get_next_dof_set_names, 262
• db_get_all_form_opt_code_names, 262
• db_get_next_form_opt_code_names, 263
• db_get_all_geo_opt_code_names, 263
• db_get_next_geo_opt_code_names, 264
• db_get_all_lam_opt_code_names, 264
• db_get_next_lam_opt_code_names, 265
• db_get_region_for_geometry, 265
• db_get_region_ids_and_names, 266
• db_get_elements_in_region_exp, 266
• db_get_etop_for_a_code, 267
• db_get_a_phys_prop_w_nord, 267
• db_create_phys_prop_set_defn, 268
• db_get_phys_prop_set_defn, 268
• db_get_allowable_phys_prop, 269
• db_get_selected_prop_set, 270
Main Index
• db_delete_phys_prop_region, 270
• db_associate_geo_to_region, 271
• db_count_geo_in_region, 272
• db_get_geo_in_region, 272
• db_count_elements_in_region_exp, 273
• db_create_anl_elm_summary, 273
• db_get_anl_elm_summary, 274
• db_delete_anl_elm_summary, 274
• db_create_analysis_elements, 275
• db_delete_analysis_elements, 275
• db_get_analysis_elements, 276
• db_get_all_elem_defn, 276
• db_get_next_elem_defn, 277
• db_bulk_get_possible_dof_sets2, 277
• db_bulk_get_possible_lam_opts2, 278
• db_bulk_get_possible_form_opts2, 279
• db_bulk_get_possible_dof_sets1, 279
• db_bulk_get_possible_lam_opts1, 280
• db_bulk_get_possible_geo_opts1, 280
• db_bulk_get_possible_form_opts1, 281
• db_bulk_get_selected_etops_mat, 281
• db_bulk_get_possible_matl_dirs, 282
• db_bulk_get_possible_matl_lins, 283
• db_get_all_pp_ids_and_names, 284
• db_get_next_pp_ids_and_names, 284
• db_set_comp_lam, 285
11
Loads and ■ General, 288
Boundary • lbc_create, 288
Conditions • lbc_delete, 289
• lbc_eval_fem_by_lc, 289
• lbc_eval_fem_lbc, 289
• lbc_get_sdbx_datatype, 290
• lbc_gm, 290
• lbc_graphics_defn, 291
• lbc_lp_parse_sca, 291
• lbc_lp_parse_vec, 292
• lbc_plot_markers, 293
• lbc_show_plot_scalar, 293
• loadcase_create2, 294
• loadsbcs_get_appl_region_list, 294
• loadsbcs_lp_coord, 295
■ Database, 296
• db_bulk_get_lbc_ds, 296
• db_bulk_get_lbc_dv, 296
• db_bulk_get_lbc_ss, 297
• db_bulk_get_lbc_sv, 298
• db_count_appl_geo_region, 298
• db_count_lbc, 299
• db_count_lbc_appl_region_entity, 299
Main Index
• db_count_lbc_types, 300
• db_count_loads_for_element, 300
• db_count_load_cases_with_lbc, 300
• db_delete_lbc, 301
• db_delete_lbc_defn, 301
• db_get_all_appl_geo_regions, 301
• db_get_next_appl_geo_region, 302
• db_get_all_appl_reg_defns, 302
• db_get_next_appl_reg_defn, 303
• db_get_all_lbcs_new, 303
• db_get_next_lbcs_new, 303
• db_get_all_lbc_names, 304
• db_get_next_lbc_name, 304
• db_get_all_lbc_names_by_type, 305
• db_get_next_lbc_name_by_type, 305
• db_get_all_lbc_type_defns, 306
• db_get_next_lbc_type_defn, 306
• db_get_all_lbc_type_names, 307
• db_get_next_lbc_type_name, 308
• db_get_all_lbc_var_defns, 308
• db_get_next_lbc_var_defn, 308
• db_get_lbc_id, 309
• db_get_lbc_name, 309
• db_get_lbc_type_defn, 310
• db_get_lbc_var_defn, 311
• db_get_loads_for_element, 311
• db_get_load_cases_with_lbc, 312
• db_get_valid_cat_by_type, 312
• db_get_valid_eldim_by_type_cat, 313
• db_get_valid_lbc_var_ids, 313
• db_modify_load_case, 314
12
Materials ■ Database, 316
• db_bulk_get_possible_cond_opts1, 316
• db_bulk_get_possible_cond_opts2, 316
• db_bulk_get_possible_dof_sets, 317
• db_get_constitutive_model, 318
• db_get_valid_const_models_count, 318
• db_get_valid_const_models, 319
• db_mo_const_models_specified, 319
• db_delete_matl_const_model, 320
• db_get_matl_category, 320
• db_get_valid_mtl_category_cnt, 321
• db_get_valid_mtl_categories, 321
• db_create_mtl_allowable_magics, 322
• db_get_mtl_allowable_magic_cnt, 322
• db_count_options, 323
• db_get_mtl_allowable_magics, 323
• db_get_mtl_magics, 324
• db_get_mtl_magics_count, 324
• db_get_mtl_magics_defn, 325
Main Index
• db_get_mtl_magics_options, 325
• db_get_material_name_from_id, 326
• db_get_material_id_from_name, 326
• db_count_materials, 326
• db_get_all_material_names, 327
• db_get_next_material_name, 327
• db_modify_material, 328
• db_delete_material, 328
• db_get_all_cond_opt_code_names, 329
• db_get_next_cond_opt_code_names, 329
• db_get_all_lam_opt_code_names, 330
• db_get_next_lam_opt_code_names, 330
• db_get_allowable_matl_prop, 331
• db_get_all_allow_matl_prop_cnt, 331
• db_get_allowable_matl_prop_cnt, 332
• db_get_all_allowable_matl_prop, 332
• db_get_matl_prop_alias, 333
• db_get_matl_prop_defn, 333
• db_modify_matl_prop_value, 334
• db_delete_material_property, 334
• db_get_comp_hal, 335
• db_get_comp_sfc, 335
• mat_3d_ani_to_3d_ort, 336
• engin_cons_to_elastic_matrix, 337
• mat_2d_ani_to_2d_ort, 337
• get_qab_from_engin_cons, 338
• n21_cons_to_sym_6x6_matrix, 338
• mat_load_show, 339
• mat_hal_load_defn_show, 340
• mat_lam_load_defn_show, 341
• mat_mix_load_defn_show, 341
• mat_sfc_load_defn_show, 342
• material.namedelete, 343
■ Laminate Modeler, 344
• p3cm.close_2, 344
• p3cm.create_book_layup2, 344
• P3cm.create_laminates_layup_2, 345
• p3cm.create_layup_add_2, 346
• p3cm.create_material_add, 347
• p3cm.create_ply_add_2, 348
• p3cm.create_results_failure, 349
• p3cm.create_results_mid_sort, 349
• p3cm.create_results_sort, 350
• p3cm.delete_laminates, 350
• p3cm.delete_material_name, 351
• p3cm.delete_ply_name, 351
• p3cm.delete_propsets, 351
• p3cm.import_model_file_2, 352
• p3cm.import_plies_file_2, 352
• p3cm.modify_material, 353
• p3cm.modify_ply, 353
• p3cm.new, 354
• p3cm.set_offsets, 355
Main Index
• p3cm.open, 355
• p3cm.save_as_2, 356
• p3cm.set_export_options_2, 356
• p3cm.set_graphics_options_2, 357
• p3cm.set_tolerance, 357
• p3cm.show_laminate, 358
• p3cm.show_layup_exploded, 359
• p3cm.show_ply, 359
13
Analysis ■ General, 362
• analysis_get.pset_for_job, 362
• analysis_import, 362
• analysis_main.job_name_lbox, 363
• analysis_main.user_function, 363
• analysis_submit, 364
• analysis_submit_2, 365
• db_set_pref, 366
• db_get_job_info, 367
• db_set_model_file_suffix, 367
• db_set_results_file_suffix, 368
• db_set_default_anal_code, 368
• db_get_default_anal_code, 369
• db_get_anal_code_name, 369
• db_get_anal_code_id, 369
• db_count_anal_codes, 370
• db_get_all_anal_codes, 370
• db_get_next_anal_code, 371
• db_set_default_anal_type, 371
• db_get_default_anal_type, 372
• db_get_anal_type_name, 372
• db_get_anal_type_id, 372
• db_count_anal_types, 373
• db_get_all_anal_types, 373
• db_get_next_anal_type, 374
• db_get_at_for_ac, 374
• db_set_at_for_ac, 375
• db_create_job_name_for_a_code, 375
• db_count_job_names_for_a_code, 376
• db_get_jobnames_for_a_code, 376
• db_update_jobname_for_a_code, 377
• db_create_job_name_list, 378
• db_create_job_name_list_entry, 378
• db_get_jobname_list_entries, 379
• db_count_job_name_list_entry, 379
• db_delete_job_name_list, 380
• db_create_job_name, 380
• db_assign_last_jobname, 380
• db_get_last_jobname, 381
• db_get_job_name_given_id, 381
• db_count_all_job_name_ids, 382
• db_get_all_job_name_ids, 382
Main Index
• db_get_all_job_names, 383
• db_get_next_job_name, 383
• db_get_id_given_job_name, 383
• db_get_id_given_job_name_code, 384
• db_get_id_given_load_case_name, 384
• db_delete_job_name, 385
• db_create_analysis_step, 385
• db_get_analysis_steps, 386
• db_get_steps_for_a_job, 386
• db_get_step_info, 387
• db_count_analysis_steps, 388
• db_count_steps_for_a_job, 388
• db_get_id_given_step_name, 388
• db_update_analysis_step, 389
• db_delete_analysis_step_id, 389
• db_create_param_set_entry, 390
• db_count_param_set_entries, 391
• db_get_param_set_entry, 391
• db_get_param_set_ent_pcl, 392
• db_get_param_set_entries, 392
• db_delete_param_set_entry, 393
• db_delete_param_set_entries, 393
• db_create_pset_matrix_entry, 394
• db_get_pset_matrix_entry, 394
• db_get_pset_matrix_size, 395
• jobfile.close, 395
• jobfile.create_matrix, 396
• jobfile.open, 396
• jobfile.set_job_status, 397
• jobfile.writec, 397
• jobfile.writei, 398
• jobfile.writer, 398
• jobfile.write_spl, 399
• msc_delete_old_files, 399
• mscnastran_anlyze_sub_create.available_callback, 400
• mscnastran_analyze_tp.get_version_number, 400
• mscnastran_job.associate_subcases, 400
• mscnastran_subcase.create, 401
• mscnastran_subcase.create_char_param, 401
• mscnastran_update.job, 402
• uil_app_analysis.change_current_branch, 402
14
Fields ■ General, 404
• db_get_all_field_names, 404
• db_get_next_field_name, 404
• db_get_field_id, 405
• db_get_field_attrs, 405
• fields_create_general_term, 406
• get_field_values_no_trans, 408
• get_field_values, 408
• db_get_max_field, 409
Main Index
• fld_evl_get_maxnod_for_group, 409
• db_modify_field, 410
• db_delete_field, 411
• fld_cre_fem_res_sca, 411
• fld_cre_fem_res_vec, 411
• db_delete_field_res, 412
• field_create_field_lbc, 412
• db_get_field_lbc, 413
• db_get_field_lbc_type, 414
• field_fem_const_eval, 414
• db_get_field_dfem, 415
15
Results ■ General, 418
• db_count_result_types_for_elem, 418
• db_get_results_file_suffix, 418
• db_get_elem_scalar_name, 419
• jobfile.create_jobname, 419
• jobfile.create_param, 420
• jobfile.eval_list, 420
• jobfile.write_array_as_list, 421
• jobfile.write_element_list, 421
• jobfile.write_integer_list, 422
• jobfile.write_node_list, 422
• jobfile.write_real_list, 422
• jobfile.write_stream, 423
• jobfile.write_string, 423
• jobfile.writer, 424
• jobfile.writeS1, 424
• jobfile.writeS2, 424
• jobfile.writeS3, 425
• jobfile.writeS4, 425
• jobfile.writeSS, 425
• rdm_result_minmax_get, 426
• res_db_cgetlayerposids, 426
• res_db_cgetrescases, 427
• res_utl_create_elem_result, 427
• res_utl_extract_elem_history2, 428
• res_utl_extract_elem_results2, 429
• res_utl_extract_nodal_history2, 431
• res_utl_extract_nodal_results2, 432
• res_utl_transform_nodal_results, 433
• vki_db_getresid, 434
• xy_curve_results_set_wnd, 434
16
Preferences ■ Database, 436
• db_get_pref, 436
• db_add_pref, 436
■ General, 438
Main Index
• pref_anal_get, 438
• pref_anal_set, 438
• pref_confirm_get, 439
• pref_display_method_get, 439
• pref_entity_dp_get, 439
• pref_entity_dp_set, 440
• pref_env_get_integer, 440
• pref_env_get_logical, 441
• pref_env_get_real, 441
• pref_env_get_string, 442
• pref_fa_get, 442
• pref_fa_set, 443
• pref_geo_cid_int_string, 445
• pref_geo_cid_string_int, 445
• pref_geo_get, 446
• pref_get_anal_attributes, 446
• pref_get_anal_code_count, 447
• pref_get_anal_type_count, 447
• pref_get_next_anal_code, 448
• pref_get_next_anal_type, 448
• pref_global_get, 448
• pref_graphics_get, 449
• pref_graphics_marker_data_get, 450
• pref_entity_set, 450
17
Utilities ■ Arrays, 454
• array_copy_real, 454
• array_del_zero_int, 454
• array_fill_int, 454
• array_fill_zero_int, 455
• array_fill_zero_real, 455
• array_real_fill_null, 455
• array_sort_and_del_dupl_int, 456
■ Math, 457
• math_get_no_data_null, 457
• math_is_no_data_null, 457
• math_mat_add, 458
• math_mat_invert, 458
• math_mat_mult, 458
• math_mat_transp_in_place, 459
• math_vec_len, 459
• math_vec_norm, 459
• mth_vec_add, 460
• mth_vec_cross_prod, 460
• mth_vec_dot_prod, 460
• mth_vec_length, 461
• mth_vec_scale, 461
• util_equal_real, 461
• util_real_equal_null, 462
• util_rounder, 462
Main Index
■ RPCs, 463
• rpc_add_server, 465
• rpc_init_client, 466
• rpc_call, 466
• rpc_timeout, 467
• rpc_put_bool_array, 467
• rpc_put_int_array, 467
• rpc_put_real_array, 468
• rpc_put_boolean, 468
• rpc_put_command, 469
• rpc_put_integer, 469
• rpc_put_real, 469
• rpc_put_status, 470
• rpc_put_string, 470
• rpc_clear_output, 471
• rpc_get_bool_array, 471
• rpc_get_int_array, 471
• rpc_get_real_array, 472
• rpc_get_boolean, 472
• rpc_get_command, 473
• rpc_get_integer, 473
• rpc_get_real, 474
• rpc_get_status, 474
• rpc_get_string, 475
• rpc_inquire_count, 475
• rpc_inquire_item, 475
■ Security, 477
• sec_is_product_in_matrix, 477
• sec_is_product_licensed, 477
• sec_license_type, 477
■ Strings, 479
• string_newline_count, 479
• string_newline_position, 479
• ga_entities_string_format, 480
• ga_entity_get_by_type, 480
• uil_list_union_expr, 481
■ Performance, 482
• timer_on, 482
• timer_off, 482
18
Obsolete, ■ General, 484
Modified, and ■ Functions for Chapter 1, 485
Broken Functions
• utl_get_terse_version, 485
■ Model (Chapter 2), 486
• db_delete_client_label, 486
• db_reset_client_info, 486
■ Files (Chapter 3), 489
• get_current_dir, 489
Main Index
• utl_is_locked_file, 490
• sf_write_disable, 491
• ui_form_to_frame, 491
• ugi_export_iges_v1, 492
■ Graphics (Chapter 4), 494
• ga_elem_scalar_delete, 494
• ga_elem_scalar_get, 496
• ga_elem_scalar_minmax_get, 499
• ga_elem_scalar_number_get, 501
• ga_vector_delete, 503
• gm_animate_end, 506
• gm_animate_loadcase_parms, 507
• gm_animate_start, 507
• gm_database_close, 508
• gm_database_open, 509
• gm_pick, 511
• gm_pick_abort, 511
• gm_pick_add, 513
• gm_pick_add_widget, 515
• gm_pick_adjust_hilight, 517
• gm_pick_clear, 518
• gm_pick_filter, 520
• gm_pick_notify, 523
• gm_pick_reject, 525
• gm_pick_reset_level_counter, 526
• gm_uiwindow_create, 527
• gm_uiwindow_delete, 527
• gm_viewport_auto_off, 527
• gm_viewport_auto_on, 528
• gm_viewport_plot, 530
• gm_window_id_get, 532
• gm_xy_plot, 533
■ User Interface (Chapter 5), 536
• msg_format_string, 536
• msg_to_file, 537
• app_count_list, 538
• lp_eval_cleanup, 539
• lp_keyword_text, 539
• ui_flush, 540
• ui_flush_events, 540
• ui_sys_return, 541
• ui_text_select, 541
• ui_window_create, 542
• ui_helpmenu_create, 542
• ui_abortwidget_create, 543
• ui_wid_restore_widget, 544
• ui_wid_save_widget, 544
• uil_primary_file.enable_entire_menu, 545
• uil_primary_file.enable_item, 545
• uil_primary_pref.enable_item, 545
• uil_utils_listbox.select_list, 546
• uil_utils_listbox.create_list, 547
• uil_utils_listbox.append_list, 548
Main Index
• uil_utils_listbox.select_one, 549
• uil_utils_listbox.select, 549
■ Group (Chapter 6), 550
• db_count_entities_in_group, 550
• ga_group_ngroups_get, 551
• db_get_orphan_mpcs, 551
• count_orphan_elements, 551
• db_add_mpc_to_group, 552
• db_get_orphan_curves, 553
• db_get_orphan_points, 553
• db_get_orphan_solids, 554
• db_get_orphan_surfaces, 554
• ga_group_selectable_set, 555
• sgm_db_get_iges_in_group, 556
■ Geometry (Chapter 7), 558
• asm_db_get_next_grid_label, 558
• asm_db_get_next_line_label, 559
• asm_db_get_next_patch_label, 560
• sgm_show_surface_normals, 561
• asm_db_get_next_hpat_label, 562
• sgm_db_get_solid, 563
• sgm_verify_solid_brep, 564
• app_db_get_ref_cid, 564
• asm_db_get_next_cord_label, 565
• db_get_all_coord_frame_ids, 566
• db_get_current_coord, 567
• db_get_surfaces_for_edge, 568
• db_get_solids_for_surface, 569
■ Finite Element Model (Chapter 8), 570
• db_get_elems_by_lbc, 570
• db_get_node, 570
• fem_get_node_ids, 571
• fem_seed_display_dir_arrows, 572
■ Load Cases (Chapter 9), 573
• db_delete_load_case, 573
■ Element Properties (Chapter 10), 574
• db_get_next_lam_opt_code_names, 574
• db_del_geo_assoc_to_region, 574
■ Loads and Boundary Conditions (Chapter 11), 575
• lbc_create, 575
• lbc_get_sdbx_datatype, 577
• lbc_lp_parse_sca, 578
• lbc_show_plot_marker, 579
• lbc_plot_markers, 579
• lbc_show_plot_scalar, 579
• loadsbcs_get_appl_region_list, 581
• db_count_lbc_in_group, 582
• db_get_all_lbcs, 582
• db_get_all_lbcs_new, 582
• db_get_next_lbc, 583
Main Index
• db_get_next_lbcs_new, 583
• db_get_all_lbcs_in_group, 583
• db_get_all_lbc_var_defns, 584
• db_get_lbc_type_defn, 585
• db_get_lbc_var_defn, 586
■ Materials (Chapter 12), 588
• mat_2d_ani_to_2d_ort, 588
■ Analysis (Chapter 13), 589
• analysis_get.pset_for_job, 589
• db_get_anal_type_name, 590
• db_get_anal_type_id, 591
• db_get_pset_matrix_entry, 592
■ Fields (Chapter 14), 593
• db_modify_field, 593
• db_create_field_res, 595
• db_get_field_dfem, 596
• field_create_field_lbc, 597
• db_get_field_lbc, 598
■ Results (Chapter 15), 600
• db_count_result_types_for_elem, 600
■ Preferences (Chapter 16), 601
• pref_env_get_string, 601
■ Utilities (Chapter 17), 602
• rpc_clear_timeout, 602
• util_round, 602
Main Index
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Introduction
1
■ Introduction
■ General Built-ins
■ Synchronizing with Startup, Exit, and Database Events
Main Index
2
Function Descriptions
1.1 Introduction
MSC.Patran is composed of compiled code (either C or FORTRAN) which is the MSC.Patran
executable and PCL programs which are delivered in the p3patran.plb library file. PCL makes
up a significant portion of the MSC.Patran functionality. In fact, p3patran.plb contains more
than 44,000 routines at last count! PCL interacts with the compiled code through “wrappers.” A
wrapper is a special type of C function which allows PCL to call the compiled code directly.
Sometimes, the functions which are in wrappers are called “Built-ins” which is similar to an
intrinsic function in traditional programming languages. Wrappers can only be created at
compile time, so you, the PCL programmer cannot add any additional “Built-ins” at your site.
Fortunately, the programmers here at The MSC.Software Corporation had the foresight to add
numerous useful PCL built-ins which are documented here and are in addition to the current
functions described in PCL and Customization, PCL and Customization (p. i) in the and PCL
Reference Manual delivered in the standard product.
The Extended PCL Functions Manual includes functions for model (database), files, graphics,
user-interface, groups, geometry, fem, loadcases, element properties, loads, materials, results,
utilities and much more.
Main Index
CHAPTER 1 3
Introduction
is_batch ()
Description:
Checks to see if MSC.Patran is running in batch mode.
Input:
none
Output:
LOGICAL <Return Value> TRUE if running in batch mode.
FALSE if running interactively.
Example:
Please see is_batch (p. 2) in the MSC.Acumen, Volume 2: Code Examples.
db_get_p3_version ( p3_ver)
Description:
Queries the database for the version number.
Input:
none
Output:
STRING p3_ver[] Buffer to hold MSC.Patran version.
INTEGER <Return Value> SQL error code.
Example:
Please see db_get_p3_version (p. 2) in the MSC.Acumen, Volume 2: Code Examples.
utl_get_terse_version ( terse_verson )
Description:
Get terse (short) version string.
Input:
none
Output:
STRING terse_verson[] Version string.
Example:
Please see utl_get_terse_version (p. 6) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
4
Function Descriptions
utl_query_version_level ()
Description:
Return the code version level.
Input:
none
Output:
INTEGER <Return Value> 0 = Production code.
1 = Beta code.
2 = Alpha code.
3 = Development code.
Example:
Please see utl_query_version_level (p. 6) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 1 5
Introduction
user_start ()
Description:
Called just after startup of MSC.Patran. No arguments are given to the function and there is no
return result.
Input:
none
Output:
none
Example:
Please see user_start (p. 5) in the MSC.Acumen, Volume 2: Code Examples.
user_quit ()
Description:
Called just before exit of MSC.Patran. No arguments are given to the function and there is no
return result.
Input:
none
Output:
none
Example:
Please see user_quit (p. 5) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Called just after a new database is created.
Input:
STRING dbname[] Name of database that was created.
STRING tmplname[] Name of the template file used for the database.
Output:
none
Example:
Please see user_db_new (p. 3) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
6
Function Descriptions
user_db_open ( dbname )
Description:
Called just after an existing database is opened.
Input:
STRING dbname[] Name of database that was opened.
Output:
none
Example:
Please see user_db_open (p. 4) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Called just before a database is closed.
Input:
STRING dbname[] Name of database that was created.
LOGICAL isquit TRUE if quit, FALSE if close.
Output:
none
Example:
Please see user_db_close (p. 3) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Model
2
■ General
■ User Defined
Main Index
8
Function Descriptions
2.1 General
The following routines return general information and allow manipulation of the model file.
db_get_db_version (db_ver)
Description:
Retrieves the database version.
Input:
none
Output:
STRING db_ver[] Database version. Success or failure of routine.
INTEGER <Return Value> SQL error code.
Example:
Please see db_get_db_version (p. 625) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function returns term_field_id, term_function_types and field_data from the field form.
The input to the function are the field_id, term_id and the length of the field data. It returns a
positive integer indicating the status of the execution of the function.
Input:
INTEGER field_id The id of the field.
INTEGER term_id Term order of creation in the general field.
INTEGER field_data_length Length of the expression stored.
Output:
INTEGER term_field_id Field id of the term
INTEGER term_function_type Function type id
0 - Field expression.
1 - Utility functions.
2 - PCL Math Built-Ins.
3 - PCL String Built-Ins.
STRING field_data[] String containing the field expression.
INTEGER <return value> 0 for success and 1 for failure
Error Conditions:
None.
Example:
Please see db_get_general_field (p. 625) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 2 9
Model
Description:
This function returns the term_id and field_data_length of the field_id from which the length of
field is required. It returns a positive integer indicating the status of the execution of the
function, 0 for success.
Input:
INTEGER field_id The id of the field.
INTEGER count The count of term_ids in the field.
Output:
INTEGER term_id() The term id's for the field.
ARRAY
INTEGER field_data_length() Length of the strings of the field data.
ARRAY
INTEGER <return value> 0 for success and 1 for failure.
Error Conditions:
None.
Example:
Please see db_get_general_field_length (p. 627) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the model file suffix associated with the named analysis code.
Input:
STRING name[31] Name of the analysis code for which the suffix is to be
retrieved.
Output:
STRING suffix[6] Location into which the named suffix is to be retrieved.
INTEGER <Return Value> Success or failure of routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Example:
Please see db_get_model_file_suffix (p. 629) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
10
Function Descriptions
Description:
Creates a client defined entity in the database.
Input:
INTEGER client_label The external id of the db entity being created. if input as
”0”, the database will assign a label. if a number is input,
the database will ensure that it is not a duplicate, then
insert it.
INTEGER client_type Type of data uniquely defined by the client.
INTEGER num_logicals The number of logical data items being associated with this
entity.
INTEGER num_integers The number of integer data items being associated with this
entity.
INTEGER num_reals The number of real data items being associated with this
entity.
INTEGER num_strings The number of real data items being associated with this
entity.
INTEGER max_string_length The maximum length of any one string.
LOGICAL p_logical_data Pointer to an array of logicals.
INTEGER p_integer_data Pointer to an array of integers.
REAL p_real_data Pointer to an array of reals.
STRING p_string_data[] Pointer to an array of strings.
Output:
INTEGER id This filed receives the id of the client db entity that was just
created. this is the uniques database identifier for the entity.
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:
13000002 Unrecoverable database error.
13000004 Duplicate entry exists in table.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Creates one record in the “xxx_client_entity” table in the database. Also, depending upon the
input data, this routine creates zero or more records in the “xxx_client_interger_data”, or
“xxx_client_logical_data”, or “xxx_client_real_data”, or
Example:
Please see db_create_client_data (p. 613) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 2 11
Model
Description:
Returns the number of all labels with a specified type.
Input:
INTEGER client_type Type of data uniquely defined by the client.
Output:
INTEGER nbr_of_labels The number of all labels.
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:
13000126 Label not found.
13000007 other database error.
Example:
Please see db_count_client_labels_by_type (p. 610) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function returns the count of terms in a field. It returns an integer status of 0 on success
and 1 on failure.
Input:
INTEGER field_id The id of the field.
Output:
INTEGER count The count of term_ids in the field.
INTEGER <Return Value> 0 for success and 1 for failure.
Error Conditions:
None.
Example:
db_count_general_field (p. 612) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets all data related to a specified client data entity from the database.
Input:
INTEGER id Id of the client entity for which data is requested.
INTEGER num_logicals Num of logical numbers for which storage has been
allocated by the calling routine.
INTEGER num_integers Num of integer numbers for which storage has been
allocated by the calling routine.
Main Index
12
Function Descriptions
INTEGER num_reals Num of real numbers for which storage has been allocated
by the calling routine.
INTEGER num_strings Num of strings for which storage has been allocated by the
calling routine.
INTEGER max_string_length Max number of characters to copy into p_string buffer.
Output:
LOGICAL p_logical_data(num Pointer to an array of logicals.
_logicals)
INTEGER p_integer_data() Pointer to an array of integers.
REAL p_real_data() Pointer to an array of reals.
STRING p_string_data[]() Pointer to an array of characters.
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:
DbFUBAR
DbClientEntityNotFound
DbOtherFailure
External Dependencies and Side Effects:
Accesses multiple records in the “xxx_client_integer_data”, “xxx_client_logical_data”,
“xxx_client_real_data”, “xxx_client_string_data” in the database.
Example:
Please see db_get_all_client_data (p. 616) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a client data entity from the database by user defined label.
Input:
INTEGER client_label External id for the user defined entity.
Output:
INTEGER id Internal id for the user defined entity.
INTEGER client_type Type of data uniquely defined by the client.
INTEGER num_logicals The number of logical data items being associated with this
entity.
INTEGER num_integers The number of integer data items being associated with this
entity.
INTEGER num_reals The number of real data items being associated with this
entity.
INTEGER num_strings The number of string items being associated with this
entity.
INTEGER max_string_length The maximum length of any one string.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Main Index
CHAPTER 2 13
Model
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses one record in the “xxx_client_data” table in the database.
Example:
See example for db_get_client_data (p. 618) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns client id given the label.
Input:
INTEGER client_label The client label.
Output:
INTEGER id The client id corresponding to the label.
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:
13000126 The entity specified in the query was not labeled.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses a record in the “xxx_client_entity” table.
Example:
Please see db_get_client_id_by_label (p. 620) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns all labels with a specified type.
Input:
INTEGER client_type Type of data uniquely defined by the client.
Output:
INTEGER labels() An array of labels.
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:
13000201 The specified client entity was not found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses multiple records in the “xxx_client_entity” table.
Example:
Please see db_get_client_labels_by_type (p. 623) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
14
Function Descriptions
Main Index
CHAPTER 2 15
Model
Description:
Returns client label given the id.
Input:
INTEGER id The client id.
Output:
INTEGER client_label The label corresponding to the id.
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:
13000201 The specified client entity was not found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses a record in the “xxx_client_entity” table.
Example:
Please see db_get_client_label_by_id (p. 621) in the MSC.Acumen, Volume 2: Code Examples.
db_get_next_client_entity_label (label)
Description:
This function will get the value of the next available client entity label from the database. This
value should be equal to the highest value client entity label in use plus one.
Input:
none
Output:
INTEGER label Highest entity label used.
INTEGER <Return Value> This value returns the next available client entity label.
Error Conditions:
13000201 The specified client entity was not found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Selects the largest client_entity_label from the database.
Example:
Please see db_get_next_client_entity_label (p. 630) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
16
Function Descriptions
db_delete_client_data (label)
Description:
Delete client data from the database.
Input:
INTEGER label User defined label of the data to be deleted.
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:
13000201 The specified client entity was not found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Deletes one record in the “xxx_client_entity” table in the database, and depending on the client
data, all associated records.
Example:
Please see db_delete_client_data (p. 615) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Files
3
■ General
■ IGES and CAD Access
■ Journal and Session
■ Neutral
■ FrameMaker Files
Main Index
18
Function Descriptions
3.1 General
The following utilities are used for basic file management such as setting and determining file
and directory attributes.
file_is_directory (dirname)
Description:
To validate the given string as a valid directory.
Input:
STRING dirname[] Possible file directory.
Output:
INTEGER <Return Value> This function will return a value of 1 if the input value dirname
represents a valid directory and a value of 0 if the input value
dirname represents an invalid directory.
Example:
Please see file_is_directory (p. 634) in the MSC.Acumen, Volume 2: Code Examples.
get_current_dir (dirname)
Description:
Return the current directory.
Input:
none
Output:
STRING dirname[] Current directory.
INTEGER <Return Value> 0 if Function was successful.
Example:
Please see get_current_dir (p. 634) in the MSC.Acumen, Volume 2: Code Examples.
p3_ps_get_xm (<filename>)
t
Description:
This function returns the filename of the UG part being imported. Typically, a UG model is in a
file with ‘filename.prt’ extension. This function converts it to ‘filename-ps0001.xmt_txt’ file
which is actually imported into MSC.Patran. The filename is taken from the function
p3_ps_open_ug_v2() which is run previous to p3_ps_get_xmt() function. This is an internal
function called during the execution of the function p3_ps_open_ug_v2(). See example file for
this function.
Input:
None
Main Index
CHAPTER 3 19
Files
Output:
STRING filename[]() The filename for the file. This has an extension of xmt_txt
ARRAY format.
INTEGER <Return Value> Returns the output status of the function.
Error Conditions:
None.
Note:
The output of the function is an integer, but the status cannot be ascertained from this integer.
Example:
Please see p3_ps_get_xmt (p. 639) in the MSC.Acumen, Volume 2: Code Examples.
set_current_dir (dirname)
Description:
Set the current directory.
Input:
STRING dirname[] Current directory to set to.
Output:
INTEGER <Return Value> 0 = successful.
-1= failure.
Example:
See example for get_current_dir (p. 18). See also set_current_dir (p. 640) in the MSC.Acumen,
Volume 2: Code Examples.
utl_is_locked_file (filename)
Description:
This function will determine if the indicated file is currently locked.
Input:
STRING filename[] This value specifies the name of the file which will have its lock
status checked.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Remarks:
The commands for locking and unlocking files are designed to control access to files shared
between two or more processes.
The file lock control functions assume that only one file at a time will be locked.
This function will always return FALSE for a file that is owned by the process in which this
function is executed.
Example:
Please see utl_is_locked_file (p. 649) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
20
Function Descriptions
utl_lock_file (filename)
Description:
This function will set an advisory lock on a file.
Input:
STRING filename[] This value specifies the name of the file to lock.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
8111006 Error attempting to access %A%.
8111002 File %A% is in use by another user. Opening this database may cause
undesirable results.
8111001 Cannot lock %A%. Another file is locked.
8111003 Error while attempting to lock %A%.
Remarks:
The commands for locking and unlocking files are designed to control access to files shared
between two or more processes.
The file lock control functions assume that only one file at a time will be locked.
Example:
Please see utl_lock_file (p. 650) in the MSC.Acumen, Volume 2: Code Examples.
utl_unlock_file ()
Description:
This function will clear an advisory lock.
Input:
none
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
8111004 Cannot perform file unlock. No files known to be locked.
8111005 Error while attempting to perform an unlock.
Remarks:
The commands for locking and unlocking files are designed to control access to files shared
between two or more processes.
The file lock control functions assume that only one file at a time will be locked.
Example:
Please see utl_unlock_file (p. 651) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 3 21
Files
Description:
Open a database and set some initial parameters.
Input:
STRING name[] File name of database to be opened.
LOGICAL newdb This flag will execute viewport tiling on a new database so that
it will fill all space from Main Menu to Command Window.
Output:
INTEGER <Return Value> 0 if Description was successful.
Example:
Please see uil_file_open.open_db (p. 648) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
22
Function Descriptions
Description:
Export MSC.Patran geometry to the IGES standard.
Input:
STRING filnam[] IGES file name to create.
STRING start_section[] IGES file start section prolog lines.
INTEGER nlpos ( ) Array of nlknt values. Each entry is the # of characters
for that line of the “IGES file start section prolog” plus
the pervious lines.
INTEGER nlknt Number of lines in the “IGES file start section prolog”.
STRING product_id[] Product Id for receiving system.
STRING author[] Author.
STRING author_org[] Author’s Organization
STRING model_units[] IGES file model units.
LOGICAL entity_toggle_values(35) Flags to specify which MSC.Patran entity types to
export. Only the first 7 flags are used.
LOGICAL all_groups TRUE if all groups are to be exported.
INTEGER ngroups Number of groups to export.
INTEGER group_ids ( ) Group ids to export.
Output:
INTEGER patran_summary (8) Number of MSC.Patran entities processed.
INTEGER iges_summary (21) Number of IGES entities created.
INTEGER <Return Value> 0 if Function was successful.
Example:
Please see ugi_export_iges_v1 (p. 642) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 3 23
Files
INTEGER <Return Value> This function returns a value 0 for success and a non-zero
value to indicate a change in status or an error.
Error Conditions:
-1 This is an internal status condition. There is no
corresponding status message in the message database.
Example:
Please see ugi_import_iges_v3 (p. 643) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 3 25
Files
jou_file_write ( astring )
Description:
To write a string to the journal file ONLY.
Input:
STRING astring[] string to write.
Output:
none
Example:
Please see jou_file_write (p. 635) in the MSC.Acumen, Volume 2: Code Examples.
sf_write_disable ( alogical )
Description:
To control whether the next “$ pcl_func(blah, blah)” gets written to the session file. Depends
upon value of ’flag’.
Input:
LOGICAL alogical TRUE -- don’t record next “$ pcl_func()”.
FALSE - record next “$ pcl_func()”.
Output:
none
Example:
Please see sf_write_disable (p. 641) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
26
Function Descriptions
3.4 Neutral
The following PCL functions are used to export MSC.Patran 2.5 format neutral files. nf_write_all
will create the GFEG and CFEG tables for association between geometry in FEM. Since
MSC.Patran has no limitation on the number of nodes and elements associated to the geometry,
care should be taken when importing neutral files generated from nf_write_all into
MSC.Patran 2.5 so that the 2000 nodes per a single geometric region (Curve, surface or solid)
limit is not exceeded.
Description:
Export data to a neutral file, applying the specified entity and group filters first.
Input:
STRING pname[] Neutral file name.
STRING title[] Neutral file title.
LOGICAL entflg(35 ) Entity filters. TRUE/FALSE toggle flags. Only 22 of the 35
values are used. Visable flags include: #1-8, #10, #11, #14-17,
#19-24, #32, and #33.
LOGICAL grp_all TRUE if ALL groups are to be output.
INTEGER ngroups The number of groups to be output.
INTEGER groudid( ) The IDs of the groups to be output.
Output:
INTEGER <Return Value> 0 if Function was successful.
Example:
Please see neutral_export2 (p. 635) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Write a MSC.Patran 2.5 format neutral file from the open MSC.Patran database. Use the PFEA
translator as a base, add new Phase I. If PFEA is TRUE, write only a PFEA neutral file.
Input:
STRING pname[] Neutral file name.
STRING title[] Neutral file title.
LOGICAL pfea Flag to write only PFEA neutral file if TRUE.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
45000001 Unable to open output file. Aborting Neutral File Export.
8107002 Last command aborted.
45000002 Error writing Finite Element Model. Will try to complete Neutral File.
45000003 Error writing Named Components. Aborting FEM portion of Neutral File. Will
try to complete writing geometry, if any.
Main Index
CHAPTER 3 27
Files
Example:
Please see nf_write (p. 636) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Write a MSC.Patran 2.5 format neutral file from the open MSC.Patran database. Use the PFEA
translator as a base, add new Phase I. If PFEA is TRUE, write only a PFEA neutral file.
Input:
STRING pname[] Neutral file name.
STRING title[] Neutral file title.
LOGICAL pfea Flag to write only PFEA neutral file if TRUE.
LOGICAL entflg( ) Entity filters. TRUE/FALSE toggle flags.
LOGICAL grp_all TRUE if ALL groups are to be output.
INTEGER ngroups The number of groups to be output.
INTEGER groupid( ) The IDs of the groups to be output.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
45000001 Unable to open output file. Aborting Neutral File Export.
45000002 Error writing Finite Element Model. Will try to complete Neutral File.
45000003 Error writing Named Components. Aborting FEM portion of Neutral File. Will
try to complete writing geometry, if any.
Example:
Please see nf_write2 (p. 638) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
28
Function Descriptions
Description:
Given the string classname as the name of a class which has a form currently displayed, this
function will create a framemaker file classname.mif file which contains the form at a scale
factor of scale.
Input:
STRING classname[] Name of the PCL class containing the form to be used.
REAL scale Scale factor for translation. Optional and defaults to 1.0.
Output:
none
Comments:
Creates FrameMaker objects when imported into a FrameMaker document through the import
file menu pick.
Example:
Please see ui_form_to_frame (p. 645) in the MSC.Acumen, Volume 2: Code Examples.
ui_framemaker ( option,[scale] )
Description:
Set automatic framemaker generation. If option is 1, whenever ui_form_display() is called, the
classname is echoed to the history window. This gives you the classname in order to type a
ui_form_to_frame() command. If option is 2, then whenever ui_form_display() is called, the
name of the class is echoed, and a call is automatically made to ui_form_to_frame() with the
specified scale factor. If option is 0, then ui_form_display() reverts back to normal operation.
Input:
INTEGER option Specifies how the function works. See Description above.
REAL scale Scale factor for translation. Optional and defaults to 1.0.
Output:
none
Example:
Please see ui_framemaker (p. 646) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Graphics
4
■ General
■ Element Tables
■ Light Source
■ Color Look-up Tables
■ Deformation Plots
■ Ranges
■ Spectrums
■ Titles
■ Graphics Manager
■ Clipping Planes
Main Index
30
Function Descriptions
4.1 General
The following general purpose utilities affects or reports the state of the graphics manager.
ga_error ()
Description:
Returns a LOGICAL indicating whether the last call to the Graphics application raised an error
condition.
Input:
None.
Output:
LOGICAL <Return Value> Flag indicating if an error occurred.
Example:
Please see ga_error (p. 682) in the MSC.Acumen, Volume 2: Code Examples.
verify_boundaries_display_mgr.initialize ()
Description:
Save graphics properties associated with the current group. Used in conjunction with
verify_boundaries_display_mgr.plot/erase.
Input:
None.
Output:
None.
Example:
Please see verify_boundaries_display_mgr.initialize (p. 831) in the MSC.Acumen, Volume 2:
Code Examples.
verify_boundaries_display_mgr.plot (displ_type )
Description:
Plot the free boundaries by changing display properties.
Input:
STRING displ_type[] “Free_Edges” or “Free_Faces”
Output:
None.
Example:
Please see verify_boundaries_display_mgr.plot (p. 832) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 4 31
Graphics
verify_boundaries_display_mgr.erase ( )
Description:
Erase the free boundary display by resetting graphics properties
Input:
None.
Output:
None.
Example:
Please see verify_boundaries_display_mgr.erase (p. 831) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
32
Function Descriptions
ga_elem_scalar_create ( title,nbr_elems,elem_ids,nbr_values,max_vals,scalars,id )
Description:
Creates a scalar element table.
Input:
STRING title[] Title of table.
INTEGER nbr_elems Number of elements to place in table.
INTEGER elem_ids ( ) Array of element ids.
INTEGER nbr_values ( ) Number of scalar values in each element.
INTEGER max_vals Maximum number of scalar values in any element.
REAL scalars (nbr_elems, Scalar values for all elements.
max_value)
Output:
INTEGER id Id of created element scalar table.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_elem_scalar_create (p. 679) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates a scalar element table given only one value per element.
Input:
STRING title[] Title of table.
INTEGER nbr_elems Number of elements to place in table.
INTEGER elem_ids ( ) Array of element ids.
INTEGER nbr_nodes ( ) Number of nodes in each element.
REAL scalars ( ) One scalar value per element.
Output:
INTEGER id Id of created element scalar table.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_elem_scalar_single_create (p. 681) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 4 33
Graphics
Description:
Creates a vector table.
Input:
STRING title[] Title of table.
INTEGER comp_vect_flag Whether 3 component vector should be displayed or
a resultant vector.
INTEGER sym_flag Whether vector should be displayed symmetrically
on the opposite side.
INTEGER nbr_vectors Number of vectors to place in table.
INTEGER vect_ent_types ( ) Array of entity types.
INTEGER vect_ent_ids ( ) Array of entity ids (if negative, use the location to
signify the location of the vector).
REAL vect_locs (nbr_vectors ,3) Location of vector (only used if vector_ent_ids < 0 ).
REAL normals (nbr_vectors ,3) Normal of vector (includes length).
INTEGER vect_types ( ) Vector types.
0 - no arrow head.
1 - one arrow head.
2 - double head.
3 - triple head.
4 - one arrow head 0-displacements.
5 - double head 0-displacements.
6 - triple head 0-displacements.
7 - one arrow head imposed displacements.
8 - double head imposed displacements.
9 - triple head imposed displacements.
100’s are reserved for markers.
101 - dot.
102 - circle.
103 - X.
104 - +.
105 - filled circle.
106 - square.
107 - filled square.
108 - triangle.
109 - filled triangle.
110 - diamond.
111 - filled diamond.
INTEGER anchor_styles ( ) Anchor styles (1-base, 2-tip, 3-middle).
Main Index
34
Function Descriptions
Description:
Gets a vector table.
Input:
INTEGER id Id of vector table.
Output:
STRING title[] Title of table.
INTEGER comp_vect_flag Whether 3 component vector should be displayed or a
resultant vector.
INTEGER sym_flag Whether vector should be displayed symmetrically on
the opposite side.
INTEGER vect_ent_types ( ) Array of entity types.
INTEGER vect_ent_ids ( ) Array of entity ids (if negative, use the location to
signify the location of the vector).
REAL vect_locs ( ,3) Location of vector (only used if vector_ent_ids < 0 ).
REAL normals ( ,3) Normal of vector (includes length).
INTEGER vect_types ( ) Vector types (1-one arrow head, 2-double head, 3-triple
head, 0-no arrow head).
INTEGER anchor_styles ( ) Anchor styles (1-base, 2-tip, 3-middle).
INTEGER vect_colors ( ) Vector colors.
INTEGER sub_ids ( ) Sub-ids.
INTEGER <Return Value> 0 if function was succesful.
Error Conditions:
11000143 The specified vector result table was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_vector_get (p. 772) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 35
Graphics
Description:
Gets the number of vectors in vector table.
Input:
INTEGER id Id of vector table.
Output:
INTEGER number Number of vectors in table.
INTEGER <Return Value> 0 if function was successful.
Example:
Please see ga_vector_number_get (p. 775) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
36
Function Descriptions
Description:
Get the attenuation of the light.
Input:
STRING name[] Light source name.
Output:
REAL value Attenuation of light (0.0-1.0).
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_attenuation_get (p. 683) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the attenuation of the light.
Input:
STRING name[] Light source name.
REAL value Attenuation of light (0.0-1.0).
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_attenuation_set (p. 684) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the light source color.
Input:
STRING name[] Light source name.
Main Index
CHAPTER 4 37
Graphics
Output:
INTEGER index Light color.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_color_get (p. 685) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the light source color.
Input:
STRING name Light source name.
INTEGER index Light source color index.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000086 The color index for the current lookup table is out of range.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_light_attenuation_set (p. 36). See also ga_light_color_set (p. 686) in the
MSC.Acumen, Volume 2: Code Examples.
ga_light_create ( name )
Description:
Creates a light source.
Input:
STRING name Name of light source.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000036 A light source with the given name is already in the database.
11000097 There is not enough disk space to complete operation.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_create (p. 687) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
38
Function Descriptions
ga_light_delete ( name )
Description:
Delete a light source.
Input:
STRING name[] Name of light source.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_delete (p. 688) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the light source direction.
Input:
STRING name Light source name.
Output:
REAL value (3) Direction of light source.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_direction_get (p. 689) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the light source direction.
Input:
STRING name[] Light source name.
REAL value (3) Direction of light source.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Main Index
CHAPTER 4 39
Graphics
Example:
See example for ga_light_attenuation_set (p. 36). See also ga_light_direction_set (p. 691) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the status whether the icon is displayed.
Input:
STRING name[] Light source name.
Output:
INTEGER value Flag specifying if an icon should be displayed at light
source.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_icon_get (p. 692) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the status whether the icon is displayed.
Input:
STRING name[] Light source name.
INTEGER value Flag specifying if an icon should be displayed at light
source.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_light_attenuation_set (p. 36). See also ga_light_icon_set (p. 693) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
40
Function Descriptions
Description:
Get the intensity of the light.
Input:
STRING name[] Light source name.
Output:
REAL value Intensity of light (0.0-1.0).
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_intensity_get (p. 694) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the intensity of the light.
Input:
STRING name[] Light source name.
REAL value Intensity of light (0.0-1.0).
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_light_attenuation_set (p. 36). See also ga_light_intensity_set (p. 695) in
the MSC.Acumen, Volume 2: Code Examples.
ga_light_lights_get ( lights_list )
Description:
Gets the list of lights.
Input:
None.
Output:
STRING lights_list [ ] ( ) List of lights.
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 4 41
Graphics
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_lights_get (p. 696) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the location of light source.
Input:
STRING name[] Light source name.
Output:
REAL value (3) Location of light source (x,y,z).
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_location_get (p. 697) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the location of light source.
Input:
STRING name[] Light source name.
REAL value (3) Location of light source (x,y,z).
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_light_attenuation_set (p. 36). See also ga_light_location_set (p. 698) in
the MSC.Acumen, Volume 2: Code Examples.
Main Index
42
Function Descriptions
Description:
Get whether the light moves with the model or not.
Input:
STRING name[] Light source name.
Output:
INTEGER value Flag specifying whether light moves with the model or
not.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_movement_get (p. 699) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the status whether the light should move with the model.
Input:
STRING name[] Light source name.
INTEGER value Flag specifying if the light should move with the model.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_light_attenuation_set (p. 36). See also ga_light_movement_set (p. 700)
in the MSC.Acumen, Volume 2: Code Examples.
ga_light_nlights_get ( nlights )
Description:
Gets the number of lights.
Input:
None.
Output:
INTEGER nlights Number of lights.
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 4 43
Graphics
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_nlights_get (p. 702) in the MSC.Acumen, Volume 2: Code Examples.
ga_light_nposted_get ( nlights )
Description:
Gets the number of posted lights.
Input:
None.
Output:
INTEGER nlights Number of posted lights.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_nposted_get (p. 702) in the MSC.Acumen, Volume 2: Code Examples.
ga_light_post ( name )
Description:
Post a light source.
Input:
STRING name[] Name of light source.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_post (p. 703) in the MSC.Acumen, Volume 2: Code Examples.
ga_light_posted_get ( lights_list )
Description:
Gets the list of posted lights.
Input:
None.
Output:
STRING lights_list [ ] ( ) List of lights.
Main Index
44
Function Descriptions
Description:
Get the light source type.
Input:
STRING name[] Light source name.
Output:
STRING value[] Type.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_type_get (p. 705) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the light source type.
Input:
STRING name[] Light source name.
STRING value[] Light source type.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_type_set (p. 706) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 45
Graphics
ga_light_unpost ( name )
Description:
Unpost a light source.
Input:
STRING name[] Name of light source.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000037 The light source name is invalid.
11000104 The specified light source was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_light_unpost (p. 707) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
46
Function Descriptions
Description:
Get the colors defined in LUT.
Input:
STRING name[] LUT name.
Output:
REAL rgb ( ,3) Colors in LUT.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_colors_get (p. 709) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the LUT’s colors.
Input:
STRING name[] LUT name.
INTEGER offset Start position.
INTEGER number Number of colors in LUT.
REAL rgb ( ,3) Triplets of RGB values.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000026 The lookup table is invalid.
11000028 An incorrect offset was specified in lookup table.
11000027 An incorrect number of colors was specified for lookup table.
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_colors_set (p. 710) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 47
Graphics
Description:
Create a lookup table.
Input:
STRING name[] LUT name.
INTEGER number Number of colors in LUT.
REAL rgb ( ,3) Triplets of RGB values.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000026 The lookup table is invalid.
11000027 An incorrect number of colors was specified for lookup table.
11000097 There is not enough disk space to complete operation.
11000025 A lookup table with the given name is already in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_create (p. 712) in the MSC.Acumen, Volume 2: Code Examples.
ga_lookup_current_get ( name )
Description:
Get the current LUT.
Input:
None.
Output:
STRING name[] LUT name.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_current_get (p. 713) in the MSC.Acumen, Volume 2: Code Examples.
ga_lookup_current_set ( name )
Description:
Set the current LUT.
Input:
STRING name[] LUT name.
Output:
INTEGER <Return Value> See error conditions.
Main Index
48
Function Descriptions
Error Conditions:
11000026 The lookup table is invalid.
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_current_set (p. 714) in the MSC.Acumen, Volume 2: Code Examples.
ga_lookup_delete ( name )
Description:
Delete a LUT.
Input:
STRING name[] Display name.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000026 The lookup table is invalid.
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_delete (p. 715) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the number of colors defined in LUT.
Input:
STRING name[] LUT name.
Output:
INTEGER number Number of colors.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000026 The lookup table is invalid.
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_ncolors_get (p. 716) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 49
Graphics
ga_lookup_ntables_get ( ntables )
Description:
Get the number of luts in database.
Input:
None.
Output:
INTEGER ntables Number of luts.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_ntables_get (p. 717) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Rename a LUT.
Input:
STRING old_name[] Old LUT name.
STRING new_name[] New LUT name.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000026 The lookup table is invalid.
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_rename (p. 718) in the MSC.Acumen, Volume 2: Code Examples.
ga_lookup_tables_get ( ntables )
Description:
Get the list of luts in database.
Input:
None.
Output:
STRING ntables [ ] ( ) List of lut names.
INTEGER <Return Value> See error conditions.
Main Index
50
Function Descriptions
Error Conditions:
11000102 The specified lookup table was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_lookup_tables_get (p. 719) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 51
Graphics
Description:
Creates a node deformation table.
Input:
STRING title[] Title of table.
INTEGER nbr_nodes Number of nodes to place in table.
INTEGER node_ids ( ) Array of node ids.
REAL deforms (nbr_nodes,3) Deform values for all nodes.
Output:
INTEGER id Id of created node deformation table.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_node_deform_create (p. 720) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
52
Function Descriptions
4.6 Ranges
Description:
Get whether range is to be displayed using contour values.
Input:
STRING name[] Range name.
Output:
INTEGER flag Flag=1 if contour values are displayed, Flag=0 if fringe
values.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_contour_get (p. 721) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the display type flag.
Input:
STRING name[] Name of range.
INTEGER flag Flag=1 if contour values are displayed
Flag=0 if fringe values.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_contour_set (p. 722) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates a range.
Input:
STRING name[] Name of range.
Main Index
CHAPTER 4 53
Graphics
ga_range_delete ( name )
Description:
Delete a range
Input:
STRING name[] Name of range.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_delete (p. 726) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Check if range exists.
Input:
STRING name[] Range name.
Output:
INTEGER flag Exist flag.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
Example:
See example for ga_range_create (p. 52). See also ga_range_exist_get (p. 728) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
54
Function Descriptions
ga_range_nranges_get ( nranges )
Description:
Gets the number of ranges.
Input:
None.
Output:
INTEGER nranges Number of ranges.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_nranges_get (p. 729) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the number of sub-ranges defined in range.
Input:
STRING name[] Range name.
Output:
INTEGER number Number of sub-ranges.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_nvalues_get (p. 729) in the MSC.Acumen, Volume 2: Code Examples.
ga_range_ranges_get ( ranges )
Description:
Gets the list of ranges.
Input:
None.
Output:
STRING ranges [ ] ( ) List of ranges.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_ranges_get (p. 730) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 55
Graphics
Description:
Rename a range.
Input:
STRING old[] Current name of range.
STRING new[] New name of range.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_rename (p. 731) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the sub-ranges in range given start/end.
Input:
STRING name[] Name of range.
REAL start Start value.
REAL end End value.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_startend_set (p. 733) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the sub-ranges in range given start/end and threshold values.
Input:
STRING name[] Name of range.
REAL start Start value.
REAL end End value.
INTEGER sthresh_fl Whether a starting threshold value is spec.
REAL sthresh Starting threshold value.
Main Index
56
Function Descriptions
Description:
Get the sub-ranges defined in range.
Input:
STRING name[] Range name.
Output:
REAL from ( ) From values.
REAL to ( ) To values.
REAL ranges [ ] ( ) List of ranges.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_values_get (p. 737) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the sub-ranges in range.
Input:
STRING name[] Name of range.
REAL from ( ) From values.
REAL to ( ) To values.
REAL middle ( ) Middle values.
Output:
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 4 57
Graphics
Error Conditions:
11000134 The range name is invalid.
11000136 The specified range was not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_range_values_set (p. 738) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
58
Function Descriptions
4.7 Spectrums
Description:
Get the colors defined in a spectrum.
Input:
STRING name[] Spectrum name.
Output:
INTEGER colors ( ) Color index values.
INTEGER <Return Value> GA error status.
Error Conditions:
11000030 The spectrum name is invalid.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_colors_get (p. 740) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the colors in spectrum.
Input:
STRING name[] Name of spectrum.
INTEGER offset Starting position in color table where colors should be
modified.
INTEGER number Number of colors in spectrum.
INTEGER colors ( ) Color values.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000032 An incorrect offset was specified in spectrum color table.
11000031 An incorrect number of colors was specified for the spectrum.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_colors_set (p. 741) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 59
Graphics
Description:
Get the continuous tone flag.
Input:
STRING name[] Spectrum name.
Output:
INTEGER value Continuous tone flag.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_continuous_get (p. 743) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Set the continuous tone flag.
Input:
STRING name[] Spectrum name.
INTEGER value Continuous tone flag.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_spectrum_colors_set (p. 58). See also ga_spectrum_continuous_set
(p. 744) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates a spectrum color table.
Input:
STRING name[] Name of spectrum table.
INTEGER number Number of colors in spectrum.
INTEGER colors ( ) Color index values.
Main Index
60
Function Descriptions
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000031 An incorrect number of colors was specified for the spectrum.
11000029 A spectrum with the given name is already in the database.
11000097 There is not enough disk space to complete operation.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_create (p. 745) in the MSC.Acumen, Volume 2: Code Examples.
ga_spectrum_current_get ( name )
Description:
Gets the current spectrum.
Input:
None.
Output:
STRING name[] Spectrum name.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_current_get (p. 747) in the MSC.Acumen, Volume 2: Code Examples.
ga_spectrum_current_set ( name )
Description:
Sets the current spectrum.
Input:
STRING name[] Spectrum name.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_current_set (p. 747) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 61
Graphics
ga_spectrum_delete ( name )
Description:
Delete a spectrum table.
Input:
STRING name[] Name of spectrum table.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_delete (p. 749) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the interpolation factor.
Input:
STRING name[] Spectrum name.
Output:
REAL factor Interpolation factor.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_interpolation_get (p. 750) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Set the interpolation factor.
Input:
STRING name[] Spectrum name.
REAL factor Interpolation factor.
Output:
INTEGER <Return Value> See error conditions.
Main Index
62
Function Descriptions
Error Conditions:
11000030 The spectrum name is invalid.
11000033 An incorrect interpolation factor was specified.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_spectrum_colors_set (p. 58). See also ga_spectrum_interpolation_set
(p. 751) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the number of colors defined in spectrum.
Input:
STRING name[] Spectrum name.
Output:
INTEGER number Number of colors.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000030 The spectrum name is invalid.
11000106 The specified spectrum was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_ncolors_get (p. 753) in the MSC.Acumen, Volume 2: Code Examples.
ga_spectrum_nspectrums_get ( nspectrums )
Description:
Gets the number of spectrums.
Input:
None.
Output:
INTEGER nspectrums Number of spectrums.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_nspectrums_get (p. 753) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 4 63
Graphics
Description:
Rename a spectrum.
Input:
STRING old[] Current name of spectrum.
STRING new[] New name of spectrum.
Output:
INTEGER <Return Value> GA Error status
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_rename (p. 754) in the MSC.Acumen, Volume 2: Code Examples.
ga_spectrum_spectrums_get ( spectrums )
Description:
Gets the list of spectrums.
Input:
None.
Output:
STRING spectrums [ ] ( ) List of spectrums.
INTEGER <Return Value> GA error status.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_spectrum_spectrums_get (p. 755) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
64
Function Descriptions
4.8 Titles
Description:
Get the color.
Input:
STRING old_name[] Title name.
Output:
INTEGER size Color.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000152 Invalid title name.
11000151 Title not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_color_get (p. 756) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the color.
Input:
STRING old_name[] Title name.
INTEGER size Title color.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000152 Invalid title name.
11000151 Title not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_color_set (p. 757) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates title.
Input:
STRING name[] Title.
REAL x X percentage.
REAL y Y percentage.
Main Index
CHAPTER 4 65
Graphics
ga_title_delete ( name )
Description:
Delete title.
Input:
STRING name[] Title.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000150 Duplicate title.
11000097 There is not enough disk space to complete operation.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_delete (p. 760) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the font size.
Input:
STRING old_name[] Title name.
Output:
INTEGER size Font size.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000152 Invalid title name.
11000151 Title not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_font_size_get (p. 761) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
66
Function Descriptions
Description:
Set the font size.
Input:
STRING old_name[] Title name.
INTEGER size Font size.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000152 Invalid title name.
11000151 Title not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_font_size_set (p. 762) in the MSC.Acumen, Volume 2: Code Examples.
ga_title_list_get ( list )
Description:
Get the list of titles.
Input:
None.
Output:
STRING list [ ] ( ) List of titles from db.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_list_get (p. 763) in the MSC.Acumen, Volume 2: Code Examples.
ga_title_loc_get ( old_name, x, y )
Description:
Get the x,y location.
Input:
STRING old_name[] Title name.
Output:
REAL x X percentage.
REAL y Y percentage.
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 4 67
Graphics
Error Conditions:
11000152 Invalid title name.
11000151 Title not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_loc_get (p. 764) in the MSC.Acumen, Volume 2: Code Examples.
ga_title_loc_set ( old_name, x, y )
Description:
Set the x, y location.
Input:
STRING old_name[] Title name.
REAL x X percentage.
REAL y Y percentage.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000152 Invalid title name.
11000151 Title not found.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_loc_set (p. 765) in the MSC.Acumen, Volume 2: Code Examples.
ga_title_nposted_get ( num )
Description:
Get the number of posted titles in db.
Input:
None.
Output:
INTEGER num Number of posted titles.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_nposted_get (p. 766) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
68
Function Descriptions
ga_title_num_get ( num )
Description:
Get the number of titles in db.
Input:
None.
Output:
INTEGER num Number of titles.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_num_get (p. 767) in the MSC.Acumen, Volume 2: Code Examples.
ga_title_posted_get ( list )
Description:
Get the list of posted titles
Input:
None.
Output:
STRING list [ ] ( ) List of posted titles from db.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_posted_get (p. 768) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Rename title.
Input:
STRING old_name[] Title.
STRING new_name[] Title.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_title_rename (p. 769) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 69
Graphics
db_get_current_viewport_id (id)
Description:
Retrieves the viewport id associated with the specified viewport.
Input:
None.
Output:
INTEGER id Location for returned value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Example:
Please see db_get_current_viewport_id (p. 657) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function gets the view vector for the view.
Input:
STRING viewport[ ] The name of the viewport. ““ for the current viewport.
Output:
REAL ARRAYvector(3) The three values of the view vector.
INTEGER <Return_value>This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see ga_view_normal_get (p. 777) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will remove the directory from a full path and file name specification.
Input:
STRING orig_name[] This value specifies the full path and file name.
Output:
STRING new_name[] This value will return the file name from the path and
file name specification.
Main Index
70
Function Descriptions
Description:
To convert from device space to subject space.
Input:
INTEGER vp_id Viewport id.
INTEGER dev_pt (2) Point in device space.
Output:
REAL sub_pt (3) Point in subject space.
INTEGER <Return Value> See error conditions.
Error Conditions:
15000028 The viewport must be posted to carry out this operation.
15000025 An error occurred during an operation on the graphics manager display list.
Example:
Please see gm_conv_device_to_subject (p. 778) in the MSC.Acumen, Volume 2: Code Examples.
gm_database_current ( dbname )
Description:
Get the current database from the graphics manager.
Input:
None.
Output:
STRING dbname[] Current database name.
INTEGER <Return Value> GM Error status.
Example:
Please see gm_database_current (p. 780) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function draws an entity in segment or current viewport.
Input:
INTEGER segment_id Segment id number. If <0 then use current viewport.
INTEGER color_id Selected color id of entity.
INTEGER entity_type Type of entity, i.e. curve or surface.
INTEGER entity_id Entity ID
Main Index
CHAPTER 4 71
Graphics
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Condition:
None
Example:
Please see gm_draw_entity (p. 780) in the MSC.Acumen, Volume 2: Code Examples.
gm_fit_view ( flag )
Description:
Make sure limits are up to date and perform a fit view.
Input:
INTEGER flag If TRUE perform fit view no matter what. If FALSE, only
fit view if gm has detected that a fit is necessary.
Output:
INTEGER <Return Value> 1 if a fit view was done, 0 if not.
Example:
Please see gm_fit_view (p. 781) in the MSC.Acumen, Volume 2: Code Examples.
gm_fullcolor_mode ( )
Description:
Return whether or not the device is Fullcolor.
Input:
None.
Output:
LOGICAL <Return Value> Fullcolor status of device.
Example:
Please see gm_fullcolor_mode (p. 782) in the MSC.Acumen, Volume 2: Code Examples.
gm_graphics_off ( )
Description:
Shut down the graphics. Database will be closed and all colors freed.
Input:
None.
Output:
INTEGER <Return Value> GM Error status.
Example:
Please see gm_graphics_off (p. 783) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
72
Function Descriptions
gm_graphics_on ( )
Description:
Start the graphics back up. Called after a GmGraphicsOff call. Loads in the last database,
allocated colors.
Input:
None.
Output:
INTEGER <Return Value> GM Error status.
Example:
Please see gm_graphics_on (p. 783) in the MSC.Acumen, Volume 2: Code Examples.
gm_hilight_clear ( )
Description:
To unhighlight all of the highlighted objects.
Input:
None.
Output:
INTEGER <Return Value> GM Error status.
Example:
Please see gm_hilight_clear (p. 784) in the MSC.Acumen, Volume 2: Code Examples.
Description:
To highlight an entity.
Input:
INTEGER type Entity type.
INTEGER id Entity id.
INTEGER color Color to hilight. 0 - unhilight, -1 - hilight using
preference color.
Output:
INTEGER <Return Value> This return value is unused.
Error Conditions:
15000035 A new pick list could not be created.
Example:
Please see gm_hilight_entity (p. 785) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 73
Graphics
Description:
This function highlights all of the entities in the picklist string.
Input:
STRING string[] Picklist string.
INTEGER color Color to hilight. 0 - unhilight, -1 - hilight using preference
color.
Output:
INTEGER <Return Value> This return value is unused.
Error Condition:
None
Example:
Please see gm_hilight_string (p. 786) in the MSC.Acumen, Volume 2: Code Examples.
Description:
To hilight all of the entities in the select databox.
Input:
WIDGET wid_id Select databox widget id.
INTEGER color Color to hilight. 0 - unhilight, -1 - hilight using
preference color.
Output:
INTEGER <Return Value> This return value is unused.
Error Conditions:
15000035 A new pick list could not be created.
Example:
Please see gm_hilight_widget (p. 787) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Write colors to lookup table.
Input:
INTEGER start Starting location in colormap to write to.
INTEGER ncolors Number of colors to write.
REAL colors (ncolors,3) Array of RGB values.
Output:
INTEGER <Return Value> See error conditions.
Comments:
The color table is organized in three regions; The first region is for the DAKAR color table, the
second for UIMS colors, the third for shading. When calling this routine, the ncolors should not
cross over these boundaries.
Main Index
74
Function Descriptions
Error Conditions:
15000041 User Interface colors not allocated. The colormap is being used.
15000042 Not enough colors were allocated for shading.
Example:
Please see gm_lookup_write (p. 788) in the MSC.Acumen, Volume 2: Code Examples.
gm_mpeg_pause_recording ()
Description:
This function pauses the recording of mpeg images file. This is a void function so there are no
input/output arguments in this function.
Input:
None
Output:
None
Example:
Please see gm_mpeg_pause_recording (p. 789) in the MSC.Acumen, Volume 2: Code Examples.
gm_mpeg_resume_recording ()
Description:
This function resumes the recording of mpeg images file. This is a void function so there are
no input/output arguments in this function.
Input:
None
Output:
None
Example:
Please see gm_mpeg_resume_recording (p. 791) in the MSC.Acumen, Volume 2: Code
Examples.
Output:
INTEGER <Return Value> 0 for success of the function and integer value 1 to 7 for
the failure of the function.
Error Condition:
None
Example:
Please see gm_mpeg_start_recording (p. 793) in the MSC.Acumen, Volume 2: Code Examples.
gm_mpeg_stop_recording ()
Description:
This function stops the recording of an mpeg images file. This is a void function so there are no
input/output arguments in this function.
Input:
None
Output:
None
Example:
Please see gm_mpeg_stop_recording (p. 795) in the MSC.Acumen, Volume 2: Code Examples.
gm_viewport_hardware_mode_get ( hard_flag )
Description:
To get whether viewport is drawn in hardware mode.
Input:
None.
Output:
INTEGER hard_flag If TRUE, viewport is drawn in hardware.
INTEGER <Return Value> This return value is unused.
Example:
Please see gm_viewport_hardware_mode_get (p. 797) in the MSC.Acumen, Volume 2: Code
Examples.
gm_viewport_hardware_mode_set ( hard_flag )
Description:
To set whether viewport is drawn in hardware mode.
Input:
INTEGER hard_flag If TRUE, viewport is drawn in hardware.
Output:
INTEGER <Return Value> This return value is unused.
Main Index
76
Function Descriptions
Example:
Please see gm_viewport_hardware_mode_set (p. 797) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Convert from Viewport id to Viewport name.
Input:
INTEGER id Viewport ID.
Output:
STRING name[] Viewport name.
INTEGER <Return Value> GM error status.
Example:
Please see gm_viewport_id_to_name (p. 798) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Determine the limits of the model in View Space.
Input:
LOGICAL persp If TRUE, this skips perspective. If FALSE, the
perspective setting in the current viewport will be used.
Output:
REAL limits (6) Min/max x, y and z coordinates of the model in View
Space.
INTEGER <Return Value> See error conditions.
Error Conditions:
15000025 An error occurred during an operation on the graphics manager display list.
15000028 The viewport must be posted to carry out this operation.
Example:
Please see gm_viewport_limits_get (p. 799) in the MSC.Acumen, Volume 2: Code Examples.
gm_viewport_ncolors_get ( ncolors )
Description:
To get the number of colors used by the GM.
Input:
None.
Output:
INTEGER ncolors Number of colors.
INTEGER <Return Value> This return value is unused.
Main Index
CHAPTER 4 77
Graphics
Example:
Please see gm_viewport_ncolors_get (p. 800) in the MSC.Acumen, Volume 2: Code Examples.
gm_viewport_refresh_off ( )
Description:
Turn off viewport refresh.
Input:
None.
Output:
INTEGER <Return Value> This return value is unused.
Example:
Please see gm_viewport_refresh_off (p. 800) in the MSC.Acumen, Volume 2: Code Examples.
gm_viewport_refresh_on ( )
Description:
Turn on viewport refresh.
Input:
None.
Output:
INTEGER <Return Value> This return value is unused.
Example:
Please see gm_viewport_refresh_on (p. 801) in the MSC.Acumen, Volume 2: Code Examples.
gm_viewport_refresh_status ( )
Description:
Return the current status of gmRefreshViewports.
Input:
None.
Output:
LOGICAL <Return Value> GM error status.
Example:
Please see gm_viewport_refresh_status (p. 802) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
78
Function Descriptions
Description:
Calculate the center and zoom for a viewport given two corners of a rectangle.
Input:
INTEGER id Viewport id.
INTEGER corn1[2] This value specifies the X and Y coordinates of the upper
left corner of the rectangle defining the new center point
and zoom value for the viewport.
INTEGER corn1[2] This value specifies the X and Y coordinates of the
lower right corner of the rectangle defining the new
center point and zoom value for the viewport.
Output:
REAL cent_x New center in x.
REAL cent_y New center in y.
REAL zoom New zoom.
INTEGER <Return Value> GM error status.
Example:
See example for gm_viewport_id_to_name (p. 76). See also gm_viewport_view_corners
(p. 802) in the MSC.Acumen, Volume 2: Code Examples.
gm_visibility_all ( vstat )
Description:
To set the visibility status of all objects.
Input:
LOGICAL vstat TRUE - plot.
FALSE - erase.
Output:
INTEGER <Return Value> GM error status.
Example:
Please see gm_visibility_all (p. 804) in the MSC.Acumen, Volume 2: Code Examples.
Description:
To set the visibility status of all the entities in the selectdatabox.
Input:
STRING entityList List of entities to plot or erase.
LOGICAL visibility Visibility status: TRUE - visible, FALSE - hidden.
Output:
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 4 79
Graphics
Error Conditions:
15000035 A new pick list could not be created.
Example:
Please see gm_visibility_widget (p. 804) in the MSC.Acumen, Volume 2: Code Examples.
end_vrml_animation ()
Description:
The function ends the process of copying the animation from the screen into a VRML file. This
function has to follow the start_vrml_animation() function after specifying the animation
attributes. The function has no return conditions.
Input:
None
Output:
None
Error Conditions:
None.
Example:
Please see end_vrml_animation (p. 657) in the MSC.Acumen, Volume 2: Code Examples.
Description:
The function prepares an image file of the specified type of the current viewport. It returns an
integer status of 0 on success and 1 on failure.
Input:
STRING image_type[] The typeof the image file – BMP, JPEG, PNG, TIFF, VRML.
STRING filename[] The name of the file to write the image with the file
extensions - bmp, jpg, png, tif, wrl.
STRING version_logic[] String to specify the version logic for writing the image file
– “Overwrite”, “Increment”. Any other string defaults to
“Increment”.
REAL xpcnt The starting percentage of the viewport for the image file in
the horizontal direction.
REAL ypcnt The starting percentage of the viewport for the image file in
the vertical direction.
REAL width_pcnt The ending percentage of the viewport for the image file in
the horizontal direction.
REAL height_pcnt The ending percentage of the viewport for the image file in
the vertical direction.
INTEGER quality An integer specifying the quality of image.
STRING xyplot The image captured will be of the current XY PLOT
window as opposed to the model graphics viewport.
Output:
Main Index
80
Function Descriptions
Description:
The function prepares an image file of the entire viewport with the extension .wrl. It returns an
integer status of 1 on success and 0 on failure.
Input:
STRING filename[] The name of the file to write the image with the file
extension - .wrl.
STRING version_logic[] String to specify the version logic for writing the image file.
– “Overwrite”, “Increment”. Any other string defaults to
“Increment”.
Output:
INTEGER <Return Value> 1 for success and 0 for failure.
Error Conditions:
None.
Example:
Please see gm_write_vrml (p. 807) in the MSC.Acumen, Volume 2: Code Examples.
Description:
The function starts the process of copying the animation from the screen into a VRML file. This
function has to be followed by the end_vrml_animation() function after specifying the
animation attributes. During the course of execution of this function, the animation is sent to
the .wrl file and is not viewed in the current viewport. The function has no return conditions.
Input:
STRING filename[] The name of the file to write the animation file with the file
extension - .wrl
STRING version_logic[] String to specify the version logic for writing the image file
– “Overwrite”, “Increment”. Any other string defaults to
“Increment”.
Output:
None
Error Conditions:
None.
Example:
Please see start_vrml_animation (p. 828) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 81
Graphics
ga_clip_plane_clip_planes_get ( aclips_list )
Description:
Gets the list of arb clipping planes.
Input:
None.
Output:
STRING aclips_list [ ] List of arb clipping planes.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_clip_planes_get (p. 660) in the MSC.Acumen, Volume 2: Code
Examples.
ga_clip_plane_create ( name )
Description:
Creates an arb clipping plane.
Input:
STRING name[] Name of plane.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000154 An arbitrary clipping plane with the given name is already in the database.
11000097 There is not enough disk space to complete operation.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_create (p. 661) in the MSC.Acumen, Volume 2: Code Examples.
ga_clip_plane_delete ( name )
Description:
Delete a plane.
Input:
STRING name[] Name of plane.
Output:
INTEGER <Return Value> See error conditions.
Main Index
82
Function Descriptions
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_delete (p. 662) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the arb clipping plane direction.
Input:
STRING name[] Arb clipping plane name.
Output:
REAL value (3) Direction of arb clipping plane.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_direction_get (p. 663) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the arb clipping plane direction.
Input:
STRING name[] Arb clipping plane name.
REAL value (3) Direction of arb clipping plane.
LOGICAL up_flag Calculate up vector or not.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_direction_set (p. 664) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 4 83
Graphics
Description:
Get the status whether the icon is displayed.
Input:
STRING name[] Arb clipping plane name.
Output:
INTEGER value Flag specifying if an icon should be displayed at arb
clipping plane.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_icon_get (p. 665) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the status whether the icon is displayed.
Input:
STRING name[] Arb clipping plane name.
INTEGER value Up of arb clipping plane.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_clip_plane_direction_set (p. 82). See also ga_clip_plane_icon_set
(p. 666) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the location of arb clipping plane.
Input:
STRING name[] Arb clipping plane name.
Output:
REAL value (3) Location of arb clipping plane (x, y, z).
INTEGER <Return Value> See error conditions.
Main Index
84
Function Descriptions
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_location_get (p. 667) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the location of arb clipping plane.
Input:
STRING name Arb clipping plane name.
REAL value (3) Location of arb clipping plane (x, y, z).
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_clip_plane_direction_set (p. 82). See also ga_clip_plane_location_set
(p. 668) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get whether the arb clipping plane moves with the model or not.
Input:
STRING name[] Arb clipping plane name.
Output:
INTEGER value (3) Flag specifying whether arb clipping plane moves with
the model or not.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_movement_get (p. 669) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 4 85
Graphics
Description:
Set the status whether the arb clipping plane should move with the model.
Input:
STRING name[] Arb clipping plane name.
INTEGER value Flag specifying if the arb clipping plane should move
with the model.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
See example for ga_clip_plane_direction_set (p. 82). See also
ga_clip_plane_movement_set (p. 671) in the MSC.Acumen, Volume 2: Code Examples.
ga_clip_plane_nclip_planes_get ( naclips )
Description:
Gets the number of arb clipping planes.
Input:
None.
Output:
INTEGER naclips Number of arb clipping planes.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_nclip_planes_get (p. 672) in the MSC.Acumen, Volume 2: Code
Examples.
ga_clip_plane_nposted_get ( naclips )
Description:
Gets the number of posted arb clipping planes.
Input:
None.
Output:
INTEGER naclips Number of posted arb clipping planes.
INTEGER <Return Value> See error conditions.
Main Index
86
Function Descriptions
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_nposted_get (p. 673) in the MSC.Acumen, Volume 2: Code Examples.
ga_clip_plane_post ( name )
Description:
Post a plane.
Input:
STRING name[] Name of plane.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_post (p. 674) in the MSC.Acumen, Volume 2: Code Examples.
ga_clip_plane_posted_get ( aclips_list )
Description:
Gets the list of posted arb clipping planes.
Input:
None.
Output:
STRING aclips_list [ ] ( ) List of arb clipping planes.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_posted_get (p. 675) in the MSC.Acumen, Volume 2: Code Examples.
ga_clip_plane_unpost ( name )
Description:
Unpost a plane.
Input:
STRING name[] Name of plane.
Output:
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 4 87
Graphics
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_unpost (p. 677) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the arb clipping plane Up.
Input:
STRING name[] Arb clipping plane name.
REAL value (3) Up of arb clipping plane.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000155 The arbitrary clipping plane name is invalid.
11000158 The specified arbitrary clipping plane was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_clip_plane_up_set (p. 678) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Update the indicated clipping plane’s data to reflect the axes relative rotations about the x, y
and z axes.
Input:
STRING name[] Name of clipping plane.
REAL rx Rotation about the x-axis.
REAL ry Rotation about the y-axis.
REAL rz Rotation about the z-axis.
Output:
REAL new_dir(3) New dir.
REAL new_up(3) New up.
INTEGER <Return Value> Error status.
Example:
Please see clip_plane_ar_calc (p. 654) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
88
Function Descriptions
Description:
Update the indicated clipping plane’s location point to reflect the zoom ( not in db ).
Input:
STRING name[] Name of clipping plane.
REAL factor Factor.
Output:
REAL new_loc(3) New location.
INTEGER <Return Value> Error status.
Example:
Please see clip_plane_zoom_calc (p. 655) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
User Interface
5
■ Error Message Handling
■ List Processor
■ General
■ Widgets
■ Help
Main Index
90
Function Descriptions
appcode ( status )
Description:
Return the multiple of 1000000 ignoring the remainder of status. Used to determine the
application which originated the error status code.
Input:
INTEGER status Application error status code.
Output:
INTEGER <Return Value> Return status of operation.
Example:
Please see appcode (p. 843) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Handle a database error.
Input:
LOGICAL domesg Error message flag: If TRUE, this routine will issue a message if
an error is encountered.
STRING db_routine[] Name of the database routine that detected the error.
STRING caller[] Name of the routine that called the database routine.
INTEGER status Database status code.
INTEGER id Id of item causing the error.
Output:
none
Example:
Please see app_db_err_msg (p. 839) in the MSC.Acumen, Volume 2: Code Examples.
Description:
PCL interface to Message Utility for getting message into string(s).
Input:
INTEGER msgcode Message code to look up.
INTEGER ints() Integer array for formatting.
Main Index
CHAPTER 5 91
User Interface
msg_get_application ( msgcode )
Description:
Get Application code embedded in a message code.
Input:
INTEGER msgcode Message code to look up.
Output:
INTEGER <Return Value> Application code extracted from msgcode.
Example:
Please see msg_get_application (p. 853) in the MSC.Acumen, Volume 2: Code Examples.
msg_string_more ( string )
Description:
Get next piece of message string.
Input:
none
Output:
STRING string[] Return string containing up to the total number of characters
in the message string. The string can be declared to any length.
INTEGER <Return Value> Number of characters left.
Example:
Please see msg_string_more (p. 854) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Output a message to a PCL fio unit.
Input:
INTEGER msgcode Message code to look up.
INTEGER msgtype Message type.
INTEGER appcode Application code for calling application.
INTEGER ints() Integer array for formatting.
Main Index
92
Function Descriptions
Description:
Interface to Message utility to retrieve Message from message database.
Input:
INTEGER msgcode Message code to look up.
INTEGER msgtype Message type.
INTEGER appcode Application code for calling application.
INTEGER ints() Integer array for formatting.
REAL reals() Real array for formatting.
STRING chars[] Character array for formatting.
Output:
STRING string[] String to return first part of message in to.
INTEGER <Return Value> Number of characters left in string.
Example:
Please see msg_to_string (p. 856) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Display a user message with the MSC.Patran user interface and possibly wait for and return a
reply. The “type” determines whether the message is displayed in a form or simply output to
the history window. The “type” also determines what buttons are available in the form. The
“appcode” is a number assigned by the programmer which can be used in conjunction with
ui_answer_message and ui_override_message to supply the message response during session
file playback. Use of duplicate application codes will not generally cause problems but it is
better if they are unique.
Main Index
CHAPTER 5 93
User Interface
Input:
STRING type[] Type of message format desired. May be:
“Info” Informative message
“Warn” Warning message
“Error” Error/Fatal message
“Ack” Acknowledgment message
“Q_YN” -Yes/No Query w/o default
“Q_YN_Y” -Yes/No Query Yes default
“Q_YN_N” -Yes/No Query No default
“Q_YNY” -Yes/No/YesAll Query w/o default
“Q_YNY_N” -Yes/No/YesAll Query No default
“Q_YNYN” -Yes/No/YesAll/NoAll Query w/o default
“Q_YNYN_Y” -Yes/No/YesAll/NoAll Query Yes default
“Q_YNYN_N” -Yes/No/YesAll/NoAll Query No default
“C_YN” -Yes/No Critical w/o default
“C_YN_Y” -Yes/No Critical Yes default
“C_YN_N” -Yes/No Critical No default
“C_YNY” -Yes/No/YesAll Critical w/o default
“C_YNY_N” -Yes/No/YesAll Critical No default
“C_YNYN” -Yes/No/YesAll/NoAll Critical w/o default
“C_YNYN_Y” -Yes/No/YesAll/NoAll Critical Yes default
“C_YNYN_N” -Yes/No/YesAll/NoAll Critical No default
INTEGER appcode Application message code, unique value.
STRING appname[] Name of the application generating the message.
INTEGER message[] Message to display.
Output:
INTEGER <Return Value> 1=Yes, 2=No, 3=Yes All, 4=Abort, 5=No All.
Example:
Please see user_message (p. 905) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Simple note message form with Ok button.
Input:
STRING label[] Form label.
STRING message[] Message text (Include \n for new line).
Output:
none
Example:
Please see notemessage.text (p. 858) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
94
Function Descriptions
Include files
The following include files define symbols used with certain list processor functions:
lpkeywords.i
lpenums.i
geometry_types.i
geometry_coos.i
Description:
Count the number of items of a specified type that are contained in a list.
Input:
INTEGER type Item type ( for example lp_sublist_curve from “lpenums.i” )
STRING list[] Input list from user interface.
LOGICAL domes Error message flag: If TRUE, this routine will issue a message if
LIST produces an error condition during list processing.
Output:
INTEGER status List processor status code: 0 = ok.
INTEGER <Return Value> Number of TYPE items in LIST ( -1 if error encountered ).
Example:
Please see app_count_list (p. 836), and app_count_list (p. 837) in the MSC.Acumen, Volume 2:
Code Examples.
Description:
This function will create a string from an array of integer id and label values.
Input:
INTEGER id_array(numval) This value specifies the integer id and label values used to
create a string.
INTEGER numval This value specifies the number of offsets defined for the
input value id_array.
INTEGER type This value specifies the list processor entity type that the
integer id and label values represent. This value can range
from 1 to 16.
Output:
INTEGER appstr [VIRTUAL] This value returns the string created from the integer id
and label values.
INTEGER <Return Value> This function will always return a value of zero.
Main Index
CHAPTER 5 95
User Interface
Example:
Please see app_ids_to_vstring (p. 840) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will create a list processor string of entity identifiers from a list of label values.
Input:
STRING prefix[] Prefix string, max be null or empty.
INTEGER numvals The number of values in the input list.
INTEGER inlist() The int array input list of ids to convert.
Output:
STRING virtsym[VIRTUAL] Virtual string to receive character list.
INTEGER <Return Value> Success = 0, else message code.
Example:
Please see app_int_array_to_vstring (p. 842) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Transform points from global coordinates to local. Pass the transpose of the rotation matrix
stored in the database. The real array points() which is used as an input to the function returns
the new coordinates of the points.
Input:
REAL ARRAY points() The point coordinates in global frame.
REAL ARRAY trans_vector() This value specifies the translation vector for the local
coordinate frame.
REAL ARRAY rot_matrix() This value specifies the rotation matrix for the local
coordinate frame and is the transpose of the rotation
matrix stored in the database.
INTEGER i_type The reference coordinate frame type:
1=rectangular
2=cylindrical
3=spherical
Any other integer defaults to rectangular.
INTEGER num_points The number of points.
Output:
REAL points() The point coordinates in local frame
Error Conditions:
None.
Example:
Please see asm_u_coord_global_to_local (p. 843) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
96
Function Descriptions
Description:
Get an ASM entity label from the user supplied entity label list.
Input:
INTEGER label_handle Pointer to the list evaluator allocated structure for the
entity labels.
STRING list[] User input list.
LOGICAL last_supplied_label True if the list of user supplied entity labels has been
exhausted prematurely and the remaining entity labels
will be assigned by the database.
LOGICAL domesg Error message flag: If TRUE, this routine will allow the
app_db_err_msg routine to issue a message if an error is
encountered.
Output:
INTEGER label Label of asm entity to create.
INTEGER status The list processor status flag.
=0: successful.
Example:
Please see asm_u_lp_get_entity_label (p. 844) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Uses list processor to get a point.
Input:
STRING point_list[] The point list.
LOGICAL do_message =TRUE if subroutine to handle errors.
Output:
REAL point() The x, y, z coordinates of the point.
INTEGER status =0: successful.
!=0: error, returns error code.
Example:
Please see asm_u_lp_get_point (p. 845) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Uses list processor to get the x, y, z parts of a vector.
Input:
STRING vector[] The vector list.
LOGICAL do_message =TRUE if subroutine to handle errors.
Main Index
CHAPTER 5 97
User Interface
Output:
REAL vector_coord() The x, y, z coordinates of the vector.
INTEGER status =0: successful.
!=0: error, returns error code.
Example:
Please see asm_u_lp_get_vector (p. 846) in the MSC.Acumen, Volume 2: Code Examples.
lp_eval_cleanup ( handle )
Description:
Free allocated memory for list processor operations. This function must be called after all calls
to parse a particular picklist.
Input:
INTEGER handle Handle returned from lp_eval.
Output:
INTEGER <Return Value> Always returns 0.
Example:
Please see lp_eval_cleanup (p. 848) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Create a geometry Picklist from a prefix and array of integers.
Input:
INTEGER geo_keyword Geometry type (From lpkeywords.i)
INTEGER geo_id_count Number of ids in array.
INTEGER geo_id_list ( ) List of ids.
INTEGER text_len_max Number of characters in text.
Output:
STRING text[VIRTUAL] Picklist syntax string.
INTEGER <Return Value> See error conditions.
Error Conditions:
14000199 LpGeometryText: there isn’t enough room to build the output string.
Example:
Please see lp_geometry_text (p. 849) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
98
Function Descriptions
Description:
The purpose of this function is to return the keywords found in MSC.Patran that are used by
MSC.Patran to describe objects, actions, etc.
This function receives parameters in a nonintuitive fashion. The family is the first method of
grouping, and the keyword is next. 1,3 yields point, and 2,3 yields grid. This should show that
they keywords are organized by family, the second parameter. Below is shown all the families,
and then a listing of the LpGEOMETRY family.
Input:
INTEGER keyword Identifies the entity. From lpkeywords.i:
(SAMPLE for family LpGEOMETRY)
#define LpPOINT 1
#define LpGRID 2
#define LpCURVE 3
#define LpLINE 4
#define LpSURFACE 5
#define LpPATCH 6
#define LpSOLID 7
#define LpHYPERPATCH 8
#define LpPOINT_IMMEDIATE 9
#define LpSCREEN_PICK 10
#define LpCOORDINATE_FRAME 11
#define LpVECTOR 12
#define LpAXIS 13
#define LpVECTOR_IMMEDIATE 4
#define LpAXIS_IMMEDIATE 15
#define LpSIDE_NUMBER 16
INTEGER family Identifies the group of entities keyword falls. From
lpkeywords.i:
/* listing of possible families */
#define LpACTION 1
#define LpTECHNIQUE 2
#define LpGEOMETRY 3
#define LpFINITE_ELEMENT 4
#define LpDESIGNATOR 5
#define LpATTRIBUTE 6
#define LpGEOMETRY_TYPES 7
#define LpGEOMETRY_FORMATS 8
#define LpGEOMETRY_COOS 9
#define LpOPERATION 10
#define LpTOKEN_TYPES 11
#define LpELEMENT_TYPES 12
#define LpNUMERIC_STANDIN 13
Main Index
CHAPTER 5 99
User Interface
Output:
STRING text[31] String alias for keyword.
INTEGER <Return Value> Message facility code. See Message System Functions
(p. 114) in the PCL and Customization. 0 indicates no error.
Example:
Please see lp_keyword_text (p. 850) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
100
Function Descriptions
5.3 General
Description:
Return the setting of screen size in pixels and pixels per inch.
Input:
none
Output:
INTEGER xpix The number of pixels in the x screen direction.
INTEGER ypix The number of pixels in the y screen direction.
INTEGER width The pixel width of the screen.
INTEGER height The pixel height of the screen.
INTEGER dpi The number of dots (pixels) per inch in the x direction.
Error Conditions:
14000199 LpGeometryText: there isn’t enough room to build the output string.
Example:
Please see uid_get_screen_info (p. 883) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Return the value of positionIsFrame and the size of the borders in all four directions for a
specific type of window.
Input:
INTEGER type Window type:
0=dialog
1=graphics
2=modal
Output:
LOGICAL pos_is_frame Setting of PositionIsFrame.
INTEGER leftoffset Size of left border.
INTEGER topoffset Size of top border.
INTEGER rightoffset Size of right border.
INTEGER bottomoffset Size of bottom border.
Example:
See example for uid_get_screen_info (p. 100). See also uid_get_border_sizes (p. 882) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 5 101
User Interface
Description:
Return font heights.
Input:
none
Output:
INTEGER font_ht Font height in pixels.
INTEGER textfont_ht Text font height in pixels.
INTEGER spreadfont_ht Spreadsheet font height in pixels.
Example:
Please see uid_get_font_heights (p. 883) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Calculate system dimensions.
Input:
REAL pix_per_inch Set monitor pixels per inch.
REAL new_disp_factor Set the display factor.
Output:
none
Example:
See example for uid_get_font_heights (p. 101). See also uid_set_sys_pix (p. 884) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
Get the current preference from the database.
Input:
STRING user_name[] The current analysis code or type name. See
db_get_default_anal_code.
Output:
STRING real_name[] The modified analysis code or analysis type name.
Example:
Please see uil_app_analysis.get_real_name (p. 885) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
102
Function Descriptions
uil_pcntcomplete.close ()
Description:
This function closes the percent complete form in the MSC.Patran window. The function has no
return value.
Input:
None.
Output:
None.
Error Conditions:
None.
Example:
Please see uil_pcntcomplete.close (p. 886) in the MSC.Acumen, Volume 2: Code Examples.
uil_pcntcomplete.initlz (<label>)
Description:
This function starts the percent complete status form in the MSC.Patran window. The function
has no return value.
Input:
STRING label [] The label for the percent complete form.
Output:
None.
Error Conditions:
None.
Example:
Please see uil_pcntcomplete.initlz (p. 886) in the MSC.Acumen, Volume 2: Code Examples.
uil_primary.get_menubar_id ( )
Description:
Returns the widget id of the main menu bar
Input:
none
Output:
WIDGET <Return Value> Value of the main menu bar id.
Example:
Please see uil_primary.get_menubar_id (p. 887) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 5 103
User Interface
ui_sys_command ( cmd )
Description:
Can be used to create new files outside the MSC.Patran environment, or perform any other unix
task in the invoking window.
Input:
STRING cmd[] Unix command.
Output:
LOGICAL <Return Value> True- Unsuccessful. False- Successful.
Example:
Please see ui_sys_command (p. 873) in the MSC.Acumen, Volume 2: Code Examples.
ui_sys_return ( )
Description:
Return out of the event loop. This will cause the application to return to the operating system
command line.
Input:
none
Output:
none
Example:
Please see ui_sys_return (p. 874) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Return selected text and it’s left and right positions in the string in which it resides.
Input:
WIDGET textwid The widget ID.
Output:
INTEGER left Left position.
INTEGER right Right position.
STRING vstr[ ] This value returns the text selected in the textbox. See the
notes below.
Notes:
This string must be allocated with enough characters to contain the entire string. If enough
characters are not allocated, the text box string returned by this function will be truncated.
A string with enough characters to contain the selected text can be allocated with a call to the
ui_wid_get_vstring () function as shown in the example.
Example:
Please see ui_text_select (p. 874) and ui_text_select (p. 875) in the MSC.Acumen, Volume 2:
Code Examples.
Main Index
104
Function Descriptions
ui_wid_exit ( )
Description:
Call the exit function for all displayed windows.
Input:
none
Output:
none
Example:
Please see ui_wid_exit (p. 877) in the MSC.Acumen, Volume 2: Code Examples.
ui_wid_hide_forms ( parm )
Description:
Call the hide all function for all displayed windows to hide all the displayed windows. Used
for applications such as Insight which need to hide all the forms with one call.
Input:
STRING parm[] “ALL”, “NONGRAPHICS”, “NONMODAL”, “MODAL”,
“GRAPHICS”, “DB” .
Output:
none
Example:
Please see ui_wid_hide_forms (p. 877) in the MSC.Acumen, Volume 2: Code Examples.
ui_exec_command ( cmd )
Description:
Invokes a MSC.Patran command.
Input:
STRING cmd[] Command to be invoked.
Output:
none
Example:
Please see ui_exec_command (p. 861) in the MSC.Acumen, Volume 2: Code Examples.
ui_form_delete ( class )
Description:
Delete the form defined in the given group.
Input:
STRING class[] Form’s group name.
Main Index
CHAPTER 5 105
User Interface
Output:
none
Example:
Please see ui_form_delete (p. 861) in the MSC.Acumen, Volume 2: Code Examples.
ui_form_exists ( class )
Description:
This function will determine if a form has been initialized.
Input:
STRING class[] This value specifies the name of the class that implements the
form.
Output:
LOGICAL <Return Value> TRUE if the given groupname has been initialized.
Notes:
This function will work only with forms that are created throug a call to ui_form_create () made
in an init function that is a member of the class of functions represented by the input value
class. In all other cases this function will return FALSE.
Example:
Please see ui_form_exists (p. 862) in the MSC.Acumen, Volume 2: Code Examples.
ui_form_is_displayed ( class )
Description:
This function will determine if a form is currently being displayed.
Input:
STRING class[] Name of the class to be searched for in the list of currently
displayed forms.
Output:
LOGICAL <Return Value> TRUE: The class form is currently displayed.
FALSE: The class form is NOT displayed.
Notes:
This function will work only with forms that are created through a call to ui_form_create ()
made in an init function that is a member of the class of functions represented by the input
value class. In all other cases this function will return FALSE.
The value specified for the input argument class is case sensitive. If this function does not
behave as described, try changing the case of the name passed with that argument.
Example:
Please see ui_form_is_displayed (p. 864) and ui_form_is_displayed (p. 865) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
106
Function Descriptions
Description:
Create a graphics widget.
Input:
WIDGET parent Pointer to the parent widget.
STRING name[] Name of the graphics widget.
REAL x X location.
REAL y Y location.
REAL width Widget width.
REAL height Widget height.
Output:
WIDGET <Return Value> Pointer to the new widget.
Example:
Please see ui_graph_create (p. 869) and ui_graph_create (p. 870) in the MSC.Acumen,
Volume 2: Code Examples.
ui_is_initialized ( )
Description:
Check to see if the user interface has been initialized.
Input:
none
Output:
LOGICAL <Return Value> User interface has been initialized.
User interface has not been initialized.
Example:
Please see ui_is_initialized (p. 871) in the MSC.Acumen, Volume 2: Code Examples.
ui_get_client ( client_info )
Description:
Get the X client.
Input:
none
Output:
STRING client_info [80] X client.
Example:
Please see ui_get_client (p. 867) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 5 107
User Interface
ui_get_server ( server_info )
Description:
Get the X server.
Input:
none
Output:
STRING server_info[] X server.
Example:
See example for ui_get_client (p. 106). See also ui_get_server (p. 869) in the MSC.Acumen,
Volume 2: Code Examples.
Main Index
108
Function Descriptions
5.4 Widgets
ui_clear_focus ( wid )
Description:
Clear the input focus for a widget.
Input:
WIDGET wid Pointer to the widget.
Output:
none
Example:
Please see ui_clear_focus (p. 860) in the MSC.Acumen, Volume 2: Code Examples.
ui_wid_restore_widget ( wid )
Description:
Restore the values for this widget and all child widgets.
Input:
WIDGET wid Widget ID.
Output:
LOGICAL <Return Value> TRUE if no error.
Example:
Please see ui_wid_restore_widget (p. 878) in the MSC.Acumen, Volume 2: Code Examples.
ui_wid_save_widget ( wid )
Description:
Save the values for this widget and all child widgets.
Input:
WIDGET wid Pointer to the widget.
Output:
LOGICAL <Return Value> TRUE if no error.
Example:
Please see ui_wid_save_widget (p. 880) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 5 109
User Interface
Description:
Highlight a “name” in the listbox.
Input:
WIDGET lbox_id ID of listbox to modify. This is the ID returned by a call to the
PCL functions ui_listbox_items_create or
uil_utils_listbox.create_list
STRING label[] Name in listbox to highlight. This list of names is the list of
labels used by the PCL functions ui_listbox_items_create and
uil_utils_listbox.create_list.
Output:
LOGICAL <Return Value> TRUE if no error.
Example:
Please see uil_utils_listbox.select (p. 899) in the MSC.Acumen, Volume 2: Code Examples.
uil_utils_listbox.select_none ( lbox_id )
Description:
Clear all highlighted names in the listbox.
Input:
WIDGET lbox_id ID of listbox to modify.
Output:
LOGICAL <Return Value> TRUE if no error.
Example:
Please see uil_utils_listbox.select_none (p. 903) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will select or highlight a list of names in a listbox.
Input:
WIDGET list_box_id This value specifies the identifier of the listbox.
STRING label_list[31](list_count)
This value specifies the list of labels in the listbox that will be
highlighted. These labels are defined when the listbox is
created and are typically a maximum of 31 characters long.
INTEGER list_count This value specifies the number of labels specified by the
input value label_list.
Output:
LOGICAL <Return Value> This function will return a value of TRUE if an error has not
occurred and a value of FALSE if an error has occurred.
Error Conditions:
None.
Main Index
110
Function Descriptions
Remarks:
None.
Example:
Please see uil_utils_listbox.select_list (p. 902) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Create a list of items in the listbox from the given names.
Input:
WIDGET lbox_id ID of listbox to modify.
STRING labellist[]() List of names in listbox to create.
INTEGER listcnt Number of items in labellist.
Output:
none
Example:
Please see uil_utils_listbox.create_list (p. 889) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Append a list of items in the listbox from the given names.
Input:
WIDGET lbox_id ID of listbox to modify.
STRING labellist[]() List of name items to append.
INTEGER listcnt Number of items in labellist.
Output:
none
Example:
See example for uil_utils_listbox.create_list (p. 110). See also uil_utils_listbox.append_list
(p. 888) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the selected items in the listbox.
Input:
WIDGET lbox_id ID of listbox to modify.
Output:
STRING items [xx] Items selected. xx needs to be equal to or larger than the
(VIRTUAL) length of the largest item in the listbox.
INTEGER num Number of items selected.
Main Index
CHAPTER 5 111
User Interface
Example:
Please see uil_utils_listbox.get_selected (p. 896) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the unselected items in the listbox.
Input:
WIDGET lbox_id ID of listbox to modify.
Output:
STRING items [xx] Items selected. xx needs to be equal to or larger than the
(VIRTUAL) length of the largest item in the listbox.
INTEGER num Number of items selected.
Example:
Please see uil_utils_listbox.get_unselected (p. 898) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Get all items in the listbox
Input:
WIDGET lbox_id ID of listbox widget
Output:
STRING items [VIRTUAL] Listbox items.
(VIRTUAL)
INTEGER num Number of items in listbox.
Example:
See example for uil_utils_listbox.create_list (p. 110). See also uil_utils_listbox.get_all
(p. 895) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Delete a given item from the set of listbox items.
Input:
WIDGET lbox_id Id of listbox to modify.
STRING name[] Name in listbox to delete.
Output:
LOGICAL <Return Value> TRUE if no error, FALSE if name does not exist.
Example:
See example for uil_utils_listbox.create_list (p. 110). See also uil_utils_listbox.delete_item
(p. 890) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
112
Function Descriptions
Description:
Delete a list of given items from the listbox.
Input:
WIDGET lbox_id Id of listbox to modify.
INTEGER nitems The number of items in the list.
STRING itemlist[]() Names in listbox to delete.
Output:
none
Example:
See example for uil_utils_listbox.create_list (p. 110). See also
uil_utils_listbox.delete_item_list (p. 892) in the MSC.Acumen, Volume 2: Code Examples.
uil_utils_listbox.delete_selected ( lbox_id )
Description:
Deletes from the listbox the selected items.
Input:
WIDGET lbox_id Id of listbox to modify.
Output:
none
Example:
Please see uil_utils_listbox.delete_selected (p. 893) in the MSC.Acumen, Volume 2: Code
Examples.
uil_utils_listbox.select_all ( lbox_id )
Description:
Highlight all names in the listbox.
Input:
WIDGET lbox_id Id of listbox to modify.
Output:
none
Example:
See example for uil_utils_listbox.select (p. 109). See also uil_utils_listbox.select_all (p. 901)
in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 5 113
User Interface
5.5 Help
Description:
Get the help keyword registered for the given widget.
Input:
WIDGET wid Pointer to the widget.
Output:
STRING help[] Keyword used for searching.
Example:
Please see ui_get_help (p. 867) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Register help for the given widget.
Input:
WIDGET wid Pointer to the widget.
STRING help[] Keyword used for searching.
Output:
none
Example:
Please see ui_register_help (p. 871) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Adds a record to the help table, providing the connection from the keyword in the widget to the
help file and to the entry in that file.
Input:
STRING keyword[] Unique keyword to locate the marker in the frame document.
STRING path[] Path to the frame document.
STRING marker[] Frame hypertext marker.
Output:
INTEGER <Return Value> 0 for no error.
1 for duplicate.
Comments:
When the help keyword is triggered due to a request for help, the frame document as specified
in the path is opened and positioned to the specified hypertext marker. The path given is
typically a partial path to a help file, such as “userapp/appinfo.doc”. MSC.Patran will search
for this file path in each directory in the PCL path starting with the current directory. If not
Main Index
114
Function Descriptions
found MSC.Patran will then see if a unix environment variable “P3_HELP_DIRECTORY” is set
and if so will search under this directory for the file. If still not found, MSC.Patran will look for
a directory called “helpfiles” in the PCL path and look for the file path under that directory.
Used in conjunction with ui_register_help.
Example:
Please see ui_add_help (p. 858) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Group
6
■ General
■ FEM
■ Geometry
■ Graphics Application
Main Index
116
Function Descriptions
6.1 General
General functions for managing groups in the model database.
Description:
Retrieves the group name associated with the specified group id.
Input:
INTEGER grp_id Id to be retrieved from the database.
Output:
STRING name[31] Name of the group.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_get_group_name (p. 928) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Counts all entities in the specified group name.
Input:
STRING name[] Pointer to a string containing the name of the group.
INTEGER type The type of entity to be counted.
Output:
INTEGER count Location to receive the resulting entity count.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_count_entities_in_group (p. 918) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Counts all groups in which a specified entity resides
Input:
INTEGER id The id of the entity for which the group count is desired.
INTEGER type The type of entity to be counted.
Output:
INTEGER count Location to receive the resulting entity count.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_count_groups_for_entity (p. 919) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 6 117
Group
Description:
Gets all group ids associated with the specified entity type and id.
Input:
INTEGER id The id of the entity of the type specified.
INTEGER type The type of entity to be counted.
INTEGER count The number of groups for which storage has been
allocated by the calling routine.
Output:
INTEGER group_list() Array containing the ids of the groups associated with the
input id.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
See example for db_count_groups_for_entity (p. 116). See also db_get_groups_for_entity
(p. 929) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the group’s members of a given entity type.
Input:
STRING group[] Name of the group from which to get the list of members.
INTEGER entity_type Type of entity members to get.
DbTypPoint 1
DbTypCurve 2
DbTypSurface 3
DbTypSolid 4
DbTypNode 123
DbTypElem 124
DbTypMpc 161
Output:
STRING members [VIRTUAL]
INTEGER <Return Value> List of group members of the given entity type.
= 0, Function was successful.
Example:
See also uil_entity_group_members_get (p. 993) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
118
Function Descriptions
6.2 FEM
Utilities for manipulating nodes, elements and MPCs in a group or groups.
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. 930) in the MSC.Acumen, Volume 2: Code Examples.
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.
Main Index
CHAPTER 6 119
Group
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 (p. 118). See also
db_count_groups_using_mpc (p. 920) in the MSC.Acumen, Volume 2: 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. 924) in the MSC.Acumen, Volume 2: Code Examples.
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 (p. 119). See also db_get_orphan_mpcs (p. 932) in
the MSC.Acumen, Volume 2: Code Examples.
Main Index
120
Function Descriptions
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 (p. 120).
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 (p. 120). See also count_orphan_elements (p. 914) in
the MSC.Acumen, Volume 2: 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 (p. 121).
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 (p. 121). Please see count_orphan_nodes (p. 915) in the
MSC.Acumen, Volume 2: Code Examples.
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 (p. 120).
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. 988) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 6 121
Group
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 (p. 120).
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. 989) in the MSC.Acumen, Volume 2: Code Examples.
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. 917) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
122
Function Descriptions
6.3 Geometry
Utilities for managing points, curves, surfaces, and solids in conjunction with groups.
db_count_orphan_curves ( count )
Description:
Returns the number of curves not in a group.
Input:
none
Output:
INTEGER count The number of curves not in a group.
INTEGER <Return Value> Returns the success or failure of the routine
Example:
Please see db_count_orphan_curves (p. 921) and db_count_orphan_curves (p. 922) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
This function will return the label ids for curves that are not assigned to a group.
Input:
INTEGER count This value specifies the number of offsets defined for the
output value label_id.
Output:
INTEGER entity_id() This value returns the label id values of the orphan
curves.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Example:
See example for db_count_orphan_curves (p. 122) for more information. See also
db_get_orphan_curves (p. 931) in the MSC.Acumen, Volume 2: Code Examples.
db_count_orphan_points ( count )
Description:
Returns the number of points not in a group.
Input:
none
Output:
INTEGER count The number of points not in a group.
INTEGER <Return Value> Returns the success or failure of the routine
Main Index
CHAPTER 6 123
Group
Example:
Please see db_count_orphan_points (p. 925) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the point entities not in a group.
Input:
INTEGER count Max number of entities returned.
Output:
INTEGER entity_id() Array of orphan eitity ids.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
See example for db_count_orphan_points (p. 122). See also db_get_orphan_points (p. 933)
in the MSC.Acumen, Volume 2: Code Examples.
db_count_orphan_solids ( )
Description:
Returns the number of solids not in a group.
Input:
none
Output:
INTEGER count The number of solids not in a group.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_count_orphan_solids (p. 926) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the solid entities not in a group.
Input:
INTEGER count Max number of entities returned.
Output:
INTEGER entity_id() Array of orphan entity ids.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
See example for db_count_orphan_solids (p. 123). See also db_get_orphan_solids (p. 934)
in the MSC.Acumen, Volume 2: Code Examples.
Main Index
124
Function Descriptions
db_count_orphan_surfaces ( count )
Description:
Returns the number of surfaces not in a group.
Input:
none
Output:
INTEGER count The number of surfaces not in a group.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_count_orphan_surfaces (p. 927) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the surface entities not in a group.
Input:
INTEGER count Max number of entities returned.
Output:
INTEGER entity_id() Array of orphan entity ids.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
See example for db_count_orphan_surfaces (p. 124). Please see db_get_orphan_surfaces
(p. 935) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Counts all of the The MacNeal-Schwendler Corporation entities (grid, line, patch, hpat,
coordinate frames, nodes, and elements) in a group.
Input:
INTEGER groupId The id of the group.
Output:
INTEGER count(7) The count for each of the entities:
(1) - grid
(2) - line
(3) - patch
(4) - hpat
(5) - coordinate frames
(6) - nodes
(7) - elements
INTEGER status Success or an error code.
Example:
Please see asm_db_count_asm_in_group (p. 908) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 6 125
Group
Description:
Gets the labels and xyz coordinates of all the grids in a group.
Input:
INTEGER groupId The id of the group.
Output:
INTEGER gridLabels() The grid labels.
REAL xyzCoordinates() The xyz coordinates.
INTEGER status Success or an error code.
Error Conditions:
38000617 ERROR Retrieving geometric entity definition of type PDA %A% from the
database.
Example:
Please see asm_db_get_grids_in_group (p. 909) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will get the labels, hpat vertex ids, and the xyz coordinates of all the hpats in a
group.
Input:
INTEGER groupid This value specifies the id of the group.
Output:
INTEGER hpatlabels() This value returns the hpat label values. The number of
offsets for this array should equal the number of solids
defined for the group.
INTEGER hpatvertexIds() This value returns the hpat vertex ids. The number of
offsets for this array should equal the number of solids
defined for the group times 8.
REAL geometriccoeff() This value returns the xyz coordinates. The number of
offsets for this array should equal the number of solids
defined for the group times 192.
INTEGER status This value returns a value of 0 when the function executes
successfully and a non zero value to indicate a change in
status or an error.
Remarks:
The number of solids defined in a group can be found by calling the function
db_count_entities_in_group (p. 116). with the entity type value set to 4.
Example:
Please see asm_db_get_hpats_in_group (p. 910) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
126
Function Descriptions
Description:
Gets the labels and xyz coordinates of all the lines in the model.
Input:
INTEGER groupId The id of the group.
Output:
INTEGER linelabels() The line labels.
REAL geometriccoefficients() The xyz coordinates.
INTEGER status Success or an error code.
Error Conditions:
38000617 ERROR Retrieving geometric entity definition of type PDA %A% from the
database.
Example:
Please see asm_db_get_lines_in_group (p. 911) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will get the labels and the xyz coordinates of all of the patches in a group.
Input:
INTEGER groupid This value specifies the id of the group.
Output:
INTEGER patchlabels() This value returns the patch label values. The number of
offsets for this array should equal the number of surfaces
defined for the group.
REAL geometriccoeff() This value returns the xyz coordinates. The number of
offsets for this array should equal the number of surfaces
defined for the group times 48.
INTEGER status This value returns a value of 0 when the function executes
successfully and a non zero value to indicate a change in
status or an error.
Remarks:
The number of surfaces defined in a group can be found by calling the function
db_count_entities_in_group (p. 116) with the entity type value set to 3.
Example:
Please see asm_db_get_patches_in_group (p. 913) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 6 127
Group
Description:
Counts all the IGES entity types IN A GROUP.
Input:
INTEGER groupId The id of the group.
Output:
INTEGER count (15) The count for each of the entities:
(1) - IGES_Nurb_Curve.
(2) - IGES_Cubic_Spline.
(3) - IGES_Arc.
(4) - IGES_Composite_Curve.
(5) - IGES_Line.
(6) - IGES_Conic.
(7) - IGES_PieceWise_Linear.
(8) - IGES_Offset_Curve.
(9) - IGES_Nurb_Surface.
(10) - IGES_Trimmed_Surface.
(11) - IGES_BiCubic_Patch_Network.
(12) - IGES_Surface_Of_Revolution.
(13) - IGES_Ruled_Surface.
(14) - IGES_Tabulated_Cylinder.
(15) - IGES_Offset_Surface.
INTEGER <Return Value> See error conditions.
Error Conditions:
1000025 Error attempting to allocate virtual memory.
Example:
Please see sgm_db_count_iges_in_group (p. 990) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will get all the IGES entity types in a group.
Input:
INTEGER groupid This value specifies the id of the group.
INTEGER typecode This value specifies the type code of the group. See the
remarks below.
Output:
INTEGER entityids() This value returns the entity id values. This array must be
allocated with enough offsets to list all of the entity id
values assigned to the group. Use a call to the PCL
function sgm_db_count_iges_in_group() to get a count of
the number of offsets required.
INTEGER id_count This value returns the number of id values of the
specified type returned by the value entityids.
Main Index
128
Function Descriptions
Main Index
CHAPTER 6 129
Group
Description:
Changes the current load vector table associated with multiple groups.
Input:
INTEGER ngroups Number of groups.
INTEGER group_ids ( ) Groups to assign vector table to.
INTEGER vector_id Load vector id.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000143 The specified vector result table was not found.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_groups_load_vector_set (p. 984) and ga_groups_load_vector_set (p. 986) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the current color associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER color Color of group (0-15).
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_color_get (p. 936) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
130
Function Descriptions
Description:
Modifies the current color associated with a group.
Input:
STRING name[] Group name.
INTEGER color Color id (0-15).
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_color_set (p. 937) in the MSC.Acumen, Volume 2: Code Examples.
ga_group_current_get ( name )
Description:
Get the current group.
Input:
none
Output:
STRING name[] Group name.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000121 There is not a current group defined.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_current_get (p. 938) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the deform flag associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER flag Deform flag.
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 6 131
Group
Error Conditions:
11000050 The group name is invalid.
11000098 A fatal error has occurred in the database. Database is corrupted.
11000105 The specified group was not found in the database.
Example:
Please see ga_group_deform_get (p. 939) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Sets whether a deform plot should be displayed.
Input:
STRING name[] Group name.
INTEGER flag If Flag=1 display deform plot, If Flag=0 don’t display.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000098 A fatal error has occurred in the database. Database is corrupted.
11000105 The specified group was not found in the database.
Example:
Please see ga_group_deform_set (p. 940) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the name of the current display property list associated with a group.
Input:
STRING name[] Group name.
Output:
STRING dname[] Name of the display property list.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000118 There is no display property posted to the group.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_display_get (p. 941) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
132
Function Descriptions
Description:
Gets the scalar table associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER scalar_id Scalar id.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_elem_scalar_get (p. 943) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Changes the current element scalar table associated with a group.
Input:
STRING name[] Group name.
INTEGER scalar_id Element scalar id.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000137 The specified element scalar table was not found.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_elem_scalar_set (p. 944) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a sorted list of the entities contained in a group.
Input:
STRING name[] Group name.
INTEGER type Entity type.
INTEGER range (3) Id range of members to return (1,2) and (3) max size of
conversion string.
INTEGER number Number of entities in group.
Main Index
CHAPTER 6 133
Group
Output:
STRING entities[] Entity labels.
INTEGER <Return Value> See error conditions.
Comments:
Called from PCL ( uil_group_modify.pcl, uil_group_modify_members.pcl,
uil_group_show_members).
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
11000127 The group does not have any entities in it.
Example:
Please see ga_group_entities_get (p. 946) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Determines if a group with the specified name exists.
Input:
STRING name[] Group name.
Output:
INTEGER flag Existence flag.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_exist_get (p. 947) in the MSC.Acumen, Volume 2: Code Examples.
ga_group_groups_get ( group_list )
Description:
This function will get a list of the currently defined groups.
Input:
none
Output:
STRING group_list [ ] () List of groups.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Main Index
134
Function Descriptions
Example:
#
# Purpose : This file gives an example of a call to the
# function ga_group_groups_get()
#
# This function gets the list of all the groups.
# This file opens a database spool.db which has
# two groups “default_group”and “fem_model”group.
# This file gets the list of all the groups in
# the database “spool.db”.
#
# Before running this file the database should be
# created by running the session file “spool.ses”
# To run this session file, first start
# a session of MSC.Patran,then run this session
# file by “File”,”Session”,”Play” pulldown
# menus on the menu bar.
#
# The ga_group_groups_get has the following arguments:
# ga_group_groups_get
# ( group_list )
# -------------------------------------------------------------------
# Variable Declaration
#
STRING s_group_list[32](VIRTUAL)
INTEGER i_return_value
INTEGER i_group_count
# -------------------------------------------------------------------
# opening the existing database spool.db
uil_file_open.go(“spool.db”)
i_return_value =
ga_group_ngroups_get
( i_group_count )
dump i_return_value
dump i_group_count
i_return_value =
sys_allocate_array ( s_group_list, 1, i_group_count )
dump i_return_value
i_return_value = @
ga_group_groups_get @
( s_group_list )
dump i_return_value
# -------------------------------------------------------------------
Main Index
CHAPTER 6 135
Group
Description:
Gets the current label flag associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER flag Label flag.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_label_get (p. 949) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Sets whether labels should be displayed.
Input:
STRING name[] Group name.
INTEGER flag If Flag=1 display deform plot, If Flag=0 don’t display.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_label_set (p. 950) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the load vector table associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER vector_id Vector id.
INTEGER <Return Value> See error conditions.
Main Index
136
Function Descriptions
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_load_vector_get (p. 951) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Changes the current load vector table associated with a group.
Input:
STRING name[] Group name.
INTEGER vector_id Load vector id.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000143 The specified vector result table was not found.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_load_vector_set (p. 953), ga_group_load_vector_set (p. 954), and
ga_group_load_vector_set (p. 956) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the number of entities of a particular type contained in the specified group.
Input:
STRING name[] Group name.
INTEGER type Entity type.
Output:
INTEGER number Number of entities.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_nentities_get (p. 958) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 6 137
Group
ga_group_ngroups_get ( group_count )
Description:
This function will get the number of currently defined groups.
Input:
None.
Output:
INTEGER group_count This value will return the number of groups that are
currently defined.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_groups_get (p. 948) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Changes the current deform table associated with a group.
Input:
STRING name[] Group name.
INTEGER deform_id Node deform id.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000139 The specified nodal deformation table was not found.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_node_deform_set (p. 959) and ga_group_node_deform_set (p. 960) in
the MSC.Acumen, Volume 2: Code Examples.
Main Index
138
Function Descriptions
Description:
Gets the current precision flag associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER flag Flag=1 if high precision, Flag=0 if fast.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_precision_get (p. 962) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the result vector table associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER vector_id Vector id.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_result_vector_get (p. 963) and ga_group_result_vector_get (p. 965) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Changes the current result vector table associated with a group.
Input:
STRING name[] Group name.
INTEGER vector_id Result vector id.
Output:
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 6 139
Group
Error Conditions:
11000050 The group name is invalid.
11000143 The specified vector result table was not found.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Pleae see ga_group_result_vector_set (p. 967) and ga_group_result_vector_set (p. 969) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the current select status of a group.
Input:
STRING name[] Group name.
Output:
INTEGER flag 1 or 0 if selectable or not.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_selectable_get (p. 971) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Modifies the current setting of the group selectable flag.
Input:
STRING name[] Group name.
INTEGER flag 1 or 0 if selectable or not.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_selectable_set (p. 973) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
140
Function Descriptions
Description:
Gets the render style associated with a group.
Input:
STRING name[] Group name.
Output:
STRING style[] Render style.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_style_get (p. 974) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Modifies the render style associated with a group.
Input:
STRING name[] Group name.
STRING style[] Render Style.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000013 The render style is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_style_set (p. 975) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the load vector flag associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER flag Vector flag.
INTEGER <Return Value> See error conditions.
Main Index
CHAPTER 6 141
Group
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_vector_load_get (p. 977) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Flags if a load vector plot should be displayed with group.
Input:
STRING name[] Group name.
INTEGER flag If Flag=1 display vector plot, If Flag=0 don’t display.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_vector_load_set (p. 978) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the load vector flag associated with a group.
Input:
STRING name[] Group name.
Output:
INTEGER flag Vector flag.
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_vector_result_get (p. 979) and ga_group_vector_result_get (p. 980) in
the MSC.Acumen, Volume 2: Code Examples.
Main Index
142
Function Descriptions
Description:
Flags if a result vector plot should be displayed with group.
Input:
STRING name[] Group name.
INTEGER flag If Flag=1 display vector plot, If Flag=0 don’t display.
Output:
INTEGER <Return Value> See error conditions.
Error Conditions:
11000050 The group name is invalid.
11000105 The specified group was not found in the database.
11000098 A fatal error has occurred in the database. Database is corrupted.
Example:
Please see ga_group_vector_result_set (p. 982) and ga_group_vector_result_set (p. 983) in
the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Geometry
7
■ General
■ Point
■ Curve
■ Surface
■ Solid
■ Coordinate Frame
■ Point/Curve Relation
■ Curve/Surface Relation
■ Surface/Solid Relation
■ Transform
Main Index
144
Function Descriptions
7.1 General
A set of general utilities are provided to manage geometry in the model database.
Description:
Returns the geometry type for the given label and entity_type.
Input:
INTEGER id_label The label id of the piece of geometry.
INTEGER entity_type The type of entity.
point = 1
curve = 2
surface = 3
solid = 4
Output:
STRING geom_type[] The type of geometry.
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:
13000161 The geometric type is not defined.
13000134 The specified entity type was not found.
Example:
Please see db_get_geom_type (p. 1030) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will return the size of a block of data defining a specific piece of geometry.
Input:
INTEGER entitytype This value specifies the type of the geometry for which
the data block will be retrieved. See the remarks listed
below for more information.
INTEGER entityid This value specifies the identifier for the geometry for
which the data block will be retrieved.
Output:
INTEGER blobsize The value returns the size of the of the array needed to
hold the block of data defining the geometry.
INTEGER status This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
38000003 No blob provided.
Main Index
CHAPTER 7 145
Geometry
Remarks:
The input value entitytype can be set to the following values:
Value Description
Description:
Gets a geometric coo and type from the database given an id.
Input:
INTEGER dbtype The dbtype from dbtypes.h.
INTEGER entityid The Entity ID.
Output:
INTEGER compoforg The company of origin.
From include file geometry_coos.i
Main Index
146
Function Descriptions
Description:
Modifies the label of an existing geometric entity.
Input:
INTEGER entitytype Type of entity from DbTypes.
INTEGER entityid Id of the entity to change.
INTEGER newlabel Label to be assigned to the entity.
Output:
INTEGER <Return Value> 0: no error.
Error Conditions:
10000052 %A% %I% is not an ASM Entity and was not written to the MSC.Patran Neutral
File.
Example:
Please see sgm_db_modify_entity_label (p. 1089) in the MSC.Acumen, Volume 2: Code
Examples.
sgm_incongruent_geom_exist ( )
Description:
Initialize the geometry list.
Input:
none
Output:
INTEGER <Return Value> 0: no error.
1: fatal error.
Example:
Please see sgm_incongruent_geom_exist (p. 1112) in the MSC.Acumen, Volume 2: Code
Examples.
sgm_incongruent_geom_display ( )
Description:
Creates a graphical display list for curves and surfaces, but displays all unique points and
solids. Need to call sgm_verify_surface_boundary first.
Input:
none
Output:
INTEGER <Return Value> 0 if function was successful.
Comments:
This routine cannot display points or solids because of graphics restrictions.
Example:
Please see sgm_incongruent_geom_display (p. 1111) in the MSC.Acumen, Volume 2: Code
Main Index
Examples.
CHAPTER 7 147
Geometry
sgm_incongruent_geom_seg_exit ( )
Description:
Delete the segment list to clear graphics.
Input:
none
Output:
INTEGER <Return Value> Success returned, else fatal error.
Comments:
Used with sgm_incongruent_geom_exist() and sgm_incongruent_geom_display()
Example:
See example for sgm_incongruent_geom_exist (p. 146). See also
sgm_incongruent_geom_seg_exit (p. 1112) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Calculates a transformation matrix for a mscale transformation.
Input:
REAL coord_org (3) Reference coordinate frame origin.
REAL coord_rmat (9) Reference coordinate frame rotation matrix.
REAL translation (3) Translation vector.
REAL scale (3) Scale factors.
REAL axis_base (3) Axis base (for rotation).
REAL axis_tip (3) Axis tip (for rotation).
REAL rotation_angle Rotation angle.
Output:
REAL tmat (16) This value returns the calculated transformation matrix.
INTEGER <Return Value> SUCCESS or error code.
Example:
Please see sgm_u_calc_mscale_mat (p. 1127) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Transform points from global coordinates to local. Pass the transpose of the rotation matrix
stored in the database.
Input:
REAL p(3,npts) The point coordinates in global frame.
Main Index
148
Function Descriptions
REAL t(3) This value specifies the translation vector for the local
coordinate frame.
REAL r(3,3) This value specifies the rotation matrix for the local
coordinate frame and is the transpose of the rotation
matrix stored in the database.
INTEGER ityper The reference coordinate frame type:
1=rectangular
2=cylindrical
3=spherical
INTEGER npts The number of points.
Output:
REAL p(3,npts) The point coordinates in local frame.
Example:
Please see asm_u_coord_global_to_local (p. 1009) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 7 149
Geometry
7.2 Point
Description:
This function creates a grid in the database and the graphical user-interface.
Input:
REAL ARRAY location(3) The xyz location of the point.
INTEGER grid_label Label of next grid to create.
=0 Database will use the next highest label for the next
grid to create. If grid found within tolerance, returns
currently existing grid label, otherwise returns new label.
>0 User-definable.
LOGICAL yes_to_all = TRUE if grid already exists in database with same label
and user wants to overwrite old grid with new grid.
LOGICAL no_to_all = TRUE if grid already exists in database with same label
and user does not want to overwrite old grid with new
grid.
LOGICAL yes_to_all_dup = TRUE if grid already exists in database within tolerance
and same label and user wants to create duplicate grids.
LOGICAL no_to_all_dup = TRUE if grid already exists in database within tolerance
and same label and user does not want to create duplicate
grids.
Output:
INTEGER status The value of 0 is returned when executed successfully
and a non zero value to indicate a change in status or an
error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see asm_db_create_grid (p. 1002) in the MSC.Acumen, Volume 2: Code Examples
db_count_point ( count )
Description:
Counts all points in the database.
Input:
none
Output:
INTEGER count The integer number of points in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Main Index
150
Function Descriptions
Example:
Please see db_count_point (p. 1017) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_point_label ( label )
Description:
Gets the largest point label from the database.
Input:
none
Output:
INTEGER label Highest point label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_max_point_label (p. 1032) in the MSC.Acumen, Volume 2: Code Examples.
db_get_min_point_label ( label )
Description:
Gets the smallest point label from the database.
Input:
none
Output:
INTEGER label Lowest point label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_min_point_label (p. 1036) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the number of higher order entities associated with this point.
Input:
INTEGER point_id The point id.
Output:
INTEGER assoc_count The number of higher order entities associated with this
point.
INTEGER <Return Value> Returns the success or failure of the routine.
Main Index
CHAPTER 7 151
Geometry
db_get_point_id ( label, id )
Description:
Gets a point id from the database given a point label.
Input:
INTEGER label The unique external point ID identifying the point to be
retrieved from the database.
Output:
INTEGER id The unique internal point id identifying the point
retrieved from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_point_id (p. 1043) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a point label from the database given a point id.
Input:
INTEGER id The unique internal point id identifying the point to be
retrieved from the database.
Output:
INTEGER label The unique external point id identifying the point to be
retrieved from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_point_label (p. 1043) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a geometric coo and type from the database given an id.
Input:
INTEGER id The association of the information to be retrieved from
the database.
Main Index
152
Function Descriptions
Output:
INTEGER coo The geometric company of origin stored in the database.
INTEGER type The geometric type of data stored in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_point_coo_and_type (p. 1042) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Get the next highest grid label from the database.
Input:
LOGICAL domessage Tells the routine to issue an error message if an error
occurs.
Output:
INTEGER integerlabel The next highest grid label.
STRING stringlabel[] The next highest grid label.
INTEGER <Return Value> Success or an error code.
Example:
Please see asm_db_get_next_grid_label (p. 1005) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Get the geometric definition of a point from the database.
Input:
INTEGER pointid Id of the point.
Output:
REAL xyz (3) Global coordinates of a point.
INTEGER status Success or an error code.
Example:
Please see sgm_db_get_point (p. 1086) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function checks the equivalence of two points and deletes one of the duplicate points.
Input:
Main Index
CHAPTER 7 153
Geometry
Output:
STRING created_ids[ ] This value returns the created ID list.
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see sgm_edit_point_equivalence (p. 1093) in the MSC.Acumen, Volume 2: Code
Examples.
Output:
INTEGER num_point The number of points within the tolerance around the
location.
INTEGER point_ids(num_points) Point ids of the points.
ARRAY
REAL distances(num_points) Distances of the points from the location specified.
ARRAY
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_get_close_points (p. 1106) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
154
Function Descriptions
Description:
Get the nodes close to the given points within the geometric tolerance.
Input:
REAL geotol The geometric tolerance.
INTEGER num_pts The number of the given points.
INTEGER pt_id_list (num_pts) The ID list of the given points.
Output:
INTEGER num_nodes ( ) The number of the nodes found.
INTEGER node_id_list The ID list of the nodes found.
(num_nodes)
INTEGER <Return Value> Success or an error code.
Error Conditions:
1000025 Error attempting to allocate virtual memory.
1000305 Coordinates for point %I% not found.
1000303 No points were found to exist in the database as defined in the point list. The
point list input was %A%.
48000004 No Node found !
Example:
Please see sgm_node_on_point (p. 1118) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 155
Geometry
7.3 Curve
Description:
Get the geometric format of a curve.
Input:
INTEGER curve_id Curve id (internal db id).
Output:
REAL geo_coefs(12) Geometric coefficients of the curve.
INTEGER status 0 , no error.
-1 , data base not responding.
Example:
Please see asm_db_get_curve_geo (p. 1003) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the next highest line label from the database.
Input:
LOGICAL domessage Tells the routine to issue an error message if an error
occurs.
Output:
INTEGER integerlabel The next highest curve label.
STRING stringlabel 0 , no error.
-1 , data base not responding.
INTEGER <Return Value> Success or an error code.
Example:
Please see asm_db_get_next_line_label (p. 1008) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function creates an arc from ‘two points and center point’ or from ‘start, end point and
radius’.
Input:
Main Index
156
Function Descriptions
STRING output_ids[] This value specifies the curve ID list. If this value is set to an
empty string or to “#”, the function will automatically
allocate and assign a sequential list of curve IDs.
INTEGER num_curves Number of curves to be created.
INTEGER arc_method This value specifies the arc method: 1 = define arc by center,
start and end points, and 2 = define arc by start point, end
point and radius.
REAL radius This value specifies the arc radius if the input value
arc_method is set to 2.
LOGICAL create_center This value is set to TRUE if the arc center point is to be
created along with the arc and if the input value
arc_method is equal to 2.
LOGICAL center_rev_direction This value is set to TRUE if the arc center is to be
flipped/rotated in the counter-clockwise direction before
the arc is created and if the input value arc_method is equal
to 2.
INTEGER arc_angle This value specifies the arc angle to use: 1 = minimum arc
angle, and 2 = maximum arc angle.
STRING plane_list[] This value specifies the list of planes in which to construct
the arcs.
STRING center_point_list[] This value specifies the list of points defining the center
points of the circular arcs.
STRING start_point_list[] This value specifies the list of points defining the starting
points of the circular arcs.
STRING end_point_list[] This value specifies the list of points defining the ending
points of the circular arcs.
LOGICAL project_points This value specifies, when set to TRUE, that the center
points be projected onto the plane. When this value is set to
FALSE and the input value arc_method is not set to 2, the
construction plane will be translated to the center point
location and will still be parallel to the original plane. If this
value is set to FALSE and the input value arc_method is set
to 2, the construction plane is translated to the starting
point location and will still be parallel to the original plane.
Output:
STRING created_ids[VIRTUA This value returns the created ID list.
L]
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
38000845 Unable to acquire %I% words of virtual memory.
38000424 The center point and start point define a zero radius.
38000413 Zero length plane normal vector
38000440 Invalid 2D Arc2Point method. Must be 1 or 2. Try again.
1000578 The number of Curves per Arc must be greater than or
equal to one. The invalid value input was %I%
38000442 The Radius value of %G% is too small for the input start
and end points. Radius magnitude must be at least %G%.
Modify application input and try again.
Main Index
CHAPTER 7 157
Geometry
38000418 The Arc radius must be greater than zero. Invalid value
input was %G%
Example:
Please see asm_const_curve_2d_arc2point_v2 (p. 997) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function creates an arc-shaped or parametric cubic curve in two dimensional space,
defined by a start point, midpoint, and an end point.
Input:
STRING output_ids[] This value specifies the curve ID list. If this value is set to
an empty string or to “#”, the function will automatically
allocate and assign a sequential list of curve IDs.
INTEGER num_curves This value specifies the number of curves per arc to
create.
LOGICAL create_center This value is set to TRUE if a point is to be created at the
center of the arc.
STRING plane_list[] This value specifies the construction plane of the arc.
STRING start_list[] This value specifies the start point of the arc.
STRING mid_list[] This value specifies the midpoint of the arc.
STRING end_list[] This value specifies the end point of the arc.
LOGICAL project_flag TRUE if the center point is to be projected onto the plane.
Output:
STRING created_ids[VIRTUAL] This value returns the created ID list.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
38000845 Unable to acquire %I% words of virtual memory.
38000423 The three points specified are nearly collinear.
38000413 Zero length plane normal vector
1000578 The number of Curves per Arc must be greater than or
equal to one. The invalid value input was %I%
Example:
Please see asm_const_curve_2d_arc3point_v1 (p. 998) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Main Index
158
Function Descriptions
Description:
This function creates a parametric cubic curve from the projection of curves onto surfaces.
Input:
STRING output_ids[] This value specifies the curve ID list. If this value is set to
an empty string or to “#”, the function will automatically
allocate and assign a sequential list of curve IDs.
STRING curve_list[] This value specifies the curve list to project.
STRING entity_list[] This value specifies the entity list to project onto.
Main Index
CHAPTER 7 159
Geometry
Description:
This function determines the corresponding coordinates for various input values of percent
arclength along a curve.
Input:
INTEGER curve_id The id of the curve for which data is required.
INTEGER num_values The number of values for which the
parametric coordinates are required.
REAL ARRAY arc_lengths(num_values) Array of arc lengths at which the parameters
are desired.
Output:
REAL ARRAY parametric_coord(num_values)Array of parametric coordinates for the curve.
INTEGER status This function returns a value of 0 when
executed successfully and a non zero value to
indicate a change in status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Main Index
160
Function Descriptions
Example:
Please see curve_arc_to_parm (p. 1011) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function determines the corresponding arc length coordinates for various input values of
parametric coordinates along a curve.
Input:
INTEGER curve_id The id of the curve for which data is required.
INTEGER num_values The number of values for which the arc lengths are
required.
REAL ARRAY parameters(num_values) Array of parametric coordinates for the curve at
which the arc lengths are desired.
Output:
REAL ARRAY arc_lengths(num_values)Array of arc lengths.
INTEGER status This function returns a value of 0 when executed
successfully and a non zero value to indicate a
change in status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see curve_parm_to_arc (p. 1012) in the MSC.Acumen, Volume 2: Code Examples.
db_count_curve ( count )
Description:
Counts all curves in the database.
Input:
none
Output:
INTEGER count The integer number of curves in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_count_curve (p. 1015) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 161
Geometry
Description:
Gets a geometric coo and type from the database given an id.
Input:
INTEGER id The unique internal curve id identifying the association of
the information to be retrieved from the database.
Output:
INTEGER coo The geometric company of origin stored in the database.
INTEGER type The geometric type of data stored in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_curve_coo_and_type (p. 1026) in the MSC.Acumen, Volume 2: Code
Examples.
db_get_curve_id ( label, id )
Description:
Gets a curve id from the database given a curve label.
Input:
INTEGER label The unique external curve id identifying the curve to be
retrieved from the database
Output:
INTEGER id The unique internal curve id identifying the curve
retrieved from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_curve_id (p. 1027) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a curve label from the database given a curve id.
Input:
INTEGER id The unique internal curve id identifying the curve to be
retrieved from the database.
Main Index
162
Function Descriptions
Output:
INTEGER label The unique external curve id identifying the curve to be
retrieved from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_curve_label (p. 1028) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_curve_label ( label )
Description:
Gets the largest curve label from the database.
Input:
none
Output:
INTEGER label Highest curve label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_max_curve_label (p. 1031) in the MSC.Acumen, Volume 2: Code Examples.
db_get_min_curve_label ( label )
Description:
Gets the smallest curve label from the database.
Input:
none
Output:
INTEGER label Lowest curve label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_min_curve_label (p. 1035) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 163
Geometry
Description:
This function associates nodes with a given set of curves.
Input:
STRING node_list[ ] The list of nodes to be associated with the curves.
STRING curve_list[ ] The list of curves to which the nodes are to be associated.
Output:
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_associate_nodes_curve (p. 1052) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
164
Function Descriptions
Description:
This function creates curve on a surface in any of the u /v directions at a given parameter and
returns the blob of the curve created.
Input:
INTEGER direction The direction to create the curve.
1 = u direction , 2 = v direction.
REAL param_value The value of the parameter for creating the curve (0 <
param_value < 1)
REAL ARRAY surface_blob() The blob of the surface on which to create the curve.
The functions to be used for getting the blob are
sgm_db_get_blob_size() followed by
sgm_db_get_surface().
Output:
REAL ARRAY curve_blob() The blob of the curve returned. The functions to be
used for getting the blob size are
sgm_db_get_blob_size() followed by
sgm_db_get_curve().
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change
in status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_create_curve_on_surface (p. 1058) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 7 165
Geometry
Example:
Please see sgm_curve_convert_u_to_s (p. 1068) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will evaluate a data table representing the geometry of a curve, returning
information about the point of origin and the first, second, and third derivatives of the curve.
Input:
REAL blob( ) This value specifies the curve data table. This array must be
allocated with at least 6 offsets and no more than the number of
offsets set by the following formula: s(s(6)). The value stored in
the array at offset 6 must be equal to or greater than 0. See the
comments below.
REAL para_parameter This value specifies a parametric coordinate value and has a
range from 0.0 to 1.0.
INTEGER out_type This value specifies the type output expected from this function
call. See the remarks below.
Output:
REAL output_data (n,3) This value returns the output data table. See the remarks below.
INTEGER status This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Remarks:
The input value out_type can be set to the following values:
Value Description
0 4
1 4
2 4
3 4
A curve data table can be retrieved with a call to the sgm_db_get_curve() PCL function. The
size of the data curve table can be retrieved with a call to the PCL function
sgm_db_get_blob_size().
Example:
Please see sgm_curve_evaluate (p. 1070) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 167
Geometry
Description:
Get the geometric definition of a curve from the database.
Input:
INTEGER curveid Id of the curve.
INTEGER blobsize Size of the blob in words.
Output:
REAL blob ( ) Geometric description of the curve.
INTEGER status Success or an error code.
Error Conditions:
38000001 The allocated space for the blob is too small.
Example:
See example for sgm_curve_evaluate (p. 166). See also sgm_db_get_curve (p. 1074) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the geometric definition of a curve from the database.
Input:
INTEGER curveid Id of the curve.
INTEGER blobsize Size of the blob in words.
Output:
REAL blob ( ) Geometric description of the curve.
INTEGER status Success or an error code.
Error Conditions:
38000001 The allocated space for the blob is too small.
Example:
See example for sgm_curve_evaluate (p. 166). See also sgm_db_get_curve (p. 1074) in the
MSC.Acumen, Volume 2: Code Examples.
Description
:
This function gets the start point, center point and the radius for any arc.
Input:
INTEGER arc_id The id for the arc.
Output:
REAL start_point(3) The starting point of the curve.
ARRAY
REAL center_point(3) The center point of the curve.
ARRAY
Main Index
168
Function Descriptions
Description:
Gets the length of a curve.
Input:
INTEGER curveid The ID of the curve.
Output:
REAL length The length of the curve.
INTEGER <Return Value> 0: successful, otherwise return error code.
Example:
Please see sgm_get_curve_length (p. 1108) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the nodes close to the given curves within the geometric tolerance.
Input:
REAL geotol The geometric tolerance.
INTEGER num_crvs The number of the given curves.
INTEGER crv_id_lis (num_crvs) The ID list of the given curves.
INTEGER list_size The size of the node_id_list.
INTEGER init_flag Initial call ( = 0 ) or continued call ( = 1 ).
Output:
INTEGER num_nodes ( ) The number of the nodes found.
INTEGER node_id_list The ID list of the nodes found.
(num_nodes)
REAL node_u_list The list of the node parameter U.
(num_nodes)
INTEGER <Return Value> Success or an error code.
Comments:
If the node_id_list is not BIG enough to accommodate all found nodes, the return value is 9999.
Allocate another memory space, set init_flag == 1, call this routine again to get the rest nodes. (
until <return value> == 0 ).
Error Conditions:
1000025 Error attempting to allocate virtual memory.
Main Index
CHAPTER 7 169
Geometry
Main Index
170
Function Descriptions
7.4 Surface
Description:
Get the next highest patch label from the database.
Input:
LOGICAL domessage Tells the routine to issue an error message if an error
occurs.
Output:
INTEGER integerlabel The next highest curve label.
STRING stringlabel[] The next highest curve label.
INTEGER <Return Value> Success or an error code.
Example:
Please see asm_db_get_next_patch_label (p. 1008) in the MSC.Acumen, Volume 2: Code
Examples.
db_count_surface ( )
Description:
Counts all surfaces in the database.
Input:
none
Output:
INTEGER count The integer number of surfaces in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_count_surface (p. 1020) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_surface_label ( label )
Description:
Gets the largest surface label from the database.
Input:
none
Output:
INTEGER label
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Main Index
CHAPTER 7 171
Geometry
Example:
Please see db_get_max_surface_label (p. 1034) in the MSC.Acumen, Volume 2: Code Examples.
db_get_min_surface_label ( label )
Description:
Gets the smallest surface label from the database.
Input:
none
Output:
INTEGER label Highest surface label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_min_surface_label (p. 1037) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a geometric coo and type from the database given an id.
Input:
INTEGER id The unique internal surface id identifying the association
of the information to be retrieved from the database.
Output:
INTEGER coo The geometric company of origin stored in the database.
INTEGER type The geometric type of data stored in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_surface_coo_and_type (p. 1048) in the MSC.Acumen, Volume 2: Code
Examples.
db_get_surface_id ( label, id )
Description:
Gets a surface id from the database given a surface label.
Input:
INTEGER label The unique external surface id identifying the surface to
be retrieved from the database.
Main Index
172
Function Descriptions
Output:
INTEGER id The unique internal surface id identifying the surface
retrieved from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_surface_id (p. 1049) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a surface label from the database given a surface id.
Input:
INTEGER id The unique internal surface id identifying the surface to
be retrieved from the database.
Output:
INTEGER label The unique external surface id identifying the surface to
be retrieved from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_surface_label (p. 1050) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 173
Geometry
LOGICAL implicit_topology This value specifies, when set to TRUE, that the
edges of the created surfaces are defined by the
chain links. When this value is set to FALSE the
chain link edges will be combined if there is slope
continuity in the 2D segments.
Output:
STRING created_labels[VIRTUAL] This value returns the label of the composite surface
created.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a
change in status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see sgm_create_surface_composite_c (p. 1060) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
174
Function Descriptions
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see sgm_create_surface_comptrim_v1 (p. 1062) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 7 175
Geometry
Description:
Gets the number of loops for a surface, and the total number of edges and if desired, the
number of edges per loop.
Input:
INTEGER surfaceid The ID of the surface.
LOGICAL getedges TRUE if routine should get number of edges per loop.
FALSE if not.
Output:
INTEGER numloops The number of loops.
INTEGER numedges The total number of edges.
INTEGER numegploop ( ) The number of edges per loop (dimension is
numberLoops).
INTEGER status Success or an error code.
Comments:
The usual way to use this routine is:
1) Call it to get the number of loops numberLoops with getEdges == False (0)
2) User allocates array numberEdgesPerLoop as (INT *) MemAlloc ( arg, numberLoops *
sizeof(INT)).
3) User calls routine again with getEdges == True (1) to get the array of number of edges per
loop for all loops (numberEdgesPerLoop).
Error Conditions:
1000025 Error attempting to allocate virtual memory.
Example:
Please see sgm_db_get_num_loops_face (p. 1083) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Get the geometric definition of a surface from the database.
Input:
INTEGER surfaceid The ID of the surface.
INTEGER blobsize Size of the blob in words.
REAL blob ( ) Array to be filled in with Geometric description of a
surface as a blob.
Output:
REAL blob ( ) Geometric description of the surface.
INTEGER status 0: no error.
-1: database error.
-2: insufficient array length for the blob.
Error Conditions:
38000001 The allocated space for the blob is too small
Main Index
176
Function Descriptions
Example:
See example for sgm_db_get_curve (p. 167). See also sgm_db_get_surface (p. 1088) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
This function sews surfaces which have gaps inbetween. This is relevant when surface models
are imported. Such models tend to have gaps which require closing to avoid any errors
regarding continuity of the surfaces. This function will sew edges into a common boundary
between surfaces. This function was introduced to handle cases and close up gaps not possible
with just edge_match.
Input:
STRING surface_list[] The list of surfaces to be sewed.
Output:
STRING created_ids[] This value returns the created ID list.
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Main Index
CHAPTER 7 177
Geometry
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_edit_surface_sew (p. 1102) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the area of a surface.
Input:
INTEGER surfid The ID of the surface.
Output:
REAL area The area of the surface.
INTEGER <Return Value> SUCCESS or an error code.
Example:
Please see sgm_get_surface_area (p. 1110) in the MSC.Acumen, Volume 2: Code Examples..
Description:
This function will get the nodes close to the given surfaces within the geometric tolerance.
Input:
REAL geo_tolerance This value specifies the geometric tolerance.
INTEGER number_surfaces This value specifies the number of offsets in the input
value surface_list
INTEGER surface_list(number_nodes)
This value specifies a list of surface identifier values.
INTEGER number_nodes This value specifies the number of offsets defined for the
output values node_id_list and node_uv_list.
INTEGER init_flag This value specifies when set to 0 that the initial call to get
the number of nodes on the surfaces is being made. This
value specifies, when set to 1 that the call to retrieve the
list of nodes on the surfaces is being made.
Output:
INTEGER number_nodes_found (1)
This value returns the number of the nodes found on the
list of surfaces.
INTEGER node_id_list (number_nodes)
This value returns a list of the node identifiers found on
the specified surfaces.
REAL node_uv_list (number_nodes * 2)
Main Index
178
Function Descriptions
Description:
Routine that calculates and shows the surface normals.
Input:
STRING surflist[] The list of surfaces.
LOGICAL scaled TRUE if user wants to scale the normals to a percentage of
the surface area, FALSE otherwise.
INTEGER numsurf The number of surfaces (or segments).
INTEGER segid The ID of the segment.
INTEGER redflag 0 to show vectors on the interior and boundary, 1 to show
vectors on the boundary only.
INTEGER vecdens The number of vectors in the u and v directions.
REAL veclen The length of the vectors if they are not scaled.
Output:
INTEGER <Return Value> 0 if successful, else returns error code.
Main Index
CHAPTER 7 179
Geometry
Error Conditions:
14000010 In the list being used, the current sublist does not match the sublist filter.
14000015 LpSublistNext: End of current list has been reached.
1000025 Error attempting to allocate virtual memory.
1000707 No surfaces were found to exist in the database as defined in the surface list. The
surface list input was %A%.
Example:
Please see sgm_show_surface_normals (p. 1123) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function evaluates a surface, returning information that defines the characteristics of a
surface.
Input:
REAL surface_data() This value specifies a surface data table or a blob. See the
remarks below for more information.
REAL ui This value specifies a parametric coordinate.
REAL vi This value specifies a parametric coordinate.
INTEGER derivative_use This value specifies the type of information that will be
returned by this function. See below for more
information.
Output:
REAL surface_info(21) This value returns the evaluated surface information. See
the remarks below for information on how to interpret the
values returned.
INTEGER error_code This value returns an error code and will be set to 0 if the
surface evaluation was successful and a non zero value to
indicate an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
1 A malformed surface data table or blob has been found. This problem is most
likely caused by an error in the input value surface_data.
2 This value indicates that the input value drivative_use has been set to request
normal information and that the current input values for ui and vi fall on an
unresolvable singularity. All of the other return vectors are valid at this point.
Only the normal vector is not to be used.
Remarks:
The size of the input value surface_data can be obtained with a call to the function
sgm_db_get_blob_size (p. 144). The surface data table or blob information can then be
retrieved with a call to sgm_db_get_surface (p. 175).
The input value derivative_use specifies the type of information that will be returned. The
following table explains the allowed values.
derivative_use valueInformation Returned
0 x, y, z
Main Index
180
Function Descriptions
1 x,y,z,nx,ny,nz,xu,yu,zu,xv,yv,zv
2 x,y,z,nx,ny,nz,xu,yu,zu,xv,yv,zv,xuu,yuu,zuu, xvv,yvv,zvv
3 x,y,z,nx,ny,nz,xu,yu,zu,xv,yv,zv,xuu,yuu,zuu, xvv,yvv,zvv,xuv,yuv,zuv
Example:
Please see sgm_surface_evaluate (p. 1126) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 181
Geometry
7.5 Solid
db_count_solid ( count )
Description:
Counts all solids in the database.
Input:
none
Output:
INTEGER count The integer number of solids in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_count_solid (p. 1018) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_solid_label ( label )
Description:
Gets the largest solid label from the database.
Input:
none
Output:
INTEGER label Highest solid label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Example:
Please see db_get_max_solid_label (p. 1033) in the MSC.Acumen, Volume 2: Code Examples.
db_get_min_solid_label ( label )
Description:
Gets the smallest solid label from the database.
Input:
none
Output:
INTEGER label Lowest solid label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Example:
Please see db_get_min_solid_label (p. 1037) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
182
Function Descriptions
Description:
Gets a geometric coo and type from the database given an id.
Input:
INTEGER id The unique internal solid id identifying the association of the
information to be retrieved from the database.
Output:
INTEGER coo The geometric company of origin stored in the database.
INTEGER type The geometric type of data stored in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Example:
Please see db_get_solid_coo_and_type (p. 1044) in the MSC.Acumen, Volume 2: Code
Examples.
db_get_solid_id ( label, id )
Description:
Gets a solid id from the database given a solid label.
Input:
INTEGER label The unique external solid id identifying the solid to be
retrieved from the database.
Output:
INTEGER id The unique internal solid id identifying the solid retrieved
from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Example:
Please see db_get_solid_id (p. 1045) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a solid label from the database given a solid id.
Input:
INTEGER id The unique internal solid id identifying the solid to be
retrieved from the database.
Output:
INTEGER label The unique external solid id identifying the solid to be
retrieved from the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Example:
Main Index
Please see db_get_solid_label (p. 1046) in the MSC.Acumen, Volume 2: Code Examples.
CHAPTER 7 183
Geometry
Main Index
184
Function Descriptions
Description:
Get the next unused hpat label from the database.
Input:
LOGICAL domessage Tells the routine to issue an error message if an error
occurs.
Output:
INTEGER integerlabel The next highest solid label.
STRING stringlabel[] The next highest solid label.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see asm_db_get_next_hpat_label (p. 1007) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function creates a b-rep solids from surfaces.
Input:
STRING output_ids[] The output ids to be assigned to the new solids.
STRING surface_list[] This value specifies the list of the surfaces used to create
the b-rep solid.
LOGICAL delete_flag This value is set to TRUE if the original surfaces are to be
deleted.
Output:
STRING created_ids[] This value returns the created ID list.
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see sgm_construct_solid_brep (p. 1055) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function creates solids with a set of surfaces.
Input:
STRING output_ids[ ] The output ids to be assigned to the new solids.
STRING surface_list[ ] This value specifies the list of the surfaces from which the
solid is to be created.
Main Index
CHAPTER 7 185
Geometry
LOGICAL delete_flag This value is set to TRUE if the original surfaces are to be
deleted.
Output:
STRING created_ids[] This value returns the created ID list.
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see sgm_construct_solid_volume (p. 1056) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets the number of vertices for a general body.
Input:
INTEGER bodyid The ID of the body.
Output:
INTEGER numvert The number of vertices for the body.
INTEGER status Success or an error code.
Example:
Please see sgm_db_get_num_vertices_body (p. 1085) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Get the geometric definition of a solid from the database.
Input:
INTEGER solidid Id of the solid.
INTEGER blobsize The size of the blob in words.
Output:
REAL blob ( ) Array to be filled in with Geometric descriptionof a solid
as a blob.
INTEGER status 0: no error.
-1: database error.
-2: insufficient array length for the blob.
Error Conditions:
38000001 The allocated space for the blob is too small.
Example:
Please see sgm_db_get_solid (p. 1087) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
186
Function Descriptions
Output:
STRING created_ids[] This value returns the created ID list.
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_edit_solid_break (p. 1094) in the MSC.Acumen, Volume 2: Code Examples.
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_edit_solid_refit_v1 (p. 1096) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function reverses the parametric directions of solids.
Input:
STRING solid_list[] List of solids to be reversed.
Output:
STRING created_ids[] This value returns the created ID list.
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see sgm_edit_solid_reverse (p. 1097) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the volume of a solid.
Input:
INTEGER solid The ID of the solid.
Output:
REAL volume The volume of the solid.
INTEGER <Return Value> Success or an error code.
Error Conditions:
1000025 Error attempting to allocate virtual memory.
Example:
Please see sgm_get_solid_volume (p. 1109) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This subroutine plays traffic cop for the lower level solid evaluators.
Input:
REAL s() Solid data table.
REAL ui Parametric coordinates.
REAL vi Parametric coordinates.
Main Index
CHAPTER 7 189
Geometry
Description:
This function verifies that a collection of surfaces represent a valid B-rep solid.
Input:
STRING surface_list[] This value specifies the collection of surfaces that
represent the B-rep solid.
REAL verify_tol This value specifies a tolerance value used to determine if
the surfaces represent the B-rep solid. This value must be
less than or equal to the global geometric modeling
tolerance value.
Output:
INTEGER <Return Value> 0 if the function was successful.
Example:
Please see sgm_verify_solid_brep (p. 1128) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
190
Function Descriptions
Description:
Get the default reference coordinate frame from the database.
Input:
LOGICAL domesg Error message flag: If TRUE, this routine will allow the
app_db_err_msg routine to issue a message if an error is
encountered.
Output:
STRING cord_frame[] The default reference coordinate frame.
INTEGER <Return Value> Success or an error code.
Example:
Please see app_db_get_ref_cid (p. 996) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function transforms points from local coordinates to global. It passes the transpose of the
rotation matrix stored in the database.
Input:
REAL ARRAYp(3,npts) The point coordinates in local frame.
REAL ARRAYt(3) This value specifies the translation vector for the global
coordinate frame.
REAL ARRAYr(3,3) This value specifies the rotation matrix for the global
coordinate frame and is the transpose of the rotation matrix
stored in the database.
INTEGER itype The reference coordinate frame type:
1=rectangular
2=cylindrical
3=spherical
INTEGER npts The number of points.
Output:
REAL ARRAYp(3,npts) The point coordinates in global frame.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this
function.
Example:
Please see asm_u_coord_local_to_global (p. 1010) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 7 191
Geometry
db_check_coord_frame_exist ( id )
Description:
Checks to see if a coordinate frame exists in the database.
Input:
INTEGER id The unique internal cid identifying the coordinate frame
to be retrieved from the database.
Output:
LOGICAL <Return Value> True if the cid exists.
Error Conditions:
This routine returns only a logical value, and gives no indication of why a failure occurred.
External Dependencies and Side Effects:
Accesses one record in the “coordinate_frame” table in the database.
Example:
Please see db_check_coord_frame_exist (p. 1014) in the MSC.Acumen, Volume 2: Code
Examples.
db_count_coordinate_frame ( count )
Description:
Counts all coordinate_frames in the database.
Input:
none
Output:
INTEGER count The integer number of coordinate_frames in the database.
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:
13000002 Unrecoverable database error
External Dependencies and Side Effects:
Queries “coordinate_frame” table in the database.
Example:
Please see db_count_coordinate_frame (p. 1015) in the MSC.Acumen, Volume 2: Code
Examples.
db_get_all_coord_frame_ids ( )
Description:
This function will set a cursor to the start of a list of all coordinate frames.
Input:
none
Output:
none
Main Index
192
Function Descriptions
Remarks:
This function must be called before the db_get_next_coord_frame_ids() function can be called.
Example:
Please see db_get_all_coord_frame_ids (p. 1021) in the MSC.Acumen, Volume 2: Code
Examples.
db_get_next_coord_frame_ids ( id )
Description:
This function will get the next coordinate frame id from the database.
Input:
none
Output:
INTEGER id This value returns the id of the next coordinate frame id.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Remarks:
The PCL function db_get_all_coord_frame_ids() must be called at least once to establish the list
of posted coordinate frame id values and to set the cursor to point to the start of the list. Calling
the db_get_next_coord_frame_ids() function in a loop will then allow the list entries to be
retrieved.
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred.
13000085 Cursor not open.
13000117 The query specified has completed.
External Dependencies and Side Effects:
Accesses all records in the “coordinate frame” table in the database.
Example:
See example for db_get_all_coord_frame_ids (p. 191). See also
db_get_next_coord_frame_ids (p. 1038) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_coord_label ( label )
Description:
Gets the largest coord label from the database.
Input:
none
Output:
INTEGER label Highest coord label used.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Main Index
CHAPTER 7 193
Geometry
Error Conditions:
13000056 Coordinate frame not found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Selects the largest coord label from the database.
Example:
Please see db_get_max_coord_label (p. 1031) in the MSC.Acumen, Volume 2: Code Examples.
db_get_min_coord_label ( label )
Description:
Gets the smallest coord label from the database.
Input:
none
Output:
INTEGER label Lowest coord label used.
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:
13000056 Coordinate frame not found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Selects the smallest coord label from the database.
Example:
Please see db_get_min_coord_label (p. 1034) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_posted_coord ( )
Description:
This function will set a cursor to the start of a list of posted coordinate frames.
Input:
none
Output:
none
Remarks:
This function must be called before the db_get_next_posted_coord() function can be called.
Example:
Please see db_get_all_posted_coord (p. 1023) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
194
Function Descriptions
db_get_next_posted_coord ( id )
Description:
This function will get the next posted coordinate frame id from the database.
Input:
none
Output:
INTEGER id This value returns the id of the next posted coordinate
frame id.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Remarks:
The PCL function db_get_all_posted_coord() must be called at least once to establish the list of
posted coordinate frame id values and to set the cursor to point to the start of the list. Calling
the db_get_next_posted_coord() function in a loop will then allow the list entries to be
retrieved.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000085 Cursor not open.
13000117 The query specified has completed.
External Dependencies and Side Effects:
Accesses all records in the “coordinate frame” table in the database.
Example:
See example for db_get_all_posted_coord (p. 193). See also db_get_next_posted_coord
(p. 1039) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the next highest coord label from the database.
Input:
LOGICAL domessage Tells the routine to issue an error message if an error
occurs.
Output:
INTEGER integerlabel The next highest coord label.
STRING stringlabel[] The next highest coord label.
INTEGER <Return Value> Success or an error code.
Example:
Please see asm_db_get_next_cord_label (p. 1004) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 7 195
Geometry
Description:
Gets a label from the database given an id.
Input:
INTEGER id The unique internal id identifying the coord to be
retrieved from the database.
Output:
INTEGER label The unique external id identifying the coord to be
retrieved from the database.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Accesses one record in the “coordinate_frame” table in the database.
Example:
Please see db_get_coord_frame_label (p. 1024) in the MSC.Acumen, Volume 2: Code Examples.
db_get_current_coord ( coord_label )
Description:
Retrieves the current coordinate frame from the database.
Input:
none
Output:
INTEGER label Location for returned value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000056 Coordinate frame not found
13000007 An unspecified database error occurred.
Example:
Please see db_get_current_coord (p. 1025) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
196
Function Descriptions
Description:
Counts all curves associated with a specified point in the database.
Input:
INTEGER id The id of the point to which the curves are associated.
Output:
INTEGER count The integer number of curves associated to the point in the
database.
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:
13000097 Curve input was not found.
Example:
Please see db_count_curves_for_point (p. 1016) in the MSC.Acumen, Volume 2: Code Examples.
db_get_curves_for_point ( ptid,count,crvid)
Description:
Finds the ids of all curves associated with a specified point in the database.
Input:
INTEGER ptid Id of the point to which the curves are associated.
INTEGER count The number of curves that the calling routine expects to
receive from the database. This count should be the same as
the number of curves to which the point is associated as it
should have been fetched from the database prior to making
this call.
Output:
INTEGER crvid() Ids of the various curves associated with the specified point.
Example:
See example for db_count_curves_for_point (p. 196). See also db_get_curves_for_point
(p. 1028) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function returns the vertex id values foran edge.
Input:
INTEGER edgeid This value specifies the id of an edge.
Main Index
CHAPTER 7 197
Geometry
Output:
INTEGER vertexids ( ) This value returns the id values of the vertices of an edge.
INTEGER <Return Value> 0 if the function was successful.
Example:
Please see sgm_db_get_edge_vertex_ids (p. 1075) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function gets the nearest point at a specific parametric location on a curve.
Input:
REAL location(3) The xyz location of the point in space.
ARRAY
REAL curve_data() The blob of the curve. The functions to be used for get-
ARRAY ting the blob are sgm_db_get_blob_size() followed by
sgm_db_get_curve().
REAL parameter The parameter value along the curve where to look for
the nearest point.
Output:
REAL point_location(3) The xyz location of the nearest point in space.
ARRAY
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_nearest_point_on_curve (p. 1114) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function gets the nearest point at a specific parametric location on a curve.
Input:
REAL ARRAY location(3) The xyz location of the point in space.
REAL ARRAY curve_data() The blob of the curve. The functions to be used for get-
ting the blob are sgm_db_get_blob_size() followed by
sgm_db_get_curve().
REAL parameter The parameter value where to look for the nearest point.
Output:
REAL ARRAY point_location(3) The xyz location of the nearest point in space.
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
Main Index
198
Function Descriptions
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see sgm_nearest_point_on_curve_aea (p. 1115) in the MSC.Acumen, Volume 2: Code
Examples.
xy_curve_num_points_get (<curve_name>,<yonly>,<npoints>)
Description:
This function will get the number of points on the curve.
Input:
STRING curve_name Name of the curve.
Output:
LOGICAL yonly Flag which is TRUE if curve uses only y values and FALSE
if curve uses both xy values.
INTEGER npoints Number of points on the curve.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error values returned by this function.
Example:
Please see xy_curve_num_points_get (p. 1130) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 199
Geometry
Description:
Counts all surfaces associated with a specified edge in the database.
Input:
INTEGER id The id of the edge to which the surfaces are associated.
Output:
INTEGER count The integer number of surfaces associated to the edge in
the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
See example for db_count_surface (p. 170). See also db_count_surfaces_for_edge (p. 1020)
in the MSC.Acumen, Volume 2: Code Examples.
Description:
Finds the ids of all surfaces associated with a specified edge in the database.
Input:
INTEGER edgid Id of the edge to which the surfaces are associated.
INTEGER count The number of surfaces that the calling routine expects to
receive from the database. This count should be the same
as the number of surfaces to which the edge is associated
as it should have been fetched from the database prior to
making this call.
Output:
INTEGER srfid() Ids of the various surfaces associated with the specified
edge.
Example:
See example for db_count_surface (p. 170). See also db_get_surfaces_for_edge (p. 1051) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the loop ids, edge ids, and orientations for an n-sided surface identified by its id.
Input:
INTEGER surfaceid The id of the surface.
Main Index
200
Function Descriptions
Description:
Returns the vertex ids for an n-sided surface identified by its id.
Input:
INTEGER surfaceid The id of the surface.
INTEGER numberverts The number of vertices for the surface.
Output:
INTEGER vertexids ( ) The ids of the vertex.
INTEGER <Return Value> Success or an error code.
Example:
Please see sgm_db_get_gen_face_vertex_ids (p. 1080) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will return the number of edges of the specified surface.
Input:
INTEGER surfaceid This value specifies the identifier for a surface or the face
of a solid.
Output:
INTEGER numberfaces This value returns the number of edges of the specified
surface of face of a solid.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Example:
See example for sgm_db_get_num_loops_face (p. 175). See also
sgm_db_get_num_edges_face (p. 1081) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 7 201
Geometry
Description:
Counts all solids associated with a specified surface in the database.
Input:
INTEGER id The id of the surface to which the solids are associated.
Output:
INTEGER count The integer number of solids associated to the surface in
the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_count_solids_for_surface (p. 1019) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Finds the ids of all solids associated with a specified surface in the database.
Input:
INTEGER srfid Id of the surface to which the solids are associated.
INTEGER count The number of solids that the calling routine expects to
receive from the database. This count should be the same
as the number of solids to which the surface is associated
as it should have been fetched from the database prior to
making this call.
Output:
INTEGER solid() Ids of the various solids associated with the specified
surface.
Example:
Please see db_get_solids_for_surface (p. 1047) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the Face IDs for a body.
Input:
INTEGER bodyid The ID of the body.
INTEGER numberfaces The number of face for the body.
Main Index
202
Function Descriptions
Output:
INTEGER faceids () The IDs of the faces of the body.
INTEGER faceorients ( ) The orientations of the faces of the body.
INTEGER facesense ( ) The sense of the normal (out or in).
INTEGER status Success or an error code.
Example:
See example for sgm_db_get_num_loops_face (p. 175). See also
sgm_db_get_gen_body_face_ids (p. 1076) in the MSC.Acumen, Volume 2: Code Examples.
Notes:
The faceorients () values listed above provide the following information:
The surface normal relative to position 0 (where the face exactly matches the underlying
surface).
The offset according to the INDUSTRY STANDARD, not according to MSC.Patran standards.
Note that the offset is always given relative to position 0 when the face exactly matches the
topology of the underlying surface.
Reverse pairs (If you reverse a 4-sided surface as the orientation toggles between these two
values.
Description:
Gets the Vertex IDs for a body.
Input:
Main Index
CHAPTER 7 203
Geometry
Description:
Gets the number of faces for a general body.
Input:
INTEGER bodyid The ID of the body.
Output:
INTEGER numberfaces The number of faces for the body.
INTEGER status 0 if successful, else returns error code.
Example:
See example for sgm_db_get_num_loops_face (p. 175). See also
sgm_db_get_num_faces_body (p. 1082) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
204
Function Descriptions
7.10 Transform
Description:
This function will transform points defined in the global coordinate system to the specified
local coordinate system.
Input:
INTEGER cid This value specifies the local coordinate system id.
INTEGER npts This value specifies the number of points to be
transformed.
REAL points(3,npts) This value specifies the coordinates of the points to be
transformed. This value is used as both an input and an
output to this function and the values passed into the
function will be changed.
Output:
INTEGER cidtyp This value returns the type of the local coordinate system.
REAL points (3,npts) This value returns the coordinates of the points
transformed into the local coordinate system. This value
is used as both an input and an output to this function.
The original input values for this array will be lost.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Example:
Please see transform_pts (p. 1129) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Finite Element Model
8
■ Finite Elements
■ MPCs
■ Nodes
■ Mesh
■ Element/Node Relations
Main Index
204
Function Descriptions
db_get_next_elem_id (id)
Description:
This function will return the next available element ID to the caller.
Input:
None.
Output:
INTEGER id The next available element ID.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_get_next_elem_id (p. 1166) in the MSC.Acumen, Volume 2: Code Examples.
db_get_min_elem_id (id)
Description:
This function will search the entire element list to find the minimum element ID currently in
use.
Input:
None.
Output:
INTEGER id The minimum element ID currently in use.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_get_min_elem_id (p. 1163) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_elem_id (id)
Description:
This function will search the entire element list to find the maximum element ID currently in
use.
Input:
None.
Output:
INTEGER id The maximum element ID currently in use.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
See example for db_get_min_elem_id (p. 204). See also db_get_max_elem_id (p. 1160) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 8 205
Finite Element Model
Description:
Get a list of all the groups associated with the elements in the FEM_LIST
Input:
INTEGER nelem Number of elements.
INTEGER idelems() List of elements.
Output:
INTEGER ngroups Number of unique groups associated with elements.
INTEGER ids()symbol Pointer to VIRTUAL integer array containing list of
associated group IDs.
INTEGER <Return Value> 0 Function was successful.
-1 Abort
-2 No elements in list
-3 No associated groups
Error Conditions:
2001070 Unable to acquire %I% words of virtual memory.
4 Interrupted system call.
Example:
Please see fem_get_mpc_assoc_groups (p. 1184) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Extract the array of existing element IDs from ELEM_LST.
Input:
STRING entity_list[] List of selected elements.
Output:
INTEGER nelem Number of existing element IDs.
INTEGER idelem()symbol Pointer to sorted Element IDs.
INTEGER notfound Number of elements that were not found.
INTEGER idnoexist()symbol Pointer to sorted list of nonexistent IDs.
INTEGER <Return Value> 0 Function was successful.
-1 Abort.
-2 No existing elements in list.
Example:
See example for fem_get_elem_assoc_groups (p. 205). See also fem_get_elem_ids
(p. 1183) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
206
Function Descriptions
Description:
Create a list of all free edges in a list of finite elements.
Input:
INTEGER el_ids() List of elements.
INTEGER max_nodes Maximum number of nodes per element in EL_IDS.
INTEGER max_per_edge Maximum number of nodes per edge in EL_IDS.
INTEGER max_edges Maximum number of edges per element in EL_IDS.
INTEGER nels Number of elements.
INTEGER el_con() Element node list (Connectivity).
INTEGER el_shape() Element shape array.
INTEGER el_nodes() Element node count array.
Output:
INTEGER edge_el_ids() Associated element id.
INTEGER edge_ids() Free edge ID.
INTEGER free_edges Number of free edges.
INTEGER <Return Value> 0, no error.
1, Unsupported element type (shape/nodes).
2, Memory allocation error.
Example:
Please see fem_u_get_free_edges (p. 1190) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will create a list of all free element faces in a list of solid finite elements.
Input:
INTEGER el_ids(num_els) This value specifies a list of solid element identifiers.
INTEGER max_nodes This value specifies the maximum number of nodes used
by the elements specified by the input value el_ids.
INTEGER max_per_face This value specifies the maximum number of nodes used
by the elements specified by the input value el_ids.
INTEGER max_faces This value specifies the maximum number of faces used
by the elements specified by the input value el_ids.
INTEGER num_els This value specifies the number of offsets defined for the
input value el_ids.
INTEGER el_con(num_els * max_nodes)
This value specifies the solid element connectivity node
list.
INTEGER el_shape(num_els) This value specifies the shapes of the solid elements.
INTEGER el_nodes(num_els) This value specifies the solid element node counts.
Main Index
CHAPTER 8 207
Finite Element Model
Output:
INTEGER face_el_ids(max_per_face * num_els)
This value returns the associated element identifiers.
INTEGER face_ids(max_per_face * num_els)
This value returns the free face identifiers.
INTEGER free_faces This value returns the number of free faces.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
This is only a partial list of the error values that can be returned by this function.
1 An unsupported element shape or node type has been specified.
2 A memory allocation error has occurred.
Example:
Please see fem_u_get_free_faces (p. 1192) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function changes the ID of a list of elements.
Input:
INTEGER numelem The number of elements to be changed.
INTEGER old_id() The list of old element IDs.
INTEGER new_id() The list of new element IDs.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
0 Successful Completion.
13000095 User Aborted Transaction In Progress.
13000118 The renumber specified could not complete.
Example:
Please see db_update_elem_ids (p. 1176) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Count the number of elements that have the given geometry type and ID.
Input:
INTEGER geo_type The geometry type to search for.
INTEGER geo_id The geometry ID to search for.
Output:
INTEGER nbr_of_elements The number of elements found.
INTEGER <Return Value> Returns the success or failure of the routine.
Main Index
208
Function Descriptions
Error Conditions:
SUCCESS This function completed successfully.
13000041 Element not found .
Example:
Please see db_count_elems_for_geo (p. 1135) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will update the given elements with the new element topology and create a set of
new nodes for that element.
Input:
INTEGER nelem The number of elements to be created.
INTEGER mxnode The number of nodes on each element.
INTEGER eid() The array of element IDs to be used.
INTEGER etop() The array of element topologies to be used.
INTEGER econ() The array of node IDs for each element.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
SUCCESS This function completed successfully.
Example:
Please see db_update_elem_types (p. 1178) in the MSC.Acumen, Volume 2: Code Examples.
db_count_elem_topology_codes (ntop)
Description:
This function will count the total number of element topologies currently defined in the system.
Input:
None.
Output:
INTEGER ntop The number of element topologies in the database.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_count_elem_topology_codes (p. 1134) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will count the number of elements that have the specified topologies. The
maximum number of topologies that can be returned is passed in by the caller and the caller
passes in the address of the output array.
Main Index
CHAPTER 8 209
Finite Element Model
Input:
INTEGER ntop The number of topologies to be looked up.
INTEGER top() An array of the topologies to look up.
Output:
INTEGER nelem() An array of the number of elements of each type.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
See example for db_count_elem_w_topology (p. 208). See also db_count_elem_w_topology
(p. 1134) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will count all of the nodes associated with the specified piece of geometry. If the
parent geometry parameters are specified, then the given child geometry is assumed to be a
constituent part of the parent. The parent geometry and ID must define the entity that contains
the elements that the requested nodes belong to. For example, if the caller wants all of the nodes
on an edge of a solid, the “geoType” and “geoId” should refer to the specific edge and the
“parentType” and “parentId” should refer to the solid (assuming that the desired nodes are
part of a solid mesh.)
Input:
INTEGER geoType The type of the geometry in question (point, curve, etc.)
INTEGER geoId The ID of the geometry in question.
INTEGER parentType The type of the highest order geometry that the
“geoType” is part of.
INTEGER parentId The ID of the highest order geometry that the “geoType”
is part of.
Output:
INTEGER nodeCount The number of nodes associated with that piece of
geometry.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_count_nodes_for_geometry (p. 1138) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will retrieve all of the information about a group of elements from the memory
database given the IDs of the elements. The user must pass in the addresses of the output
arrays.
Input:
INTEGER nelem The number of elements being requested.
INTEGER mxnode The maximum number of nodes allowed for each
element.
Main Index
210
Function Descriptions
Description:
Gets all elements associated with a specified LBC.
Input:
INTEGER lbc_id Id of the LBC to which the requested elements are
associated.
INTEGER max_elem Maximum number of element IDs for which storage has
been allocated by the calling routine.
Output:
INTEGER nelem Number of elements found associated to the specified
LBC.
INTEGER eid() Ids of the elements associated to the specified lbc.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
None.
Example:
Please see db_get_elems_by_lbc (p. 1156) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets an ntl 25 configuration code from the database.
Input:
INTEGER atid The id of the analysis type associated to the selected
element type.
INTEGER acid The id of the analysis code associated to the selected
element type.
INTEGER geopcd The id of the geometric option code associated with the
selected element type.
Main Index
CHAPTER 8 211
Finite Element Model
INTEGER copcd The id of the condense option code associated with the
selected element type.
INTEGER fopcd The id of the formulation option code associated with the
selected element type.
INTEGER lopcd The id of the laminate option code associated with the
selected element type.
INTEGER etopid The id of the element topology associated with the
selected element type.
INTEGER dofsetid The id of the degree of freedom associated with the
selected element type.
INTEGER matlcode The id of the material code associated with the selected
element type.
INTEGER matdcode The id of the material definition code associated with the
selected element type.
Output:
INTEGER config The id of the associated configuration.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Gets a record in the “selected_element_type” table.
Example:
Please see db_get_elem_config_ntl (p. 1147) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will retrieve the element dimensionality for the specified element topology ID
value.
Input:
INTEGER top_id The element topology ID value.
Output:
INTEGER dimen The element dimensionality for the specified ID.
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:
13000041 Element not found.
External Dependencies and Side Effects:
None.
Example:
Please see db_get_elem_dimens (p. 1149) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
212
Function Descriptions
Description:
This function will retrieve all of the element IDs that have a given geometry type and geometry
ID.
Input:
INTEGER geo_type The desired geometry type to look for.
INTEGER geo_id The desired geometry ID to look for.
INTEGER nbr_of_elements The maximum number of elements we can return.
Output:
INTEGER element The array of element IDs with the specified type and ID.
(nbr_of_elements)
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:
13000041 Element not found.
13000093 Too Many Values Returned for Space Allocated.
Example:
Please see db_get_elem_for_geo_type_and_id (p. 1149) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function gets the shape codes for the array of elements specified.
Input:
INTEGER nelem The number of elements to be looked up.
INTEGER eid() The array of input element IDs.
Output:
INTEGER shape() The array of shape codes.
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:
13000041 Element not found.
SUCCESS This function completed successfully.
Example:
Please see db_get_elem_shape_for_id (p. 1151) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 8 213
Finite Element Model
Description:
The number of element topologies defined in the database.
Input:
INTEGER ntop The maximum number of topology IDs that can be
returned.
Output:
INTEGER top() The array of the element topology IDs.
INTEGER <Return Value> Integer indicating the success or failure of the routine.
Example:
Please see db_get_elem_topology_codes (p. 1153) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will retrieve all of the distinct topology IDs currently in use that match the
specified geometry type and geometry ID.
Input:
INTEGER geo_id The desired geometry ID to look for.
INTEGER geo_type The desired geometry type to look for.
Output:
INTEGER n_tops The number of topologies that were found.
INTEGER top_ids() The array of topology IDs that were found.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_elem_topos_for_geom (p. 1153) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will retrieve the element topology name for the specified element topology ID
value. Note: The output string that will hold the name of the degenerate element topology
MUST be at least GrNameLength bytes long. Anything less can cause memory to be
overwritten!
Input:
INTEGER id The element topology ID value.
Output:
STRING name[] The element topology name string.
Main Index
214
Function Descriptions
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:
13000091 Analysis type input was not found.
SUCCESS This function completed successfully.
Example:
Please see db_get_elem_top_name (p. 1152) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the element verification parameters.
Input:
STRING analysis_code_name[31] The current analysis code name.
INTEGER test_id The specific test id.
Output:
REAL threshold The threshold value.
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:
13000090 Analysis code input was not found.
13000086 No Records Found.
External Dependencies and Side Effects:
This routine accesses records in the analysis_code and element_verification_parms tables in the
database.
Example:
Please see db_get_elem_verification_parms (p. 1154) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves a set of element_topology_ids based of analysis code and type id.
Input:
INTEGER acid The analysis code id.
INTEGER atid The analysis type id.
INTEGER count Maximum number of topologies to be returned.
Output:
INTEGER etids() The element type ids retrieved.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Main Index
CHAPTER 8 215
Finite Element Model
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Retrieves analysis_elements relationships.
Example:
Please see db_get_etop_for_a_code (p. 1158) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function returns a list of independent nodes which refer to the specified sub-MPC.
Input:
INTEGER mpc_id This value specifies the mass property constraint or
MPC id for which the information is being requested.
INTEGER sub_mpc_id This value specifies the sub-mass property constraint or
MPC id for which the information is being requested.
INTEGER mxnode This value specifies the maximum number of nodes
which may be returned for the sub-MPC. This value
should be less than or equal to the number of offsets
defined for the return value nid.
Output:
INTEGER nnode This value returns the number of nodes using the sub-
mass property constraint or MPC.
INTEGER nid() This value returns the id values of the nodes for each
sub-mass property constraint or MPC. The number of
offsets allocated for this array should be less than or
equal to the input value mxnode.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
13000142 The MPC was not found in the database.
13000143 The sub-MPC was not found in the database.
13000150 The list of nodes for one or more of the MPCs is longer than MAXNODE.
External Dependencies and Side Effects:
Accesses records in the mpc_term_node table in the database.
Example:
Please see db_get_indep_nodes_in_sub_mpc (p. 1159) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
216
Function Descriptions
8.2 MPCs
db_get_next_mpc_id ( next_id )
Description:
Return the next available unused MPC id.
Input:
None.
Output:
INTEGER next_id The MPC id.
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:
13000004 Duplicate entry exists in table.
External Dependencies and Side Effects:
Accesses records in the mpc table in the database.
Example:
Please see db_get_next_mpc_id (p. 1166) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get a list of all the nodes associated with the MPCs in the FEM_LIST.
Input:
INTEGER nmpc Number of MPCs.
INTEGER idmpcs(nmpc) List of MPCs.
Output:
INTEGER nnodes Number of unique nodes associated with MPCs.
INTEGER ids()symbol Pointer to VIRTUAL integer array containing list of
associated Node IDs.
INTEGER <Return Value> 0 Function was successful.
-1 Abort
-2 No MPCs in list
-3 No associated nodes
Error Conditions:
2001070 Unable to acquire %I% words of virtual memory.
4 Interrupted system call.
Example:
Please see fem_get_mpc_assoc_nodes (p. 1185) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 8 217
Finite Element Model
Description:
This function will extract an array of MPC id values from a picklist string.
Input:
STRING entity_list[] This value specifies a list of mass property constraints or
MPCs.
Output:
INTEGER nmpc This value returns the number of offsets defined for the
return value idmpc.
INTEGER idmpc(VIRTUAL) This value returns the sorted mass property constraint
or MPC id values.
INTEGER notfound This value returns the number of offsets defined for the
return value idnoexist.
INTEGER idnoexist(VIRTUAL) This value returns the sorted id values for mass
property constraints or MPCs that do not exist.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
-1 Abort.
-2 No existing MPCs in list.
4 Interrupted system call.
2001070 Unable to acquire %I% words of virtual memory.
Example:
Please see fem_get_mpc_ids (p. 1186) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a count of the valid degrees of freedom for a particular MPC types from the database.
Input:
INTEGER mpc_type_id The MPC type id
Output:
INTEGER inum_dofs The number of valid DOFS for this MPC type id.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
External Dependencies and Side Effects:
Accesses records in the mpc_term_dof table in the database.
Example:
Please seedb_count_valid_dofs_f_mpc_type (p. 1141) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
218
Function Descriptions
Description:
This function determines if an MPC is valid.
Input:
INTEGER mpc_id This value specifies the MPC identifier.
Output:
LOGICAL valid_flag This value returns the status of the MPC. If this value is
set to 1 ( TRUE ), then the MPC is value. If this value is
set to 0 ( FALSE ) then the MPC is invalid.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
External Dependencies and Side Effects:
Accesses records in the mpc, valid_mpc_type, control_info and analysis_code tables in the
database.
Remarks:
An MPC is valid if its type and associated degrees of freedom are valid for the current analysis
code and analysis type preferences.
Example:
Please see db_validate_mpc (p. 1179) in the MSC.Acumen, Volume 2: Code Examples.
db_count_valid_mpc_types ( numtypes )
Description:
Gets a count of the valid MPC type for the default analysis type id and analysis code id from
the database.
Input:
None.
Output:
INTEGER numtypes The number of valid MPC type ids.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
External Dependencies and Side Effects:
Accesses records in the valid_mpc_type table in the database.
Example:
Please see db_count_valid_mpc_types (p. 1141) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 8 219
Finite Element Model
db_get_all_valid_dof_f_mpc_type ( mpc_type_id )
Description:
Get all the valid degrees of freedom for a particular MPC type from the database.
Input:
INTEGER mpc_type_id The MPC type id.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
See example for db_count_valid_dofs_f_mpc_type (p. 217). See also
db_get_all_valid_dof_f_mpc_type (p. 1142) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the next valid degree of freedom for a particular MPC type from the database.
Input:
INTEGER mpc_type_id The MPC type id.
Output:
INTEGER dof_id The degree of freedom id.
STRING dof_name[] The degree of freedom name.
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_type, mpc and mpc_term_dof tables in the database.
Example:
See example for db_count_valid_dofs_f_mpc_type (p. 217). See also
db_get_nxt_valid_dof_f_mpc_type (p. 1173) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_valid_mpc_type ( )
Description:
Get the next valid (for the current analysis code and analysis type) MPC type id and name
stored in the database.
Input:
None.
Main Index
220
Function Descriptions
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.
External Dependencies and Side Effects:
Accesses records in the mpc_type, mpc and mpc_term_dof tables in the database.
Example:
See example for db_count_valid_mpc_types (p. 218). See also db_get_all_valid_mpc_type
(p. 1143) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the next valid (for the current analysis code and analysis type) MPC type id and name
stored in the database.
Input:
None.
Output:
INTEGER mpc_type_id The MPC type id.
STRING mpc_type_name[] The MPC type name.
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 valid_mpc_type and mpc_type table in the database.
Example:
See example for db_count_valid_mpc_types (p. 218). See also
db_get_next_valid_mpc_type (p. 1168) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function returns a list of dependent nodes which refer to the specified sub-MPC.
Input:
INTEGER mpc_id This value specifies the mass property constraint or
MPC id for which the information is being requested.
INTEGER sub_mpc_id This value specifies the sub-mass property constraint or
MPC id for which the information is being requested.
Main Index
CHAPTER 8 221
Finite Element Model
Description:
Get the degree of freedom id from its degree of freedom name.
Input:
STRING dof_name[] The degree of freedom name.
Output:
INTEGER dof_id The degree of freedom id.
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:
13000140 The DOF ID was not found in the database
External Dependencies and Side Effects:
Accesses records in the degrees_of_freedom table in the database.
Example:
Please seedb_get_dof_id (p. 1146) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
222
Function Descriptions
Description:
Get the degree of freedom name from its degree of freedom id.
Input:
INTEGER dof_id The degree of freedom id.
Output:
INTEGER dof_name The degree of freedom name.
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:
13000140 The DOF ID was not found in the database
External Dependencies and Side Effects:
Accesses records in the degrees_of_freedom table in the database.
Example:
Please see db_get_dof_name (p. 1146) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the MPC type id from its MPC type name.
Input:
STRING mpc_type_name[] The MPC type name.
Output:
INTEGER mpc_type_id The MPC type id.
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:
13000152 The MPC type ID was not found in the database.
External Dependencies and Side Effects:
Accesses records in the mpc_type table in the database.
Example:
Please see db_get_mpc_type_id (p. 1164) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the MPC type name from its MPC type id.
Input:
INTEGER mpc_type_id The MPC type id.
Main Index
CHAPTER 8 223
Finite Element Model
Output:
STRING mpc_type_name[] The MPC type id.
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:
13000152 The MPC type ID was not found in the database.
External Dependencies and Side Effects:
Accesses records in the mpc_type table in the database.
Example:
Please see db_get_mpc_type_name (p. 1165) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns a list of ids for all valid MPCs in a group. A MPC is valid if it’s type and associated
degrees of freedom are valid for the current analysis code and analysis type preferences.
Input:
INTEGER gid The group id.
INTEGER nmpc The number of valid MPCs to be returned.
Output:
INTEGER numval The actual number of valid MPCs.
INTEGER mpcid() The MPC ids.
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:
13000008 Group not found.
13000156 There are more than NMPC valid MPCs in the database.
External Dependencies and Side Effects:
Accesses records in the mpc, valid_mpc_type, control_info and analysis_code tables in the
database.
Example:
Please see db_get_valid_mpc_ids_in_group (p. 1175) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Get a list of all the groups associated with the MPCs in the FEM_LIST.
Input:
INTEGER nmpc Number of MPCs.
INTEGER idmpcs List of MPCs.
Output:
INTEGER ngroups() Number of unique groups associated with MPCs.
Main Index
224
Function Descriptions
Main Index
CHAPTER 8 225
Finite Element Model
8.3 Nodes
Description:
This function will retrieve the geometry type and ID that is associated with each node that is
specified.
Input:
INTEGER nnode The number of node IDs being supplied.
INTEGER nid() The array of nodes IDs to be looked up.
Output:
INTEGER gid() The array of geometry IDs (one for each node ID).
INTEGER gtype() The array of geometry types (one for each node ID).
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Example:
Please see db_get_nodal_association (p. 1169) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Given a node ID, this function will look up the specified node and return the coordinates of that
node to the caller.
Input:
INTEGER id The node ID to be looked up.
Output:
REAL xyz(3) An array of 3 floating point values which are the
coordinates of the specified node.
INTEGER <Return Value> Integer indicating the success or failure of the routine.
Error Conditions:
SUCCESS This function completed successfully.
13000020 Node not found.
Example:
Please see db_get_node (p. 1170) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
226
Function Descriptions
Description:
Gets all nodes associated with an specified lbc.
Input:
INTEGER lbc_id Id of the lbc to which the requested nodes are associated.
INTEGER max_node Maximum number of node ids for which storage has been
allocated by the calling routine.
Output:
INTEGER nnode Number of nodes found associated to the specified lbc.
INTEGER nid() Ids of the nodes associated to the specified lbc.
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:
13000002 Unrecoverable database error.
13000048 Maximum node count exceeded.
External Dependencies and Side Effects:
None.
Example:
Please see db_get_nodes_by_lbc (p. 1170) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will retrieve information about all of the nodes associated with a given piece of
geometry.
Input:
INTEGER geo_type The type of geometry in question.
INTEGER geo_id The id of the geometry in question.
INTEGER parent_type The type of highest order geometry that the “geo-type” is
part of.
INTEGER parent_id The id of the highest order geometry that the “geo-type” is
part of.
Output:
INTEGER nnode The number of nodes found.
INTEGER nids() The IDs of all of the nodes found.
REAL ncoord() The model space coordinates of each node (x, y, z).
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:
SUCCESS This function completed successfully.
Example:
Please see db_get_nodes_for_geometry (p. 1171) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 8 227
Finite Element Model
db_get_next_node_id ( id )
Description:
This function will return the next available node ID to the caller. This can be used to create
another node.
Input:
None.
Output:
INTEGER id The next available node ID.
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:
SUCCESS This function completed successfully.
Example:
Please see db_get_next_node_id (p. 1167) in the MSC.Acumen, Volume 2: Code Examples.
db_get_min_node_id ( id )
Description:
This function will find the smallest node ID currently in use.
Input:
None.
Output:
INTEGER id The smallest node ID currently in use.
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:
SUCCESS This function completed successfully.
Example:
Please see db_get_min_node_id (p. 1163) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_node_id ( id )
Description:
This function will find the largest node ID currently in use.
Input:
None.
Output:
INTEGER id The largest node ID currently in use.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Main Index
228
Function Descriptions
Example:
See example for db_get_min_node_id (p. 227). See also db_get_max_node_id (p. 1161) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
Get a list of all the groups associated with the nodes in the FEM_LIST.
Input:
INTEGER nnode Number of nodes.
INTEGER idnodes() List of nodes.
Output:
INTEGER ngroups Number of unique groups associated with nodes.
INTEGER ids()symbol Pointer to VIRTUAL integer array containing list of
associated group IDs.
INTEGER <Return Value> 0 Function was successful.
-1 Abort
-2 No NODEs in list
-3 No associated groups
Error Conditions:
2001070 Unable to acquire %I% words of virtual memory.
4 Interrupted system call.
Example:
Please see fem_get_node_assoc_groups (p. 1187) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will sort a list of node id values, returning a list of existing nodes and a list of
nodes that do not exist.
Input:
STRING entity_list[] This value specifies a list of nodes.
Output:
INTEGER nnode This value returns the number of node id values in the
return value idnode.
INTEGER idnode(VIRTUAL) This value returns an array of node id values that refer
to nodes that do exist.
INTEGER notfound This value returns the number of node id values in the
return value idnoexist.
INTEGER idnoexist(VIRTUAL) This value returns an array of node id values that refer
to nodes that do not exist.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Main Index
CHAPTER 8 229
Finite Element Model
Error Conditions:
-1 Abort.
-2 No existing nodes in list
4 Interrupted system call.
2001070 Unable to acquire %I% words of virtual memory.
16000102 Database error during list processing: Node not found
Example:
See example for fem_get_node_assoc_groups (p. 228). See also fem_get_node_ids
(p. 1188) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function verifies that a set of node id values exist in the database.
Input:
INTEGER nnode This value specifies the number of node values listed in
the input value nid.
INTEGER nid(nnode) This value specifies the node ids to be checked.
Output:
INTEGER exist(nnode) This value specifies an array of integers used to return a
value of 0 if the id value at an offset into the input value
nid exists and a non-zero value if the id does not exist.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
13000020 Node not found.
Example:
Please see db_verify_nodes_exist (p. 1180) in the MSC.Acumen, Volume 2: Code Examples.
db_count_unref_nodes ( nbr_unref_node )
Description:
This function will count all of the nodes in the database which are not referenced by any of the
elements.
Input:
None.
Output:
INTEGER nbr_unref_node The number of unreferenced nodes in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the
reason.
Main Index
230
Function Descriptions
Error Conditions:
SUCCESS This function completed successfully.
13000020 Node not found.
Example:
Please see db_count_unref_nodes (p. 1140) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will return the IDs and the count of all of the nodes in the database that are not
referenced by any elements or mpcs. If the specified count is less than the number of nodes in
the database, output will stop when the requested count has been reached. The order of the IDs
returned is not determinate.
Input:
INTEGER nnode The maximum number of nodes that can be returned.
Output:
INTEGER nunref The number of unreferenced nodes found.
INTEGER nid() The array of IDs of the unreferenced nodes.
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:
SUCCESS This function completed successfully.
13000048 Maximum node count exceeded.
Example:
Please see db_get_unreferenced_node_ids (p. 1175) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 8 231
Finite Element Model
8.4 Mesh
fem_create_mesh_sol_3 (<mesher_pick>,<flag>,<solid_list>,<num_val>,<g_leng>,
<elem_topo>,<node_list>,<elem_list>,<a_coord_frame>,
<r_coord_frame>,<num_nodes>,<num_elems>,
<nodes_created>, < elems_created> )
Description:
This function creates a finite element mesh on solids and returns the FEM data for the solid. It
returns an integer status of zero on successful completion.
Input:
STRING mesher_pick [ ] Mesher to be used: "IsoMesh" or "Tetmesh".
INTEGER flag Integer to specify use of preview. Used only with
“Tetmesh”.
STRING solid_list[ ] List of solids to be meshed.
INTEGER num_val Number of float values.
REAL g_leng Global element edge length.
STRING elem_topo[ ] Element topology.
STRING node_list[ ] List of output node ids.
STRING elem_list[ ] List of output element ids.
STRING a_coord_frame[ ] Analysis coordinate frame id.
STRING r_coord_frame[ ] Reference coordinate frame id.
Output:
INTEGER num_nodes Number of nodes created.
INTEGER num_elems Number of elements created.
STRING nodes_created[ ] Ids of nodes created.
STRING elems_created[ ] Ids of elements created.
INTEGER <Return Value> 0 for success, 1 for error.
Error Conditions:
None.
Example:
Please see fem_create_mesh_sol_3 (p. 1181) in the MSC.Acumen, Volume 2: Code Examples.
fem_seed_display_dir_arrows ( arrow_segment )
Description:
Display direction arrows on all visible curves.
Input:
INTEGER arrow_segment Graphics manager segment id for arrows.
Output:
INTEGER <Return Value> Integer indicating the success or failure of the routine.
Main Index
232
Function Descriptions
Error Conditions:
2001060 List overflow in %A%. Call customer support.
4 Interrupted system call.
Example:
Please see fem_seed_display_dir_arrows (p. 1189) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets the definition of an edge mesh from the database.
Input:
None.
Output:
REAL wmesh The unique internal line wmesh identifying the mesh to be
retrieved from the database.
INTEGER mshcyc The number of elements on the edge.
REAL relaxm The mesh relaxm of the edge.
REAL tolmsh The tolmsh of the edge.
INTEGER dgmesh The number of meshes on the edge.
INTEGER itrngl True if the edge has been itrngled.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Accesses one record in the “line” table in the database.
Example:
Please see db_get_mesh_params (p. 1162) in the MSC.Acumen, Volume 2: Code Examples.
Description:
The function moves the finite element entities – vertex nodes, edge nodes and the face nodes
with the elements from one surface to another. The size of the two surfaces should be equal and
the user tolerance should be at least equal to the normal distance between the two surfaces. It
returns an integer status of 0 on success and 1 on failure.
Input:
INTEGER surface_id_2 The id of the surface to which the mesh is to be moved.
INTEGER surface_id_1 The id of the surface from which the mesh is to be moved.
REAL user_tolerance The value of the user tolerance specified by the user.
Output:
INTEGER <Return Value> 0 for success and 1 for failure.
Main Index
CHAPTER 8 233
Finite Element Model
Error Conditions:
None.
Example:
Please see move_mesh (p. 1205) in the MSC.Acumen, Volume 2: Code Examples.
Description:
The function moves the finite element entities – vertex nodes, edge nodes and the face nodes
with the elements from one surface to another. The size of the two surfaces should be equal and
the user tolerance should be at least equal to the normal distance between the two surfaces. It
returns an integer status of 0 on success and 1 on failure.
Input:
STRING surface_name_2[] The name of the surface to which the mesh is to be moved.
STRING surface_name_1[] The name of the surface from which the mesh is to be
moved.
REAL user_tolerance The value of the user tolerance specified by the user.
Output:
INTEGER <Return Value> 0 for success and 1 for failure.
Error Conditions:
None.
Example:
Please see move_mesh_1 (p. 1207) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
234
Function Descriptions
Description:
This function will count the number of elements associated with the specified array of nodes in
the memory database.
Input:
INTEGER nnode The number of node ids in the node id array.
INTEGER nid() The array of node IDs to be looked for.
Output:
INTEGER nelem() The number of elements associated with this node.
INTEGER fflag A flag indicating if any nodes were 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:
13000020 Node not found.
SUCCESS if the node exists and is associated with some elements.
Example:
Please see db_count_elems_using_node (p. 1136) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will count the number of MPCs associated with a group of nodes.
Input:
INTEGER nnode This value specifies the number of node id values listed in the
input value nid.
INTEGER nid(nnode) This value specifies the id values of the nodes for which
information is being requested.
Output:
INTEGER nmpc(nnode) This value returns the number of MPCs using each node.
INTEGER fflag This value returns a non zero value if one or more of the
nodes listed in the input value nid are not found.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an
error.
Error Conditions:
13000020 Node not found.
External Dependencies and Side Effects:
Accesses records in the mpc_term_node table in the database.
Example:
Please see db_count_mpcs_using_node (p. 1137) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 8 235
Finite Element Model
Description:
Returns the total number of nodes in a specified MPC.
Input:
INTEGER nmpc The number of MPCs for which the information is being
requested.
INTEGER mpcid() The ids of the MPCs for which the information is being
requested.
Output:
INTEGER nnode() The number of nodes in each MPC.
INTEGER fflag 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_term_node table in the database.
Example:
Please see db_count_nodes_in_mpc (p. 1139) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will retrieve the list of elements associated with the specified array of nodes in the
memory database.
Input:
INTEGER nnode The number of node IDs in the node ID array.
INTEGER nid() The array of node IDs to be looked for.
INTEGER mxelem The maximum number of elements allowed per node.
Output:
INTEGER nelem() The number of elements associated with this node.
INTEGER eid() The IDs of all elements referencing this node.
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:
13000020 Node not found.
SUCCESS If the node exists and is associated with some elements.
Example:
See example for db_count_elems_using_node (p. 234). See also
db_get_elems_using_nodes (p. 1157) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
236
Function Descriptions
Description:
This function will retrieve all of the node IDs for a specified element. The nodes will be
returned in node position order.
Input:
INTEGER eid The element ID to be looked up.
Output:
INTEGER numnode The number of nodes associated with this element.
INTEGER nid() The array of node IDs associated with this element.
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:
13000020 Node not found.
SUCCESS If some nodes exist for this element.
Example:
Please see db_get_elem_nodes (p. 1150) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns a list of all nodes 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 mxnode The maximum number of nodes which may be returned per
MPC.
Output:
INTEGER nnode() The number of nodes using each MPC.
INTEGER nid() The ids of the nodes 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.
13000150 The list of nodes for one or more of the MPCs is longer than MAXNODE.
External Dependencies and Side Effects:
Accesses records in the mpc_term_node table in the database.
Example:
See example for db_count_nodes_in_mpc (p. 235). See also db_get_nodes_in_mpc (p. 1172)
in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 8 237
Finite Element Model
Description:
This function gets the nodes associated to the specified element edges.
Input:
STRING elem_edge_list[] List of element edges.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_ass_el_edge (p. 1194) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function gets the nodes associated to the specified element faces.
Input:
STRING elem_face_list[] List of element faces.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_ass_el_face (p. 1195) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function gets the nodes associated to the specified element.
Input:
STRING elem_list[] List of elements.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_ass_elem (p. 1196) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
238
Function Descriptions
Description:
This function gets the nodes associated to the specified geometry entities.
Input:
STRING ent_list[] List of geometry entities.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_ass_geo (p. 1197) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function gets the nodes associated to the specified groups.
Input:
INTEGER num Number of groups.
STRING ARRAY group_list[]() Array of group names.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_ass_group (p. 1199) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function gets the nodes associated to the specified mpcs.
Input:
STRING mpc_list[] List of mpcs.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_ass_mpc (p. 1200) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 8 239
Finite Element Model
Description:
This function gets the nodes associated with a specified fringe range.
Input:
REAL val(2) Upper & lower fringe value.
STRING act[80] Method name.
REAL tol Tolerance of xyz or rpt if applicable.
STRING group[32] Group name which has the fringe table.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_att_fringe (p. 1202) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function gets the nodes associated with a specified coordinate value.
Input:
REAL ARRAY val_xyz(3) Value of xyz or rpt coordinate.
LOGICAL ARRAY val_log(3) Logical value specifying active coords.
STRING ARRAY act[80](3) Method name.
REAL ARRAY tol(3) Tolerance of xyz or rpt if applicable.
STRING coord[32] Coordinate frame
LOGICAL group Logical value for group.
Output:
STRING node_list[VIRTUAL] List of nodes.
INTEGER <Return Value> 0 for success.
Error Condition:
None
Example:
Please see list_get_node_att_value (p. 1204) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
240
Function Descriptions
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Load Cases
9
■ General
Main Index
242
Function Descriptions
9.1 General
db_activate_load_case (name)
Description:
Activates the specified load case in the model.
Input:
STRING name[80] Name of the load case to be activated.
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:
13000002 Unrecoverable database error.
13000052 Load Case Not Found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Updates one record in the “load case” table in the database.
Example:
Please see db_activate_load_case (p. 1210) in the MSC.Acumen, Volume 2: Code Examples.
db_delete_load_case
Description:
Deletes a load case entry from the database
Input:
STRING name[80] Name of the load case to be deleted.
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:
13000002 Unrecoverable database error.
13000052 Load Case Not Found.
13000076 Load case active
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Deletes one record in the “load case” table in the database.
Example:
Please see db_delete_load_case (p. 1211) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 9 243
Load Cases
Description:
Gets all load case ids from the database in one structure.
Input:
STRING jbname[] The jobname used for the desired run.
INTEGER lc_seqno The load case sequence number for the desired load case.
Output:
INTEGER lc_id The id of the desired load case.
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:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000052 Load Case Not Found.
External Dependencies and Side Effects:
Accesses the “load_case” table in the database and retrieves an id of a specified jobname/load
case sequence number.
Example:
Please see db_find_load_case_id (p. 1212) in the MSC.Acumen, Volume 2: Code Examples.
db_count_load_cases ( load_case_count )
Description:
This function returns the number of load cases defined in the database.
Input:
none
Output:
INTEGER load_case_count This value returns the number of load cases defined in the
database.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an
error.
Example:
None.
db_get_all_load_case_names ( )
Description:
Gets all load cases from the database.
Input:
None
Main Index
244
Function Descriptions
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason
Example:
None.
db_get_all_load_cases ( )
Description:
This function will set a cursor to the start of a list of load cases.
Input:
None
Output:
None
Remarks:
This function must be called before the db_get_next_load_case() function can be called.
Example:
None.
Description:
This function will get the next load case from the database.
Input:
None
Output:
STRING name[80] This value returns the name of the load case retrieved.
INTEGER id This value returns the load case id.
INTEGER type This value returns the load case type.
STRING description[256] This value returns the description of the load case.
INTEGER num_lbc This value returns the number of load and boundary
conditions associated with the load case.
INTEGER lbc[num_lbc] This value returns the ids of the loads and boundary
conditions associated with this load case.
INTEGER dyn_load This value returns the name of the dynamic load case
used as a basis for this load case. This value is valid only
if the load case is a static load case created from a
dynamic load case.
REAL map This value returns a map variable.
INTEGER priority This value returns the priority assigned to the load case.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Main Index
CHAPTER 9 245
Load Cases
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000085 Cursor not open.
13000117 The query specified has completed.
External Dependencies and Side Effects:
Accesses all records in the “load case” table in the database.
Remarks:
The PCL function db_get_all_load_cases (p. 244) must be called at least once to establish the
list of posted coordinate frame id values and to set the cursor to point to the start of the list.
Calling the db_get_next_posted_coord (p. 194) function in a loop will then allow the list
entries to be retrieved.
Example:
None.
Description:
Gets all load case ids from the database in one structure.
Input:
INTEGER ac_id Analysis code id for the requested jobname.
STRING jobname[] The jobname used for the desired run.
INTEGER lcseq The load case sequence number for the desired load case.
Output:
INTEGER lcid The id of the desired load case.
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:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000052 Load Case Not Found
External Dependencies and Side Effects:
Accesses the “load_case” table in the database and retrieves an id of a specified jobname/load
case sequence number.
Example:
Please see db_get_lc_id_given_job_seq (p. 1213) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
246
Function Descriptions
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Element Properties
10
■ General
Main Index
248
Function Descriptions
10.1 General
bl_create_std_beam_section (<shape>,<name>,<ndim>,<data_types>,<rvalues>,
<field_ids>,<id>)
Description:
This function will create a standard beam section.
Input:
STRING shape [] Standard shape of the beam section.
STRING name [] Name for the beam section created.
INTEGER ndim Number of dimension required for corresponding beam
section shape.
INTEGER data_types() Type of data for each dimension.
REAL rvalues() Dimension values for beam section
INTEGER field_ids() Field ids for beam section.
Output:
INTEGER id ID of beam section
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
NONE
Example:
Please see bl_create_std_beam_section (p. 1218) in the MSC.Acumen, Volume 2: Code
Examples.
bl_get_std_beam_section_data (<id>,<ndim>,<data_types>,<rvalues>,<field_ids>)
Description:
This function will get standard beam section data.
Input:
INTEGER id [] Id of the beam section for which data is required.
INTEGER ndim Number of dimension required for beam section shape.
Output:
INTEGER data_types() Type of data for each dimension.
REAL rvalues() Dimension values for beam section.
INTEGER field_ids() Field ids for beam section.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
NONE
Example:
Please see bl_get_std_beam_section_data (p. 1219) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 10 249
Element Properties
bl_modify_std_beam_section (<new_shape>,<old_name>,<new_name>,<ndim>,<da
ta_types>,<rvalues>,<field_ids>,<id>)
Description:
This function will modify the existing standard beam section.
Input:
STRING new_shape [] Standard shape of the beam section.
STRING old_name [] Name of the existing beam section .
STRING new_name[] Name for the modified beam section.
INTEGER ndim Number of dimension required for modified beam section
shape.
INTEGER data_types() Type of data for each dimension.
REAL rvalues() Dimension values for modified beam section.
INTEGER field_ids() Field ids for modified beam section.
Output:
INTEGER id ID of the modified beam section.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid shape name
Example:
Please see bl_modify_std_beam_section (p. 1221) in the MSC.Acumen, Volume 2: Code
Examples.
blcomputeprincaxespoints (<alpha>,<npoints>,<points>,<centroid>,<princ_axis1>,
<princ_axis2>)
Description:
This function calculates principal axes vectors for the beam section from the principal angle
alpha. It also scales the axes based on the beam section points.
Input:
REAL alpha Principal angle for the beam section.
INTEGER npoints Number of points for beam section shape.
REAL points() Coordinates for each point
REAL centroid(2) Coordinates for centroid of beam section.
Output:
REAL princ_axis1(2) First principal axis
REAL princ_axis2(2) Second principal axis.
INTEGER <Return Value> Returns 0 for success.
Error Conditions:
NONE
Example:
Please see blcomputeprincaxespoints (p. 1223) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
250
Function Descriptions
blgetalpha (<entype>,<prop>,<alpha>)
Description:
This function calculates principal angle for the beam section from the given properties of a
beam section.
Input:
INTEGER entype Type of beam secion (1=Basic, 2=Advanced)
REAL prop() Properties of beam section.
Output:
REAL alpha Principal angle for the beam section.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid entype.
2 Extremely small Izz or Iyy in property definition.
Example:
Please see blgetalpha (p. 1224) in the MSC.Acumen, Volume 2: Code Examples.
blgetbuttonicon (<shape>,<cdo>)
Description:
This function gets the file system location of the button icon bitmap for a shape.
Input:
STRING shape Shape of the beam section.
Output:
STRING cdo[] File system location of the button icon bitmap for a shape.
INTEGER <Return Value> Returns 0 for success,otherwise returns the error code.
Error Conditions:
1 Invalid shape name
Example:
Please see blgetbuttonicon (p. 1225) in the MSC.Acumen, Volume 2: Code Examples.
blgetcenters (<enttype>,<shape>,<dim>,<prop>,<centroid>,<shear>)
Description:
This function calculates the centroid and sheare centre of the beam section.
Input:
INTEGER enttype Type of beam secion (1=Basic, 2=Advanced)
STRING shape Shape of the beam section.
REAL dim() Dimensions for the beam section shape.
REAL prop() Properties of beam section.
Output:
REAL centroid() Centroid of the beam section.
REAL shear() Shear center of the beam section.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid area in property definition
Main Index
CHAPTER 10 251
Element Properties
Example:
Please see blgetcenters (p. 1226) in the MSC.Acumen, Volume 2: Code Examples.
blgetdimfieldid (<bsid>,<dim_loc>,<field_id>)
Description:
This function will get the field id at specified dimension location.
Input:
INTEGER bsid Beam section ID.
STRING dim_loc Dimension location.
Output:
INTEGER field_id Field id at specified dimension location.
INTEGER <Return Value> Returns 0 for success.
Error Conditions:
NONE
Example:
Please see blgetdimfieldid (p. 1227) in the MSC.Acumen, Volume 2: Code Examples.
blgetdimvalue (<bsid>,<dim_loc>,<value>)
Description:
This function will get the value at the specified dimension location.
Input:
INTEGER bsid Beam section ID.
STRING dim_loc Dimension location.
Output:
REAL value Value at specified dimension location.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
NONE
Example:
Please see blgetdimvalue (p. 1228) in the MSC.Acumen, Volume 2: Code Examples.
blgetlabelicon (<shape>,<cdo>)
Description:
This function gets the file system location of the label icon bitmap for a shape.
Input:
STRING shape Shape of the beam section.
Output:
STRING cdo[] File system location of the label icon bitmap for a shape.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid shape name.
Main Index
252
Function Descriptions
Example:
Please see blgetlabelicon (p. 1230) in the MSC.Acumen, Volume 2: Code Examples.
blgetlabels (<shape>,<cdo>)
Description:
This function gets the dimension labels for a given shape.
Input:
STRING shape[] Shape of the beam section.
Output:
STRING ARRAY cdo[]() String array of dimension labels for beam section shape.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid shape name.
Example:
Please see blgetlabels (p. 1231) in the MSC.Acumen, Volume 2: Code Examples.
blgetnumdimension (<shape>)
Description:
This function gets the number of dimensions required to define a given shape completely.
Input:
STRING shape[] Shape of the beam section.
Output:
INTEGER ndim No. of dimensions required for beam section shape.
<Return Value>
Error Conditions:
1 Invalid shape name.
Example:
Please see blgetnumdimension (p. 1231) in the MSC.Acumen, Volume 2: Code Examples.
blgetnumplotpoints (<shape>,<chord_tol>,<npoints>,<nloops>)
Description:
This function will get the number of total plot points and loops used to draw a given shape.
Input:
STRING shape[] Beam section shape.
REAL chord_tol Chordal tolerance for rod and tube.
Output:
INTEGER npoints Number of total plot points.
INTEGER nloops Number of loops.
INTEGER <Return Value> Returns 0 for success, othewise returns the error code.
Error Conditions:
1 Invalid shape name
Main Index
CHAPTER 10 253
Element Properties
Example:
Please see blgetnumplotpoints (p. 1232) in the MSC.Acumen, Volume 2: Code Examples.
blgetnumplotpointsbyid (<bsid>,<chord_tol>,<npoints>,<nloops>)
Description:
This function will get the number of total plot points and loops used to draw a shape of beam
section.
Input:
INTEGER bsid ID of beam section.
REAL chord_tol Chordal tolerance for rod and tube.
Output:
INTEGER npoints Number of total plot points.
INTEGER nloops Number of loops.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid shape name
Example:
Please see blgetnumplotpointsbyid (p. 1233) in the MSC.Acumen, Volume 2: Code Examples.
blgetnumtypeinfo (<nsect>,<ndimax>)
Description:
This function will get the number of section types available in MSC.Patran and the maximum
number of dimensions for any section.
Input:
Output:
INTEGER nsect Number of different section types.
INTEGER ndimax Maximum number of dimensions for any section.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
NONE
Example:
Please see blgetnumtypeinfo (p. 1235) in the MSC.Acumen, Volume 2: Code Examples.
blgetperim (<shape>,<dim>,<perim>)
Description:
This function calculates the exterior perimeter of a beam section.
Input:
STRING shape[] Beam section shape.
REAL ARRAY dim() Array of dimensions of the section.
Output:
REAL perim Perimeter of the beam section.
Main Index
254
Function Descriptions
INTEGER <Return Value> Returns 0 for success, otherwise returns the error
code.
Error Conditions:
1 Invalid shape name
Example;
Please see blgetperim (p. 1235) in the MSC.Acumen, Volume 2: Code Examples.
blgetplotpoints (<shape>,<dim>,<npoints>,<nloops>,<points>,<nploops>)
Description:
This function gets the coordinates of plot points and the number of plot points on each loop for
given section shape.
Input:
STRING shape[] Beam section shape.
REAL ARRAY dim() Array of dimensions of the section.
INTEGER npoints Number of total plot points.
INTEGER nloops Number of loops.
Output:
REAL ARRAY points() Coordinates of plot points for the section.
INTEGER ARRAY nploops() Array of number of plot points on each loop.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid shape name, npoints or nloops
Example:
Please see blgetplotpoints (p. 1236) in the MSC.Acumen, Volume 2: Code Examples.
blgetplotpointsbyid (<bsid>,<bmtype>,<enttype>,<entid>,<nparloc>,<nrmflg>,
<npoints>,<nloops>,<points>,<nploop>,<vec1s>,<vec2s>,<xyz>)
Description:
This function gets the coordinates of plot points and the number of plot points on each loop for
given beam section id, entity type, entity id and entity parametric location. This function calls
blgetplotpointsbyid2, and hardwires the displaymode argument in blgetplotpointsbyid2 to 1
(flag to process offsets).
Input:
INTEGER bsid Beam section id stored in db or region id for Abaqus beams.
INTEGER bmtype Beam type 1 = Bar , 2 = Beam, 3 for aero bodies. For Abaqus
beams:
1001 = Box section
1002 = Circular section
1003 = I section
1004 = L section
1005 = Pipe section
1006 = Rectangular section
1007 = Hex section
1008 = Trapazoidal section
1009 = Arbitrary section
Main Index
CHAPTER 10 255
Element Properties
blgetplotpointsbyid2 (<bsid>,<bmtype>,<enttype>,<entid>,<nparloc>,<nrmflg>,
<npoints>,<nloops>,<displaymode>,<points>,<nploop>,
<vec1s>,<vec2s>,<xyz>)
Description:
This function gets the coordinates of plot points and the number of plot points on each loop for
given beam section id, entity type, entity id and entity parametric location.
Input:
INTEGER bsid Beam section id stored in db or region id for Abaqus beams.
INTEGER bmtype Beam type 1 = Bar , 2 = Beam, 3 for aero bodies. For Abaqus
beams:
1001 = Box section
1002 = Circular section
1003 = I section
1004 = L section
1005 = Pipe section
1006 = Rectangular section
1007 = Hex section
1008 = Trapazoidal section
1009 = Arbitrary section
INTEGER enttype Entity type, currently only type 124 is supported.
INTEGER entid Entity id
INTEGER nparloc Number of parametric locations.
REAL parloc(nparloc) One dimensional parametric locations on entity.
INTEGER nrmflg If =1, calculates normals.
INTEGER npoints Number of total plot points for one parametric location.
Main Index
256
Function Descriptions
blgetprop (<enttyp>,<shape>,<dim>,<ndim>,<prop>,<nprop>)
Description:
This function will get the all properties of beam section.
Input:
INTEGER enttyp Beam type (1 = Basic(Bar), 2 = Advanced(Beam))
STRING shape[] Beam section shape. See beam_section_create for valid
beam sections.
REAL dim(ndim) Array of dimensions of the section.
INTEGER ndim Number of dimensions.
Output:
REAL prop() Properties of the beam section.
INTEGER nprop Number of properties
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error values returned by this function.
Example:
Please see blgetprop (p. 1243) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 10 257
Element Properties
blgetproplabels (<enttyp>,<cdo>)
Description:
This function will get the propery labels for given beam entity type.
Input:
INTEGER enttyp Beam type (1 = Basic(Bar), 2 = Advanced(Beam))
Output:
STRING cdo[]() Array of property label strings.
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid Entity type.
Example:
Please see blgetproplabels (p. 1244) in the MSC.Acumen, Volume 2: Code Examples.
blgettypeinfo (<entype>,<shapes>,<ndims>,<nconsts>)
Description:
This function will get the beam shape name, number of dimensions for each beam shape and
the number of dimensional constraints for each beam shape available in the MSC.Patran library.
Input:
INTEGER entype Beam type(1=Basic(Bar), 2=Advanced(Beam))
Output:
STRING shapes[] Array of shape names
INTEGER ndims[] Array of the number of dimensions for each shape
INTEGER nconsts[] Array of the number of dimensional constraints
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
1 Invalid entype
Example:
Please see blgettypeinfo (p. 1245) in the MSC.Acumen, Volume 2: Code Examples.
blmodifybeamdimension (<bsid>,<dimid>,<value>,<fid>)
Description:
This function will modify the beam section dimension.
Input:
INTEGER bsid ID of beam section.
INTEGER dimid Dimension location.
REAL value New dimension value.
INTEGER fid Field id.
Output:
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error values returned by this function.
Main Index
258
Function Descriptions
Example:
Please see blmodifybeamdimension (p. 1246) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Create a selected element type entry in the database.
Input:
INTEGER atid The ID of the analysis type associated to the selected element
type.
INTEGER acid The ID of the analysis code associated to the selected element
type.
INTEGER geopcd The ID of the geometric option code associated with the selected
element type.
INTEGER copcd The ID of the condense option code associated with the selected
element type.
INTEGER fopcd The ID of the formulation option code associated with the
selected element type.
INTEGER lopcd The ID of the laminate option code associated with the selected
element type.
INTEGER etopid The ID of the element topology associated with the selected
element type.
INTEGER dofsetid The ID of the degree of freedom associated with the selected
element type.
INTEGER mlcd The ID of the material linearity code associated with the selected
element type.
INTEGER mdcd The ID of the material directionality code associated with the
selected element type.
INTEGER etypid The ID of the element type associated with the selected element
type.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Creates one record in the “selected_element_type” relation in the database. Verifies all input
fields in their respective tables to verify their existence in the database before creating the entry.
Example:
Please see db_create_selected_etype (p. 1269) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 10 259
Element Properties
Description:
This function will return a count of the number of distinct element types for each element
dimensionality for a specified analysis code and type.
Input:
INTEGER acid This value specifies the analysis code id.
INTEGER atid This value specifies the analysis type id.
Output:
INTEGER etcnt(4) This value returns the count of element types, one for
each element dimensionality.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Example:
Please see db_count_elem_type (p. 1261) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will return a count of element types for all element topologies for a specific
analysis code and type.
Input:
INTEGER acid This value specifies the analysis code id.
INTEGER atid This value specifies the analysis type id.
Output:
INTEGER count This value returns the count of element types for all element
topologies.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Example:
Please see db_count_etop_for_a_code (p. 1263) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_dof_set_names ( )
Description:
Sets db_get_next_dof_set_names to start at the beginning of a list of dof_set code names and ids
from the database.
Input:
None.
Main Index
260
Function Descriptions
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:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “dof_set” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_all_dof_set_names (p. 1277) in the MSC.Acumen, Volume 2: Code Examples.
db_get_next_dof_set_names ( name, id )
Description:
Gets the next dof_set code names and id from the database.
Input:
None.
Output:
STRING name[31] The name retrieved from the database.
INTEGER id Id corresponding to the name retrieved.
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:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “dof_set” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_next_dof_set_names (p. 1290) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_form_opt_code_names ( )
Description:
Gets the next dof_set code names and id from the database.
Input:
None.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
CHAPTER 10 261
Element Properties
Error Conditions:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “formulation_option” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_all_form_opt_code_names (p. 1279) in the MSC.Acumen, Volume 2: Code Examples.
db_get_next_form_opt_code_names ( name, id )
Description:
Gets the next formulation option code name from the database.
Input:
None.
Output:
STRING name[31] The name retrieved from the database.
INTEGER id The ID retrieved from the database.
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:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “formulation_option” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_next_form_opt_code_names (p. 1292) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_geo_opt_code_names ( )
Description:
Sets the db_get_next_geo_opt_code_names to start at the beginning of a list of geometric
option code names.
Input:
None.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
262
Function Descriptions
Error Conditions:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “geometric_option” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_all_geo_opt_code_names (p. 1279) in the MSC.Acumen, Volume 2: Code Examples.
db_get_next_geo_opt_code_names ( name, id )
Description:
Gets the next formulation option code name from the database.
Input:
None.
Output:
STRING name[31] The name retrieved from the database.
INTEGER id The ID retrieved from the database.
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:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “geometric_option” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_next_geo_opt_code_names (p. 1292) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_lam_opt_code_names ( )
Description:
Set db_get_next_lam_opt_code_names to start at the beginning of a list of laminate_option code
names from the database.
Input:
None.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
CHAPTER 10 263
Element Properties
Error Conditions:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “laminate_option” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_all_lam_opt_code_names (p. 1280) in the MSC.Acumen, Volume 2: Code Examples.
db_get_next_lam_opt_code_names ( name, id )
Description:
Gets all laminate_option code names from the database, in get all, get next method.
Input:
None.
Output:
STRING name[31] The name retrieved from the database.
INTEGER id The ID retrieved from the database.
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:
13000002 Unrecoverable database error.
13000007 The query specified has completed.
13000117 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “laminate_option” table in the database.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_next_lam_opt_code_names (p. 1293) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the region id for the given entity type and entity id.
Input:
INTEGER entity_type The entity type.
INTEGER entity_id The entity ID.
Output:
INTEGER rid The region ID.
INTEGER <Return Value> Returns the success or failure of the routine.
External Dependencies and Side Effects:
This routine access the geometric_region_list table in the database.
Main Index
264
Function Descriptions
Example:
Please see db_get_region_for_geometry (p. 1296) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets all region ids from the database.
Input:
INTEGER count The number of region IDs for which storage has been
allocated by the calling routine.
Output:
INTEGER rid(count) The region IDs.
STRING name[31](count) The region names.
INTEGER <Return Value> Returns the success or failure of the routine.
External Dependencies and Side Effects:
This routine accesses the phys_prop_region table in the database.
Example:
Please see db_get_region_ids_and_names (p. 1297) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets all element ids for a specified region id from the database.
Input:
INTEGER count The number of region IDs for which storage has been
allocated by the calling routine.
INTEGER rid The region ID for which the list of element IDs is requested.
Output:
INTEGER eid() The element IDs for the region.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Accesses specified records in the “element_in__region” table.
Example:
Please see db_get_elements_in_region_exp (p. 1286) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 10 265
Element Properties
Description:
Retrieves a set of element_topology_ids based on analysis code id and analysis type id.
Input:
INTEGER acid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER count The count of element types, one for each element
dimensionality.
Output:
INTEGER etids() The list of element type IDs retrieved.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Retrieves analysis_elements relationships.
Example:
See example for db_count_etop_for_a_code (p. 259). See also db_get_etop_for_a_code
(p. 1287) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates an allowable physical property entry in the database.
Input:
INTEGER acid The ID of the analysis code for which this physical property
is to be allowed.
INTEGER ppid The ID of the physical property to be allowed.
INTEGER defid The ID of the physical property member set defn allowed.
Output:
STRING alias[] The alias to be used for this physical property from this
analysis code.
INTEGER rflag Flag indicating whether or not this property is required.
INTEGER atypes(10) Allowable types for this physical property.
INTEGER dtype Default type for this physical prop.
INTEGER nord Neutral file order for this physical property from
phys_prop_set_mbr_defn.
STRING aival[] PCL function to be used to validate integer values.
STRING arval[] PCL function to be used to validate real values.
STRING acval[] PCL function to be used to validate character values.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
266
Function Descriptions
Error Conditions:
13000002 Unrecoverable database error.
13000004 Duplicate entry exists in table.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Creates one record in the “allowable_phys_prop” table in the database.
Example:
Please see db_get_a_phys_prop_w_nord (p. 1275) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Creates a physical property set entry in the database.
Input:
INTEGER id The ID of the physical property set to be created.
STRING name[] The name of the physical property set to be created.
INTEGER num The number of physical properties to be associated with this set.
INTEGER ppids() The IDs of the physical properties to be associated with this set
defn.
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:
13000002 Unrecoverable database error.
13000004 Duplicate entry exists in table.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Creates one record in the “phys_prop_set_defn” table in the database.
Example:
Please see db_create_phys_prop_set_defn (p. 1268) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Get physical property definition from the database.
Input:
INTEGER id The set ID for which the physical property IDs are requested.
Output:
STRING name[] The name of the physical property set.
INTEGER num The number of physical property values associated with this
set.
Main Index
CHAPTER 10 267
Element Properties
INTEGER ppids() The IDs of the physical property values associated with this
set.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Specified.
Example:
See example for db_get_allowable_phys_prop (p. 267). See also
db_get_phys_prop_set_defn (p. 1295) in the MSC.Acumen, Volume 2: Code Examples.
db_get_allowable_phys_prop ( acid, ppid, alias, rflag, atypes, dtype, nord, aival, arval,
acval )
Description:
Creates an allowable physical property entry in the database.
Input:
INTEGER acid The ID of the analysis code for which this physical property
is to be allowed.
INTEGER ppid The ID of the physical property to be allowed.
Output:
STRING alias[] The alias to be used for this physical property from this
analysis code.
INTEGER rflag Flag indicating whether or not this property is required.
INTEGER atypes(10) Allowable types for this physical property.
INTEGER dtype Default type for this physical prop.
INTEGER nord Neutral file order for this physical property.
STRING aival[] PCL function to be used to validate integer values.
STRING arval[] PCL function to be used to validate real values.
STRING acval[] PCL function to be used to validate character values.
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:
13000002 Unrecoverable database error.
13000004 Duplicate entry exists in table.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Creates one record in the “allowable_phys_prop” table in the database.
Example:
Please see db_get_allowable_phys_prop (p. 1282) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
268
Function Descriptions
Description:
Gets a field in the database.
Input:
INTEGER atid The ID of the analysis type associated to the selected
property set.
INTEGER acid The ID of the analysis code associated to the selected
property set.
INTEGER geopcd The ID of the geometric option code associated with the
selected property set.
INTEGER copcd The ID of the condense option code associated with the
selected property set.
INTEGER fopcd The ID of the formulation option code associated with the
selected property set.
INTEGER lopcd The ID of the laminate option code associated with the
selected property set.
INTEGER etopid The ID of the element topology associated with the selected
property set.
INTEGER dofsetid The ID of the physical property to be allowed.
Output:
STRING physprop The ID of the associated physical property set.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Gets a record in the “selected_property_set” table.
Example:
See example for db_bulk_get_selected_etops_mat (p. 279). See also
db_get_selected_prop_set (p. 1298) in the MSC.Acumen, Volume 2: Code Examples.
db_delete_phys_prop_region ( prop_reg_id )
Description:
This function will delete a physical property region from the database.
Input:
INTEGER prop_reg_id This value specifies the physical property region id.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an
error.
Main Index
CHAPTER 10 269
Element Properties
Error Conditions:
13000002 Unrecoverable database error.
13000125 The property entered does not exist.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Deletes one record in the “phys_prop_region”, and any record associated to the specified
physical property in the “element_in_region” or “geometric_region_list” relations in the
database.
Example:
Please see db_delete_phys_prop_region (p. 1274) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Associates a specified region to a geometric entity in the database.
Input:
INTEGER gid The internal ID for the geometric entity to associate with the
region.
INTEGER gtype The type of geometric entity to which the region is being
associated.
INTEGER gsid The internal sub_id for the geometric entity to associate with
the region.
INTEGER rid The internal ID of the region being associated to the
geometric entity.
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:
13000002 Unrecoverable database error.
13000004 Duplicate entry exists in table.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Creates one record associating a region to a geometric entity in the database for the region id
passed to the routine.
Example:
Please see db_associate_geo_to_region (p. 1247) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
270
Function Descriptions
Description:
Retrieves the count of entities associated with a physical property region in the database.
Input:
INTEGER rid The physical property region ID for which information is
requested.
Output:
INTEGER count The number of entities for the specified physical property
region.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Counts all entities in the “phys_prop_region” relation in the database for a specified region id.
Example:
Please see db_count_geo_in_region (p. 1264) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets all geometric entities for a physical property region from the database.
Input:
INTEGER count The number of region IDs for which storage has been
allocated by the calling routine.
INTEGER rid The physical property region for which the geometric entities
are requested.
Output:
INTEGER gid() The IDs of the geometric entities associated with the specified
physical property region.
INTEGER gtype() The type of the geometric entities associated with the
specified physical property region.
INTEGER gsid() The sub-IDs of the geometric entities associated with the
specified physical property region.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Accesses records in the “geometric_region_list” relation by the physical property region id
specified.
Example:
Please see db_get_geo_in_region (p. 1288) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 10 271
Element Properties
Description:
Retrieves the number of elements in a specified region in the database.
Input:
INTEGER rid The region ID for which the element count is requested.
Output:
INTEGER count The number of physical_property_region items stored
in the database.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Counts records in the “element_in_region” relation in the database for one specified region.
Example:
Please see db_count_elements_in_region_exp (p. 1262) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Stores an analysis_element_summary relationship.
Input:
INTEGER acid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER etcnt(4) The count of element types, one for each element
dimensionality.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Uses the analysis_element_summary relationship.
Example:
Please see db_create_anl_elm_summary (p. 1267) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
272
Function Descriptions
Description:
Retrieves an analysis_element_summary relationship
Input:
INTEGER acid The analysis code ID.
INTEGER atid The analysis type ID.
Output:
INTEGER etcnt(4) The count of element types, one for each element
dimensionality.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Uses the analysis_element_summary relationship.
Example:
See example for db_create_anl_elm_summary (p. 271). See also db_get_anl_elm_summary
(p. 1284) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Removes an analysis_element_summary relationship.
Input:
INTEGER acid The analysis code ID.
INTEGER atid The analysis type ID.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Deletes a analysis_element_summary relationship.
Example:
See example for db_create_anl_elm_summary (p. 271). See also
db_delete_anl_elm_summary (p. 1273) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 10 273
Element Properties
Description:
Stores a set of analysis_elements relationships.
Input:
INTEGER acid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER etcnt The count of element types to store.
INTEGER etids() The element type IDs to store.
STRING etnames[]() The element type names to go with the corresponding
ID.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Set analysis_elements relationships. Note that the etnames values are actually a denormalized
form of the element_type_name field in the element_type relationship, placed in the
analysis_elements relationship for speed.
Example:
See example for db_create_anl_elm_summary (p. 271). See also
db_create_analysis_elements (p. 1265) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Removes a set of analysis_elements relationships.
Input:
INTEGER acid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER etcnt The count of element types to delete.
INTEGER etids() The element type IDs to delete.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Removes analysis_elements relationships.
Example:
See example for db_create_anl_elm_summary (p. 271). See also
db_delete_analysis_elements (p. 1271) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
274
Function Descriptions
Description:
Retrieves a set of analysis_elements relationships.
Input:
INTEGER acid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER etcntMax The size that the receiving arrays are dimensioned for.
Output:
INTEGER etcntFound The number of element type IDs and element type
names found. Only the first etcntMax values will
actually be returned.
INTEGER etids() The element type IDs retrieved.
STRING etnames[]() The element type names related to the corresponding
IDs.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Retrieves analysis_elements relationships. Note that the etnames values are actually a
denormalized form of the element_type_name field in the element_type relationship, placed in
the analysis_elements relationship for speed.
Example:
See example for db_create_anl_elm_summary (p. 271). See also db_get_analysis_elements
(p. 1283) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets all the definitions for all requested elements in get all, get next method.
Input:
INTEGER acid The analysis code ID for the requested element definition.
INTEGER atid The analysis type ID for the requested element definition.
INTEGER eldim The dimensionality for the requested element definition.
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:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000117 The query specified has completed.
External Dependencies and Side Effects:
Accesses the “selected_element_type” and “element_type” table in the database.
Main Index
CHAPTER 10 275
Element Properties
Example:
See example for db_create_anl_elm_summary (p. 271). See also db_get_all_elem_defn
(p. 1277) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets all the definitions for all requested elements in get all, get next method.
Input:
None.
Output:
INTEGER etype_id The ID of the next element type.
STRING ename[31] The name of the next element type.
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:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000117 The query specified has completed.
External Dependencies and Side Effects:
Accesses the “selected_element_type” and “element_type” table in the database.
Example:
See example for db_create_anl_elm_summary (p. 271). See also db_get_next_elem_defn
(p. 1291) in the MSC.Acumen, Volume 2: Code Examples.
db_bulk_get_possible_dof_sets2 ( etid, atid, acid, coc, goc, foc, loc, nbr, dsid )
Description:
This function will retrieve all possible values of the degrees of freedom sets for the specified
input options.
Input:
INTEGER etid This value specifies the id value of the element type.
INTEGER atid This value specifies the id value of the analysis type.
INTEGER acid This value specifies the id value of the analysis code.
INTEGER coc This value specifies the id value of the condense option code.
INTEGER goc This value specifies the id value of the geometric option code.
INTEGER foc This value specifies the id value of the formulation option
code.
INTEGER loc This value specifies the id value of the lamination option
code.
Main Index
276
Function Descriptions
Output:
INTEGER nbr This value returns the number of degrees of freedom set id
values returned in the output value dsid.
INTEGER dsid(nbr) This value returns the unique degrees of freedom set id
values.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an
error.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches all dof set ids for the input set of parameters.
Example:
Please see db_bulk_get_possible_dof_sets2 (p. 1250) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves all possible values of the laminate option for the specified input options.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
INTEGER goc The ID of the geometric option code selected.
INTEGER coc The ID of the condense option code selected.
Output:
INTEGER nbr The number of laminate option codes that were found for the
above specified set of parameters.
INTEGER loc() The unique laminate option code values that were found for
the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches all laminate option codes for the input set of parameters.
Example:
See example for db_bulk_get_possible_dof_sets2 (p. 275). See also
db_bulk_get_possible_lam_opts2 (p. 1255) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 10 277
Element Properties
Description:
Retrieves all possible values of the formulation option for the specified input options.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
INTEGER goc The ID of the geometric option code selected.
INTEGER coc The ID of the condense option code selected.
INTEGER loc The ID of the location option code selected.
Output:
INTEGER nbr The number of formulation option codes found for the above
specified set of parameters.
INTEGER foc() The unique formulation option code values that were found
for the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches all formulation option codes for the input set of parameters.
Example:
See example for db_bulk_get_possible_dof_sets2 (p. 275). See also
db_bulk_get_possible_form_opts2 (p. 1252) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will retrieve all possible values of the degrees of freedom sets for the specified
input options.
Input:
INTEGER etid This value specifies the id value of the element type.
INTEGER atid This value specifies the id value of the analysis type.
INTEGER acid This value specifies the id value of the analysis code.
Output:
INTEGER nbr This value returns the number of degrees of freedom set id
values returned in the output value dsid.
INTEGER dsid(nbr) This value returns the unique degrees of freedom set id values.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Main Index
278
Function Descriptions
Description:
Retrieves all possible values of the laminate option for the specified input options.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
Output:
INTEGER nbr The number of laminate option codes that were found for the
above specified set of parameters.
INTEGER loc() The unique laminate option code values that were found for
the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches all laminate option codes for the input set of parameters.
Example:
See example for db_bulk_get_possible_dof_sets1 (p. 277). See also
db_bulk_get_possible_lam_opts1 (p. 1254) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves all possible values of the geometric option for the specified input options.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
Output:
INTEGER nbr The number of geometric option codes that were found for
the above specified set of parameters.
INTEGER goc() The unique geometric option code values that were found for
the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
Main Index
CHAPTER 10 279
Element Properties
Description:
Retrieves all possible values of the formulation option for the specified input options.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
Output:
INTEGER nbr The number of formulation option codes found for the above
specified set of parameters.
INTEGER foc() The unique formulation option code values that were found
for the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches all formulation option codes for the input set of parameters.
Example:
See example for db_bulk_get_possible_dof_sets1 (p. 277). See
alsodb_bulk_get_possible_form_opts1 (p. 1251) in the MSC.Acumen, Volume 2: Code
Examples.
db_bulk_get_selected_etops_mat ( etid, atid, acid, goc, foc, loc, dsid, coc, nbr, etop )
Description:
Retrieves all possible values of element topology for the specified input options. All values
must be input for this select.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
INTEGER goc The code for the geometric option if it has been uniquely
determined at point. otherwise, zero.
INTEGER foc The code for the formulation option if it has been uniquely
determined at point. otherwise, zero.
Main Index
280
Function Descriptions
INTEGER loc The code for the laminate option if it has been uniquely
determined at point. otherwise, zero.
INTEGER dsid The ID for the dof set if it has been uniquely determined at
point. otherwise, zero.
Output:
INTEGER nbr The number of formulation option codes found for the above
specified set of parameters.
INTEGER etop() The unique element topology values that were found for the
above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches all element topologies for the input set of parameters.
Example:
Please see db_bulk_get_selected_etops_mat (p. 1259) in the MSC.Acumen, Volume 2: Code
Examples.
db_bulk_get_possible_matl_dirs ( etid, atid, acid, goc, foc, loc, dsid, coc, mlc, nbr,
mdc )
Description:
Retrieves all possible values of the material directionality option for the specified input options.
If an input option is 0, it does not have a uniquely assigned value yet. The first three parameters
may not be zero.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
INTEGER goc The code for the geometric option if it has been uniquely
determined at point. otherwise, zero.
INTEGER foc The code for the formulation option if it has been uniquely
determined at point. otherwise, zero.
INTEGER loc The code for the laminate option if it has been uniquely
determined at point. otherwise, zero.
INTEGER dsid The ID for the dof set if it has been uniquely determined at
point. otherwise, zero.
INTEGER coc The ID for the condense option if it has been uniquely
determined at point. otherwise, zero.
INTEGER mlc The code for the material linearity if it has been uniquely
determined at point. otherwise, zero.
Output:
INTEGER nbr The number of material directionality codes that were found
for the above specified set of parameters.
INTEGER mdc() The unique material directionality code value that were
found for the above specified set of values.
Main Index
CHAPTER 10 281
Element Properties
db_bulk_get_possible_matl_lins ( etid, atid, acid, goc, foc, loc, dsid, coc, mdc, nbr,
mlc )
Description:
Retrieves all possible values of the material linearity option for the specified input options. If an
input option is 0, it does not have a uniquely assigned value yet. The first three parameters may
not be zero.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
INTEGER goc The code for the geometric option if it has been uniquely
determined at point. otherwise, zero.
INTEGER foc The code for the formulation option if it has been uniquely
determined at point. otherwise, zero.
INTEGER loc The code for the laminate option if it has been uniquely
determined at point. otherwise, zero.
INTEGER dsid The ID for the dof set if it has been uniquely determined at
point. otherwise, zero.
INTEGER coc The ID for the condense option if it has been uniquely
determined at point. otherwise, zero.
INTEGER mdc The code for the material directionality if it has been
uniquely determined at point. otherwise, zero.
Output:
INTEGER nbr The number of material linearity codes that were found for
the above specified set of parameters.
INTEGER mlc() The unique material linearity code value that were found for
the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches all material linearity codes for the input set of parameters.
Example:
See example for db_bulk_get_possible_matl_dirs (p. 280). See also
db_bulk_get_possible_matl_lins (p. 1258) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
282
Function Descriptions
db_get_all_pp_ids_and_names ( )
Description:
This function will set the cursor to the start of a list of physical property id, name and data type
values.
Input:
None.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Remarks:
This function must be called before the db_get_next_pp_ids_and_names (p. 282) function
can be called.
Example:
Please see db_get_all_pp_ids_and_names (p. 1281) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function will get the next physical property id, name, and data type from the database.
Input:
None.
Output:
INTEGER pp_id This value returns the physical property id value.
STRING pp_name[80] This value returns the physical property name.
INTEGER datatype This value returns the physical property datatype.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
13000142 The MPC was not found in the database.
13000117 The query specified has completed.
External Dependencies and Side Effects:
Accesses records in the phys_prop table in the database.
Remarks:
The PCL function db_get_all_pp_ids_and_names (p. 282) must be called at least once to
establish the list of physical property id, name, and data type values and to set the cursor to
point to the start of the list. Calling the db_get_next_pp_ids_and_names() function in a loop
will then allow the list entries to be retrieved.
Example:
Please see db_get_next_pp_ids_and_names (p. 1294) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 10 283
Element Properties
Description:
This function will set laminate construction data in the laminate and laminate_layer tables in
the database.
Input:
STRING mat_name[31] This value specifies the name of the material.
INTEGER num_plies This value specifies the number of plies.
STRING ply_names[31*num_plies] This value specifies a list of ply names. See the
remarks below for details on the use of this value.
REAL thicknesses(num_plies) This value specifies a list of ply thicknesses.
REAL orientations(num_plies) This value specifies a list of ply orientations.
INTEGER iconven This value specifies the stacking sequence convention.
REAL offset This value specifies the offset.
LOGICAL offset_def This value specifes, when set to TRUE, that the input
value offset is to be used. When set to FALSE, the
input value offset will be ignored.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change
in status or an error.
Remarks:
The input value ply_names is a string that consists of the number of 32 character fields specified
by the input value num_plies. If an individual ply name is less that 32 characters in length it
must be padded by concatinating spaces so that the total name length is 32 characters.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000120 The material specified in the query was not found.
13000136 The specified material has an invalid directionality flag.
External Dependencies and Side Effects:
This routine access the material, laminate and laminate_layer tables.
Example:
Please see db_set_comp_lam (p. 1299) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
284
Function Descriptions
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Loads and Boundary Conditions
11
■ General
■ Database
Main Index
286
Function Descriptions
11.1 General
lbc_create (name, type_id, cat_id, dyn_flag, num_ar, ar_id, aplist1, aplist2, fem_flag,
targ_elem, lbc_sf, cid_id, no_data_flag, num_dat, var_id, sv, null_flag,
null_var, datatype, ivalue, rvalue, fldid, dyn_fldid, node_id)
Description:
Create the Loads and Boundary Condition Set ( i.e., for positionally dependent quantities field
references are store not actual values).
Input:
STRING name[] Load/BC Set Name - user specified.
INTEGER type_id Load/BC Type -disp, force, etc.
INTEGER cat_id Category - Nodal, Elem Uni, Elem Var.
INTEGER dyn_flag Dynamic Flag = FA_TRUE if dynamic.
INTEGER num_ar Number of Application Regions.
INTEGER ar_id (2) Appl Region db ID.
STRING aplist1[] Application Region 1 list.
STRING aplist2[] Application Region 2 list.
INTEGER fem_flag (5) FEM Flag = FA_TRUE if FEM entities FEM Flag(4) = app-
reg-couple, FEM Flag (5) = app-reg-order.
INTEGER targ_elem (3) Target Element Dimension.
REAL lbc_sf Lbc Set Scale Factor.
INTEGER cid_id Coordinate System ID.
INTEGER no_data_flag No_Data_Flag = FA_TRUE if no data case is valid.
INTEGER num_dat Number of input data variables.
INTEGER var_id (20) Input Variable Data ID.
INTEGER sv (20) Indicates whether data is scalar or vector.
INTEGER null_flag (20) Null vector flag =1, if null allowed.
INTEGER null_var (20, 3) Flag indicating whether this vector comp is null null_var
= -1 if null, 0 if not null.
INTEGER datatype (20) Indicates datatypes, (e.g. integer, real, field (see
dbcodes.h); DbInt).
INTEGER ivalue (20) Integer value.
REAL rvalue (20, 3) Real value.
INTEGER fldid (20, 3) Field ID.
INTEGER dyn_fldid (20, 3) Dynamic Field ID.
INTEGER node_id (20) Node ID.
Output:
INTEGER <Return Value> See error returned.
Comments:
Entity types and ids will change based on topological description. Displays loads/bcs graphics.
Currently only one application region is being processed.
Error Conditions:
26002020 Load/BC "%A%" already exists. Do you wish to overwrite?
26006004 Dynamic memory allocation error encountered.
Main Index
CHAPTER 11 287
Loads and Boundary Conditions
Example:
Please see lbc_create (p. 1351) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Delete the Loads and Boundary Condition Sets (and their related associations - application
region, data, load case association.
Input:
INTEGER count Number of Load/BC Sets to delete.
INTEGER del_id ( count) Load/BC Set Ids.
LOGICAL update_graph If TRUE, then update graphics.
Output:
INTEGER <Return Value> FA_NOERROR success; FA_ERROR Failure.
Comments:
Removes the Load/BC sets from all applicable load cases.
Example:
Please see lbc_delete (p. 1354) in the MSC.Acumen, Volume 2: Code Examples.
lbc_eval_fem_by_lc ( lc_name )
Description:
Given a load case name, get all the lbcs associated with it and check to see if each lbc has any
unevaluated fem_xx_lbcs. If it does then create the appropriate fem_xx_table in the db.
Input:
STRING lc_name[] Load Case Name.
Output:
INTEGER <Return Value> See error returned.
Error Conditions:
3001301 Load Case "%A%" has no Load/BC sets.
3001101 Load Case "%A%" does not exist.
Example:
Please see lbc_eval_fem_by_lc (p. 1356) in the MSC.Acumen, Volume 2: Code Examples.
lbc_eval_fem_lbc ( lbc_id )
Description:
Given an lbc id, check to see if it has any unevaluated fem_xx_lbcs. If it does then create the
appropriate fem_xx_table in the db.
Input:
INTEGER lbc_id Load/BC ID.
Output:
INTEGER <Return Value> See error returned.
Main Index
288
Function Descriptions
Error Conditions:
26002144 The application region for Load/BC Set "%A%" is empty.
Example:
Please see lbc_eval_fem_lbc (p. 1356) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Given lbc object, method, target element type, and geometry group return the select databox
datatype and label.
Input:
INTEGER lbc_id Load/BC ID.
STRING obj_str[] Load/BC object, e.g., Displacement.
STRING meth_str[] Load/BC Category - Nodal, Element Uniform, Element
Variable.
STRING targ_str[] Target Element Type - Beam, Shell, Solid, PTEAM.
STRING geo_group[] Geometry Group - Geometry or FEM.
Output:
STRING sdbx_type[] Select databox type.
STRING sdbx_label[] Select databox label.
INTEGER <Return Value> See error returned.
Error Conditions:
26002410 "%A%" is an invalid Load/BC target element type.
26002400 "%A%" is an invalid Load/BC type.
Example:
Please see lbc_get_sdbx_datatype (p. 1357) in the MSC.Acumen, Volume 2: Code Examples.
lbc_gm ( )
Description:
Loads/BCs Graphics Manager.
1. Gets the valid groups to which lbcs will be posted.
2. Gets the lbc_types which should be posted from pref form.
3. Filters out the lbc_ids in the current load case which should be posted.
4. Modifies the LBC_IN_GROUP relation as appropriate.
5. Creates the Group Vector Table.
6. Assigns the Group Vector Table to the valid groups.
Input:
none
Output:
INTEGER <Return Value> See error returned.
Error Conditions:
26006004 Dynamic memory allocation error encountered.
Main Index
CHAPTER 11 289
Loads and Boundary Conditions
Example:
Please see lbc_gm (p. 1358) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Given an lbc id, get the data in the ss_lbc, sv_lbc, ds_lbc, and/or dv_lbc table.
Input:
INTEGER type_id LBC Type Id - disp, force.
INTEGER cat_id Category - Nodal, Elem Uni, Elem Var.
INTEGER targ_elem_id Target Element Dimension.
Output:
INTEGER nvar Number of input variable (10 max).
INTEGER varid ( ) Input data variable ID.
INTEGER vector_flag ( ) Vector flag = 1, if vector.
INTEGER marker ( ) Graphics symbol.
INTEGER color ( ) Colorbox ID.
INTEGER anchor ( ) Anchor style.
INTEGER <Return Value> Returns success or failure of the routine.
0 = success
-1 = Error occurred
Example:
Please see lbc_graphics_defn (p. 1359) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will parse a loads and boundary condition data string, verify that it contains valid
scalar or scalar field information, and return the value in the string.
Input:
STRING data_string[] This value specifies a loads and boundary condition
property.
INTEGER data_type This value specifies the property data type.
This value should be set to either 1 to parse integers, 3 to
parse real values, 4 to parse tokens, 5 to parse nodes,
and 7 to parse field values.
If the "datatype" input value is not set to a value of 1 or
5, this function will attempt to parse the "dval" string as
a character, node, or field values based on information
obtained from the string itself.
Main Index
290
Function Descriptions
Output:
INTEGER field_id This value returns the value of id for the scalar field
specified by the input value data_string.
INTEGER null_flag This value returns a non zero value if the input value
data_string represents a valid loads and boundary
condition property that has no data.
REAL data_string_value This value returns the results of the parse of the input
value data_string.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
14000004 LpSublistType: I am being invoked with a NULL list.
26005002 The data entered in databox %I% on the "Input Data" form is invalid.
26005003 Databox %I% on the "Input Data" form requires a Scalar field.
26005001 The data entered in databox %I% on the "Input Data" form cannot be parsed.
Example:
Please see lbc_lp_parse_sca (p. 1360) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will parse a loads and boundary condition vector string, verify that it contains
valid vector or vector field information, and return the value in the string.
Input:
STRING data_string[] This value specifies a loads and boundary condition
property
Output:
INTEGER field_id This value returns the value of id for the scalar field
specified by the input value data_string.
INTEGER null_flag This value returns a non zero value if the input value
data_string represents a valid loads and boundary
condition property that has no data.
REAL data_string_value This value returns the results of the parse of the input
value data_string.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
14000011 LpSublistAttributeGet: Attempt to get attribute from NULL list.
26005004 Databox %I% on the "Input Data" form requires a Spatial Vector field.
26005001 The data entered in databox %I% on the "Input Data" form cannot be parsed.
Example:
Please see lbc_lp_parse_vec (p. 1361) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 11 291
Loads and Boundary Conditions
Description:
Creates graphics marker tables for display on groups.
- Filters out the lbc_ids in the current load case which should be posted.
- Modifies the LBC_IN_GROUP relation as appropriate.
- Creates or modifies the Group Vector Table.
- Assigns the Group Vector Table to the valid groups
Input:
INTEGER num_lbcs Number of lbc IDs.
INTEGER lbc_ids ( ) LBC IDs to process.
INTEGER num_grps Number of groups .
INTEGER grp_ids ( ) Group IDs to assign table to.
Output:
INTEGER <Return Value> See error returned.
FA_NOERROR = success
FA_ERROR = failure
Example:
Please see lbc_plot_markers (p. 1362) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Main application routine for the Loads/BCs Show Plot Scalar option. A scalar graphics table is
loaded with the specified load/BC and is assigned to the specified groups.
Input:
STRING type_name[] The Load/BC type name.
INTEGER type_id Load/BC type ID.
REAL dynamic_val The value of the dynamic field to evaluate.
STRING var_name[] The name of the variable to be loaded into the scalar
table.
STRING component[] The component of the variable to be loaded into the
scalar table.
INTEGER num_lbcs The number of lbcs to contour.
INTEGER lbc_ids (num_lbcs) The IDs of the lbcs to contour.
INTEGER num_grps The number of groups to assign the scalar table to.
INTEGER grp_ids (num_lbcs) The IDs of the groups to assign the scalar table to.
Output:
INTEGER <Return Value> See error returned.
Error Conditions:
26004001 Unable to assign the scalar table to Group "%A%".
26004003 Invalid component "%A%" was specified. Valid component strings are
"Resultant", "Component1", "Component2", and "Component3".
Main Index
292
Function Descriptions
Example:
Please see lbc_show_plot_scalar (p. 1364) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the application region entities - types, ids, and sub ids (if applicable) from the database.
Input:
INTEGER id Load/BC ID.
INTEGER region_id App Region ID.
INTEGER ent_count Number of entities in appl region.
Output:
STRING geo_str[] Geometry group = Geometry or FEM
STRING app_list[VIRTUAL] Application list.
INTEGER <Return Value> See error returned.
Comments:
Main Index
CHAPTER 11 293
Loads and Boundary Conditions
This routine can be used to return multiple lists by returning the array ARID, increasing the
number of PCL string pointer arguments, and filling them out.
Error Conditions:
26006004 Dynamic memory allocation error encountered.
Example:
Please see loadsbcs_get_appl_region_list (p. 1367) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Returns the coordinate system id (Expects there to be only one Coordinate system in the list).
Input:
STRING cid_list[] Coordinate System List.
Output:
INTEGER cid_id Coordinate System ID.
INTEGER <Return Value> See error returned.
Error Conditions:
26002205 No Coordinate Frame chosen. Select one.
26002210 Only one coordinate system is allowed. %I% coordinate systems were input.
26002215 Coordinate Frame List %A% is invalid.
Example:
Please see loadsbcs_lp_coord (p. 1368) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
294
Function Descriptions
11.2 Database
Description:
Fetches unevaluated dynamic scalar lbc data attached to an LBC.
Input:
INTEGER lbc_id The ID of the lbc that this lbc data is attached to.
INTEGER max The max number of dynamic scalar data records that can be
passed back to the caller.
Output:
INTEGER nbr The number of dynamic scalar data records retrieved from
the database.
INTEGER vid() The ID of the definition variable that corresponds to this
scalar data
REAL rv() Scalar data values (real).
INTEGER sc_pos() Field IDs for positional dependent scalars.
INTEGER sc_dyn() Field IDs for dynamic dependent scalars.
REAL scale_factor() LBC set scale factor.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Fetches one or more entries in the “ds_lbc” relation in the database.
Example:
Please see db_bulk_get_lbc_ds (p. 1304) in the MSC.Acumen, Volume 2: Code Examples.
db_bulk_get_lbc_dv ( lbc_id, max, nbr, vid, rv, ve_pos, ve_dyn, nv, scale_factor )
Description:
Fetches unevaluated dynamic vector LBC data attached to an LBC.
Input:
INTEGER lbc_id The ID of the lbc that this lbc data is attached to.
INTEGER max The max number of dynamic vector data records that can be
passed back to the caller.
Output:
INTEGER nbr The number of dynamic vector data records retrieved from
the database.
INTEGER vid() The ID of the definition variable that corresponds to this
vector data.
REAL rv(j, 3) Vector data values (real) {i = vector component;(3) j = vector
number (row nbr)}
INTEGER ve_pos(j, 3) Field IDs for positional dependent vectors {i = vector
component;(3) j = vector number (row nbr)}
Main Index
CHAPTER 11 295
Loads and Boundary Conditions
Description:
Fetches unevaluated static scalar LBC data attached to an LBC.
Input:
INTEGER lbc_id The ID of the lbc that this lbc data is attached to.
INTEGER max The max number of static scalar data records that can be
passed back to the caller.
Output:
INTEGER nbr The number of static scalar data records retrieved from the
database.
INTEGER vid() The ID of the definition variable that corresponds to this
scalar data.
REAL rv() Scalar data values (real).
INTEGER sc_pos() Field IDs for positional dependent scalars.
REAL scale_factor() LBC set scale factor.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Fetches one or more entries in the “ss_lbc” relation in the database.
Example:
Please see db_bulk_get_lbc_ss (p. 1308) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
296
Function Descriptions
Description:
Fetches unevaluated static vector LBC data attached to an LBC.
Input:
INTEGER lbc_id The ID of the lbc that this lbc data is attached to.
INTEGER max The max number of static vector data records that can be
passed back to the caller.
Output:
INTEGER nbr The number of static vector data records retrieved from the
database.
INTEGER vid() The ID of the definition variable that corresponds to this
vector data.
REAL rv(j, 3) Vector data values (real) {i = vector component (3); j = vector
number (row nbr)}
INTEGER ve_pos(j, 3) Field IDs for positional dependent vectors {i = vector
component (3); j = vector number (row nbr)}
INTEGER nv(j, 3) Flag indicating whether this vector component contains valid
data. {i = vector component (3); j = vector number (row nbr)}
a value of -1 denotes a missing value,
a value of 0 denotes not missing
REAL scale_factor() LBC set scale factor.
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:
13000093 Too Many Values Returned for Space Allocated.
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Fetches one or more entries in the “sv_lbc” relation in the database.
Example:
Please see db_bulk_get_lbc_sv (p. 1309) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the number of appl_geo_regions stored in the database by lbc_type_id.
Input:
INTEGER id The id of the lbc_type_id with which the appl_geo_regions
are associated
Output:
INTEGER count The number of appl_geo_regions stored in the database
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Main Index
CHAPTER 11 297
Loads and Boundary Conditions
db_count_lbc ( count )
Description:
Retrieves the number of lbcs stored in the database.
Input:
none
Output:
INTEGER count The number of appl_geo_regions stored in the database
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Counts all records in the “lbc” relation in the database.
Example:
Please see db_count_lbc (p. 1312) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the count of entity in each application region, and the application region ids for each
lbc stored in the database.
Input:
INTEGER id The lbc ID for which the region information is requested
Output:
INTEGER apprid(2) The IDs of the application regions stored in the
database. At present two is the maximum.
INTEGER count(2) The number of entities for each appl_geo_regions stored
in the database. at present there is a maximum of two
corresponding to the application region IDs.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Counts all entities in the “lbc_app_region” relation in the database for a specified lbc_id and
app_region_id.
Main Index
298
Function Descriptions
Example:
Please see db_count_lbc_appl_region_entity (p. 1313) in the MSC.Acumen, Volume 2: Code
Examples.
db_count_lbc_types ( nbr_of_lbcs )
Description:
Returns the total number of distinct lbcs in the database.
Input:
none
Output:
INTEGER nbr_of_lbcs The number of lbc type IDs
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
External Dependencies and Side Effects:
Accesses records in the lbc_type table in the database.
Example:
Please see db_count_lbc_types (p. 1314) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the number of loads and boundary conditions for an element.
Input:
INTEGER elem_id The element ID.
Output:
INTEGER nbr_of_lbcs The number of lbcs associated with the element.
INTEGER <Return Value> Returns the success or failure of the routine
External Dependencies and Side Effects:
This routine access the element, fem_ss_lbc, fem_sv_lbc, fem_ds_lbc and fem_dv_lbc tables.
Example:
Please see db_count_loads_for_element (p. 1316) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves the number of load cases associated with a lbc.
Input:
INTEGER lbc_id The lbc ID
Output:
INTEGER num_loadcases The number of distinct load cases associated with the above
lbc ID
Main Index
CHAPTER 11 299
Loads and Boundary Conditions
db_delete_lbc ( lbc_id )
Description:
Deletes an lbc entry from the database.
Input:
INTEGER lbc_id Id of the lbc to be deleted.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
External Dependencies and Side Effects:
Deletes one record in the “lbc” table in the database, and deletes from any associated lbc entity.
Example:
Please see db_delete_lbc (p. 1317) in the MSC.Acumen, Volume 2: Code Examples.
db_delete_lbc_defn (<lbc_type_id>)
Description:
This function will delete the lbc type definition from the database.
Input:
INTEGER lbc_type_id ID of the lbc type in the database.
Output:
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error values returned by this function.
Example:
Please see db_delete_lbc_defn (p. 1318) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_appl_geo_regions ( lbc_id )
Description:
Gets all records in the LbcAppRegion table relation for the specified lbc_id from the database,
in get all, get next method. See also db_get_next_appl_geo_region (p. 300).
Input:
INTEGER lbc_id The ID of the lbc for the new records
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine.
Main Index
300
Function Descriptions
Example:
Please see db_get_all_appl_geo_regions (p. 1319) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets next record in the lbcAppRegion table relation for the specified lbc id from the database.
See also db_get_all_appl_geo_regions (p. 299).
Input:
none
Output:
INTEGER ar_id The sequential ID assigned to this application geometry
region.
INTEGER etype The entity type to which this lbc has been applied.
INTEGER eid The entity ID to which this lbc has been applied.
INTEGER esid The entity sub_id to which this lbc has been applied (if
appropriate).
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses records in the “Appl Geo Region” table in the database.
Example:
See example for db_get_all_appl_geo_regions (p. 299). See also
db_get_next_appl_geo_region (p. 1336) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_appl_reg_defns ( lbc_tid )
Description:
Gets all application geometry region definitions for an lbc type definition from the database, in
get all, get next method. See also db_get_next_appl_reg_defn (p. 301)
Input:
INTEGER lbc_tid The ID of the lbc type in the database.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine.
Example:
Please see db_get_all_appl_reg_defns (p. 1320) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 11 301
Loads and Boundary Conditions
Description:
Gets next application geometry region definition for an lbc type definition from the database.
See also db_get_all_appl_reg_defns (p. 300).
Input:
none
Output:
INTEGER vid The sequential ID assigned to this application geometry
region.
INTEGER label[31] The label to be placed in front of the databox on the “Create
LBC” form.
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
Example:
See example for db_get_all_appl_reg_defns (p. 300). See also db_get_next_appl_reg_defn
(p. 1337) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_lbcs_new ( )
Description:
This function will set up the data required to retrieve all of the information about all of the
LBCs in the memory database.
Input:
none
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine.
Example:
Please see db_get_all_lbcs_new (p. 1326) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will retrieve all of the information about all of the LBCs in the memory database
one structure at a time.
Input:
none
Output:
INTEGER id The ID of the LBC structure.
STRING name[] The name of this lbc table.
Main Index
302
Function Descriptions
db_get_all_lbc_names ( )
Description:
Gets all lbc names & types from the database, in get all, get next method. See also
db_get_next_lbc_name (p. 302).
Input:
none
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:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “lbc” table in the database.
Example:
Please see db_get_all_lbc_names (p. 1321) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets next lbc name & type from the database.
Input:
none
Main Index
CHAPTER 11 303
Loads and Boundary Conditions
Output:
INTEGER id The unique internal ID of the lbc type created in the
database.
STRING name[31] The name of the lbc type being created in the database.
INTEGER type The type ID of the lbc (from the lbc_type table).
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “lbc” table in the database.
Example:
See example for db_get_all_lbc_names (p. 302). See also db_get_next_lbc_name (p. 1338) in
the MSC.Acumen, Volume 2: Code Examples.
db_get_all_lbc_names_by_type ( lbc_typ_id )
Description:
Gets all lbc type names from the database, in get all next method. See also
db_get_next_lbc_name_by_type (p. 303).
Input:
INTEGER lbc_type_id The lbc type ID for the row selected.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “lbc” table in the database.
Example:
Please see db_get_all_lbc_names_by_type (p. 1322) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets next lbc type name from the database. See also db_get_all_appl_reg_defns (p. 300).
Input:
none
Output:
INTEGER id The unique internal ID of the lbc in the database.
STRING name[31] The name of the lbc being in the database.
Main Index
304
Function Descriptions
db_get_all_lbc_type_defns ( )
Description:
Gets all lbc type definitions from the database, in get all, get next method.See also
db_get_next_lbc_type_defn (p. 304).
Input:
none
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:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “load case” table in the database.
Example:
Please see db_get_all_lbc_type_defns (p. 1323) in the MSC.Acumen, Volume 2: Code Examples.
db_get_next_lbc_type_defn ( id, name, class, form, gbc, cid, g_sym, sv, nv, nbr_ac,
an_code, defcol, cbid, anstyl )
Description:
Gets next lbc type definition from the database. See also db_get_all_lbc_type_defns (p. 304).
Input:
none
Output:
INTEGER id The unique internal ID of the lbc type created in the database.
STRING name[31] The name of the lbc type being created in the database.
INTEGER class The class of the lbc type to be created. (Structural, Thermal,
Other)
INTEGER form The form of the lbc being created. (Body or Boundary)
INTEGER gbc Flag indicating whether this is a global boundary condition.
Main Index
CHAPTER 11 305
Loads and Boundary Conditions
INTEGER cid Flag indicating whether the lbc can be defined in an alternate
coord frame.
INTEGER g_sym The graphics symbol used to display this lbc.
INTEGER sv Flag indicating whether this lbc is a scalar or vector.
INTEGER nv Flag indicating whether (for vector lbcs) one (or more) of the
components can be null.
INTEGER nbr_ac The number of analysis codes supplied.
INTEGER an_code() List of valid analysis code IDs for this lbc.
INTEGER defcol Default color of associated graphics.
INTEGER cbid Color box ID of associated graphics.
INTEGER anstyl Anchor style of associated graphics.
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “load case” table in the database.
Example:
See example for db_get_all_lbc_type_defns (p. 304). See also db_get_next_lbc_type_defn
(p. 1340) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_lbc_type_names ( )
Description:
Gets all lbc type names from the database, in get all, get next method. See also
db_get_next_lbc_type_name.
Input:
none
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:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “lbc_type” table in the database.
Example:
Please see db_get_all_lbc_type_names (p. 1325) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
306
Function Descriptions
Description:
Gets next lbc type name from the database. See also db_get_all_lbc_type_names (p. 305).
Input:
none
Output:
INTEGER id The unique internal ID of the lbc type in the database.
STRING name[31] The name of the lbc type being in the database.
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “lbc_type” table in the database.
Example:
See example for db_get_all_lbc_type_names (p. 305). See also
db_get_next_lbc_type_name (p. 1342) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_lbc_var_defns ( id )
Description:
Gets all the lbc variables for an lbc type definition from the database, in get all, get next
method. See also db_get_next_lbc_var_defn (p. 306).
Input:
INTEGER id The lbc type ID for the row selected.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine.
Example:
Please see db_get_all_lbc_var_defns (p. 1325) in the MSC.Acumen, Volume 2: Code Examples
.
Description:
Gets next lbc variable for an lbc type definition from the database. See also
db_get_all_lbc_var_defns (p. 306).
Input:
none
Output:
INTEGER cat The category of this lbc type.
STRING eldim The element shape to get this label.
Main Index
CHAPTER 11 307
Loads and Boundary Conditions
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:
13000002 Unrecoverable database error.
13000117 The query specified has completed.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses records in the “Lbc Variable Defn” table in the database.
Example:
See example under db_get_all_lbc_var_defns (p. 306). See also db_get_next_lbc_var_defn
(p. 1343) in the MSC.Acumen, Volume 2: Code Examples.
db_get_lbc_id ( name, id )
Description:
Retrieves the lbc id associated with the specified lbc name.
Input:
STRING name[31] Pointer to a string containing the name of the lbc.
Output:
INTEGER id Location to receive the resulting value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000103 No LBC was found.
13000007 An unspecified database error occurred.
Example:
Please see db_get_lbc_id (p. 1328) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the lbc name associated with the specified lbc id.
Input:
INTEGER id Integer containing the ID of the lbc.
Output:
STRING name[31] Pointer to a string where the name of the lbc is to be placed.
INTEGER <Return Value> Returns the success or failure of the routine.
Example:
Please see db_get_lbc_name (p. 1329) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
308
Function Descriptions
db_get_lbc_type_defn ( name, id, class, form, gbc, cid, g_sym, sv, nv, nbr_ac,
an_code, defcol, cbid, anstyl )
Description:
This function will get the attributes of an lbc type definition from the database.
Input:
STRING name[31] This value specifies the name of the lbc type.
Output:
INTEGER id This value returns the id value of the lbc type.
INTEGER class This value returns the class of the lbc type which can be either
structural, thermal, or other.
INTEGER form This value returns the form of the lbc which can be either a body
or a boundary.
INTEGER gbc This value returns an indication stating if the lbc is a global
boundary condition.
INTEGER cid This value returns an indication stating if the lbc can be defined
in an alternate coord frame.
INTEGER g_sym This value returns the graphics symbol used to display this lbc.
INTEGER sv This value returns an indication stating if this lbc is scalar or
vector.
INTEGER nv This value indicates for vector lbcs whether one or more of the
components can be null.
INTEGER nbr_ac The value returns the number of analysis codes applied to this
lbc.
INTEGER an_code(20) This value returns the valid analysis code id values for this lbc.
INTEGER defcol This value returns the default color of the graphics associated
with the lbc.
INTEGER cbid This value returns the color box id of the graphics associated
with the lbc.
INTEGER anstyl This value returns the anchor style of the graphics associated
with the lbc.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
13000101 No LBC Definition was found.
External Dependencies and Side Effects:
Accesses all records in the “lbc type” table in the database.
Example:
Please see db_get_lbc_type_defn (p. 1330) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 11 309
Loads and Boundary Conditions
Description:
Gets the lbc variable defn from the database.
Input:
INTEGER lbc_type_id The ID of the lbc type in the database.
INTEGER lbc_category The ID of the lbc type in the database
INTEGER eldim The dimensionality of the lbc type in the database.
STRING label[] The label of the variable in the database.
Output:
INTEGER id The unique internal ID of the lbc type variable in the
database.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000101 No LBC Definition was found.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Accesses all records in the “lbc_variable_defn” table in the database.
Example:
Please see db_get_lbc_var_defn (p. 1332) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the loads and boundary conditions for an element.
Input:
INTEGER nbr_of_lbcs The amount of memory allocated for the lbc IDs.
INTEGER elem_id The element ID.
Output:
INTEGER lbc() The lbc IDs.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000093 Too Many Values Returned for Space Allocated.
13000157 Fewer values were returned than the amount requested.
External Dependencies and Side Effects:
This routine access the element, fem_ss_lbc, fem_sv_lbc, fem_ds_lbc and fem_dv_lbc tables.
Example:
Please see db_get_loads_for_element (p. 1335) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
310
Function Descriptions
Description:
Retrieves the number of load cases associated with an lbc.
Input:
INTEGER lbc_id The ID of the lbcs to which the load cases are associated in
the database.
INTEGER num_loadcases The input/output field containing the maximum number of
load cases on input and the actual number of load cases
retrieved from the database on output.
Output:
INTEGER num_loadcases The input/output field containing the maximum number of
load cases on input and the actual number of load cases
retrieved from the database on output.
INTEGER loadcase_ids() Array of the IDs of the load cases assigned to this lbc id.
INTEGER priority() Priority associated with the assigned load set.
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:
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Retrieves multiple entries from the “assigned_load_case” relation.
Example:
Please see db_get_load_cases_with_lbc (p. 1333) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves all valid categories from the database for a specified type. The maximum number of
categories for a type is three.
Input:
INTEGER typid The specific lbc type for which the category is requested.
Output:
INTEGER cat(3) The categories associated with the specified lbc type.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches the categories associated with specified type from the lbc_variable_defn relation.
Example:
Please see db_get_valid_cat_by_type (p. 1345) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 11 311
Loads and Boundary Conditions
Description:
Retrieves all valid element dimensions for the specified types and categories in the database.
The maximum number of element dimensions is five.
Input:
INTEGER typid The specific lbc type for which the element dimensionality is
requested.
INTEGER cat The categories associated with the specified lbc type.
Output:
INTEGER eldim(5) The types of element dimensionality which correspond to the
input type and category.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches the element dimensionalities associated with specified type and category of lbc from
the lbc_variable_defn relation.
Example:
See example for db_get_valid_cat_by_type (p. 310). See also
db_get_valid_eldim_by_type_cat (p. 1346) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves all valid element variable ids for the specified combination pf type, category, and
dimensionality specified from the database.
Input:
INTEGER typid The specific lbc type for which the element dimensionality is
requested.
INTEGER cat The categories associated with the specified lbc type.
INTEGER eldim The types of element dimensionality for which the variable
IDs are requested.
INTEGER count Input/Output field which specifies the maximum storage
allocated by the calling routine, and outputs the actual
number of variable IDs fetched if it is not greater than the
count.
Output:
INTEGER count Input/Output field which specifies the maximum storage
allocated by the calling routine, and outputs the actual
number of variable IDs fetched if it is not greater than the
count.
INTEGER vid() Array of variable IDs defined by the combination of items
input.
INTEGER <Return Value> Returns the success or failure of the routine.
Main Index
312
Function Descriptions
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Fetches the element dimensionalities associated with specified type and category of lbc from
the lbc_variable_defn relation.
Example:
Please see db_get_valid_lbc_var_ids (p. 1348) in the MSC.Acumen, Volume 2: Code Examples.
db_modify_load_case ( id, name, type, desc, nbrlc, lbc, dlcname, mv, priority )
Description:
Modifies a load case in the database.
Input:
INTEGER id The unique internal ID of the load case being modified in the
database.
STRING name[80] The new name of the load case being modified in the
database.
INTEGER type The new type of the load case being modified.
STRING desc[256] The description of the load case being modified.
INTEGER nbrlbc The number of lbcs being attached to this load case.
INTEGER lbc() Array of the IDs of the load\bc set IDs assigned to this load
case.
STRING dlcname[80] The name of the dynamic load case being used as a basis for
this definition. (This field is only applicable if a static load
case is being created from a dynamic load case.)
REAL mv Map variable.
INTEGER priority() The priority for the assigned load set.
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:
13000075 Load case name exists.
13000052 Load Case Not Found.
13000002 Unrecoverable database error.
External Dependencies and Side Effects:
Updates an entry in the “load_case” relation in the database and deletes and adds multiple
entries to the “assigned_load_case” relation.
Example:
Please see db_modify_load_case (p. 1349) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Materials
12
■ Database
■ Laminate Modeler
Main Index
314
Function Descriptions
12.1 Database
Description:
Retrieves all possible values of the condense option for the specified input options.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
Output:
INTEGER nbr The number of condense option codes that were found for the
above specified set of parameters.
INTEGER coc() The unique condense option code values that were found for
the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Fetches all condense option codes for the input set of parameters.
Example:
Please see db_bulk_get_possible_cond_opts1 (p. 1370) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves all possible values of the condense option for the specified input options.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
INTEGER goc The ID of the geometric option code selected.
Output:
INTEGER nbr The number of condense option codes that were found for the
above specified set of parameters.
INTEGER coc() The unique condense option code values that were found for
the above specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Main Index
CHAPTER 12 315
Materials
Remarks:
Fetches all condense option codes for the input set of parameters.
Example:
Please see db_bulk_get_possible_cond_opts2 (p. 1371) in the MSC.Acumen, Volume 2: Code
Examples.
db_bulk_get_possible_dof_sets (etid, atid, acid, coc, goc, foc, loc, mlc, mdc, nbr, dsid)
Description:
Retrieves all possible values of the condensation option for the specified input options. If an
input option is 0, it does not have a uniquely assigned value yet. The first three parameters
may not be zero.
Input:
INTEGER etid The ID of the element type selected by the user.
INTEGER atid The ID of the analysis type currently selected.
INTEGER acid The ID of the analysis code currently selected.
INTEGER coc The ID for the condense option if it has been uniquely
determined at point. otherwise, zero.
INTEGER goc The code for the geometric option if it has been uniquely
determined at point. otherwise, zero.
INTEGER foc The code for the formulation option if it has been uniquely
determined at point. otherwise, zero.
INTEGER loc The code for the laminate option if it has been uniquely
determined at point. otherwise, zero.
INTEGER mlc The code for the formulation option if it has been uniquely
determined at point. otherwise, zero.
INTEGER mdc The code for the material directionality if it has been uniquely
determined at point. otherwise, zero.
Output:
INTEGER nbr The number of condense option codes that were found for the
above specified set of parameters
INTEGER dsid() The unique dof set ID values that were found for the above
specified set of values.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Fetches all dof set ids for the input set of parameters.
Example:
Please see db_bulk_get_possible_dof_sets (p. 1372) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
316
Function Descriptions
Description:
Gets a constitutive model in the database.
Input:
INTEGER cid The analysis code ID.
INTEGER cm_id The constitutive model ID.
Output:
STRING cm_name[] The constitutive model name.
INTEGER linearity_code The linearity code.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine retrieves a row in the constitutive_model table in the database.
Example:
See example for db_get_matl_category (p. 318) or db_get_matl_prop_defn (p. 331). See also
db_get_constitutive_model (p. 1394) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the number of valid constitutive models for the given analysis code ID, analysis type
ID and material category ID.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER mc_id The material category ID.
Output:
INTEGER nbr The number of valid constitutive models.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_constitutive_models table.
Example:
See example for db_get_valid_const_models (p. 317). See also
db_get_valid_const_models_count (p. 1414) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 317
Materials
Description:
Returns the constitutive model IDs for the given analysis code ID, analysis type ID and
material category ID.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER mc_id The material category ID.
Output:
INTEGER cm_id() The constitutive model IDs.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_constitutive_models table.
Example:
Please see db_get_valid_const_models (p. 1413) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Modifies a constitutive model specified in the database.
Input:
INTEGER mid The material ID.
INTEGER cm_id The constitutive model ID.
INTEGER magics(5) The magic numbers ID.
INTEGER active The active flag.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000120 The material specified in the query was not found
13000164 The constitutive model was not found in the database
Remarks:
This routine modifies rows in the constitutive_mmodels_specified table in the database.
Example:
Please see db_mo_const_models_specified (p. 1417) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
318
Function Descriptions
Description:
Deletes a constitutive model defn from the database.
Input:
INTEGER mid The ID of the material associated with the material property
value.
INTEGER cmid The ID of the constitutive model.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Deletes one record in the “matl_const_model_defn” table in the database.
Example:
Please see db_delete_matl_const_model (p. 1380) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets a material category definition in the database.
Input:
INTEGER cid The analysis code ID.
INTEGER mc_id The material category defn ID.
Output:
STRING mc_name[] The material category defn name.
INTEGER dirctionality The directionality code.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine retrieves a row in the matl_category table in the database.
Example:
Please see db_get_matl_category (p. 1397) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 319
Materials
Description:
Returns the number of valid material categories for the given analysis code ID and analysis
type ID.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
Output:
INTEGER nbr The number of valid material categories.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_material_categories table.
Example:
Please see db_get_valid_mtl_category_cnt (p. 1416) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Returns the valid material categories for the given analysis code ID and analysis type ID.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
Output:
INTEGER mc_id() The material category ids.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the valid_material_categories table.
Example:
See example for db_get_valid_mtl_category_cnt (p. 319). See also
db_get_valid_mtl_categories (p. 1415) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
320
Function Descriptions
Description:
Creates ’nbr’ records in the allowable_magic_prop table.
Input:
INTEGER cid The analysis code ID.
INTEGER mc_id The material category ID. See Material Categories (p. 389) in
the PCL and Customization.
INTEGER magic_category_id The magic category ID. See Material Options and Material
Option Categories (p. 393) in the PCL and Customization.
INTEGER magic_alias_id() The magic (ooh) alias ID. See
db_create_mtl_magics_options (p. 394) in the PCL and
Customization.
INTEGER nbr The number of magic aliases.
Output:
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine access the allowable_magic_prop table.
Example:
Please see db_create_mtl_allowable_magics (p. 1376) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Returns the number of allowable magic properties for the given magic_category_id, code_id,
and matl_cat_id
Input:
INTEGER code_id The analysis code ID.
INTEGER matl_cat_id The material category ID.
INTEGER magic_category_id The magic category ID.
Output:
INTEGER nbr The number of magic aliases.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the allowable_magic_prop table.
Example:
Please see db_get_mtl_allowable_magic_cnt (p. 1402) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 12 321
Materials
Description:
Retrieves a count of the number of distinct geometric (or laminate, or...) option codes.
Input:
None.
Output:
INTEGER goc The count of geometric options.
INTEGER coc The count of condense options.
INTEGER loc The count of laminate options.
INTEGER foc The count of formulation options.
INTEGER dsid The count of dof sets.
INTEGER etop The count of element topologies.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Counts all of the listed option codes.
Example:
Please see db_count_options (p. 1375) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the number of allowable magic properties for the given magic_category_id, cid, and
mc_id.
Input:
INTEGER code_id The analysis code ID.
INTEGER matl_cat_id The material category ID.
INTEGER magic_category_id The magic category ID.
Output:
INTEGER magic_alias_id() The magic alias ids.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the allowable_magic_prop table.
Example:
See example for db_get_mtl_allowable_magic_cnt (p. 320). See also
db_get_mtl_allowable_magics (p. 1403) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
322
Function Descriptions
Description:
Returns the material magic categories for the given cid, mc_id, and cm_id
Input:
INTEGER analysis_code_id The analysis code ID.
INTEGER analysis_type_id The analysis type ID.
INTEGER matl_category_id The material category ID.
INTEGER constit_model_id The constitutive model ID.
Output:
INTEGER magic_category_id() The magic category ids.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the matl_magic table.
Example:
Please see db_get_mtl_magics (p. 1404) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the number of material magic properties for the given analysis_code_id,
analysis_type_id, matl_category_id, and constit_model_id
Input:
INTEGER analysis_code_id The analysis code ID.
INTEGER analysis_type_id The analysis type ID.
INTEGER matl_category_id The material category ID.
INTEGER constit_model_id The constitutive model ID.
Output:
INTEGER nbr The number of magic categories.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
This routine access the matl_magic table.
Example:
See example for db_get_mtl_magics (p. 322). See also db_get_mtl_magics_count (p. 1406)
in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 323
Materials
Description:
Returns the magic label given the analysis code ID and the magic category.
Input:
INTEGER analysis_code_id The analysis code ID.
INTEGER analysis_type_id The analysis type ID.
INTEGER magic_category_id The magic category ID.
Output:
STRING magic_label[] The magic label.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000086 No Records Found
Remarks:
This routine access the matl_magic_definition table.
Example:
See example for db_get_mtl_magics (p. 322). See also db_get_mtl_magics_defn (p. 1407) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the magic alias given the analysis code ID and the magic alias.
Input:
INTEGER analysis_code_id The analysis code ID.
INTEGER magic_alias_id The magic alias ID.
Output:
STRING magic_name[] The magic alias.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000086 No Records Found
Remarks:
This routine access the matl_magic_alias table.
Example:
See example for db_get_matl_prop_defn (p. 331). Please see db_get_mtl_magics_options
(p. 1408) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
324
Function Descriptions
Description:
Returns the material name given the ID.
Input:
INTEGER id The material ID.
Output:
STRING mat_name[31] The name of the material.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000120 The material specified in the query was not found
Remarks:
This routine access the material table in the database.
Example:
Please see db_get_material_name_from_id (p. 1396) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Returns the material ID given the name.
Input:
STRING mat_name[31] The name of the material.
Output:
INTEGER id The material ID.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000120 The material specified in the query was not found
Remarks:
This routine access the material table in the database.
Example:
Please see db_get_material_id_from_name (p. 1395) in the MSC.Acumen, Volume 2: Code
Examples.
db_count_materials (count)
Description:
This function returns the number of materials currently defined in the database.
Input:
None.
Main Index
CHAPTER 12 325
Materials
Output:
INTEGER count The number of materials in the database
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Counts records in the “material” relation in the database for one specified region.
Example:
See example for db_get_all_material_names (p. 325). See also db_count_materials (p. 1373)
in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_material_names ()
Description:
Gets all material information from the database, in get all, get next method.
Input:
None.
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:
None.
Remarks:
None.
Example:
Please see db_get_all_material_names (p. 1385) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets all material information from the database, in get all, get next method.
Input:
None.
Output:
STRING name[] The name of the material retrieved from the database.
INTEGER id The ID of the material.
INTEGER cat The material category.
INTEGER lin The material linearity code.
INTEGER dir The material directionality code.
INTEGER type The material type.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
326
Function Descriptions
Error Conditions:
13000002 Unrecoverable database error
13000117 The query specified has completed
13000007 An unspecified database error occurred
Remarks:
Accesses all records in the “material” table in the database.
Example:
See example for db_get_all_material_names (p. 325). See also db_get_next_material_name
(p. 1411) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Modifies a material in the database.
Input:
INTEGER mid The ID of the material to be modified.
STRING desc[] The description of the material being modified.
INTEGER mc_id The category for the material being modified.
INTEGER lin The linearity of the material being modified.
INTEGER dir The directionality for the material being modified.
INTEGER matl_type The type of the material being modified.
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:
13000002 Unrecoverable database error
13000004 Duplicate entry exists in table
13000007 An unspecified database error occurred
Remarks:
Modifies one record in the “material” table in the database.
Example:
Please see db_modify_material (p. 1419) in the MSC.Acumen, Volume 2: Code Examples.
db_delete_material (name)
Description:
Deletes a material in the database.
Input:
STRING name[] The name of the material to be deleted.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
CHAPTER 12 327
Materials
Error Conditions:
13000002 Unrecoverable database error
13000004 Duplicate entry exists in table
13000007 An unspecified database error occurred
Remarks:
Deletes one record in the “material” table in the database.
Example:
Please see db_delete_material (p. 1377) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_cond_opt_code_names ()
Description:
Gets all condense_option code names from the database, in get all, get next method.
Input:
None.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Example:
Please see db_get_all_cond_opt_code_names (p. 1384) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Gets all condense_option code names from the database, in get all, get next method.
Input:
None.
Output:
STRING name[31] The name retrieved from the database.
INTEGER id The ID received from the database.
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:
13000002 Unrecoverable database error
13000117 The query specified has completed
13000007 An unspecified database error occurred
Remarks:
Accesses all records in the “condense_option” table in the database.
Main Index
328
Function Descriptions
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_next_cond_opt_code_names (p. 1410) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_lam_opt_code_names ()
Description:
Gets all laminate_option code names from the database, in get all, get next method.
Input:
None.
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:
None.
Remarks:
None.
Example:
See example for db_get_all_cond_opt_code_names (p. 327). See also
db_get_all_lam_opt_code_names (p. 1384) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets all laminate_option code names from the database, in get all, get next method.
Input:
None.
Output:
STRING name[31] The name retrieved from the database.
INTEGER id The ID retrieved from the database.
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:
13000002 Unrecoverable database error
13000117 The query specified has completed
13000007 An unspecified database error occurred
Remarks:
Accesses all records in the “laminate_option” table in the database.
Example:
See example fordb_get_all_cond_opt_code_names (p. 327). See also
db_get_next_lam_opt_code_names (p. 1410) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 329
Materials
Description:
Returns an allowable material property in the database.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER mc_id The material category ID.
INTEGER cm_id The constitutive model ID.
INTEGER magics(5) The magic numbers ID.
Output:
INTEGER() mp_id() The material prop alias IDs.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns a row from the allowable_matl_prop table in the database.
Example:
Please see db_get_allowable_matl_prop (p. 1387) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Returns an allowable material property in the database.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER mc_id The material category ID.
INTEGER cm_id The constitutive model ID.
Output:
INTEGER nbr The number of material prop aliases.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns a row from the allowable_matl_prop table in the database.
Example:
See example for db_get_all_allowable_matl_prop (p. 330). See also
db_get_all_allow_matl_prop_cnt (p. 1381) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
330
Function Descriptions
Description:
Returns an allowable material property in the database.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER mc_id The material category ID.
INTEGER cm_id The constitutive model ID.
INTEGER magics(5) The magic numbers ID.
Output:
INTEGER nbr The number of material prop aliases.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns a row from the allowable_matl_prop table in the database.
Example:
Please see db_get_allowable_matl_prop_cnt (p. 1388) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Returns all allowable material property in the database for the given analysis code, analysis
type, material category and constitutive model.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER mc_id The material category ID.
INTEGER cm_id The constitutive model ID.
Output:
INTEGER mp_id() The material prop alias IDs.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine returns rows from the allowable_matl_prop table in the database.
Example:
Please see db_get_all_allowable_matl_prop (p. 1382) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 12 331
Materials
Description:
Returns a material property alias in the database.
Input:
INTEGER cid The analysis code ID.
INTEGER atid The analysis type ID.
INTEGER mc_id The material category ID.
INTEGER cm_id The constitutive model ID.
INTEGER mp_id The material prop alias ID.
Output:
STRING mp_alias[] The material prop alias.
INTEGER field_ok The field ok flag.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000167 The material property alias was not found in the database
Remarks:
This routine returns a row from the material_prop_alias table in the database.
Example:
Please see db_get_matl_prop_alias (p. 1399) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the material property definition name given the ID.
Input:
INTEGER mp_id The material prop defn ID.
Output:
STRING mp_name[] The material prop defn name.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000163 The material property definition was not found in the database
Remarks:
This routine access the matl_prop_defn table in the database.
Example:
Please see db_get_matl_prop_defn (p. 1400) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
332
Function Descriptions
Description:
Updates an material property value in the database.
Input:
INTEGER mid The material ID.
INTEGER mp_id() The material prop IDs.
INTEGER fid() The field IDs.
REAL value() The material values.
INTEGER nbr The dimension of the above three arrays.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000120 The material specified in the query was not found.
13000163 The material property definition was not found in the database
13000127 The field entered does not exist.
Remarks:
None.
Example:
Please see db_modify_matl_prop_value (p. 1421) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Deletes a material property value from the database.
Input:
INTEGER mid The ID of the material associated with the material property
value.
INTEGER mpid The ID of the material property.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Deletes one record in the “matl_prop_value” table in the database.
Example:
See example for db_modify_matl_prop_value (p. 332). See also
db_delete_material_property (p. 1378) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 333
Materials
Description:
Returns the construction data for composite materials generated using the “Halpin -Tsai”
equations, given a material name.
Input:
STRING mat_name[31] The name of the material.
Output:
INTEGER iopt The construction option.
STRING fiber_name[] The name of the fiber.
STRING matrix_name[] The name of the matrix.
REAL fiber_vol_frac The fiber vol frac.
REAL matrix_vol_frac The matrix vol frac.
INTEGER theory The theory.
LOGICAL override The override.
REAL aspect_ratios() A 1 by 2 array of aspect ratios.
REAL emperical_factors() A 1 by 9 array of empirical factors.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
13000086 No Records Found
13000120 The material specified in the query was not found
Remarks:
This routine accesses the material and halpin_tsai tables.
Example:
Please see db_get_comp_hal (p. 1389) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the construction data for composite materials generated using the “Short Fiber” option,
given a material name.
Input:
STRING mat_name[31] The name of the material.
Output:
STRING uni_mat_name[31] The name of the short fiber.
INTEGER ndim The number of dimensions.
INTEGER niter The number of iterations.
REAL theta_av Theta_av.
REAL sig_theta Sig_theta.
REAL phi_av Phi_av.
REAL sig_phi Sig_phi.
Main Index
334
Function Descriptions
mat_3d_ani_to_3d_ort (s11, s12, s13, s22, s23, s33, div_tol, e11, e22, e33, v12, v23,
v31 )
Description:
Given the 3d orthotropic elements of the stiffness matrix, calculates the 3d orthotropic
engineering constants. The shear moduli ( Shear12, Shear23, Shear31 ) are not included since
there is a one to one relationship between them and Stiff44, Stiff55 and Stiff66 in ( 11, 22, 33, 12,
23, 31 ) matrix form. Jones “Mechanics of Composite Materials” ( 1975 ) page 38.
Input:
REAL s11 The 11 element of the stiffness matrix.
REAL s12 The 12 element of the stiffness matrix. Synonymous to s21.
REAL s13 The 13 element of the stiffness matrix. Synonymous to s31.
REAL s22 The 22 element of the stiffness matrix.
REAL s23 The 23 element of the stiffness matrix. Synonymous to s32.
REAL s33 The 33 element of the stiffness matrix.
REAL div_tol The division tolerance.
Output:
REAL e11 The elastic modulus in the 11 direction.
REAL e22 The elastic modulus in the 22 direction.
REAL e33 The elastic modulus in the 33 direction.
REAL v12 Poisson ratio relating directions 1 and 2. Not generally equivalent to
v21.
REAL v23 Poisson ratio relating directions 2 and 3. Not generally equivalent to
v32.
REAL v31 Poisson ratio relating directions 3 and 1. Not generally equivalent to
v13.
Error Conditions:
None.
Remarks:
None.
Example:
Please see mat_3d_ani_to_3d_ort (p. 1425) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 335
Materials
Description:
Compute the stress-strain coefficients for a 3D orthotropic material from the nine engineering
constants. This routine was called ORTHCZ in the PATRAN 2.5 library. Do not allow any nulls
into the output.
Input:
REAL e(9) e = E11, E22, E33, NU12, NU23, NU31, G12, G23, G31.
Output:
REAL c(21) c = Material stiffness matrix in string format using the
PATCHES sequence for the 21 constants.
INTEGER status status = Error flag (0=success, 1=error)
Error Conditions:
None.
Remarks:
AIR FORCE DESIGN GUIDE CONVENTION
EII*VJI = EJJ*VIJ
Example:
Please see engin_cons_to_elastic_matrix (p. 1422) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Given the 2d, orthotropic elements of the reduced ( plane stress or 2d ) stiffness matrix,
calculates the 2d engineering constants. The in plane shear modulus is not included since there
is a one to one relationship between it and Stiff33 ( in ( 11, 22, 12 ) matrix form ). Jones
“Mechanics of Composite Materials” ( 1975 ) page 38.
Input:
REAL s11 The 11 element of the plane stress stiffness matrix.
REAL s12 The 12 element of the plane stress stiffness matrix.
Synonymous to s21.
REAL s22 The 22 element of the plane stress stiffness matrix.
REAL div_tol The division tolerance.
Output:
REAL e11 The elastic modulus in the 11 direction.
REAL e22 The elastic modulus in the 22 direction.
REAL v12 The in plane poisson ratio. Not generally equal to v21
Error Conditions:
None.
Remarks:
None.
Example:
Please see mat_2d_ani_to_2d_ort (p. 1424) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
336
Function Descriptions
Description:
Compute the reduced materials matrix Qab from the 4 engineering constants for a 2D
orthotropic material.
Input:
REAL e( ) Real array that contains the 4 engineering constants:
E(1) = E11.
E(2) = E22.
E(4) = NU12 .
E(7) = G12.
Output:
REAL qab( ) The computed reduced materials matrix
INTEGER ier Integer indicating the success or failure of the routine.
Error Conditions:
None.
Remarks:
All other elements of E are ignored.
Example:
Please see get_qab_from_engin_cons (p. 1423) in the MSC.Acumen, Volume 2: Code Examples.
n21_cons_to_sym_6x6_matrix (cm, cb )
Description:
Form the 6x6 symmetric matrix CM from the 21 terms in CB. This routine was called SYM6X6 in
the PATRAN 2.5 library.
Input:
REAL cb (21) Array of 21 engineering constants.
Output:
REAL cm (6,6) Value of the 6x6 symmetric matrix.
Error Conditions:
None.
Remarks:
None.
Example:
Please see n21_cons_to_sym_6x6_matrix (p. 1438) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 12 337
Materials
Description:
Load the material properties into the format needed for display after performing some error
checking.
Input:
STRING mat_name[] Material name.
INTEGER itype Please see Remarks below.
INTEGER iopt Composite option number (used only for HAL and SFC;
Halpin-Tsai = Option number (1-5)
Short Fiber = Option number (1-2) ).
Output:
STRING desc[2500] Material description.
REAL rvals(6, 36) Array of material properties.
INTEGER num_phases A type-dependent integer ( Laminate = ply count Rule-of-
Mixtures = phase count )
INTEGER <Return Value> See error returned.
Error Conditions:
28003001 The material name is ““blank””. Enter a material name.
28003026 Material %A% is not a laminated composite.
28003038 Material %A% is not a Rule-of-Mixtures composite.
28003059 Material %A% is not a Halpin-Tsai composite.
28003070 Short Fiber material %A% is a %A% material, but the existing form is used to
display %A% materials.
28003069 Halpin-Tsai material %A% is a %A% material, but the existing form is used to
display %A% materials.
28004416 Material %A% does not exist.
Remarks:
Composite material type.
#define MAT_TYP_HOMOG 0
#define MAT_TYP_LAM 1
#define MAT_TYP_MIX 2
#define MAT_TYP_HAL 3
#define MAT_TYP_SFC 4
#define MAT_TYP_EXTERNAL 101
Example:
See example for mat_hal_load_defn_show (p. 338), mat_lam_load_defn_show (p. 339),
mat_mix_load_defn_show (p. 339) or mat_sfc_load_defn_show (p. 340). See also
mat_load_show (p. 1430) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
338
Function Descriptions
Description:
Load the Halpin-Tsai material definition data into the format needed for display.
Input:
STRING mat_name[] Halpin-Tsai material name.
INTEGER iopt Halpin-Tsai option flag :
1=continuous fiber
2=discontinuous fiber
3=continuous ribbon
4=discontinuous ribbon
5=particulate).
Output:
STRING fiber_name[] Fiber material name.
STRING matrix_name[] Matrix material name.
REAL fvf Fiber volume fraction.
REAL mvf Matrix volume fraction.
STRING aratio1[] String representation of 1st aspect ratio.
STRING aratio2[] String representation of 2nd aspect ratio.
INTEGER theory 1=New Theory (GTT).
2=Old Theory (NUTT).
LOGICAL override If ON, use empirical factors in ESTRINGi.
STRING fudge_factor1[] String representation of 1st empirical factor
STRING fudge_factor2[] String representation of 2nd empirical factor
STRING fudge_factor3[] String representation of 3rd empirical factor.
STRING fudge_factor4[] String representation of 4th empirical factor.
STRING fudge_factor5[] String representation of 5th empirical factor
STRING fudge_factor6[] String representation of 6th empirical factor.
INTEGER <Return Value> See error returned.
Error Conditions:
28003001 The material name is ““blank””. Enter a material name.
28004416 Material %A% does not exist.
28003069 Halpin-Tsai material %A% is a %A% material, but the existing form is used to
display %A% materials.
28003060 Unable to show the properties for composite material %A%.
Remarks:
None.
Example:
Please see mat_hal_load_defn_show (p. 1426) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 339
Materials
Description:
Load the laminate definition data into the format needed for display.
Input:
STRING mat_name[] Laminate material name.
INTEGER num_plies Number of plies.
Output:
INTEGER ply_names Ply material names (passed as an integer to get through the
wrapper).
REAL thicks Ply thicknesses (passed as an integer to get through the
wrapper).
REAL orients Ply orientations (passed as an integer to get through the
wrapper)
INTEGER num_def Number of plies defined (!= total ply count if ICONV > 1)
INTEGER iconv Stacking sequence convention.
STRING offset_string[] String containing laminate offset.
INTEGER <Return Value> See error returned.
Error Conditions:
28003001 The material name is ““blank””. Enter a material name.
28004416 Material %A% does not exist
28003042 Unable to show the offset for laminate material %A%.
Remarks:
None.
Example:
Please see mat_lam_load_defn_show (p. 1428) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Load the Rule-of-Mixtures material definition data into the format needed for display.
Input:
STRING mat_name[] Rule-of-Mixtures material name.
INTEGER num_phases Number of phases.
Output:
STRING name_string2[] String containing the second phase material name and
workspace.
STRING name_string3[] String containing the third phase material name and
workspace.
STRING name_string4[] String containing the fourth phase material name and
workspace.
STRING phase_string[] String containing the primary phase material name.
Main Index
340
Function Descriptions
Description:
Load the Short Fiber material definition data into the format needed for display.
Input:
STRING mat_name[] Short Fiber material name.
INTEGER iopt Short Fiber material option.
Output:
STRING uni_mat_name[] Unidirectional material name.
REAL fmo First mean orientation.
REAL smo Second mean orientation
REAL fsd First standard deviation.
REAL ssd Second standard deviation.
REAL cor Correlation coefficient
INTEGER niter Number of Monte Carlo iteration.
INTEGER <Return Value> See error returned.
Error Conditions:
28003001 The material name is ““blank””. Enter a material name.
28003070 Short Fiber material %A% is a %A% material, but the existing form is used to
display %A% materials.
28004416 Material %A% does not exist
Main Index
CHAPTER 12 341
Materials
Remarks:
None.
Example:
Please see mat_sfc_load_defn_show (p. 1434) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function creates finite element mesh on solids and returns the FEM data for the solid. It
returns an integer status of zero on successful completion.
Input:
STRING material_name[]() The names of the material. Array size gets allocated from
ARRAY the num_material argument.
STRING descrip[] Description of the material. Can be “”.
INTEGER num_material The number of materials to be deleted.
Output:
INTEGER <Return Value> 0 for success., error code for failure.
Error Conditions:
130000120 Material does not exist in the database
130000007 Database not open.
Example:
Please see material.namedelete (p. 1436) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
342
Function Descriptions
p3cm.close_2 (detail )
Description:
This function closes the Laminate Modeler Layup database.
Input:
INTEGER detail Value is 0 for closing the file.
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None.
Example:
Please see p3cm.close_2 (p. 1439) in the MSC.Acumen, Volume 2: Code Examples.
LOGICAL cutout Flat Pattern. This is the Laminate Modeler Ply Graphics Display
Option.
REAL offval Offset value. By default, value is 0.0.
LOGICAL pat_igs This is the Laminate Modeler Ply “Draped Pattern IGES
files” Export Option.
LOGICAL pat_dxf This is the Laminate Modeler Ply “Draped Pattern DXF
files” Export Option.
LOGICAL cut_igs This is the Laminate Modeler Ply “Flat Pattern IGES files”
Export Option.
LOGICAL cut_dxf This is the Laminate Modeler Ply “Flat Pattern DXF files”
Export Option.
STRING curve_str[] “POLYLINE” or “SPLINE”
STRING layer_str[] Layer String.
LOGICAL hardcopy_it Image creation display option.
STRING options[] “printer=Postscript Default, driver=Postscript,
destination=Unknown, window=Current Viewport,
save=YES, output_file=, paper=Letter, left_margin=0.5 in,
right_margin=0.5 in, top_margin=0.5 in,
bottom_margin=0.5 in, default_units=Inches,
orientation=Landscape, copies=1, format=Black to White,
background=White, lines_&_text=Black, line_weight=0.5
pts, text_scale=100%, image_size=Fit on Page,
scale_factor=1.0, center=Yes, draw_borders=Yes,
quality=Normal, color_model=RGB, gcr=75 %”
Output:
<Return Status> This function creates the layup report file
“./filename.lm_report.0*”. and postscript file
“./filename.1_ply_1.ps.0*” .
Error Conditions:
None
Example:
Please see p3cm.create_book_layup2 (p. 1440) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
346
Function Descriptions
Description:
This functions creates the Laminate Modeler results by using the material identifier sorting
method.
Input:
STRING res_name[]() Array of the results names, i.e. load case, subcase,
primary result case, secondary result case & layer
result case.
STRING area[] Selected area for results data.
Main Index
348
Function Descriptions
p3cm.create_results_sort (res_name)
Description:
This functions creates the Laminate Modeler results by using the LM_Ply Sorting method.
Input:
STRING res_name[]() Array of the results names, i.e. load case, subcase,
primary result case, secondary result case & layer result
case.
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
-1 Module Error.
Example:
Please see p3cm.create_results_sort (p. 1455) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function deletes the laminates from the Laminate Modeler database.
Input:
INTEGER num_laminates Number of laminates.
STRING laminates[](num_laminates)Array of the laminates.
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None.
Example:
Please see p3cm.delete_laminates (p. 1457) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 349
Materials
Description:
This function deletes the material name from the database.
Input:
STRING type_name[] Material type in Laminate Modeler like “Paint”,
“Scissor”, “Slide” or “Project”.
STRING material_name[] Laminate Modeler material name.
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
-1 Could not find specified material.
Example:
Please see p3cm.delete_material_name (p. 1458) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function deletes the ply name from the Laminate Modeler database.
Input:
STRING type_name[] Material type in Laminate Modeler like “Paint”,
“Scissor”, “Slide” or “Project”
STRING ply_name[] Laminate Modeler ply name
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
-1 Could not find specified layer.
Example:
Please see p3cm.delete_ply_name (p. 1460) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function deletes the property sets from the Laminate Modeler Database.
Input:
INTEGER num_propsets Number of property sets.
STRING propsets[](num_propsets)Array of the property sets.
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
13000119 Property Sets could not retrieved from the database. 0 Property Sets
deleted.
Example:
Please see p3cm.delete_propsets (p. 1461) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
350
Function Descriptions
Main Index
CHAPTER 12 351
Materials
p3cm.new (filename)
Description:
This function opens the new layup file for begining the Laminate Modeler session.
Input:
STRING filename[] The new layup file name. (As default “db_filename.layup”)
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None.
Example:
Please see p3cm.new (p. 1470) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 353
Materials
Description:
This function sets the offsets data for creating the new layup in Laminate Modeler database.
Input:
INTEGER num_offs Number of the defined offsets.
REAL off_values() Array of the offset value for each defined offsets.
STRING off_flags[]() Array of the offset flag for each defined offsets. There are
three types of flags as Middle, Top & Bottom. These flag
types represent the value as below:
“0” for Middle type,
“1” for Top type
“-1” for Bottom type.
REAL off_starts() Array of the 3D coordinate values of definition points for
all defined offsets. It represents the starting points of the
offsets.
REAL off_views() Array of the 3D coordinate values of definition direction for
all defined offsets. It represents the directional views of the
offsets.
STRING off_areas[]() This represents the array of the selected areas for each
defined offset in the form of elements or surfaces.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None
Example:
Please see p3cm.set_offsets (p. 1471) in the MSC.Acumen, Volume 2: Code Examples.
p3cm.open (filename)
Description:
This function opens the existing laminate modeler database.
Input:
STRING filename[] The existing layup filename.
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None.
Example:
Please see p3cm.open (p. 1472) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
354
Function Descriptions
Description:
This function saves the Laminate Modeler database.
Input:
STRING filename[] The open layup file name.
INTEGER detail Set this value = 0
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None.
Example:
Please see p3cm.save_as_2 (p. 1473) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 355
Materials
Description:
This function sets the tolerance data for Laminate Modeler database.
Input:
INTEGER num_tols Tolerance number.
REAL ang_tols() Angle tolerance array. By default value is 5.0 degrees.
REAL thick_tols() Thickness tolerance array. By default value is 5.0 %
STRING tol_areas[]() Array of the define overrides .
Main Index
356
Function Descriptions
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None
Example:
Please see p3cm.set_tolerance (p. 1478) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 12 357
Materials
Description:
This function shows the selected laminate modeler layup from the database.
Input:
INTEGER num_selected Number of Laminate Modeler plys
INTEGER index(num_selected)Array of ply ids
REAL offset_mult Offset distance multiplier. By default, value is taken
as 1.0
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None
Example:
Please see p3cm.show_layup_exploded (p. 1482) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function deletes the ply name from the database.
Input:
STRING type_id_name[] ID string for various material types like “Paint”,
“Scissor”, “Slide” or “Project”.
STRING ply_name[] Laminate Modeler Ply Name.
LOGICAL plot_flag TRUE to show the existing ply.
Output:
INTEGER <Return Value> 0 for success of the function.
Error Conditions:
None
Example:
Please see p3cm.show_ply (p. 1483) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
358
Function Descriptions
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Analysis
13
■ General
Main Index
360
Function Descriptions
13.1 General
Description:
This function will get the analysis job id for a specific job and analysis code.
Input:
STRING analysis_code[31] This value specifies the name of the analysis code.
STRING anal_job_name[] This value specifies the name of the job.
Output:
INTEGER anal_job_id This value returns the identifier associated with the specified
analysis code and job name.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an
error.
Example:
Please see analysis_get.pset_for_job (p. 1486) in the MSC.Acumen, Volume 2: Code Examples.
analysis_import (<analysis_code>,<jobname>,<object>,<filename>,<wait>)
Description:
This function controls the submittal of either a "Result File" importation or an "Input File "
importation. It generates the geometry and FEM data from a input file like ".bdf" or from a result
file like ".op2" file.
The function does the following steps:
1. If running from a session file, it gives the user the option of waiting for the analysis to
finish.
2. Checks for old preference and updates if required.
3. Runs the preference specific result import routine if provided by the analysis code, else
runs the generic import routine.
4. Calls the analysis code specific function to get the name of the translation program.
Input:
STRING analysis_code[] The name of the analysis code.
STRING jobname[] The name of the importation job.
STRING object[] Object being read, “Result File” or “Input file”.
STRING filename[] ‘.bdf’ file to be read, when “object” is “Input File”.
‘.op2’ or ‘.fil’ file to be read when the object is “Result File”.
LOGICAL wait True to wait for completion before continuing. False to
execute command asynchronously.
Output:
None
Error Conditions:
None
Main Index
CHAPTER 13 361
Analysis
Note:
The function has return statements but does not return any value. The function can be enhanced
to check the status of execution by returning a value.
Example:
Please see analysis_import (p. 1487) in the MSC.Acumen, Volume 2: Code Examples.
analysis_main.job_name_lbox (<num_items>,<job_name>)
Description:
This function is a callback to the “Available Jobs” listbox in the “Analysis” form.
Input:
INTEGER num_items Number of items
STRING ARRAY job_name[](num_items) Array of job names.
Output:
None
Error Conditions:
None
Example:
Please see analysis_main.job_name_lbox (p. 1491) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function executes a given function under a classname. It first checks the status of the
function and checks whether it exists and whether it is currently loaded in memory. If the
function does not exist then the value of the output return is 0. If the function gets executed
then the value of exist_flag returned is 1. It invokes a class function. Problems could occur if
the function has input arguments. This function can best be utilized for "init" or "display"
functions. This function works only if the Analysis Form is open in Patran.
Input:
STRING classname[ ] The classname of the function
STRING function_name[ ] Function name
LOGICAL exist_flag Status of execution of the function. Returns 1 on execution
and 0 for failure.
Output:
INTEGER <Return Value> 1 for success and 0 for failure.
Error Conditions:
None.
Example:
Please see analysis_main.user_function (p. 1492) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
362
Function Descriptions
analysis_submit ( <analysis_code>,<jobname>,<wait_for_analysis>)
Description:
The function submits the jobname for analysis with a wait for analysis flag option. If running in
batch mode the wait flag can be set to TRUE to assure that the process will wait for completion
of the analysis prior to continuing. The analysis_submit() call must follow a job preparation
sequence that is dependent upon the analysis solver preference selected. For the MSC.Nastran
preference, a typical job submission involves the following sequence. A job file is created by a
series of calls: jobfile.open, msc_delete_old_files, jobfile.write_spl, jobfile.writec, jobfile.writei,
jobfile.close. Next, mscnastran_job.associate_subcases, and then finally analysis_submit is
called. An exact sequence is best found from MSC.Patran session files.
The function does the following steps:
1. Displays fatal message if the database is not ready for submission to analysis.
2. Does some steps before invoking the translator.
3. Builds up code specific name and call.
4. Gets the name of the currently open database.
5. Replaces all blank characters with “\” in order to handle database path names with
blank characters.
6. Evaluates LBC’s from geometry to elements.
7. Checks whether there are any tasks set to be done by the user before calling the
translator.
8. Calls the analysis code specific submit routine.
9. Assign last jobname.
10. After translation, checks for any user clean-up required.
Input:
STRING analysis_code[] The name of the analysis code.
STRING jobname[] The name of the job to be loaded in the job name databox.
LOGICAL wait_for_analysis True to wait for completion before continuing. False to
execute command asynchronously
Output:
None
Error Conditions:
None
Note:
The function has return statements but does not return any value. The function can be enhanced
to check the status of execution by returning a value.
Following are the analysis names supported by MSC interfaces:
Main Index
CHAPTER 13 363
Analysis
Analysis Code:
MSC.Nastran MSC.Patran Structural Optimization
ABAQUS MARC K6
ANSYS LMS CADA-X
MARC FASTRUDL
MSC.Patran FEA SESAM
MSC.Patran Thermal DYNA3D
MSC.Patran CFD RCS
MSC.Patran Advanced FEA CFX-F3D
MARC K CFX-FLOW
ANSYS 5 MSC.Droptest
MSC.Patran Team MSC.Forging
SAMCEF LS-DYNA3D
PATRAN 2NF PAMCRASH
MSC.Dytran
Example:
Please see analysis_submit (p. 1494) in the MSC.Acumen, Volume 2: Code Examples.
analysis_submit_2 (<analysis_code>,<jobname>)
Description:
This is a new function designed to replace the call to analysis_submit in the session files. The
‘wait-flag’ in the analysis_submit() is set to TRUE to wait for completion before continuing and
FALSE to execute command asynchronously. This function anslysis_submit_2() asks the user
for input to the wait flag and then calls the analysis_submit function with the appropriate wait
flag.
The function does the following steps:
1. If running from a session file, it gives the user the option of waiting for the analysis to
finish.
2. Checks for abort before asking the user about waiting for the analysis to complete.
3. Calls the analysis_submit function with the appropriate wait flag.
Input:
STRING analysis_code[] The name of the analysis code.
STRING jobname[] The name of the job to be loaded in the job name databox.
Output:
None
Error Conditions:
None
Main Index
364
Function Descriptions
Notes:
The function has return statements but does not return any value. The function can be enhanced
to check the status of execution by returning a value.
Please refer to description of the Function – analysis_submit() for a list of Analysis Codes.
Example:
Please see analysis_submit_2 (p. 1498) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will set the geometric preferences in the database.
Input:
INTEGER pref_id This value specifies the internal identifier of the preference to
be set in the database.
INTEGER data_type This value specifies the data type of the preference to be set in
the database.
INTEGER int_pref This value specifies the integer preference to be set in the
database.
LOGICAL log_pref This value specifies the logical preference to be set in the
database.
REAL real_pref This value specifies the real preference to be set in the
database.
STRING char_pref[31] This value specifies the character preference to be set in the
database.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
13000088 Preference not found
13000002 Unrecoverable database error
Remarks:
Not adding a preference to the database is a common cause of receiving a returned value of
13000088. The PCL function db_add_pref (p. 434) can be used to add a preference to the
database.
Example:
Please see db_set_pref (p. 1569) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 13 365
Analysis
Description:
Retrieves the jobname, description, parameter set id, and status given the analysis code id and
jobname id.
Input:
INTEGER analysis_code_id The ID of the analysis codes to which the jobnames are
associated in the database.
INTEGER jobname_id The ID of the jobname associated with analysis_code input.
Output:
STRING jobname[80] The jobname associated with analysis code input.
STRING description[256] The job description associated with the analysis code input.
INTEGER param_set_id The ID of the parameter set associated with the analysis
code and job ID.
INTEGER status The status of the job being retrieved.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves an entry from the “jobname” relation.
Example:
See example for db_update_jobname_for_a_code (p. 375), db_get_id_given_job_name
(p. 381), or db_get_id_given_job_name_code (p. 382). See also db_get_job_info (p. 1545) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Updates the control info table in the database.
Input:
STRING name[31] Name of the analysis code whose suffix is to be set.
STRING suffix[6] Name of the suffix for the analysis code named above.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Updates one record in the “analysis_code” table in the database.
Main Index
366
Function Descriptions
Example:
Please see db_set_model_file_suffix (p. 1568) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Updates the control info table in the database.
Input:
STRING name[31] Name of the analysis code whose suffix is to be set.
STRING suffix[6] Name of the suffix for the analysis code named above.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Updates one record in the “analysis_code” table in the database.
Example:
See example for db_set_model_file_suffix (p. 365). See also db_set_results_file_suffix
(p. 1570) in the MSC.Acumen, Volume 2: Code Examples.
db_set_default_anal_code (name)
Description:
Updates the control info table in the database.
Input:
STRING name[31] Name of the new current analysis code.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Updates one record in the “control_info” table in the database.
Example:
Please see db_set_default_anal_code (p. 1566) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 13 367
Analysis
db_get_default_anal_code (name)
Description:
Retrieves the default analysis code associated with the model.
Input:
None.
Output:
STRING name[31] Analysis code name.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
None.
Example:
See example for db_get_steps_for_a_job (p. 384). See also db_get_default_anal_code
(p. 1538) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the analysis code name associated with the specified analysis code id.
Input:
INTEGER id Integer containing the ID of the analysis code.
Output:
STRING name[31] String where the name of the analysis code is to be placed.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
None.
Example:
Please see db_get_anal_code_name (p. 1534) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the analysis code id associated with the specified analysis code name.
Input:
STRING name[31] The name of the analysis code.
Main Index
368
Function Descriptions
Output:
INTEGER id Integer containing the ID of the analysis code.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
None.
Example:
See example for db_get_steps_for_a_job (p. 384). See also db_get_anal_code_id (p. 1533) in
the MSC.Acumen, Volume 2: Code Examples.
db_count_anal_codes (count)
Description:
Retrieves the number of analysis codes stored in the database.
Input:
None.
Output:
INTEGER count The number of analysis codes stored in the database
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Counts all records in the “analysis_code” relation in the database.
Example:
Please see db_count_anal_codes (p. 1504) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_anal_codes ()
Description:
Gets all analysis code names from the database, in get all, get next method.
Input:
None.
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:
13000002 Unrecoverable database error
13000117 The query specified has completed
13000007 An unspecified database error occurred
Main Index
CHAPTER 13 369
Analysis
Remarks:
Accesses all records in the “analysis_code” table in the database.
Example:
See example for db_count_anal_codes (p. 368). See also db_get_all_anal_codes (p. 1530) in
the MSC.Acumen, Volume 2: Code Examples.
db_get_next_anal_code (name)
Description:
Gets all analysis code names from the database, in get all, get next method.
Input:
None.
Output:
STRING name[31] The name of the analysis code retrieved.
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:
13000002 Unrecoverable database error
13000117 The query specified has completed
13000007 An unspecified database error occurred
Remarks:
Accesses all records in the “analysis_code” table in the database.
Example:
See example for db_count_anal_codes (p. 368). See also db_get_next_anal_code (p. 1551) in
the MSC.Acumen, Volume 2: Code Examples.
db_set_default_anal_type (name)
Description:
Updates the control info table in the database.
Input:
STRING name[31] Name of the new current analysis type.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Updates one record in the “control_info” table in the database.
Example:
Please see db_set_default_anal_type (p. 1567) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
370
Function Descriptions
db_get_default_anal_type (name)
Description:
Retrieves the default analysis type associated with the model.
Input:
None.
Output:
STRING name[31] Location for returned value.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
None.
Example:
Please see db_get_default_anal_type (p. 1539) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the analysis type name associated with the specified analysis type id.
Input:
INTEGER id Integer containing the ID of the analysis type.
Output:
STRING name[31] Pointer to a string where the name of the analysis type is to be
placed.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
None.
Example:
Please see db_get_anal_type_name (p. 1536) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the analysis type id associated with the specified analysis type name.
Input:
STRING name[31] Pointer to a string containing the name of the analysis type.
Main Index
CHAPTER 13 371
Analysis
Output:
INTEGER id Location to receive the resulting value.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error.
13000014 Viewport not found.
13000007 An unspecified database error occurred.
Remarks:
None.
Example:
Please see db_get_anal_type_id (p. 1535) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the number of analysis types stored in the database.
Input:
STRING name[31] The name of the analysis code for which the type are to be
returned
Output:
INTEGER count The number of analysis types stored in the database
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Remarks:
Counts all records in the “analysis_type” relation in the database.
Example:
Please see db_count_anal_types (p. 1504) in the MSC.Acumen, Volume 2: Code Examples.
db_get_all_anal_types (name)
Description:
Gets all analysis type names from the database corresponding to an analysis code name, in get
all, get next method.
Input:
STRING name[31] The space to receive the analysis type name and to give the
analysis code name.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
372
Function Descriptions
Error Conditions:
13000002 Unrecoverable database error.
13000117 The query specified has completed
13000007 An unspecified database error occurred.
Remarks:
Accesses all records in the “supported_analysis_type” table.
Example:
See example for db_count_anal_types (p. 371). See also db_get_all_anal_types (p. 1531) in
the MSC.Acumen, Volume 2: Code Examples.
db_get_next_anal_type (name)
Description:
Gets all analysis type names from the database corresponding to an analysis code name, in get
all, get next method.
Input:
None.
Output:
STRING name[31] The name of the analysis type retrieved and the name of the
analysis code.
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:
13000002 Unrecoverable database error.
13000117 The query specified has completed
13000007 An unspecified database error occurred.
Remarks:
Accesses all records in the “supported_analysis_type” table.
Example:
See example for db_count_anal_types (p. 371). See also db_get_next_anal_type (p. 1552) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets the default analysis type for a given analysis code from the database.
Input:
STRING acname[31] The name of the analysis code.
Output:
STRING atname[31] The name of the default analysis type.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
CHAPTER 13 373
Analysis
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Remarks:
Accesses the default analysis type in the “analysis_code” table in the database.
Example:
See example for db_count_anal_types (p. 371). See also db_get_at_for_ac (p. 1538) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
Updates the default analysis type for an analysis code.
Input:
STRING anal_code[31] Name of the analysis code.
STRING anal_type[31] Name of the new current analysis type.
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:
13000002 Unrecoverable database error.
13000007 An unspecified database error occurred.
Remarks:
Updates one record in the “analysis_code” table in the database.
Example:
Please see db_set_at_for_ac (p. 1565) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates a new jobname for an analysis code. The next available jobname_id and param_set_id
are returned.
Input:
INTEGER ac_id Analysis code ID to which the jobname is associated.
STRING jobname[80] The job name being created for an analysis code.
STRING jobdesc[256] The description of the job being created.
INTEGER status The status of the job being created.
Output:
INTEGER jobname_id The ID of the next available jobname ID is returned from the
application.
INTEGER param_set_id The next available param_set_id is returned from the
application.
Main Index
374
Function Descriptions
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:
13000002 Unrecoverable database error.
Remarks:
Adds an entry to the “jobname” relation.
Example:
Please see db_create_job_name_for_a_code (p. 1513) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves the number of job names associated with an analysis code.
Input:
INTEGER acode_id The analysis code ID
Output:
INTEGER num_acodes The number of distinct job names associated with the analysis
code ID
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
Counts records in the “jobname” relation in the database.
Example:
Please see db_count_job_names_for_a_code (p. 1507) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves an array of jobnames, jobname_ids, descriptions, and statuses for all jobs up to count
in the analysis code id which the jobnames are associated with.
Input:
INTEGER analysis_code_id The ID of the analysis codes to which the jobnames are
associated in the in the database.
INTEGER count On input, the maximum number of jobs that can be
returned from the database.
Output:
INTEGER count On output, the actual number that was returned.
STRING jobname[80]() The array of jobnames associated with analysis code input.
The 80 char field is padded with blanks, and the array
treated as a contiguous data string.
Main Index
CHAPTER 13 375
Analysis
Description:
If the analysis_code_id and jobname_id match and existing record, and the new jobname input
does not already exist, the jobname, description, and status fields are updated.
Input:
INTEGER analysis_code_id
STRING jobname[80] The analysis code ID of the step being updated.
STRING description[256] The analysis step name being updated.
INTEGER status The status of the jobname being updated.
INTEGER jobname_id The ID of the jobname being modified.
Output:
INTEGER param_set_id The param_set_id which is being deleted.
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:
13000002 Unrecoverable database error
Remarks:
Updates an entry to the “jobname” relation. Deletes entries from the “param_set” relation that
correspond to the jobname if any exist.
Example:
Please see db_update_jobname_for_a_code (p. 1573) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
376
Function Descriptions
Description:
Inserts a list of load case ids into the jobname_list table.
Input:
INTEGER jobname_id The job name ID.
INTEGER nbr_of_loadcases The number of load case ids.
INTEGER loadcase_ids() The load case ids associated with the job name ID.
Output:
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine creates records the jobname_list table in the database.
Example:
Please see db_create_job_name_list (p. 1514) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates a new jobname list entry.
Input:
INTEGER jobname_id The ID of the jobname to which the list entries are associated.
INTEGER load_case_id The ID of the load case to which the list entries are associated.
INTEGER analysis_step_id The ID of the analysis step to which the list entries are
associated.
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:
13000002 Unrecoverable database error
Remarks:
Adds an entry to the “jobname_list” relation.
Example:
Please see db_create_job_name_list_entry (p. 1515) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 13 377
Analysis
Description:
Retrieves the load case id and step id for each job name id, up to count.
Input:
INTEGER jobname_id The ID of the jobnames codes to which the jobname lists are
associated in the in the database.
INTEGER count On input, the maximum number of entries that can be returned
from the database.
Output:
INTEGER count On output, the actual number that was returned.
INTEGER load_case_id() The ID of the load case associated with jobname_id input.
INTEGER step_id() The step_id of the job being retrieved.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves multiple entries from the “jobname_list” relation.
Example:
See example for db_get_step_info (p. 385). See also db_get_jobname_list_entries (p. 1547)
in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the number of job_list entries associated with a jobname.
Input:
INTEGER jobname_id The jobname ID.
Output:
INTEGER num_lists The number of distinct jobname_list entries associated with a
jobname.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
Counts records in the “jobname_list” relation in the database.
Example:
Please see db_count_job_name_list_entry (p. 1506) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
378
Function Descriptions
db_delete_job_name_list (jobname_id)
Description:
Deletes jobname list entries from the database.
Input:
INTEGER jobname_id Id of the jobname associated with the jobname list entries to be
deleted.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Deletes records in the “jobname_list” table in the database.
Example:
See example for db_count_job_name_list_entry (p. 377). See also db_delete_job_name_list
(p. 1524) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the jobname id upon inserting the jobname.
Input:
STRING jobname[] The job name.
Output:
INTEGER id The job ID.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000158 This job name already exists in the database.
Remarks:
This routine creates a record the jobname table in the database.
Example:
Please see db_create_job_name (p. 1512) in the MSC.Acumen, Volume 2: Code Examples.
db_assign_last_jobname (jobname)
Description:
Assigns the last jobname to the control info table.
Input:
STRING jobname[80] The last job name to be put in the control info table.
Main Index
CHAPTER 13 379
Analysis
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:
13000002 Unrecoverable database error
Remarks:
Updates an entry to the “control_info” relation.
Example:
Please see db_assign_last_jobname (p. 1502) in the MSC.Acumen, Volume 2: Code Examples.
db_get_last_jobname (jobname)
Description:
Retrieves the last used jobname.
Input:
None.
Output:
STRING jobname[80] The last used jobname from the control info relation.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves one record from the “control_info” relation.
Example:
Please see db_get_last_jobname (p. 1550) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the job name given the id.
Input:
INTEGER id The job name ID.
Output:
STRING name[] The job name.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine access the jobname table in the database.
Example:
See also db_get_job_name_given_id (p. 1546) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
380
Function Descriptions
db_count_all_job_name_ids (nbr_of_jobnames)
Description:
Returns the number of all the job name ids.
Input:
None.
Output:
INTEGER nbr_of_jobnames The number of ids being returned
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
This routine accesses the jobname table in the database.
Example:
INTEGER status, num_jobnames, max_jobnames, jobname_ids (VIRTUAL)
Please see db_count_all_job_name_ids (p. 1503) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns an array of all of the job name ids.
Input:
INTEGER max_count The maximum number of IDs for which space has been
allocated.
Output:
INTEGER nbr_of_jobnames The number of IDs being returned.
INTEGER id() The job name IDs.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
13000093 Too Many Values Returned for Space Allocated
Remarks:
This routine access the jobname table in the database.
Example:
See example for db_count_all_job_name_ids (p. 380). See also db_get_all_job_name_ids
(p. 1532) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 13 381
Analysis
db_get_all_job_names ()
Description:
Gets a job name from the database.
Input:
None.
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:
13000117 The query specified has completed
Remarks:
Accesses records in the jobname table in the database.
Example:
Please see db_get_all_job_names (p. 1533) in the MSC.Acumen, Volume 2: Code Examples.
db_get_next_job_name (jobname)
Description:
Gets a job name from the database.
Input:
None.
Output:
STRING jobname[] The job name.
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:
13000117 The query specified has completed
Remarks:
Accesses records in the jobname table in the database.
Example:
See example for db_get_all_job_names (p. 381). See also db_get_next_job_name (p. 1553) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the jobname id given the jobname.
Input:
STRING jobname[] The job name.
Output:
INTEGER id The job ID.
INTEGER <Return Value> Returns the success or failure of the routine.
Main Index
382
Function Descriptions
Error Conditions:
None.
Remarks:
This routine access the jobname table in the database.
Example:
Please see db_get_id_given_job_name (p. 1539) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the jobname id given the jobname.
Input:
INTEGER acode Analysis code ID.
STRING jobname[] The job name.
Output:
INTEGER id The job ID.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000159 The job name id was not found in the database
Remarks:
This routine access the jobname table in the database.
Example:
Please see db_get_id_given_job_name_code (p. 1541) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Returns the jobname id given the load case name.
Input:
STRING jobname[] The load case name.
Output:
INTEGER load_case_id The load case ID.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000052 Load case not found
Remarks:
This routine access the load_case table in the database.
Example:
See example for db_create_job_name_list (p. 376), or db_create_job_name_list_entry
(p. 376). See also db_get_id_given_load_case_name (p. 1542) in the MSC.Acumen, Volume 2:
Code Examples.
Main Index
CHAPTER 13 383
Analysis
db_delete_job_name (id)
Description:
Deletes a jobname and all jobname list entries from the database.
Input:
INTEGER id ID of the jobname to be deleted.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Deletes records in the “jobname_list” table in the database.
Example:
See example for db_get_id_given_job_name_code (p. 382). See also db_delete_job_name
(p. 1523) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Creates a new analysis step with name and description for the given analysis code.
Input:
STRING stepname[80] The analysis step name being created
STRING stepdesc[256] The description of the step being created.
INTEGER ac_id The analysis code ID of the step being created.
Output:
INTEGER step_id The ID of the next available step ID is returned from the
application.
INTEGER param_set_id The next available param_set_id is returned from the
application.
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:
13000002 Unrecoverable database error
Remarks:
Adds an entry to the “jobname” relation.
Example:
Please see db_create_analysis_step (p. 1510) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
384
Function Descriptions
Description:
Returns the array of analysis step names, ids, descriptions, and the parameter set ids that are
associated with the given analysis code id.
Input:
INTEGER analysis_code_id The ID of the analysis codes to which the step names are
associated in the database.
INTEGER count On input, the maximum number of jobs that can be returned
from the database.
Output:
INTEGER analysis_code_id On output, the actual number that was returned.
STRING stepname[80]() The array of step names associated with analysis code input.
The 80 char field is padded with blanks, and the array treated
as a contiguous data string.
INTEGER step_id() The ID of the stepname associated with analysis_code input.
STRING description[256]() The array of job descriptions associated with the analysis
code input. The 256 char field padded with blanks, and the
array is treated as a continuous string.
INTEGER param_set_id() The ID of the parameter set associated with the analysis code
and job ID.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves multiple entries from the “analysis_step” relation.
Example:
Please see db_get_analysis_steps (p. 1537) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function returns the step names, ids, description and the parameter set id for a given
analysis code id and jobname.
Input:
INTEGER analysis_code_id The ID of the analysis code to which the step names are
associated in the in the database.
INTEGER jobname_id The ID of the job to which the step names are associated in
the in the database.
INTEGER count The maximum number of jobs that can be returned from the
database.
Main Index
CHAPTER 13 385
Analysis
Output:
STRING stepname[80]() The array of step names associated with analysis code input.
The 80 char field is padded with blanks, and the array treated
as a contiguous data string.
INTEGER step_id() The ID of the stepname associated with analysis_code input.
STRING description[256]() The array of job descriptions associated with the analysis
code input. The 256 char field padded with blanks, and the
array is treated as a continuous string.
INTEGER param_set_id() The ID of the parameter set associated with the analysis code
and job ID.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves multiple entries from the “analysis_step” relation.
Example:
Please see db_get_steps_for_a_job (p. 1564) in the MSC.Acumen, Volume 2: Code Examples.
Description:
return to the step name, description, and parameter set id given the step id.
Input:
INTEGER analysis_code_id The ID of the analysis codes to which the jobnames are
associated in the in the database.
INTEGER step_id The ID of the stepname associated with analysis_code and
jobname_id input.
Output:
STRING stepname[80] The step_name associated with analysis code and jobname
input.
STRING description[256] The array of job descriptions associated with the analysis
code input. The 256 char field padded with blanks, and the
array is treated as a continuous string.
INTEGER param_set_id The ID of the parameter set associated with the analysis code
and job ID.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves an entry from the “jobname” relation.
Example:
Please see db_get_step_info (p. 1562) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
386
Function Descriptions
Description:
Retrieves the number of analysis steps for an analysis code.
Input:
INTEGER acode_id The analysis code ID.
Output:
INTEGER num_steps The number of analysis steps associated with an analysis code.
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
Counts records in the “jobname_list” relation in the database.
Example:
See example for db_get_analysis_steps (p. 384). See also db_count_analysis_steps
(p. 1505) in the MSC.Acumen, Volume 2: Code Examples.
db_count_steps_for_a_job (ac_id,job_id,num_steps)
Description:
Retrieves the number of analysis steps for a specified job and analysis code.
Input:
INTEGER ac_id The analysis code ID
INTEGER job_id The specific job to which the steps are associated
Output:
INTEGER num_steps The number of analysis steps associated
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
Counts records in the “analysis_step” relation in the database.
Example:
See example for db_get_steps_for_a_job (p. 384). See also db_count_steps_for_a_job
(p. 1509) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Returns the stepname id given the stepname.
Input:
INTEGER acode Analysis code ID.
STRING stepname[] The step name.
Main Index
CHAPTER 13 387
Analysis
Output:
INTEGER id The step ID.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
13000204 The specified analysis step was not found
Remarks:
This routine access the analysis_step table in the database.
Example:
See example for db_update_analysis_step (p. 387), or db_delete_analysis_step_id (p. 387).
See also db_get_id_given_step_name (p. 1543) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Updates analysis stepware and decription for the given analysis step.
Input:
INTEGER analysis_code_id The analysis code ID of the step being updated.
INTEGER analysis_step_id The ID of the step being modified.
STRING analysis_step_name[80]The analysis step name being updated.
STRING description[256] The description of the step being updated.
Output:
INTEGER param_set_id The param_set_id which is being deleted.
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:
13000002 Unrecoverable database error
Remarks:
Updates an entry to the “analysis_step” relation.
Example:
Please see db_update_analysis_step (p. 1571) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Deletes analysis step entries from the database
Input:
INTEGER ac_id Id of the analysis code to which the analysis step to be deleted
is associated.
INTEGER step_id Id of the analysis step to be deleted.
Main Index
388
Function Descriptions
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Deletes a record in the “analysis_step” table in the database.
Example:
Please see db_delete_analysis_step_id (p. 1521) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Create an entry in the param_set relation. This entry can be of a type real, character, or integer.
A type of array of reals will soon be added.
Input:
INTEGER param_set_id Parameter set ID to be added to the database.
STRING param_name[80] The parameter name being added parameter set relation.
INTEGER param_type The type of parameter set being added to the database. Only
one type of entry will be added for a parameter name, the
other types of parameters should be NULL.
DbInteger1
DbLogical2
DbReal3
DbCharacter4
DbRealArray5
DbAllTypes6
REAL param_real The real value of the parameter to be added to the database
relation.
STRING param_char[256] The character value of the parameter to be added to the
database relation.
INTEGER param_int The integer value of the parameter to be added to the
database relation.
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:
13000002 Unrecoverable database error
Remarks:
Adds an entry to the “param_set” relation.
Example:
Please see db_create_param_set_entry (p. 1517) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 13 389
Analysis
Description:
Retrieves the number of parameters for a given parameter_set_id.
Input:
INTEGER param_id The parameter set ID
Output:
INTEGER num_params The number of parameters associated with a parameter set ID
INTEGER <Return Value> Returns the success or failure of the routine
Error Conditions:
None.
Remarks:
Counts records in the “param_set” relation in the database.
Example:
See example for db_get_param_set_ent_pcl (p. 390). See also db_count_param_set_entries
(p. 1508) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get an entry in the param_set relation. This entry may be of the type real, character, or integer.
Input:
INTEGER param_set_id The ID of the parameter sets which will be fetched from the
database.
STRING param_name[80] The array of param_names associated with analysis code
input.
Output:
INTEGER param_type The type of param being fetched from the database.
REAL param_real Real parameter.
STRING param_char[256] Array containing a char parameter.
INTEGER param_int Integer parameter.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves an entry from the “param_set” relation.
Example:
See example for db_get_step_info (p. 385). See also db_get_param_set_entry (p. 1557) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
390
Function Descriptions
Description:
Allows strings of param chars to be returned to pcl. Retrieves the parameter names, types,
values, and the count given the count expected and the parameter set id.
Input:
INTEGER param_set_id The ID of the parameter sets which tre to be fetched from the
database.
INTEGER count The number of params to be returned from the database.
Output:
INTEGER count
STRING param_name[80]() The array of param_names associated with analysis code
input.
INTEGER param_type() The type of param being fetched from the database.
REAL param_real() Array containing a real parameter.
STRING param_char[256]() Array containing a char parameter.
INTEGER param_int() Array containing a integer parameter.
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:
13000002 Unrecoverable database error
Remarks:
Retrieves multiple entries from the “param_set” relation.
Example:
Please see db_get_param_set_ent_pcl (p. 1554) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieves the parameter names, types, values and the count given the count expected and the
parameter set id.
Input:
INTEGER param_set_id The ID of the parameter sets which are to be fetched from the
database.
INTEGER count The number of parameters to be returned from the database.
Output:
INTEGER count The number actually returned from the database.
STRING param_name[80]() The array of param_names associated with analysis code
input.
INTEGER param_type() The type of param being fetched from the database.
REAL param_real() Array containing a real parameter.
STRING param_char[256]() Array containing a char parameter.
Main Index
CHAPTER 13 391
Analysis
Description:
Deletes the entries listed by the parameter set id from the database.
Input:
INTEGER param_set_id Id of the param_set whose entries are to be deleted.
STRING name[80] Name of the param_set to be deleted.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Deletes a record in the “param_set” table in the database.
Example:
Please see db_get_param_set_entry (p. 1557) in the MSC.Acumen, Volume 2: Code Examples.
db_delete_param_set_entries (param_set_id)
Description:
Deletes the entries listed by the parameter set id from the database.
Input:
INTEGER param_set_id Id of the param_set whose entries are entries to be deleted.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Deletes records in the “param_set” table in the database.
Main Index
392
Function Descriptions
Example:
Please see db_get_param_set_entries (p. 1555) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Create a matrix type parameter with param_set_id and param_name.
Input:
INTEGER param_set_id Parameter set ID to be added to the database.
STRING param_name[80] The parameter name being added parameter set relation.
INTEGER nrows The number of rows in the matrix parameter.
INTEGER ncols The number of columns in the matrix parameter.
REAL matrix() The array of floats comprising the matrix.
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:
13000002 Unrecoverable database error
Remarks:
Adds an entry to the “param_set” relation.
Example:
See example for db_delete_param_set_entry (p. 391). See also
db_create_pset_matrix_entry (p. 1519) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets a matrix parameter set entry from the database.
Input:
INTEGER param_set_id Internal unique ID of the matrix values to be retrieved from the
database.
STRING param_name[80] Name of the param set being retrieved from the database.
REAL matrix() The information previously contained in the blob, but returned
to the calling routine in a float array.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Accesses one record in the “param_set” table in the database.
Example:
Please see db_get_pset_matrix_entry (p. 1559) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 13 393
Analysis
Description:
Gets a the size of a matrix parameter set entry from the database.
Input:
INTEGER param_set_id Internal unique ID of the matrix values to be retrieved from
the database.
STRING param_name[80] Name of the param set being retrieved from the database.
Output:
INTEGER Number of rows in the matrix.
INTEGER Number of columns in the matrix.
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:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
Accesses one record in the “param_set” table in the database.
Example:
See example for db_get_pset_matrix_entry (p. 392). See also db_get_pset_matrix_size
(p. 1561) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.close ()
Description:
This function closes the last jobfile opened by the jobfile.open function.
The function
1. Checks the job status of the file before closing.
2. Returns error code if file is not found or is blank, or file name is invalid.
Input:
NONE
Output:
INTEGER <Return Value> Returns 0 if function is executed successfully. Otherwise
returns a non-zero error code.
Error Conditions:
None.
Example:
Please see jobfile.close (p. 1575) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
394
Function Descriptions
Description:
This function writes a real matrix of any size into the jobfile and then as a matrix in the
database. The label and size of the matrix is defined by the jobfile.writeSS() function.
Input:
REAL ARRAY values(num_values) The values to be entered in the matrix.
INTEGER num_values The number of values to be entered in the database.
Output:
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
See the Status Messages (Ch. 11) for information on any error values returned by this function.
Example:
Please see jobfile.create_matrix (p. 1576) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function opens the output file for deck creation. It writes the parameters to be used in the
Results/Model data files. A file “jobname.jbr is created when the MSC.Nastran preference is
selected. The function returns an integer value '0' if executed properly. The functions that are
used subsequent to this function are the msc_delete_old_files, jobfile.writec, jobfile.writef,
jobfile.writei. The file must necessarily be closed by the jobfile.close function.
The function does the following steps:
1. Checks for the jobname validity.
2. Assigns suitable extension to the output file.
Input:
STRING jobname[] The name of the output file to be created.
STRING job_type[] The type of the output file desired
Output:
INTEGER <Return Value> Returns 0 if function is executed successfully. Otherwise
returns a non-zero integer value.
Error Conditions:
None
Note:
Following are the job_types supported by MSC interfaces:
“RESULTS”, “MODEL”, “OUTPUT2”, “ANALYZE NO JOBFILE”
Example:
Please see jobfile.open (p. 1578) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 13 395
Analysis
Description:
This function sets the job_status with the corresponding description for the jobfile.
Input:
INTEGER job_status The status of the job to be set.
STRING message_string [ ] The message string describing the job type.
Output:
LOGICAL < Return_status> Returns TRUE on successful execution.
Error Conditions:
None.
Example:
Please see jobfile.set_job_status (p. 1579) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes character strings in the jobfile opened by the jobfile.open function. The
other equivalents to this function are jobfile.writei, jobfile.writer and jobfile.write_spl.
Jobfile.writec("str_1","str_2 ") writes the following to the output file : str_1 = str_2. and for
jobfile.writec("","str_2), the output is str_2.
The function does the following steps:
1. Checks the session file compatibility for MARC, MSC.Nastran.
2. Writes the input charaters to the file opened by the jobfile.open() function.
Input:
STRING label_str [] The name of the variable (parameter) to be defined in the
output file.
STRING char_val[] The string value to be assigned to the solution parameter.
Output:
None
Error Conditions:
None
Note:
The function has return statements but does not return any value. The function can be
enhanced to check the status of execution by returning a value.
Example:
Please see jobfile.writec (p. 1580) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
396
Function Descriptions
Description:
This function writes integer values in the jobfile opened by the jobfile.open function. The other
equivalents to this function are jobfile.writec, jobfile.writer and jobfile.write_spl.
Jobfile.writec("str_1",int) writes the following to the output file : str_1 = int.
The function does the following steps:
1. Checks the session file compatibility for MARC, MSC.Nastran.
2. Writes the input integer values to the file opened by the jobfile.open() function.
Input
STRING label_str [] The name of the variable (parameter) to be defined in the
output file.
INTEGER int_val The integer value to be assigned to the solution parameter.
Output
None
Error Conditions:
None
Note:
The function has return statements but does not return any value. The function can be enhanced
to check the status of execution by returning a value.
Example:
Please see jobfile.writei (p. 1581) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes real values in the jobfile opened by the jobfile.open function. The other
equivalents to this function are jobfile.writei, jobfile.writec and jobfile.write_spl.
Jobfile.writer("str_1",r_val) writes the following to the output file : str_1 = r_val.
Input
STRING label_str [] The name of the variable (parameter) to be defined in the
output file.
REAL r_val The real value to be assigned to the solution parameter
Output
None
Error Conditions:
None
Note:
The function has return statements but does not return any value. The function can be
enhanced to check the status of execution by returning a value.
Example:
Please see jobfile.writer (p. 1582) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 13 397
Analysis
Description:
This function writes character string arrays in the jobfile opened by the jobfile.open function.
The other equivalents to this function are jobfile.writei, jobfile.writer and jobfile.writec. This
function writes pure string or string arrays as opposed to the function jobfile.writec which
inserts two strings with a "=" in between.
Input:
STRING label_str [] The name of the variable (parameter) to be defined in the
output file.
STRING ARRAY char_str []() The character string array to be assigned to the solution
parameter
Output:
None
Error Conditions:
None
Note:
The function has return statements but does not return any value. The function can be
enhanced to check the status of execution by returning a value.
Example:
Please see jobfile.write_spl (p. 1583) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function follows the jobfile.open() function. It searches and deletes all previous versions of
the model and results files to avoid interference with the new jobname.
The function does the following steps:
1. Creates the file names of all the possible old files with the given extension.
2. Checks the existence of files with these names.
3. If no file is found returns with a successful status.
4. If refused permission with file delete, returns with a status.
5. Deletes all old files with the jobname and extensions from the current directory.
Input:
STRING job_name [] The name of the analysis code.
STRING model_suffix[] The suffix assigned to the NASTRAN input file by the user.
STRING results_suffix[] The suffix assigned to the OUTPUT file by the user.
Output:
INTEGER <Return Value> Returns the status of the function.
0 is returned for success, i.e. no files found or all files
successfully deleted
1 is returned for unsuccessful deletion of files, i.e. no
permission to delete files.
Main Index
398
Function Descriptions
Error Conditions:
None
Example:
Please see msc_delete_old_files (p. 1584) in the MSC.Acumen, Volume 2: Code Examples.
mscnastran_anlyze_sub_create.available_callback (<num_items>,
<subcase_name>)
Description:
This function is callback to “Available Subcases” listbox in “Subcase Create” form. Execution of
this function will display the corresponding subcase name in “Subcase Name” databox
available in “Subcase Create” form.
Input:
INTEGER num_items Number of items.
STRING subcase_name[] Subcase name.
Output:
None
Error Conditions:
None
Example:
Please see mscnastran_anlyze_sub_create.available_callback (p. 1585) in the MSC.Acumen,
Volume 2: Code Examples.
mscnastran_analyze_tp.get_version_number (<version_no>)
Description:
This function will get the version number of the MSC.Nastran preference.
Input:
REAL version_no Version number of MSC.Nastran.
Output:
None
Error Conditions:
None
Example:
Please see mscnastran_analyze_tp.get_version_number (p. 1586) in the MSC.Acumen,
Volume 2: Code Examples.
mscnastran_job.associate_subcases (<sseq_str>,<job_name>,<num_subcases>,
<subcase_names>)
Description:
This function will associate the subcases to a job for the MSC.Nastran preference.
Input:
STRING sseq_str[] Solution sequence number.
STRING job_name[] Name of the job.
Main Index
CHAPTER 13 399
Analysis
mscnastran_subcase.create (<sseq_str>,<subcase_names>,<subcase_desc>)
Description:
This function will create subcases for the MSC.Nastran preference.
Input:
STRING sseq_str[] Solution sequence number.
STRING subcase_names[] Name of subcase
STRING subcase_desc[] Subcase description
Output:
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error values returned by this function.
Example:
Please see mscnastran_subcase.create (p. 1589) in the MSC.Acumen, Volume 2: Code Examples.
mscnastran_subcase.create_char_param (<sseq_str>,<char_value>)
Description:
This function will load a character value for a subcase parameter into the database.
Input:
STRING param_name[] Name of the subcase parameter.
STRING char_value[] Value of the parameter.
Output:
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error values returned by this function.
Example:
Please see mscnastran_subcase.create_char_param (p. 1590) in the MSC.Acumen, Volume 2:
Code Examples.
Main Index
400
Function Descriptions
mscnastran_update.job (<job_name>)
Description:
This function will update an old job to format of current MSC.Nastran preference.
Input:
STRING job_name[] Name of the job.
Output:
INTEGER <Return Value>Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error values returned by this function.
Example:
Please see mscnastran_update.job (p. 1591) in the MSC.Acumen, Volume 2: Code Examples.
uil_app_analysis.change_current_branch (num_branches>,<labels>,<post_them>)
Description:
This function will change the current branch of the option menu tree to the new branch for
analysis application
Input:
INTEGER num_branches Number of menus in new branch.
STRING labels[](num_branches)Array of item labels for each menu.
LOGICAL post_them Flag to indicate if the menus are to be posted after they are
set.
Output:
Error Conditions:
None
Example:
Please see uil_app_analysis.change_current_branch (p. 1592) in the MSC.Acumen, Volume 2:
Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Fields
14
■ General
Main Index
402
Function Descriptions
14.1 General
db_get_all_field_names (object)
Description:
Gets all lbc object names from the database, in get all, get next method.
Input:
INTEGER object The object ID for the rows selected
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:
None.
Remarks:
None.
Example:
Please see db_get_all_field_names (p. 1598) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Gets all lbc object names from the database, in get all, get next method.
Input:
None.
Output:
INTEGER id The unique internal ID of the field in the database.
STRING name[ The name of the field in the database.
INTEGER <Return Value> .
Error Conditions:
13000002 Unrecoverable database error
13000117 The query specified has completed
13000007 An unspecified database error occurred
Remarks:
Accesses all records for a specified object in the “field” table in the database.
Example:
See example for db_get_all_field_names (p. 402). See also db_get_next_field_name
(p. 1606) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 14 403
Fields
Description:
Gets a field id in the database.
Input:
STRING name[] The name of the field.
Output:
INTEGER id The unique internal ID identifying the field in the database.
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:
13000002 Unrecoverable database error
Remarks:
Gets a record in the “field” table.
Example:
See example for field_fem_const_eval (p. 412) or db_get_max_field (p. 407) or
db_modify_field (p. 408). See also db_get_field_id (p. 1602) in the MSC.Acumen, Volume 2:
Code Examples.
Description:
Gets a field in the database.
Input:
INTEGER id The unique internal ID identifying the field in the database.
Output:
STRING name[] The name of the field.
INTEGER object 0 = spatial; 1 = material; 2 = time
INTEGER nvar The number of functions used to define this field.
INTEGER ivar1 Values 1-4
INTEGER ivar2 Values 1-4
INTEGER ivar3 Values 1-4
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:
13000002 Unrecoverable database error
Remarks:
Gets a record in the “field” table and one in either the “field_function” or “field_table” table in
the database.
Example:
See example for db_get_all_field_names (p. 402). See also db_get_field_attrs (p. 1599) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
404
Function Descriptions
Main Index
CHAPTER 14 405
Fields
|25 = LBC_VAR_CLEAR_ZERO_PRESS
|26 = LBC_VAR_NEGATIVE_PRESSURE
|27 = LBC_VAR_OVER_CLOSURE
|28 = LBC_VAR_DAMPING_ZERO_CLEAR
|29 = LBC_VAR_CLEARANCE_ZERO_DAMP
|30 = LBC_VAR_FRAC_CLEARANCE
|31 = LBC_VAR_ADJUST_TOLERANCE
|33 = LBC_VAR_OUT_OF_PLANE_WIDTH
|35 = LBC_VAR_CROSS_SECT_AREA
|1 = “General” Contact Type
|1 = “Large” Sliding Type
|1 = “Hard” Surface Behavior
|1 = “Penalty” Friction Formulation
|2 = “One Sided” Penetration Type
|3 = Master Region Id
|3 = Slave Region Id
|2 = “Off” Viscous Damping
|0.2 = ““ Friction Coefficient (Databox Input)
|0. = Shear Stress Limit (Databox Input)
|0. = Pressure Zero Clearance
|0. = Clearance Zero Pressure
|0. = Negative Pressure
|0. = Over Closure
|0. = Damping Zero Clearance
|0. = Clearance Zero Damping
|0. = Frac Clearance
|0. = Adjust Tolerance (Databox Input)
|0. = Out of Plane Width
|0. = Cross Sectional Area
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a
change in status or an error.
Error Conditions:
-1 This is an internal status condition. There is no corresponding status message in
the message database.
Example:
Please see fields_create_general_term (p. 1613) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
406
Function Descriptions
Description:
Return the values of the field ID for NPTS locations specified by POINTS in VALUES.
Transformation matrix for the specified CID.
Input:
INTEGER field_id Field ID.
INTEGER num_evals Number of points to be evaluated.
INTEGER eval_dim Number of coordinates defining POINTS.
INTEGER field_dim Dimensionality of field. (1 or 3).
REAL eval_points (num_evals,eval_dim)Values of the coordinates of the points.
Output:
REAL field_values (num_evals,field_dim) Values of the fields.
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:
30001401 Unable to allocate enough memory to evaluate the field.
30001402 No Evaluation method is defined for this field type.
Remarks:
For REALS, PCL ordering is needed.
Main Index
CHAPTER 14 407
Fields
Example:
Please see get_field_values (p. 1619) in the MSC.Acumen, Volume 2: Code Examples.
db_get_max_field (id)
Description:
Gets the largest field id from the database.
Input:
None.
Output:
INTEGER id Highest field ID used.
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:
13000007 An unspecified database error occurred
Remarks:
Selects the largest field id from the database.
Example:
None.
Description:
Calculate the maximum number of nodes for any element in group GID.
Input:
INTEGER gid Group id - 0 get all elems in model.
Output:
INTEGER maxnod Max number of nodes in any element.
INTEGER <Return Value> .0 if no error, else error code.
Error Conditions:
None.
Remarks:
None.
Example:
Please see fld_evl_get_maxnod_for_group (p. 1618) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
408
Function Descriptions
db_modify_field (id, name, object, type, etype, eid, extra_opt, cid_type, cid, defn_type,
nvar, ivar1, ivar2, ivar3, fn1_size, fn2_size, fn3_size, fn1, fn2, fn3,
lin_def, nxvals, nyvals, nzvals, xvals, yvals, zvals, vals)
Description:
Modifies a field in the database.
Input:
INTEGER id The unique internal ID identifying the field in the database.
STRING name[] The name of the field to be modified.
INTEGER object 0 = spatial; 1 = material; 2 = time
INTEGER type 0 = scalar; 1 = vector
INTEGER etype he entity type.
INTEGER eid The entity ID.
INTEGER extra_opt The extrapolation option.
INTEGER cid_type 0 = Real; 1 = Parametric
INTEGER cid The ID of the coordinate frame used to define this field.
INTEGER defn_type 0 = Function; 1 = Table; 2 = Fem;
INTEGER nvar The number of functions used to define this field.
INTEGER ivar1 Values 1-4
INTEGER ivar2 Values 1-4
INTEGER ivar3 Values 1-4
INTEGER fn1_size The size of the first function used to define this field.
INTEGER fn2_size The size of the second function used to define this field.
INTEGER fn3_size The size of the third function used to define this field.
STRING fn1[fn1_size] The first function that defines this field.
STRING fn2[fn2_size] The second function that defines this field.
STRING fn3[fn3_size] The third function that defines this field.
LOGICAL lin_def Flag indicating whether this was a linear definition.
INTEGER nxvals The number of x values for this field.
INTEGER nyvals The number of y values for this field.
INTEGER nzvals The number of z values for this field.
REAL xvals(nxvals) The x values for this field.
REAL yvals(nyvals) The y values for this field.
REAL zvals(nzvals) The z values for this field.
REAL vals(nxvals, nyvals, nzvals)
The field values for this table field.
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:
13000002 Unrecoverable database error
Remarks:
Modifies a record in the “field” table and one in either the “field_function”, “field_fem” or
“field_table” table in the database.
Example:
Please see db_modify_field (p. 1608) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 14 409
Fields
db_delete_field (id)
Description:
Deletes a field in the database.
Input:
INTEGER id The unique internal ID identifying the field in the
database.
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:
13000002 Unrecoverable database error
Remarks:
Deletes a record in the “field” table and one in either the “field_function” or “field_table” table
in the database.
Example:
See example for db_get_max_field (p. 407). See also db_delete_field (p. 1596) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
Transform a scalar elem table to a lbc field table formatted for efficient use in a FEM field. The
table will contain one entry per element in the group and will be sorted by element id.
Input:
INTEGER fid Field ID to be converted.
INTEGER grpid Group ID.
INTEGER scalid Scalar_elem_table ID referenced by the field.
Output:
INTEGER <Return Value> .0 success, otherwise an error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see fld_cre_fem_res_sca (p. 1616) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Transform a vector graphics table to a lbc field table.
Input:
INTEGER fid Field ID to be converted.
INTEGER vecid Ggraphics_vector_table ID referenced by the field.
Main Index
410
Function Descriptions
Output:
INTEGER elmflg !=0 a field_res_elem table was created =0 a field_res_node table
was created
INTEGER <Return Value> .0 success, otherwise an error
Error Conditions:
None.
Remarks:
None.
Example:
See example for fld_cre_fem_res_sca (p. 409). See also fld_cre_fem_res_vec (p. 1617) in the
MSC.Acumen, Volume 2: Code Examples.
db_delete_field_res (id)
Description:
This function deletes the field_res_elm or the field_res_not table from a specified database field.
Input:
INTEGER id This value specifies the identifier of a field in the database.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
13000002 Unrecoverable database error
Remarks:
Deletes a record in the “field_res_elem” table or “field_res_node” table in the database.
Example:
Please see db_delete_field_res (p. 1597) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 14 411
Fields
Description:
Gets an lbc field from the database.
Input:
INTEGER id The unique internal ID identifying the field in the
database.
INTEGER nvals The number of values that the output arrays are
dimensioned to handle.
Output:
INTEGER nvals The number of values that are in the output arrays.
INTEGER eid(nvals) The entity ID.
INTEGER elem_face(nvals) The elem face ID.
INTEGER elem_edge(nvals) The elem edge ID.
INTEGER node_pos(nvals) The node position.
REAL vals(nvals, type) The scalar, vector, or tensor values of the field.
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:
13000002 Unrecoverable database error
Remarks:
Gets a record in the “field” table and one in either the “field_res_elem” or “field_res_node”
table in the database.
Example:
Please see db_get_field_lbc (p. 1602) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
412
Function Descriptions
Description:
Gets a field type from the database
Input:
INTEGER id The unique internal ID identifying the field in the database.
Output:
INTEGER type The type of the field.
INTEGER object 0 = spatial; 1 = material; 2 = time
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:
13000002 Unrecoverable database error
Remarks:
Reads a record in the “field” table.
Example:
Please see db_get_field_lbc_type (p. 1604) in the MSC.Acumen, Volume 2: Code Examples.
field_fem_const_eval (gid, numint, nindep, intrpl, extrap, maxnod, cnst, eids, geoloc,
offflg)
Description:
Evaluate a FEM type field at NUMINT points. If point is outside the range set the indices
according to EXTRAP return the constraints.
Input:
INTEGER gid Group ID.
INTEGER numint Number of interpolents to be evaluated.
INTEGER nindep Number of independent variables.
REAL intrpl(numint, nindep) Locations of interpolents.
INTEGER extrap Extrapolation Option.
INTEGER maxnod Maximum # of nodes of any element in GID.
Output:
REAL cnst(numint, maxnod) Values of the constraints.
INTEGER eids(numint) Elem IDS corresponding to the constraints.
REAL geoloc(numint, nindep)Location of the interpolated points.
INTEGER offflg(numint) =1 GEOLOC(,i) not within GEOTOL of POINTS
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:
None.
Remarks:
None.
Example:
Please see field_fem_const_eval (p. 1614) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 14 413
Fields
Main Index
414
Function Descriptions
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Results
15
■ General
Main Index
416
Function Descriptions
15.1 General
Description:
Given an elementId, count all the unique result types used by it.
Input:
INTEGER elementId The element ID.
Output:
INTEGER resultTypeCount Count of all the unique result types used by the given
element ID.
INTEGER <Return Value> .Integer indicating the success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Example:
Please see db_count_result_types_for_elem (p. 1624) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Retrieves the results file suffix associated with the named analysis code.
Input:
STRING name[31] Name of the analysis code for which the suffix is to be
retrieved.
Output:
STRING suffix[6] Location into which the named suffix is to be retrieved.
INTEGER <Return Value> Success or failure of routine.
Error Conditions:
13000002 Unrecoverable database error
13000007 An unspecified database error occurred
Remarks:
None.
Example:
Please see db_get_results_file_suffix (p. 1627) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 15 417
Results
Description:
This function retrieves the name of an element scalar table from the database.
Input:
INTEGER scalar_id This value specifies an identifier for an element scalar table in
the database.
Output:
STRING name[] The value returns the name of the specified element scalar
table. This name is used for display purposes only and is not a
unique table identifier.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
13000002-> Unrecoverable database error
13000007-> An unspecified database error occurred
Remarks:
Accesses one record in the “graphics_elem_scalar” table in the database.
Example:
Please see db_get_elem_scalar_name (p. 1625) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.create_jobname ()
Description:
This function creates a jobname for an analysis. It returns error conditions for the jobname
creation as an output.
Input:
None
Output:
INTEGER <Return Value> The status of the execution. Returns 0 for successful
completion and an error code in case of error.
Error Conditions:
13000002 Unrecoverable database error.
13000004 Duplicate entry for jobname.
13000007 An unspecified database error occured.
13000158 Jobname already exists in the database.
13000159 Jobname id not found in the database.
Example:
Please see jobfile.create_jobname (p. 1628) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
418
Function Descriptions
Description:
This function creates a parameter for the current parameter set of the type indicated. Every
new jobname or subcase is referenced by a new param_set_id. All the parameters for the
jobname or subcase can be accessed through this param_set_id. This function
(jobfile.create_param) writes the parameter name and assigns its value, first in the jobfile and
then in the database. The parameter can be of type string, integer or real. For example, if a
string “Load_case” is passed in the first argument, it creates a new param_set_id. Subsequent
functions will define the other parameters. This function also creates a new step when the load
case parameter is encountered in the label string. It also increments the version of the file search
path parameter when it is encountered.
Input:
STRING label [ ] The parameter name to create.
INTEGER int_value The integer value to be assigned to the parameter.
REAL real_value The real value to be assigned to the parameter.
STRING string_value[ ] The string value to be assigned to the parameter.
INTEGER para_type The type of parameter to be added.
1 -INTEGER
3 - REAL
4 - STRING.
Output:
INTEGER <Return Value> Returns 0 for successful execution, else returns the error
code.
Error Conditions:
13000002 Unrecoverable database error.
13000007 An unspecified database error occured.
13000052 Load case not found.
13000204 The specified analysis step not found.
Example:
Please see jobfile.create_param (p. 1628) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function sorts the values in the string ‘list[ ]’in the form of a real or integer array. This
function should be followed by function jobfile.write_array_as_list to write the array to the
jobfile. Refer to file ‘lpenums.i’ for values of sublist filters.
Input:
STRING list [ ] The values of the array in string format.
Main Index
CHAPTER 15 419
Results
INTEGER sublist_filter The type of array. Refer to file ‘lpenums.i’ for values.
512 - if the list contain nodes.
1024 - if the list contain elements.
16348 - if the list contain real values.
8192 - if the list contain integer values.
Output:
INTEGER < Return_status> Returns 0 on successful execution.
Error Conditions:
14000045 Improper input list.
Example:
Please see jobfile.eval_list (p. 1630) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes values of an array in string format to the jobfile. The array is specified by
the function jobfile.eval_list(). ‘Value_format’ is a string to specify the format for the array as
per the string input/output routines.
Input:
STRING label [ ] The label text to be written to the jobfile.
STRING value_format [ ] The format for the array values (i.e. “%I2.2%”, “%G2%”.)
INTEGER num_values_on_line The value to specify the number of values to be written on a
single line in the jobfile.
Output:
INTEGER < Return_status> Returns a 0 on successful execution.
Error Conditions:
None
Example:
Please see jobfile.write_array_as_list (p. 1631) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes element numbers from the string in the databox as string format to the
jobfile. The element_list[ ] should start with ‘elm’ or ‘Element’ for the function to get executed.
Input:
STRING label [ ] The label text to be written to the jobfile.
STRING element_list [ ] The element numbers in string format to be written to the
jobfile.
Output:
None
Error Conditions:
None
Main Index
420
Function Descriptions
Example:
Please see jobfile.write_element_list (p. 1632) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes integer values from the databox in string format to the jobfile.
Input:
STRING label [ ] The text to be written to the jobfile.
STRING integer_value [ ] The integer values in string format to be written to the
jobfile.
Output:
None
Error Conditions:
None
Example:
Please see jobfile.write_integer_list (p. 1633) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes node numbers from the string in the databox in string format to the jobfile.
The node_list[ ] should start with ‘node’ for the function to get executed.
Input:
STRING label [ ] The label text to be written to the jobfile.
STRING node_list [ ] The node list in string format to be written to the jobfile.
Output:
None
Error Conditions:
None
Example:
Please see jobfile.write_node_list (p. 1635) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes real values from the databox in string format to the jobfile.
Input:
STRING label [ ] The text to be written to the jobfile.
STRING real_value[ ] The real values in string format to be written to the jobfile.
Output:
None
Main Index
CHAPTER 15 421
Results
Error Conditions:
None
Example:
Please see jobfile.write_real_list (p. 1636) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes text (a formatted string) with the integer, real and string values (defined in
the other arguments) to the jobfile. The format of the values is specified in the label argument.
The function jobfile.write_stream() can be used in this way:
jobfile.write_stream("The values are : integer value : %I%, real value : %G% and string
value:%A%",15, 5.5, "test string ")
This will write the following statement to the jobfile:
The values are : integer value : 15, real value : 5.5 and string value: test string.
%I%, %G%, %A% are formats to specify integer, real and string values respectively.
Input:
STRING label [ ] The text to be written to the jobfile.
INTEGER int_value The integer value to be written in the text to the jobfile.
REAL real_value The real value to be written in the text to the jobfile.
STRING string_value[ ] The string value to be written in the text to the jobfile.
Output:
None
Error Conditions:
None
Example:
Please see jobfile.write_stream (p. 1637) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.write_string (<label>,<value>)
Description:
This function will write a statement “label” = “value” to the jobfile opened by the jobfile.open()
function. For total text length exceeding 80 characters, it is written to the next line in the jobfile.
For instance, if the user wants to specify that the output should be in the form of an .op2 file
only, then the command is: jobfile.write_string(“DATA OUTPUT”,”OP2 ONLY”). This will
write the following statement to the jobfile: DATA OUTPUT = OP2 ONLY.
Input:
STRING label [ ] The name of the parameter.
STRING value [ ] The value for the parameter.
Output:
INTEGER <Return Value> Returns 0 for success, else returns the error code.
Error Conditions:
6013024 The maximum number of characters that can be written to
the control file for a parameter is 240.
Main Index
422
Function Descriptions
Example:
Please see jobfile.write_string (p. 1638) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function writes real values to the jobfile. The format is ‘label = real_value’.
Input:
STRING label [ ] The label to be written to the jobfile.
REAL real_value The real value to be written to the jobfile.
Output:
None
Error Conditions:
None
Example:
Please see jobfile.writer (p. 1639) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.writeS1 (<label>,<rl_val>)
Description:
This function will write an array of one real value to the jobfile opened by the jobfile.open()
function.
Input:
STRING label [ ] The name of the parameter.
REAL rl_val (1) The array of one real value to be written.
Output:
None
Error Conditions:
None
Example:
Please see jobfile.writeS1 (p. 1640) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.writeS2 (<label>,<rl_val>)
Description:
This function will write an array of two real values to the jobfile opened by the jobfile.open()
function.
Input:
STRING label [ ] The name of the parameter.
REAL rl_val (2) The array of two real values to be written
Output:
None
Main Index
CHAPTER 15 423
Results
Error Conditions:
None
Example:
Please see jobfile.writeS2 (p. 1641) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.writeS3 (<label>,<rl_val>)
Description:
This function will write an array of three real values to the jobfile opened by the jobfile.open()
function.
Input:
STRING label [ ] The name of the parameter.
REAL rl_val (3) The array of three real values to be written
Output:
None
Error Conditions:
None
Example:
Please see jobfile.writeS3 (p. 1642) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.writeS4 (<label>,<rl_val>)
Description:
This function will write an array of four real values to the jobfile opened by the jobfile.open()
function.
Input:
STRING label [ ] The name of the parameter.
REAL rl_val (4) The array of four real values to be written
Output:
None
Error Conditions:
None
Example:
Please see jobfile.writeS4 (p. 1643) in the MSC.Acumen, Volume 2: Code Examples.
jobfile.writeSS (<label>,<int_val>)
Description:
This function will write an array of two integer values to the jobfile opened by the jobfile.open()
function.
Input:
STRING label [ ] The name of the parameter.
Main Index
424
Function Descriptions
Description:
This function obtains the minimum and maximum values from the current “active” result
which is controlling the current viewport spectrum/range.
Input:
STRING group_name[] The current viewport spectrum range.
Output:
REAL min Minimum value of results.
REAL max Maximum value of results.
Error Conditions:
None.
Example:
Please see rdm_result_minmax_get (p. 1645) in the MSC.Acumen, Volume 2: Code Examples.
res_db_cgetlayerposids (<rescase_id>,<rt_id>,<nlayers>,<layerposids>)
Description:
This function will retrieve a list of layers of a result type in a given result case
Input:
INTEGER rescase_id Result case id
INTEGER rt_id Result type id
Output:
INTEGER nlayers Number of layers
INTEGER layerposids() Layer position ids
INTEGER <Return Value> Returns 0 for success, otherwise returns the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error
values returned by this function.
Example:
Please see res_db_cgetlayerposids (p. 1647) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 15 425
Results
res_db_cgetrescases (<num_ldcases>,<loadcase_id>,<subcase_id>,<rescase_id>)
Description:
This function will retrieve result case ids.
Input:
INTEGER num_ldcases Number of load cases
INTEGER loadcase_id() Load case ids
INTEGER subcase_id() Subcase ids
Output:
INTEGER rescase_id() Result case ids.
INTEGER <Return Value> Returns 0 for success, otherwise return the error code.
Error Conditions:
See the Status Message(Ch 11) for information on any error
values returned by this function.
Example:
Please see res_db_cgetrescases (p. 1648) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
426
Function Descriptions
Output:
INTEGER resultids(5) Array of the results case ids i.e. load case id, subcase id,
primary case id, secondary case id and layer case id. The
load case, sub case and layer ids are not used as output
values by this function.
The primary id and secondary id are used as outputs by
this function. This value is used as both as input and an
outputs to the function and would be passed by the calling
function as a single argument.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None
Example:
Please see res_utl_create_elem_result (p. 1650) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
428
Function Descriptions
Input:
INTEGER resultsids() Array of the results case ids i.e. load case id, subcase id,
primary case id, secondary case id and layer case id.
STRING elem_list[] List of element ids for which to extract results.
STRING derivation[] Derivation Specifier:
Tensor to Scalar: “VONM”, “OCT”, “HYDRO”, “INV1”,
“INV2”, “INV3”, “MAXSHR”, “MAXCMP”, “MINCMP”,
“P1”, “P2”, “P3”, “XX”, “YY”, “ZZ”, “XY”, “YZ”, “ZX”,
Tensor to Vector: “PV1”, “PV2”, “PV3”, any 3 component
initials (“XXYYZZ”)
Vector to Scalar: “X”, “Y”, “Z”, “MAG”, “MINCMP”,
“MAXCMP”, “AVG”
STRING location[] This value specifies the location of the coordinate frame
identifier. “A[sis]”, “C[entroid], “N[odal] or ““ = “A[sis]”
STRING cidlist[] List format of a coordinate system for vector and tensor
transformations. NULL string will be interpreted as no
transformation.
STRING avg_method[] Average Method string (see below).
STRING avg_domain[] Average Domain string (see below).
STRING extrap_method[] Extrapolation Method string (see below).
STRING complex_form[] Complex form string (see below).
REAL complex_angle Used with complex results when complex form is “Angle”
Output:
INTEGER datatype This value returns the datatype i.e.
Scalar =1, Vector = 2, Tensor =3
INTEGER resloc This value returns the result location. Valid value are :
Centroid =1, Nodal =2, Multiple =3
INTEGER cnt Number of Element results returned.
INTEGER ids() Array of the extracted elem ids.
INTEGER nresults() Array of the results per element.
REAL results() Array of the extracted results.
INTEGER min_loc() Subcase ID for each elem minimum component.
INTEGER max_loc() Subcase ID for each elem maximum component.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
1 This is an internal status condition. There is no corresponding status message
database.
Remarks:
The input value avg_method can have the following values:
“DeriveAverage”, “AverageDerive”, “Difference”, “Sum”
The input value avg_domain can have the following values:
“All”, “Material”, “Property”, “EType”, “Target”, “Element”
The input value extrap_method can have the following values:
“ShapeFunc”, “Average”, “Centroid”, “Max”, “Min”, “AsIs”
Main Index
CHAPTER 15 429
Results
Main Index
CHAPTER 15 431
Results
STRING cidlist[] List format of a coordinate system for vector and tensor
transformations. NULL string will be interpreted as no
transformation.
STRING avg_method[] Average Method string (see below).
STRING avg_domain[] Average Domain string (see below).
STRING extrap_method[] Extrapolation Method string (see below).
STRING complex_form[] Complex form string (see below).
REAL complex_angle Used with complex results when complex form is “Angle”
Output:
INTEGER datatype This value returns the dta type i.e.
Scalar =1, Vector = 2, Tensor =3
INTEGER cnt Number of Nodal results returned.
INTEGER ids() Array of the extracted nodes ids.
REAL results() Array of the extracted results.
INTEGER min_loc() Subcase ID for each node minimum component.
INTEGER max_loc() Subcase ID for each node maximum component.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
1 This is an internal status condition. There is no corresponding status message
database.
Remarks:
The input value avg_method can have the following values:
“DeriveAverage”, “AverageDerive”, “Difference”, “Sum”
The input value avg_domain can have the following values:
“All”, “Material”, “Property”, “EType”, “Target”, “Element”
The input value extrap_method can have the following values:
“ShapeFunc”, “Average”, “Centroid”, “Max”, “Min”, “AsIs”
The input value complex_form can have the following values:
“Real”, “Imaginary”, “Magnitude”, “Phase”, “Angle”
Example:
Please see res_utl_extract_nodal_results2 (p. 1661) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
This function transforms the specified nodal results for specified coordinate system.
Input:
INTEGER node_count Number of nodal results returned.
INTEGER node_ids() Array of the extracted nodes ids.
INTEGER cid Coordinate frame identifier.
INTEGER ncomp This value specifies the number of component as 1, 3 or 6.
REAL resvals() Array of the specified results.
Main Index
432
Function Descriptions
Output:
REAL resvals() Array of the transformed results.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
4500015 The Specified Cordinate Frame Id does not exist.
Example:
Please see res_utl_transform_nodal_results (p. 1664) in the MSC.Acumen, Volume 2: Code
Examples.
vki_db_getresid (<rescase_id>,<prires_id>,<secres_id>)
Description:
This function will retrieve result type id from the database.
Input:
INTEGER rescase_id Result case id.
INTEGER prires_id Primary result id.
INTEGER secres_id Secondary result id.
Output:
INTEGER rt_id <Return Value>Result type id.
Error Conditions:
NONE
Example:
Please see vki_db_getresid (p. 1666) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function opens a window and draws a graph using given number of points and the array
for coordinates of the points. The function internally sets the array size for the x and y values.
It returns an integer with 0 as success condition or the error code in case of failure.
Input:
STRING window_name[ ] The name of the window to open the X-Y curve.
INTEGER num_points Number of points to decide the curve
STRING curve_name[ ] The name to be assigned to the curve
REAL x_values() The array of real values of the x values of the points on the
ARRAY curve.
REAL y_values() The array of real values of the y values of the points on the
ARRAY curve.
Output:
INTEGER <Return Value> 0 for success or the error code for failure.
Error Conditions:
130000007 Database not open.
Example:
Please see xy_curve_results_set_wnd (p. 1668) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Preferences
16
■ Database
■ General
Main Index
434
Function Descriptions
16.1 Database
Description:
This function will get a preference from the database.
Input:
INTEGER pref_id This value specifies the id value of the preference to be
retrieved.
INTEGER data_type This value is not used.
Output:
INTEGER int_pref This value returns the integer preference value.
LOGICAL log_pref This value returns the logical preference value.
REAL real_pref This value returns the real preference value.
STRING char_pref[31] This value returns the string preference value.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
13000002 Unrecoverable database error.
13000088 Preference not found.
Remarks:
Accesses one record in the “preference” table in the database.
Example:
Please see db_get_pref (p. 1673) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Adds preferences to the database.
Input:
INTEGER id The internal id of the preference to be added to the database
INTEGER data_type The data type of the preference to be added to the database
INTEGER int_pref The value of the integer preference to be added to the database
INTEGER log_pref The value of the logical preference to be added to the database
REAL real_pref The value of the real preference to be added to the database
STRING name[31] The value of the character preference to be added to the
database
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:
13000088 Preference not found
13000002 Unrecoverable database error
Main Index
CHAPTER 16 435
Preferences
Remarks:
Accesses one record in the “preference” table in the database.
Example:
Please see db_add_pref (p. 1672) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
436
Function Descriptions
16.2 General
Description:
Get the Analysis Preference parameters.
Input:
None
Output:
STRING anal_code[31] Analysis Code Name.
STRING anal_type[31 Analysis Type.
STRING mod_suf[4] Model File Suffix.
STRING res_suf[4] Results File Suffix.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_anal_get (p. 1675) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Set the Analysis Preference parameters.
Input:
STRING anal_code[31] Analysis Code Name.
STRING anal_type[31] Analysis Type.
STRING mod_suf[4] Model File Suffix.
STRING res_suf[4] Results File Suffix.
Output:
INTEGER <Return Value> 0: no error.
1: fatal error
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_anal_set (p. 1676) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 16 437
Preferences
pref_confirm_get (confirm )
Description:
Get the Global Preference Confirm status.
Input:
None
Output:
LOGICAL confirm Confirm Flag.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_confirm_get (p. 1677) in the MSC.Acumen, Volume 2: Code Examples.
pref_display_method_get (disp_meth )
Description:
Get the Graphics Display Method Preference type.
Input:
None
Output:
INTEGER disp_meth Display Method.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_display_method_get (p. 1678) in the MSC.Acumen, Volume 2: Code Examples.
pref_entity_dp_get (ed_prop )
Description:
Get the Entity Display Property Preference.
Input:
None
Output:
STRING ed_prop[] Entity Display Property.
INTEGER <Return Value> 0: no error.
1: fatal error.
Main Index
438
Function Descriptions
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_entity_dp_get (p. 1679) in the MSC.Acumen, Volume 2: Code Examples.
pref_entity_dp_set (ed_prop )
Description:
Set the Entity Display Property Preference.
Input:
STRING ed_prop[] Entity Display Property.
Output:
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
See example for pref_display_method_get (p. 437). See also pref_entity_dp_set (p. 1680) in
the MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieve the value of an integer preference.
Input:
STRING prefname[] Name of preference to load.
Output:
INTEGER value Result preference integer.
INTEGER <Return Value> 0: no error, else see error returned.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.
Remarks:
None.
Example:
Please see pref_env_get_integer (p. 1683) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 16 439
Preferences
Description:
Retrieve the value of a logical preference.
Input:
STRING prefname[] Name of preference to load.
Output:
LOGICAL value Result preference logical.
INTEGER <Return Value> 0: no error, else see returned error.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.
Remarks:
None.
Example:
See example for pref_env_get_integer. See also pref_env_get_logical (p. 1684) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
Retrieve the value of a real preference.
Input:
STRING prefname[] Name of preference to load.
Output:
REAL value Result preference real.
INTEGER <Return Value> 0: no error, else see error returned.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.
Remarks:
None.
Example:
See example for pref_env_get_integer (p. 438). See also pref_env_get_real (p. 1685) in the
MSC.Acumen, Volume 2: Code Examples.
Main Index
440
Function Descriptions
Description:
Retrieve the value of a string preference.
Input:
STRING prefname[] Name of preference to load.
INTEGER maxlen Max length of return string w/o null.
Output:
STRING value[] Result preference string.
INTEGER <Return Value> 0; no error, else see error returned.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.
12002003 The string buffer is too small for the preference.
Remarks:
None.
Example:
See example for pref_env_get_integer (p. 438). See also pref_env_get_string (p. 1686) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
This function gets the color preferences and flags for the display of Loads/Boundary
Conditions and Element Properties. The function pref_fa_set sets the attributes for display of
Loads/ Boundary Conditions and Element Properties.
Input:
None
Output:
INTEGER lbc_color() Load/Boundary Condition colors.
ARRAY
LOGICAL lbc_display() Load/Boundary Condition display flags.
ARRAY
INTEGER ep_color() Element Property colors.
ARRAY
LOGICAL ep_display() Element Property display flags.
ARRAY
LOGICAL display_fem Display on FEM Only flag.
INTEGER <Return Value> 0 for success , 1 for failure
Error Conditions:
None
Notes:
Refer to notes below the function pref_fa_set.
Main Index
CHAPTER 16 441
Preferences
Example:
Please see pref_fa_get (p. 1686) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function sets the color preferences, flags for the Display of Loads/Boundary Conditions
and Element Properties. The function should preferably be used from the graphical user-
interface menu, Display, Load/BC/Element Props.
Input:
LOGICAL set_flags() Array of logical values used to determine if a preference is
ARRAY set.
INTEGER lbc_color() Load/Boundary Condition colors.
ARRAY
LOGICAL lbc_display() Load/Boundary Condition display flags.
ARRAY
INTEGER ep_color() Element Property colors.
ARRAY
LOGICAL ep_display() Element Property display flags.
ARRAY
LOGICAL display_fem Display on FEM Only flag.
Output:
INTEGER <Return Value> 0 - no error , 1 - fatal error.
Error Conditions:
None
Notes:
The flag for the Load/BC/Element Properties, if set as TRUE, displays the attribute in the
graphic screen. The property is hidden in the graphic screen if this value is set as FALSE. The
color codes can be set from integers 0 to 15 – it is the color in which the property will be
displayed. The “set flag” argument shows the change in the values over the previous ones. If
any value of the flag or color is changed over the previous one, it is set as TRUE, else if previous
value is to be used, it is set at FALSE. The order for the set flags is as follows:
1 - 40 : Color Change of LBC’s
41 - 80 : Flag change of LBC’s
81 - 90 : Color change of EP’s
91 – 100 : Flag change of EP’s
101 : Flag change of Display fem.
For example, if the color of the property “distributed load” is to be changed, then set_flag(19) is
set as TRUE and set_flag(i) (i from 1 to 18 and 20 to 101 ) is set to FALSE. If the flag of the Element
Property “Axis 1 Orientation Vector” is to be changed, then set-flag(93) is set as TRUE and set-
flag(i) (i = 1 to 92 and 94 to 101) is set as FALSE. See tables below for serial numbers of the LBC’s
and Element Properties.
Main Index
442
Function Descriptions
Example:
Please see pref_fa_set (p. 1688) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Construct the selectdatabox string in SDB_STRING from the coordinate frame ID specified in
CID. Assume CID is a valid coordinate frame. SDB_STRING on input should be long enough to
accommodate the completed string.
Input:
INTEGER cid Default Coordinate Frame ID.
Output:
STRING sdb_string[] SelectDataBox string.
INTEGER <Return Value> 0: no error, else see error returned.
Error Conditions:
12001005 The string representation of the selectdatabox label for a coordinate frame
exceeds 25 characters.
Remarks:
None.
Example:
Please see pref_geo_cid_int_string (p. 1689) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the default coordinate frame ID in CID from the selectdatabox input string and verify the
coordinate frame.
Input:
STRING sdb_string[] SelectDataBox string.
Main Index
444
Function Descriptions
Output:
INTEGER cid Default Coordinate Frame ID.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_geo_cid_string_int (p. 1690) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the Geometric Modeling Preference parameters.
Input:
None
Output:
INTEGER defcid Default Coordinate Frame ID.
REAL rgtol Relative Geometric Tolerance.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
See example for pref_geo_cid_int_string (p. 443). See also pref_geo_get (p. 1691) in the
MSC.Acumen, Volume 2: Code Examples.
Description:
Get the Analysis Preference suffixes.
Input:
STRING anal_code[31] Analysis Code Name.
Output:
STRING anal_type[31] Analysis Type.
STRING mod_suf[4] Model File Suffix.
STRING res_suf[4] Results File Suffix.
INTEGER <Return Value> 0: no error.
1: fatal error.
Main Index
CHAPTER 16 445
Preferences
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_get_anal_attributes (p. 1692) in the MSC.Acumen, Volume 2: Code Examples.
pref_get_anal_code_count (num_codes )
Description:
Get the number of analysis codes and prepare for their fetch by calling
DB_GET_ALL_ANAL_CODES.
Input:
None
Output:
INTEGER num_codes Number of Analysis Codes in d.b.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_get_anal_code_count (p. 1692) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the number of analysis types associated with ANAL_CODE and prepare for their fetch by
calling DB_GET_ALL_ANAL_TYPES.
Input:
STRING anal_code [31] Default analysis code.
Output:
INTEGER num_types Number of Analysis Types in d.b.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_get_anal_type_count (p. 1693) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
446
Function Descriptions
pref_get_next_anal_code (anal_code )
Description:
Get next analysis code name.
Input:
None
Output:
STRING anal_code[31] Analysis Code Name.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
See example for pref_get_anal_code_count (p. 445). See also pref_get_next_anal_code
(p. 1694) in the MSC.Acumen, Volume 2: Code Examples.
pref_get_next_anal_type (anal_type )
Description:
Get next analysis type.
Input:
None
Output:
STRING anal_type[31] Analysis type.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
See example for pref_get_anal_type_count (p. 445). See also pref_get_next_anal_type
(p. 1695) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the Global Preference parameters.
Input:
None
Main Index
CHAPTER 16 447
Preferences
Output:
LOGICAL confirm Confirm Flag.
INTEGER wm_opt Warning Message Option.
1=none
2=ring bell
3=non-modal form
REAL glo_mod_tol Global Model Tolerance.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_global_get (p. 1696) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Get the Graphics Preference parameters.
Input:
None
Output:
INTEGER disp_meth Display Method.
INTEGER p_color Primary Color.
INTEGER s_color Secondary Color.
INTEGER e_color Error Color.
LOGICAL extend Autoextend Flag.
LOGICAL fit_view Autofitview Flag.
LOGICAL center Autocenter Flag.
LOGICAL hard_rend Hardware Rendering Flag.
LOGICAL anti_alias Anti-Alias Flag.
LOGICAL td_vector 3-D Vector Display Flag.
LOGICAL rt_display Result Title Display Flag.
LOGICAL s_light Symmetric Light Flag.
INTEGER p_marker Primary Marker.
INTEGER s_marker Secondary Marker.
INTEGER m_color Marker Color.
INTEGER m_size Marker Size.
INTEGER gm_size Grid Marker Size.
INTEGER nm_size Node Marker Size.
Main Index
448
Function Descriptions
Description:
Get the Graphics Preference parameters for markers.
Input:
None
Output:
INTEGER p_marker Primary Marker.
INTEGER s_marker Secondary Marker.
INTEGER m_color Marker Color.
INTEGER m_size Marker Size.
INTEGER <Return Value> 0: no error.
1: fatal error.
Error Conditions:
None.
Remarks:
None.
Example:
Please see pref_graphics_marker_data_get (p. 1698) in the MSC.Acumen, Volume 2: Code
Examples.
Description:
Set the Graphics Entity Types Preference parameters.
Input:
LOGICAL set_flag(37) Flag array for setting individual Preferences.
STRING ed_prop[] Entity Type Display Property.
Main Index
CHAPTER 16 449
Preferences
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Utilities
17
■ Arrays
■ Math
■ RPCs
■ Security
■ Strings
■ Performance
Main Index
452
Function Descriptions
17.1 Arrays
Description:
This function copies all n elements from real array array1 to real array array2.
Input:
REAL array1(n) Source array.
INTEGER n Number of elements in source array.
Output:
REAL array2(n) Resultant array.
Error Condition:
None
Example:
Please see array_copy_real (p. 1702) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function deletes all zeros from an integer array.
Input:
INTEGER ARRAY array(numval) Source array.
INTEGER numval Number of elements in source array.
Output:
INTEGER ARRAY array(numval) Resultant array with zeros deleted.
INTEGER numval Adjusted number of elements in resultant array.
Error Condition:
None
Example:
Please see array_del_zero_int (p. 1703) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function sets each of n elements of an array to a given input value.
Input:
INTEGER ARRAY array(dim) Source array.
INTEGER ARRAY dim Number of elements in source array.
INTEGER ARRAY n Input value for the filled array.
Output:
REAL ARRAY array(dim) Resultant array filled by input value.
Error Condition:
None
Main Index
CHAPTER 17 453
Utilities
Example:
Please see array_fill_int (p. 1703) in the MSC.Acumen, Volume 2: Code Examples.
array_fill_zero_int (array, n)
Description:
Set every component in an integer array to 0.
Input:
INTEGER n Array size.
Output:
INTEGER array() Array set to zero.
Error Conditions:
None.
Remarks:
None.
Example:
Please see array_fill_zero_int (p. 1704) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function sets each of the elements of the array to zero real values.
Input:
REAL array(dim) Source array.
INTEGER dim Number of elements in source array.
Output:
REAL array(dim) Resultant array with zero values.
Error Condition:
None
Example:
Please see array_fill_zero_real (p. 1705) in the MSC.Acumen, Volume 2: Code Examples.
array_real_fill_null (array, n)
Description:
Set every component in a real array to the null value.
Input:
INTEGER n Array size.
Output:
REAL array() Array filled with null values.
Error Conditions:
None.
Remarks:
None.
Main Index
454
Function Descriptions
Example:
Please see array_real_fill_null (p. 1706) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function sqeezes all duplicate values from the first n locations of an unsorted integer array.
This function does not exist in MSC.Patran V9.0. It works in MSC.Patran V8.5.
Input:
INTEGER ARRAY array(dim) Array to be sqeezed.
INTEGER dim Actual number of elements in array.
INTEGER n Number of array elements to be considered.
Output:
INTEGER ARRAY array(dim) Sorted array with no duplicates.
INTEGER n Adjusted element count.
Error Condition:
None
Example:
Please see array_sort_and_del_dupl_int (p. 1706) in the MSC.Acumen, Volume 2: Code
Examples.
Main Index
CHAPTER 17 455
Utilities
17.2 Math
math_get_no_data_null (rval )
Description:
Return the no valid value real number.
Input:
None
Output:
REAL rval The value that represents no valid real.
Error Conditions:
None.
Remarks:
None.
Example:
Please see math_get_no_data_null (p. 1710) in the MSC.Acumen, Volume 2: Code Examples.
math_is_no_data_null (rval )
Description:
Return True if the input is the math no data null value, False otherwise.
Input:
REAL rval The value to check against the no valid real value.
Output:
REAL rval The value to check against the no valid real value.
LOGICAL <Return Value> TRUE if value is NULL.
Error Conditions:
None.
Remarks:
Want to pass by address (must be writable).
Example:
Please see math_is_no_data_null (p. 1710) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
456
Function Descriptions
Description:
This function adds the two matrices into the third matrix.
Input:
REAL matrix1(dim1, dim2) First matrix to be added.
REAL matrix2(dim1, dim2) Second matrix to be added.
INTEGER dim1 Dimensional values.
INTEGER dim2 Dimensional values.
Output:
REAL matrix3(dim1, dim2) Resultant matrix after the addition
Example:
Please see math_mat_add (p. 1711) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function inverts the matrix.
Input:
REAL matrix(dim, dim) Matrix to be inverted.
INTEGER dim Dimensional value.
REAL tol System tolerance for singularity checking.
Output:
REAL matrix(dim, dim) Resultant matrix after inversion.
INTEGER i_return_value 0 for success of function
Example:
Please see math_mat_invert (p. 1712) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function multipies two matrices.
Input:
REAL matrix1(dim1, dim2) First matrix to be multiplied.
REAL matrix2(dim2, dim3) Second matrix to be multiplied.
INTEGER dim1 Dimensional value.
INTEGER dim2 Dimensional value.
INTEGER dim3 Dimensional value.
Output:
REAL matrix3(dim1, dim3) Resultant matrix after multipication.
Example:
Please see math_mat_mult (p. 1713) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 457
Utilities
Description:
This function transposes a matrix.
Input:
REAL matrix(dim, dim) Matrix to be transposed.
INTEGER dim Dimensional value.
Output:
REAL matrix(dim, dim) Transposed matrix.
Example:
Please see math_mat_transp_in_place (p. 1714) in the MSC.Acumen, Volume 2: Code Examples.
math_vec_len (vector)
Description:
This function computes the length of a vector.
Input:
REAL ARRAY vector(3) Three dimensional vector
Output:
REAL <Return Value> Length of the vector
Error Condition:
None
Example:
Please see math_vec_len (p. 1714) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function normalizes a three dimensional vector.
Input:
REAL syseps The system epsilon, used to determine when a floating
point number is essentially zero, as far as the system is
concerned.
REAL ARRAY vector(3) Three dimensional vector
Output:
REAL ARRAY vector(3) The normalized three dimensional vector
INTEGER <Return Value> Return value is 1 if the length of the vector is zero,
otherwise 0.
Error Condition:
None
Example:
Please see math_vec_norm (p. 1715) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
458
Function Descriptions
Description:
This function computes the sum of two n-dimensional vectors.
Input:
INTEGER dim Dimensional value of vectors.
REAL ARRAY vector1(dim) First vector to be added
REAL ARRAY vector2(dim) Second vector to be added
Output:
REAL ARRAY vector3(dim) Resultant vector
Error Condition:
None
Example:
Please see mth_vec_add (p. 1716) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function computes the cross product of two 3-dimensional vector arrays.
Input:
INTEGER dim Dimensional value of vectors.
REAL ARRAY vector1(dim, 3) First vector.
REAL ARRAY vector2(dim, 3) Second vector.
Output:
REAL vector3(dim, 3) Resultant cross product vector.
Error Condition:
None
Example:
Please see mth_vec_cross_prod (p. 1717) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function computes the dot product of two 3-dimensional vectors.
Input:
REAL ARRAY vector1(3) First vector.
REAL ARRAY vector2(3) Second vector.
Output:
REAL <Return Value> Resultant dot product real value.
Error Condition:
None
Example:
Please see mth_vec_dot_prod (p. 1717) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 459
Utilities
mth_vec_length (vector)
Description:
This function computes the length of a vector.
Input:
REAL ARRAY vector(3) Three dimensional vector.
Output:
REAL <Return Value> Length of the vector.
Error Condition:
None
Example:
Please see mth_vec_length (p. 1718) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Determine if a and b are equal out to NSIG significant digits.
Input:
REAL a Test values.
REAL b Comparison value.
INTEGER nsig Number of significant digits.
Output:
LOGICAL <Return Value> Returns TRUE if a and b are equal to the nsig significant digit,
FALSE otherwise.
Error Conditions:
None.
Remarks:
None.
Example:
Please see util_equal_real (p. 1767) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
460
Function Descriptions
util_real_equal_null (val)
Description:
Test if a real value is null.
Input:
REAL val Value to test.
Output:
LOGICAL <Return Value> Returns TRUE if input value is null.
Error Conditions:
None.
Remarks:
None.
Example:
Please see util_real_equal_null (p. 1769) in the MSC.Acumen, Volume 2: Code Examples.
Description:
Round off RVAL to NSIGD significant digits in ROUT.
Input:
REAL rval The value to be rounded.
INTEGER nsigd Number of significant digits NSIGD must be positive to get a
meaningful answer. If it is not, a warning will be issued that
NSIGD will be assumed to be one.
Output:
REAL rout Rounded value of RVAL.
INTEGER <Return Value> Return status ( =0 if no error ).
Error Conditions:
None.
Remarks:
None.
Example:
Please see util_rounder (p. 1769) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 461
Utilities
17.3 RPCs
The following describes the functional interface used for performing RPC calls from a
MSC.Patran client (in PCL) to a RPC server. The functions are broken into three distinct groups:
client calls (initialization, service requests), data write calls and data read calls. Every client has
two associated “data streams”; the output stream (commands and data sent to the server) and
the input stream (status and/or data returned from the server). In order to manage these streams
properly, every client will require the following steps in the listed order:
client/server initialization
• Register the server (once only) [rpc_add_server]
• Initialize the server (once only) [rpc_init_client]
client/server data manipulation
• Write the output stream [rpc_put_xxx]
• Call the server [rpc_call]
• Read the input stream [rpc_get_xxx]
The first two steps are done during client start-up/initialization only. The last three steps must
be done for every server request.
The allowable data types are described below.
MSC.Patran Datatype Value Purpose
Status 1 server SUCCESS/FAILURE return
Command 2 client request code
Integer 3 whole number (C int)
Boolean 4 TRUE/FALSE
Real 5 single precision float (C float)
String 6 text (C char[])
Integer Array 7 array of Integer
Boolean Array 8 array of Boolean
Real Array 9 array of Real
Output stream (data write) calls
All of the rpc_put_xxx routines will send data to the output stream.
NOTE: Any malloc failure will cause the entire output stream to be cleared.
Input stream (data read) calls
All of the rpc_get_xxx routines will copy data from the input stream into input variable. After
these routines are called, the input stream pointer will automatically advance to the next
position. There is no opportunity to retrieve the same data more than once. There are data
inquiry commands that do not advance this pointer (rpc_inquire_xxx).
Main Index
462
Function Descriptions
/****************************************************************************
*
* The all PDA RPC servers must make a call to RpcInitServer. This establishes
* the server's run-time environment as follows. All clients must make a call
* to RpcAddServer and RpcInitClient.
*
* RpcInitServer( int prognum - program number for client/server
* same value as in RpcInitClient
* int progver - program version
* void (*handler)(int) - RPC service handler
* logical inetd - server startup via inetd.
* int server_timeout - # of seconds of inactivity
* before server dies
* logical rpc_debug - display rpc data on stdout
***************************************************************************/
main(argc, argv)
int argc;
char **argv;
{
int prognum;
if((argc != 2) || (sscanf(argv[1], "%d", &prognum) != 1)){
printf("usage : %s <prognum>\n", argv[0]);
exit(2);
}
RpcInitServer(prognum, 1, RpcHandler, 0, 30, 0);
}
Description:
rpc_add_server “registers” a service name (server) and associates it with a program number,
program version and server host. This service name may be used later. Typically, all servers will
be registered during start-up processing. This does not cause the server to start.
Input:
STRING server[] Name of RPC server.
INTEGER prog_num Server program number.
INTEGER prog_ver Server program version.
STRING host[] Host where server will run.
Output:
INTEGER <Return Value> Integer indicating the success or failure of the routine.
Error Conditions:
Success (0)-> registered OK
47000001-> Malloc failure (FATAL)
47000004-> RPC exists, warning only (ignore)
Remarks:
None.
Example:
Please see rpc_add_server (p. 1720) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
464
Function Descriptions
Description:
rpc_init_client returns a handle to be used for all server communication. It initializes the
client/server communication link and data structures and will cause the server to start
execution.
Input:
STRING server[] Name of RPC server program.
Output:
INTEGER handle Handle used by client to communicate with server.
INTEGER <Return Value> Integer indicating the success or failure of the routine.
Error Conditions:
Success (0)-> registered OK
47000004-> server not registered
47000001->Malloc failure (FATAL)
47000003->Client create error (FATAL)
Remarks:
None.
Example:
Please see rpc_init_client (p. 1741) in the MSC.Acumen, Volume 2: Code Examples.
rpc_call (handle)
Description:
rpc_call will send make an RPC (remote procedure call). The client’s output data will be sent
and the client will wait for a response from the server.
Input:
INTEGER handle Pointer to client/server communication structure.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
Success (0)-> Registered OK
47000008-> RPC call failure.
Remarks:
None.
Example:
Please see rpc_call (p. 1721) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 465
Utilities
Description:
rpc_timeout will change the amount of time before all subsequent rpc_call()s will timeout.
Input:
INTEGER handle Server handle.
INTEGER seconds Timeout in seconds.
Output:
LOGICAL <Return Value> FALSE- timeout setting failed
TRUE- timeout successful.
Error Conditions:
None.
Remarks:
None.
Example:
Please see rpc_timeout (p. 1762) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_put_bool_array will put the number of booleans as indicated by count from the array value
into the output stream.
Input:
INTEGER status Pointer to client/server communications structure.
LOGICAL value(5) Array of booleans to put to the type data stream.
INTEGER count Number of booleans to send
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc Failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_bool_array (p. 1746) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_put_int_array will put the number of integers as indicated by count from the array value
into the output stream.
Input:
INTEGER status Pointer to client/server communications structure.
INTEGER value(5) Array of integers to put to the data stream.
INTEGER count Number of integers to send.
Main Index
466
Function Descriptions
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc Failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_int_array (p. 1752) in the MSC.Acumen, Volume 2: Code Examples.
rpc_put_real_array ()
Description:
rpc_put_real_array will put the number of reals as indicated by count from the array value into
the output stream
Input:
INTEGER handle Pointer to client/server communications structure.
REAL value(count) Array of reals to put to the data stream.
INTEGER count Number of reals to send.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_real_array (p. 1757) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_put_boolean will put a single boolean into the output stream.
Input:
INTEGER handle Pointer to client/server communications structure.
LOGICAL value Boolean value to put to the data stream.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_boolean (p. 1748) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 467
Utilities
Description:
rpc_put_command will put a command value into the output stream.
Input:
INTEGER handle Pointer to client/server communications structure.
INTEGER value Command value to put to the data stream.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_command (p. 1750) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_put_integer will put an integer value into the output stream.
Input:
INTEGER handle Pointer to client/server communications structure.
INTEGER value Integer value to put to the data stream.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_integer (p. 1753) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_put_real will put a real value into the output stream.
Input:
INTEGER handle Handle to server.
INTEGER value Real value.
Output:
INTEGER <Return Value> Success (0)
Error Conditions:
47000001-> Malloc failure (FATAL)
Main Index
468
Function Descriptions
Remarks:
None.
Example:
Please see rpc_put_real (p. 1755) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_put_status will put a status value into the output stream.
Input:
INTEGER handle Pointer to client/server communications structure.
INTEGER value Status code to put to the data stream.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_status (p. 1759) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_put_string will put a string value into the output stream.
Input:
INTEGER handle Pointer to client/server communications structure.
STRING value[] String value to put to the data stream.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
Remarks:
None.
Example:
Please see rpc_put_string (p. 1760) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 469
Utilities
rpc_clear_output (handle )
Description:
rpc_clear_output will reset the output data stream. Any unsent data will be lost.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
None
Error Conditions:
None.
Remarks:
None.
Example:
Please see rpc_clear_output (p. 1723) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_get_bool_array will copy a boolean array from the input stream. The number of elements
copied will be the lesser of the number in the input stream or the array size. Additionally, the
number of elements in the input stream will be placed in count (unless omitted).
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
LOGICAL value(count) Array of booleans.
INTEGER count Num of booleans in input stream (Optional).
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_get_bool_array (p. 1725) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_get_int_array will copy an integer array from the input stream. The number of elements
copied will be the lesser of the number in the input stream or the array size. Additionally, the
number of elements in the input stream will be placed in count (unless omitted).
Main Index
470
Function Descriptions
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
INTEGER value Array of integers.
INTEGER count Number of integers in input stream (Optional).
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_get_int_array (p. 1730) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_get_real_array will copy a real array from the input stream. The number of elements copied
will be the lesser of the number in the input stream or the array size. Additionally, the number
of elements in the input stream will be placed in count (unless omitted).
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
REAL value() Array of reals.
INTEGER count Number of reals in input stream (Optional).
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_get_real_array (p. 1736) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_get_boolean will get a single boolean from the input stream.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
Main Index
CHAPTER 17 471
Utilities
Description:
rpc_get_command will get a command from the input stream.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
INTEGER value Command value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_get_command (p. 1729) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_get_integer will get a integer from the input stream.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
INTEGER value Integer value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Main Index
472
Function Descriptions
Remarks:
None.
Example:
Please see rpc_get_integer (p. 1732) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_get_real will get a real value from the input stream.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
REAL value Real value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_get_real (p. 1734) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_get_status will get a status from the input stream.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
INTEGER value Status value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_get_status (p. 1737) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 473
Utilities
Description:
rpc_get_string will get a string from the input stream.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
STRING value[] String value.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_get_string (p. 1739) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_inquire_count will determine how many item remain in the input stream. Each different
data type (integer, status, real array, etc.) counts as one.
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
INTEGER count Number of items remaining in the input stream.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_inquire_count (p. 1742) in the MSC.Acumen, Volume 2: Code Examples.
Description:
rpc_inquire_item will return the type of the current input stream item and optionally, its size or
count(see the available data types listed at the beginning of thissection). The count will be 1 for
all simple datatypes. A string will have a size equal to the number of bytes required to
represent it plus 1. Arrays will have a count equal to the number of elements in the array.
Main Index
474
Function Descriptions
Input:
INTEGER handle Pointer to client/server communications structure.
Output:
INTEGER type Type of data in current list item.
INTEGER count Number of items in current list item.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
47000001-> Malloc failure (FATAL)
47000006-> warning, end of input
47000005-> warning, type mismatch
Remarks:
None.
Example:
Please see rpc_put_bool_array (p. 1746) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
CHAPTER 17 475
Utilities
17.4 Security
sec_is_product_in_matrix ( product )
Description:
To ascertain if the given product is within the product matrix.
Input:
STRING product[] Name of product to query.
Output:
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Example:
None.
sec_is_product_licensed (product )
Description:
Determines whether a given product has a current license.
Input:
STRING product[] Registered product name.
Output:
INTEGER <Return Value> Returns 0 if product is licensed.
Error Conditions:
None.
Remarks:
None.
Example:
None.
Description:
To return the license type for a previously allocated license.
Input:
STRING product[] Name of product to request or ““ for last allocated license.
STRING version[] Version of product to request or ““ for last allocated license.
Main Index
476
Function Descriptions
Output:
INTEGER <Return Value> 0: license for this product/version is not currently allocated.
Else:
NETLS_ANY
NETLS_NODELOCKED
NETLS_CONCURRENT
NETLS_COMPOUND
NETLS_USEONCE
NETLS_USAGE.
Error Conditions:
None.
Remarks:
None.
Example:
None.
Main Index
CHAPTER 17 477
Utilities
17.5 Strings
string_newline_count (chars, nl )
Description:
Count lines in string.
Input:
STRING chars[] String to count number of lines from.
Output:
INTEGER nl Number of new lines.
Error Conditions:
None.
Remarks:
None.
Example:
Please see string_newline_count (p. 1763) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will return the position of any new line characters in a string.
Input:
STRING chars[] This value specifies the string which will have its new line
characters counted.
Output:
INTEGER pos( ) This value returns the positions of any new line characters in
the string. This array should be allocated with at least the same
number of offsets as there are characters in the input string
chars. This array should be initialized to zero before this
function is called.
Error Conditions:
None.
Remarks:
None.
Example:
Please see string_newline_position (p. 1764) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
478
Function Descriptions
Description:
Converts an integer list of a given entity type to a character string.
Input:
INTEGER entitytype The Type Code from dbtypes.h.
INTEGER dblist ( ) List of database labels.
INTEGER range (3) Range of member labels to return (1,2) and max size of
conversion string (3).
INTEGER number Number of entity labels in database list.
Output:
STRING entitylist[] Formatted integer-to-character converted labelist.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
7000127-> Variable is not a virtual string.
8107002-> Last command aborted.
Remarks:
This is a utility routine called from GaGroupEntitiesGet() GaGroupVisEntitiesGet(), and
GaGroupHidEntitiesGet() to convert an integer array returned from the database to a character
string to be displayed in a listbox in the Group Members form. The “insequence” flag is to tell if
the numbers being looked at are sequential e.g. 2,3,4,5. The return form is of the type “Grid 1:4
7 11 13:20 25”. This is now also called from PCL (uil_entity_class_get).
Example:
Please see ga_entities_string_format (p. 1707) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function will return all of the labels defined for entities of a specific type.
Input:
INTEGER entity_type This value specifies a type code. The type codes are listed in
the dbtypes.h include file.
LOGICAL orphan This value specifies, when set to TRUE, that the count of all
labels, including the orphan labels, will be returned. When
this value is set to FALSE, the count of non-orphaned labels
will be returned.
INTEGER label_count This value specifies the number of offsets defined for the
output value entity_labels.
Output:
INTEGER label_count This value returns the number of labels specified by the
input values entity_type and orphan.
INTEGER entity_labels This value returns the list of entity labels specified by the
(label_count ) input values entity_type and orphan.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Main Index
CHAPTER 17 479
Utilities
Error Conditions:
13000134-> The specified entity type was not found.
Example:
Please see ga_entity_get_by_type (p. 1708) in the MSC.Acumen, Volume 2: Code Examples.
Description:
This function updates two input strings returning a combined string.
Input:
STRING operator[ ] Operation flag.
“A” for adding two strings.
“R” for subtracting one string from another.
“C” for removing repeated strings.
STRING in_str1[ ] This string contains an expression to be modified by
in_str2.
STRING in_str2[ ] This string contains an expression to use to operate on
in_str1
Output:
STRING out_str[ ] This value returns the created ID list (string).
INTEGER <Return_value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
1 Memory Error
2 List Processor Fetcher
error
3 List Processor Error
Example:
Please see uil_list_union_expr (p. 1766) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
480
Function Descriptions
17.6 Performance
timer_on ()
Description:
Starts the timer.
Input:
None.
Output:
None.
Error Conditions:
None.
Remarks:
None.
Example:
Please see timer_on (p. 1766) in the MSC.Acumen, Volume 2: Code Examples.
timer_off ()
Description:
Stops timer and reports time to xterm since last call to timer_on().
Input:
None.
Output:
INTEGER <Return Value> Accumulated CPU time elapsed for all calls to timer_on() and
timer_off() during the session.
Error Conditions:
None.
Remarks:
None.
Example:
Please see timer_off (p. 1765) in the MSC.Acumen, Volume 2: Code Examples.
Main Index
MSC.Acumen, Volume 1: Function Descriptions
CHAPTER
Obsolete, Modified, and Broken
18 Functions
■ General
■ Functions for Chapter 1
■ Model (Chapter 2)
■ Files (Chapter 3)
■ Graphics (Chapter 4)
■ User Interface (Chapter 5)
■ Group (Chapter 6)
■ Geometry (Chapter 7)
■ Finite Element Model (Chapter 8)
■ Load Cases (Chapter 9)
■ Element Properties (Chapter 10)
■ Loads and Boundary Conditions (Chapter 11)
■ Materials (Chapter 12)
■ Analysis (Chapter 13)
■ Fields (Chapter 14)
■ Results (Chapter 15)
■ Preferences (Chapter 16)
■ Utilities (Chapter 17)
Main Index
482
Function Descriptions
18.1 General
This chapter of the MSC.Acumen document contains a listing of all the calls that have been
found to contain some sort of error in Chapters 1 through 17 of the documentation that could
affect the use of the call. The routine name is given along with the page number it is located on,
a description of what issues were found, a resolution to the issue, and the original function
information. Where applicable, the new function information is also given. All spelling, spacing,
and grammar errors have been fixed and in those instances where the issues are only with the
documentation of the call, a change has been made in the new release of the MSC.Acumen
document.
Main Index
CHAPTER 18 483
Obsolete, Modified, and Broken Functions
utl_get_terse_version Issue: When a <Return Value> is used with this call, MSC.Patran outputs
the error message “Invalid assignment conversion, Extra information.”
Type: Modified
Resolution: Removed the <Return Value> variable from the documented
description.
Main Index
484
Function Descriptions
Type: Obsolete Resolution: This call was removed from the documentation.
Description:
Delete client data from the database.
Input:
INTEGER label User defined label of the data to be deleted.
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:
None.
Remarks:
None.
Examples:
None.
Type: Obsolete Resolution: This call was removed from the documentation.
Description:
This function will set the max_client_entity_id and max_client_entity_label entities in the
control_info database relation to the highest value label and ID values currently used plus one.
Input:
INTEGER label User defined label of the data to be deleted.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication if the
reason.
Error Conditions:
None.
Notes:
The db_create_client_data (p. 10) PCL function makes use of the max_client_entity_id and
max_client_entity_label entities to store maximum entity ID and label values in use plus one.
Remarks:
None.
Examples:
#
# Purpose : This file gives an example of a call to the
# function db_reset_client_info()
#
# A table is provided in the database which
Main Index
CHAPTER 18 485
Obsolete, Modified, and Broken Functions
# -------------------------------------------------------------------
i_client_label = 101
i_client_type = 1001
i_num_logicals = 1
i_num_integers = 1
i_num_reals = 1
i_num_strings = 1
i_max_string_length = 25
i_return_value = @
db_create_client_data @
( i_id, @
i_client_label, @
i_client_type, @
i_num_logicals, @
i_num_integers, @
i_num_reals, @
Main Index
486
Function Descriptions
i_num_strings, @
i_max_string_length, @
l_logical_data, @
i_integer_data, @
r_real_data, @
s_string_data )
i_return_value = @
db_reset_client_info @
( )
dump i_return_value
# -------------------------------------------------------------------
Main Index
CHAPTER 18 487
Obsolete, Modified, and Broken Functions
get_current_dir Issue: The documentation implies that the user needs to supply the value of the
variable DIRNAME for this call, but in reality the value of DIRNAME is supposed
Type: Modified to be returned.
Resolution: Changed the variable DIRNAME to be an output argument.
Main Index
488
Function Descriptions
utl_is_locked_file Issue: The function is working properly; however, the documentation stated that
the <Return Value> was of type logical when it should have been of type integer.
Type: Modified
Resolution: Changed the <Return Value> from type logical to type integer.
Main Index
CHAPTER 18 489
Obsolete, Modified, and Broken Functions
sf_write_disable Issue: The routine does not work. The call does not disable the write command.
Type: Broken Resolution: No resolution has been found for this issue.
ui_form_to_frame Issue: This call generates a “.mif” file as described but the file is not an accurate
representation of the form.
Type: Broken
Resolution: No resolution has been found for this issue.
Main Index
490
Function Descriptions
ugi_export_iges_v1 Issue: The offsets used with the output arguments patran_summary and
iges_summary were changed.
Type: Modified
Resolution: Changed the values for patran_summary and iges_summary in
the documentation.
Main Index
CHAPTER 18 491
Obsolete, Modified, and Broken Functions
Main Index
492
Function Descriptions
Type: Obsolete Resolution: 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”)
s_group_name = “fem_model”
i_return_value = @
ga_group_elem_scalar_get @
( s_group_name, @
i_old_id )
dump i_return_value
dump i_return_value
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
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)
Type: Obsolete Resolution: 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, Scalar values for all elements.
max_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.
Main Index
CHAPTER 18 495
Obsolete, Modified, and Broken Functions
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”)
““,i_dtype,i_resloc,i_nbr_elems,iv_elem_ids,iv_nbr_values, @
rv_scalars, ia_minloc,ia_maxloc)
dump i_return_value
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
sys_free_array(iv_elem_ids)
sys_free_array(iv_nbr_values)
sys_free_array(rv_scalars)
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)
sys_free_array(iv_lcids)
Main Index
CHAPTER 18 497
Obsolete, Modified, and Broken Functions
sys_free_array(iv_nsub)
sys_free_array(iv_elem_ids)
sys_free_array(iv_nbr_values)
sys_free_array(rv_scalars)
Type: Obsolete Resolution: 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
Main Index
498
Function Descriptions
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”)
dump i_return_value
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
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)
Type: Obsolete Resolution: 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
Main Index
500
Function Descriptions
dump i_return_value
i_return_value = @
ga_elem_scalar_create @
( s_title, @
i_nbr_elems, @
iv_elem_ids, @
Main Index
CHAPTER 18 501
Obsolete, Modified, and Broken Functions
iv_nbr_values, @
i_max_vals, @
rv_scalars, @
i_id )
dump i_return_value, i_id
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)
Type: Obsolete Resolution: 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.
Main Index
502
Function Descriptions
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”)
# 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
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
dump i_return_value
i_return_value = @
ga_vector_delete @
( i_id )
dump i_return_value
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)
Type: Obsolete Resolution: 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()
Main Index
CHAPTER 18 505
Obsolete, Modified, and Broken Functions
Type: Obsolete Resolution: 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 )
Type: Obsolete Resolution: 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.
Main Index
506
Function Descriptions
Example:
CLASSWIDE STRING basename[256]
CLASSWIDE LOGICAL new_seq_flag
> gm_animate_start( basename, new_seq_flag )
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()
s_dbname = ““
i_return_value = @
gm_database_current @
( s_dbname )
dump i_return_value, s_dbname
#---------------------------------------------------------------------
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
Main Index
508
Function Descriptions
uil_file_close.go()
dump i_return_value
#---------------------------------------------------------------------
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 )
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()
#
Main Index
510
Function Descriptions
ui_exec_function(“hilight”,”display”)
dump i_return_value
Main Index
CHAPTER 18 511
Obsolete, Modified, and Broken Functions
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,
Main Index
512
Function Descriptions
# 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”)
# No of selects
# i_nsels = 1
i_nsels = 1
i_return_value = @
gm_pick_add @
( i_nsels, @
saa_types, @
saa_prompts, @
s_func )
dump i_return_value
#---------------------------------------------------------------------
Main Index
CHAPTER 18 513
Obsolete, Modified, and Broken Functions
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:
#
Main Index
514
Function Descriptions
# 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”)
dump i_return_value
#---------------------------------------------------------------------
Main Index
CHAPTER 18 515
Obsolete, Modified, and Broken Functions
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”)
uil_viewport_post_groups.posted_groups(“default_viewport”,1, @
[“default_group”] )
ui_exec_function(“hilight”,”display”)
ui_wid_set(w_widget_id,”VALUE”,”Surface 1 3 5”)
i_return_value = gm_pick_adjust_hilight()
dump i_return_value
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.
Main Index
CHAPTER 18 517
Obsolete, Modified, and Broken Functions
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”)
ui_exec_function(“hilight”,”display”)
i_return_value = gm_pick_clear()
dump i_return_value
sf_pause()
#---------------------------------------------------------------------
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”
Main Index
CHAPTER 18 519
Obsolete, Modified, and Broken Functions
“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:
Main Index
520
Function Descriptions
#
# 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”)
ui_exec_function(“hilight”,”display”)
i_return_value = @
gm_pick_filter @
( s_type )
dump i_return_value
Main Index
CHAPTER 18 521
Obsolete, Modified, and Broken Functions
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]
Main Index
522
Function Descriptions
INTEGER i_return_value
#---------------------------------------------------------------------
# Open the database “spool.db”
uil_file_open.go(“spool.db”)
ui_exec_function(“hilight”,”display”)
i_return_value = @
gm_pick_notify @
( s_string )
dump i_return_value
dump i_return_value
gm_pick_adjust_hilight()
#---------------------------------------------------------------------
Main Index
CHAPTER 18 523
Obsolete, Modified, and Broken Functions
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
ui_exec_function(“hilight”,”display”)
gm_pick_filter( s_type )
i_return_value = gm_pick_reject()
dump i_return_value
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()
Main Index
CHAPTER 18 525
Obsolete, Modified, and Broken Functions
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.
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.
Description:
Turn OFF auto extend/fit.
Input:
None.
Output:
INTEGER <Return Value> 0 if successful.
Main Index
526
Function Descriptions
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”)
Description:
Turn ON auto extend/fit.
Input:
None.
Output:
INTEGER <Return Value> 0 if successful.
Main Index
CHAPTER 18 527
Obsolete, Modified, and Broken Functions
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”)
Main Index
528
Function Descriptions
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
Main Index
CHAPTER 18 529
Obsolete, Modified, and Broken Functions
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”)
Main Index
530
Function Descriptions
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”)
#---------------------------------------------------------------------
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
Main Index
532
Function Descriptions
# 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”)
i_return_value = @
xy_window_current_set @
( s_name )
dump i_return_value
#---------------------------------------------------------------------
Main Index
534
Function Descriptions
msg_format_string Issue: The INTS, REALS, and CHARS input variables have a
specified type of VARIABLE, which is not a valid PCL data type.
Type: Modified
Resolution: Changed the data type descriptions so that the variable
INTS is of type INTEGER, the variable REALS is of type REAL, and
the variable CHARS is of type STRING
Examples:
None.
msg_to_file Issue: 1) Function causes core dumps. 2) The INTS, REALS, and
CHARS input variables have a specified type of VARIABLE, which
Type: Modified is not a valid PCL data type.
Resolution: Changed the data type descriptions so that the variable
INTS is of type INTEGER, the variable REALS is of type REAL, and
the variable CHARS is of type STRING
Main Index
CHAPTER 18 537
Obsolete, Modified, and Broken Functions
Main Index
538
Function Descriptions
Description:
Flush the output buffer.
Input:
None.
Output:
None.
Examples:
CLASSWIDE INTEGER button_pressed
FUNCTION driver
ui_flush() /* force modal form to be displayed before waiting */
em_wait()
RETURN( button_pressed )
END FUNCTION /* driver */
Description:
Check the input system of the device for any unprocessed events. This should allow any
window manager time to process events and other activities it is responsible for.
Input:
None.
Output:
None.
Comments:
This routine was written for X-windows, but can be easily modified to work with any other
windowing system or terminal.
Example:
FUNCTION initlz( message )
STRING message[]
STATIC LOGICAL init = TRUE
IF( init ) THEN
uil_pcntcomplete.init()
init = FALSE
END IF
ui_wid_set( counter, “VALUE”, 0. )
uil_pcntcomplete.display( message )
ui_flush_events()
END FUNCTION /* initlz */
Main Index
CHAPTER 18 539
Obsolete, Modified, and Broken Functions
ui_sys_return Issue: This function when run will shut down MSC.Patran. Also
an Inadequate function description is given.
Type: Broken
Resolution: No resolution has been found for this issue.
Type: Broken Resolution: No resolution has been found for this issue.
Main Index
540
Function Descriptions
Description:
Create a window widget.
Input:
STRING name[] Name of the widget.
REAL x X location of widget
REAL y Y location of widget
STRING posit[] Code indicating how the window is positioned.
REAL width Width of widget.
REAL height Height of widget.
STRING label[] Label to appear in namestripe.
STRING icon[] Name of icon.
Output:
WIDGET <Return Value> Pointer to the new widget.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
ui_helpmenu_create Issue: 1) Makes use of a widget created through the use of two
undocumented PCL functions, ui_c_menubar and
Type: Obsolete ui_c_mainwindow. 2) No apparent way to delete results from the
display screen.
Resolution: Removed the call from the documentation.
Description:
Create a help menu widget.
Input:
WIDGET parent Pointer to the parent widget.
STRING name[] Name of the widget.
STRING label[] Label displayed in menubar.
Output:
WIDGET <Return Value> Pointer to the new widget.
Error Conditions:
None.
Remarks:
None.
Main Index
CHAPTER 18 541
Obsolete, Modified, and Broken Functions
Example:
CLASSWIDE WIDGET menu_id
WIDGET bar_id
ui_abortwidget_create Issue: This PCL function does not exist as part of the MSC.Patran
executable.
Type: Obsolete
Resolution: Removed the call from the documentation.
Description:
Create an abort widget.
Input:
WIDGET parent Pointer to the parent widget.
REAL x X location of widget.
REAL y Y location of widget.
STRING icon[] Name of the file containing the icon data.
STRING icon2[] Name of the file containing the icon2 data.
Output:
INTEGER <Return Value> Pointer to the new widget.
Error Conditions:
None.
Remarks:
None.
Example:
#include “appforms.p”
abort_button = ui_abortwidget_create( @
win_id, x_loc, y_loc, @
“abort.up”, “abort.down” )
Main Index
542
Function Descriptions
Type: Broken Resolution: No resolution has been found for this issue.
Main Index
CHAPTER 18 543
Obsolete, Modified, and Broken Functions
uil_primary_file.enable_entire_menu Issue:
uil_primary_file.enable_item Issue:
uil_primary_pref.enable_item Issue:
Main Index
544
Function Descriptions
Type: Modified Resolution: Updated the function listing in the body of the
document.
Main Index
CHAPTER 18 545
Obsolete, Modified, and Broken Functions
uil_utils_listbox.create_list Issue: When a <Return Value> is used with this call, MSC.Patran
outputs the error message “invalid assignment convention, Extra
Type: Modified information.”
Resolution: Removed the <Return Value> variable from the
documented description.
Main Index
546
Function Descriptions
uil_utils_listbox.append_list Issue: When a <Return Value> is used with this call, MSC.Patran
outputs the error message “invalid assignment convention, Extra
Type: Modified information.”
Resolution: Removed the <Return Value> variable from the
documented description.
Main Index
CHAPTER 18 547
Obsolete, Modified, and Broken Functions
Main Index
548
Function Descriptions
db_count_entities_in_group Issue: The documentation implies that the user needs to supply
the value of the variable COUNT for this call, but in reality the
Type: Modified value of COUNT is supposed to be returned.
Resolution: Changed the variable COUNT to be an output
argument.
Main Index
CHAPTER 18 549
Obsolete, Modified, and Broken Functions
count_orphan_elements Issue: The documentation implies that the user needs to supply
the value of the variable COUNT for this call, but in reality the
Type: Modified value of COUNT is supposed to be returned.
Resolution: Changed the variable COUNT to be an output
argument.
Examples:
None.
db_add_mpc_to_group Issue: When running this call, MSC.Patran outputs the error
message “Invalid datatype to built-in function. Arg#3”.
Type: Modified
Resolution: Changed the variable VISIBLE from type integer to
type logical.
Description:
Add an mpc to a group.
Input:
INTEGER mpc_id The mpc_id.
INTEGER gid The group ID.
LOGICAL visible TRUE 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:
None.
Remarks:
None.
Examples:
None.
Input:
INTEGER count Max number of entities returned.
Output:
INTEGER entity_id() Array of orphan entity ids.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
ga_group_selectable_set Issue: When running this call, MSC.Patran outputs the error
message “Invalid datatype to built-in function. Arg#2”.
Type: Modified
Resolution: Changed the variable FLAG from type logical to
type integer.
Main Index
554
Function Descriptions
LOGICAL all_groups
INTEGER iges_line, lineid(VIRTUAL), istat, num110, min_cycle, blob
INTEGER nww2, nww1, nwords
nwords = num110
sys_allocate_array( lineid, 1, nwords)
/*
* Get all IGES line IDs from the database in the group
*/
istat = sgm_db_get_iges_in_group( groups(ng), iges_line,
ival(lineid))
IF ( istat != 0 ) THEN
IF ( nww2 > 0 ) mem_release ( blob )
IF ( nww1 > 0 ) mem_release ( lineid )
msg_to_form ( MSG_SGM_IGES_EXPORT_DB_ERROR_IGES_ENTITY,
MSG_FATAL, @
appcode(istat), 0, 1.0,
“Line”)
IF ( ! all_groups) app_pcntcomplete_close ( min_cycle, num110)
Main Index
CHAPTER 18 555
Obsolete, Modified, and Broken Functions
Output:
INTEGER entityids() This value returns the entity ID values. This array must be
allocated with enough offsets to list all of the entity ID values
assigned to the group. Use a call to the PCL function
sgm_db_count_iges_in_group() to get a count of the number of
offsets required.
INTEGER id_count This value returns the number of ID values of the specified
type returned by the value entityids.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
.38000617 ERROR Retrieving geometric entity definition of type PDA %A% from the
database.
Examples:
None.
Main Index
556
Function Descriptions
asm_db_get_next_grid_label Issue: When running this call, MSC.Patran outputs the error
message “Invalid datatype to built-in function. Arg#1”.
Type: Modified
Resolution: Changed the variable DOMESSAGE from type
integer to type logical.
Main Index
CHAPTER 18 557
Obsolete, Modified, and Broken Functions
asm_db_get_next_line_label Issue: When running this call, MSC.Patran outputs the error
message “Invalid datatype to built-in function. Arg#1”.
Type: Modified
Resolution: Changed the variable DOMESSAGE from type
integer to type logical.
Main Index
558
Function Descriptions
asm_db_get_next_patch_lab Issue: When running this call MSC.Patran outputs the error
el message “Invalid datatype to built-in function. Arg#1”. When
this issue is corrected MSC.Patran outputs the error message
Type: Modified “Wrong number of arguments for built-in function”. In addition
to these two issues this call is missing its <Return Value>
variable.
Resolution: Changed the variable DOMESSAGE from type
integer to type logical. Removed the variable STATUS from the
routine since it only has 3 arguments and not 4. Also added the
<Return Value> variable to the list of output arguments.
Main Index
CHAPTER 18 559
Obsolete, Modified, and Broken Functions
sgm_show_surface_normals Issue: This PCL function is listed as having four arguments when
it really has seven arguments.
Type: Modified
Resolution: Added the three input arguments to the document
description for this call
asm_db_get_next_hpat_label Issue: When running this call MSC.Patran outputs the error
message “Invalid datatype to built-in function. Arg#1”.
Type: Modified
Resolution: Changed the variable DOMESSAGE from type
integer to type logical.
Main Index
CHAPTER 18 561
Obsolete, Modified, and Broken Functions
sgm_db_get_solid Issue: The documentation implies that the user needs to supply
the value of the variable BLOB for this call since it is an
Type: Modified input/output argument, but in reality the value of BLOB is only
supposed to be returned value.
Resolution: Changed the variable BLOB to be only an output
argument.
Type: Modified Resolution: Added the two input arguments and the <Return
Value> argument to the document description for this call.
Type: Modified Resolution: Add the <Return Value> variable to the list of output
arguments.
Main Index
CHAPTER 18 563
Obsolete, Modified, and Broken Functions
Input:
LOGICAL domesg Error message flag: If TRUE, this routine will allow the
app_db_err_msg routine to issue a message if an error is
encountered.
Output:
STRING cord_frame[] The default reference coordinate frame.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
asm_db_get_next_cord_label Issue: When running this call, MSC.Patran outputs the error
message “Invalid datatype to built-in function. Arg#1”. In
Type: Modified addition to this issue, the call is missing its <Return Value>
variable.
Resolution: Changed the variable DOMESSAGE from type
integer to type logical. Also added the <Return Value> variable
to the list of output arguments.
Main Index
564
Function Descriptions
Output:
INTEGER integerlabel The next highest coord label.
STRING stringlabel[] The next highest coord label.
INTEGER status Success or an error code.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Main Index
CHAPTER 18 565
Obsolete, Modified, and Broken Functions
Example:
INTEGER status
INTEGER id
db_get_all_coord_frame_ids ( )
WHILE ( status == 0 )
status = db_get_next_coord_frame_ids ( id )
END WHILE
db_get_current_coord Issue: The documentation implies that the user needs to supply
the value of the variable COORD_LABEL for this call, but in
Type: Modified reality the value of COORD_LABEL is supposed to be returned.
Resolution: Changed the variable COORD_LABEL to be an
output argument.
Main Index
566
Function Descriptions
db_get_surfaces_for_edge Issue: When a <Return Value> is used with this call, MSC.Patran
outputs the error message “Invalid assignment conversion, Extra
Type: Modified information”.
Resolution: Removed the <Return Value> variable from the
documented description.
Main Index
CHAPTER 18 567
Obsolete, Modified, and Broken Functions
db_get_solids_for_surface Issue: When a <Return Value> is used with this call, MSC.Patran
outputs the error message “Invalid assignment conversion, Extra
Type: Modified information”.
Resolution: Removed the <Return Value> variable from the
documented description.
Main Index
568
Function Descriptions
db_get_elems_by_lbc Issue: Call does not work. No elements are retrieved from the
database that were associated with the specified LBC.
Type: Broken
Resolution: No resolution has been found for this issue.
Type: Modified Resolution: Added the <Return Value> variable to the output
argument list.
Examples:
None.
fem_get_node_ids Issue: Call only partially works. Outputs the list of nodes for the
variable IDNODE but not for the variable IDNOEXIST.
Type: Broken MSC.Patran outputs an error message if the input list contains
any non-existent nodes.
Resolution: No resolution has been found for this issue.
Examples:
None.
Type: Modified Resolution: Added the <Return Value> variable to the output
argument list.
Main Index
CHAPTER 18 571
Obsolete, Modified, and Broken Functions
db_delete_load_case Issue: When running this call, MSC.Patran outputs the error
message “Wrong number of arguments for built-in function.
Type: Modified Extra information [1,2]”.
Resolution: Call originally had 2 arguments the variable
PARAM_SET_ID and the variable NAME. Removed the variable
PARAM_SET_ID since it was not needed.
Main Index
572
Function Descriptions
Description:
Unassociates a specified geometric entity from a specified physical property in the database.
Input:
INTEGER gid The internal ID for the geometric entity to unassociate with
the physical property.
INTEGER gtype The type of geometric entity from which the physical
property is being unassociated
INTEGER gsid The internal sub_id for the geometric entity to unassociate
from the physical property.
INTEGER rid The internal ID of the physical property region being
unassociated from the specified geometric entity.
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:
13000002 Unrecoverable database error.
13000004 Duplicate entry exists in table.
13000007 An unspecified database error occurred.
External Dependencies and Side Effects:
Deletes one record associating a physical property region from a geometric entity in the
database.
Examples:
See example for db_associate_geo_to_region (p. 269).
Main Index
CHAPTER 18 573
Obsolete, Modified, and Broken Functions
lbc_create Issue: The list of input and output arguments for this call have
been changed.
Type: Modified
Resolution: Changed list of input and output arguments in the
documentation to correspond to those in the actual code.
Main Index
574
Function Descriptions
Error Conditions:
None.
Remarks:
None.
Examples:
None.
NewDescription Information:
lbc_create (name, type_id, cat_id, dyn_flag, num_ar, ar_id, aplist1,
aplist2, fem_flag, targ_elem, lbc_sf, cid_id, no_data_flag,
num_dat, var_id, sv, null_flag, null_var, datatype, ivalue,
rvalue, fldid, dyn_fldid, node_id )
Description:
Create the Loads and Boundary Condition Set (unevaluated, i.e., for positionally dependent
quantities field references are store not actual values).
Input:
STRING name[] Load/BC Set Name - user specified.
INTEGER type_id Load/BC Type - disp, force, etc.
INTEGER cat_id Category - Nodal, Elem Uni, Elem Var.
INTEGER dyn_flag Dynamic Flag = FA_TRUE if dynamic.
INTEGER num_ar Number of Application Regions.
INTEGER ar_id (2) Appl Region db ID.
STRING aplist1[] Application Region 1 list.
STRING aplist2[] Application Region 2 list.
INTEGER fem_flag (5) FEM Flag = FA_TRUE if FEM entities.
FEM Flag (4) = app_reg_couple.
FEM Flag (5) = app_reg_order.
INTEGER targ_elem (3) Target Element Dimension.
REAL lbc_sf LBC Set Scale Factor.
INTEGER cid_id Coordinate System ID.
INTEGER no_data_flag Equals FA_TRUE if no data case is valid.
INTEGER num_dat Number of input data variables.
INTEGER var_id (20) Input Variable Data ID.
INTEGER sv (20) Indicates whether data is scalar or vector.
INTEGER null_flag (20) Null vector flag = 1, if null allowed.
INTEGER null_var (20,3) Flag indicating whether this vector comp is null NULLV = -1 if
null, 0 if not null.
INTEGER datatype (20) Indicates datatype, e.g. integer, real, field (see dbcodes.h;
DbInt).
INTEGER ivalue (20) Integer value.
REAL rvalue (20,3) Real value.
INTEGER fldid (20,3) Field ID.
INTEGER dyn_fldid (20,3) Dynamic Field ID.
INTEGER node_id (20) Node ID.
Output:
INTEGER <Return Value> ISee error returned.
Main Index
CHAPTER 18 575
Obsolete, Modified, and Broken Functions
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Type: Modified Resolution: Add the variable LBC_ID to the documentation for
this call as the first input argument in the list.
Output:
STRING sdbx_type[] Select databox type.
STRING sdbx_label[] Select databox label.
INTEGER <Return Value> IReturns the success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Main Index
CHAPTER 18 577
Obsolete, Modified, and Broken Functions
lbc_show_plot_marker Issue: The call no longer exists. It was replaced with the
lbc_plot_markers call.
Type: Obsolete
Resolution: Removed the call from the documentation.
Description:
Show the marker/vector plots for the given lbcs on the selected groups.
Input:
INTEGER num_lbcs Number of lbcs which should be displayed.
INTEGER lbc_ids ( ) LBC ids.
INTEGER num_grps Number of groups to which graphics vector tables will be
assigned.
INTEGER grp_ids ( ) Group ids.
Output:
INTEGER <Return Value> See error returned.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Type: Modified Resolution: Add the variable TYPE_ID to the documentation for
this call as the second input argument in the list.
Input:
STRING type_name[] The Load/BC type name.
REAL dynamic_val The value of the dynamic field to evaluate.
STRING var_name[] The name of the variable to be loaded into the scalar table.
STRING component[] The component of the variable to be loaded into the scalar
table.
INTEGER num_lbcs The number of lbcs to contour.
INTEGER lbc_ids (num_lbcs) The IDs of the lbcs to contour.
INTEGER num_grps The number of groups to assign the scalar table to.
INTEGER grp_ids (num_lbcs) The IDs of the groups to assign the scalar table to.
Output:
INTEGER <Return Value> See error returned.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Main Index
CHAPTER 18 579
Obsolete, Modified, and Broken Functions
loadsbcs_get_appl_region_list Issue: The list of input and output arguments for this call have
been changed.
Type: Modified
Resolution: Changed list of input and output arguments in the
documentation to correspond to those in the actual code.
Main Index
580
Function Descriptions
Description:
Counts all lbcs in the specified group.
Input:
INTEGER id The ID of the group for which the count is requested.
Output:
INTEGER count The number of lbcs in the group.
INTEGER <Return Value> Returns the success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
db_get_all_lbcs Issue: The call no longer exists. It was replaced with the
db_get_all_lbcs_new call.
Type: Obsolete
Resolution: Removed the call from the documentation.
Description:
Gets the LBC from the database.
Input:
None.
Output:
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Main Index
CHAPTER 18 581
Obsolete, Modified, and Broken Functions
db_get_next_lbc Issue: The call no longer exists. It was replaced with the
db_get_next_lbcs_new call.
Type: Obsolete
Resolution: Removed the call from the documentation.
Description:
Gets next LBC from the database.
Input:
None.
Output:
INTEGER id The unique internal ID of the LBC type created in the
database.
STRING name[] The name of the LBC type being created in the database.
INTEGER type The type ID of the LBC (from the lbc_type table).
INTEGER cat The category of the LBC (nodal, element uniform or element
variable).
INTEGER ted The target element dimensionality for this LBC.
INTEGER cid The cid of the alternate coordinate frame that was used to
define this LBC (if any).
INTEGER dflag A flag indicating whether this is a dynamic or static LBC.
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Description:
Gets all LBC entries in a specified group from the database in one array.
Input:
INTEGER grpid The group IDs to which the LBCs are to belong.
INTEGER count The storage that the calling routine has allocated for IDs.
Output:
INTEGER id() Array to contain the LBC IDs.
INTEGER <Return Value> Integer indicating success or failure of the routine. If the
routine failed, this value contains an indication of the reason.
Main Index
582
Function Descriptions
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Type: Modified Resolution: Add the variable ID to the documentation for this
call as the first input argument in the list.
Main Index
CHAPTER 18 583
Obsolete, Modified, and Broken Functions
Type: Modified Resolution: Added the <Return Value> variable to the output
argument list.
INTEGER cid Flag indicating whether the LBC can be defined in an alternate
coord frame
INTEGER g_sym The graphics symbol used to display this LBC.
INTEGER sv Flag indicating whether this LBC is a scalar or vector.
INTEGER nv Flag indicating whether (for vector lbcs) one (or more) of the
components can be null.
INTEGER nbr_ac The number of analysis codes supplied.
INTEGER an_code ( ) List of valid analysis code ids for this LBC.
INTEGER defcol Default color of associated graphics.
INTEGER cbid Color box ID of associated graphics.
INTEGER anstyl Anchor style of associated graphics.
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Type: Modified Resolution: Added the <Return Value> variable to the output
argument list.
Input:
INTEGER lbc_type_id The ID of the LBC type in the database.
INTEGER lbc_category The ID of the LBC type in the database.
INTEGER eldim The dimensionality of the LBC type in the database.
STRING label[] The label of the variable in the database.
Output:
INTEGER id() The unique internal ID of the LBC type variable in the
database.
INTEGER <Return Value> Integer indicating success or failure of the routine.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Main Index
586
Function Descriptions
mat_2d_ani_to_2d_ort Issue: Call does not work. Unable to calculate the 2D orthotropic
engineering constants from a 2D anisotropic material.
Type: Broken
Resolution: No resolution has been found for this issue.
Main Index
CHAPTER 18 587
Obsolete, Modified, and Broken Functions
Main Index
588
Function Descriptions
db_get_anal_type_name Issue: The documentation implies that the user needs to supply
the value of the variable NAME for this call, but in reality the
Type: Modified value of NAME is supposed to be returned.
Resolution: Changed the variable NAME to be an output
argument.
Main Index
CHAPTER 18 589
Obsolete, Modified, and Broken Functions
db_get_anal_type_id Issue: The documentation implies that the user needs to supply
the value of the variable ID for this call, but in reality the value of
Type: Modified ID is supposed to be returned.
Resolution: Changed the variable ID to be an output argument.
Main Index
590
Function Descriptions
db_get_pset_matrix_entry Issue: The documentation implies that the user need not supply
the value of the variable MATRIX for this call, but in reality the
Type: Modified value of MATRIX is supposed to be an input argument.
Resolution: Changed the variable MATRIX to be an input
argument.
Main Index
CHAPTER 18 591
Obsolete, Modified, and Broken Functions
db_modify_field Issue: The documentation implies that the variable ID will return
a value as well as supply one for this call, but in reality the value
Type: Modified of ID is only supposed to be an input argument.
Resolution: Change the variable ID to be an input argument.
Main Index
592
Function Descriptions
Output:
INTEGER id The unique internal ID identifying the field in the database.
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:
None.
Remarks:
None.
Examples:
None.
Description:
Converts a field lbc in the database.
Input:
INTEGER type 0 = scalar; 1 = vector; 2 = tensor;
INTEGER etype The entity type.
INTEGER nvals The number of field values to be created.
INTEGER eid(nvals) The entity ids to be associated with the field.
INTEGER elem_face(nvals) The elem_face to be associated with the field.
INTEGER elem_edge(nvals) The elem_edge to be associated with the field.
INTEGER node_pos(nvals) The node_pos to be associated with the field.
REAL vals(nvals, type) The field values for this table field. The input
type.determines the size of the vals array;
0 = 1;
1 = 3;
2 = 6;
The values determine how many positions should be loaded
from the input arrays and correspond to scalar, vector, or
tensor.
Output:
INTEGER id The unique internal ID identifying the field in the database.
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:
None.
Remarks:
None.
Examples:
None.
Main Index
594
Function Descriptions
Main Index
CHAPTER 18 595
Obsolete, Modified, and Broken Functions
Main Index
CHAPTER 18 597
Obsolete, Modified, and Broken Functions
Main Index
598
Function Descriptions
Main Index
CHAPTER 18 599
Obsolete, Modified, and Broken Functions
Main Index
600
Function Descriptions
Description:
rpc_clear_timeout will change the amount of time before all subsequent rpc_call()s will
timeout.
Input:
INTEGER handle Server handle.
INTEGER seconds Timeout in seconds.
Output:
LOGICAL <Return Value> FALSE - timeout setting failed.
TRUE - timeout successful.
Error Conditions:
None.
Remarks:
None.
Examples:
None.
Type: Obsolete Resolution: This function has been replaced by the function
util_rounder (p. 460) which has a return value used to indicate
errors.
Description:
Round off RVAL to NSIGD significant digits.
Input:
REAL rval The value to be rounded.
INTEGER nsigd Number of significant digits NSIGD must be positive to get a
meaningful answer.
Output:
REAL <Return Value> Rounded value of RVAL.
Error Conditions:
None.
Remarks:
None.
Example:
FUNCTION UTIL_ROUNDER( RVAL, NSIGD, ROUT )
/*
Round off RVAL to NSIGD significant digits in ROUT.
Input:
Main Index
CHAPTER 18 601
Obsolete, Modified, and Broken Functions
Output:
ROUT Real Rounded value of RVAL
UTIL_ROUNDER Integer Return status ( =0 if no error )
*/
REAL RVAL, ROUT
INTEGER NSIGD
/*
Initialize
*/
IF( NSIGD <= 0 ) THEN
UTIL_ROUNDER = 1
ELSE
UTIL_ROUNDER = 0
END IF
ROUT = UTIL_ROUND( RVAL, NSIGD )
RETURN
END
Main Index
602
Function Descriptions
Main Index
1
I N D E X
MSC.Acumen Toolkit
Function Descriptions
I N D E X
MSC.Acumen
Toolkit This Index of Functions includes all app_count_list 836
Function
Descriptions
functions in the entire MSC.Patran system: app_count_list 837
PCL and Customization; the PCL Reference app_count_list ACU 536
Manual; and MSC.Acumen in alphabetical app_count_list ACU 94
order. app_count_token_list PCL 218
app_db_err_msg 839
app_db_err_msg ACU 90
A app_db_get_ref_cid 996
app_db_get_ref_cid ACU 189
<analysis_type> PCL 324
app_db_get_ref_cid ACU 562
analysis_get.pset_for_job 1486
app_get_handle PCL 218
analysis_get.pset_for_job ACU 360
app_ids_to_vstring 840
analysis_get.pset_for_job ACU 587
app_ids_to_vstring ACU 94
analysis_import 1487
app_int_array_to_vstring 842
analysis_import ACU 360
app_int_array_to_vstring ACU 95
analysis_main.button_class_closed PCL 328
app_lp_err_msg PCL 220
analysis_main.disable_jobname_and_descriptio
app_next_id PCL 219
n PCL 323
app_next_label PCL 219
analysis_main.dont_commit_on_apply PCL 322
appcode 843
analysis_main.dont_update_on_apply PCL 323
appcode ACU 90
analysis_main.get_analysis_menu_items
arbitrary_read_file REF 1290
PCL 331
arbitrary_read_file REF 713
analysis_main.get_code_and_type PCL 332
arbitrary_section_create REF 1290
analysis_main.get_current_job_info PCL 332
arbitrary_section_create REF 714
analysis_main.get_file_suffixes PCL 332
arbitrary_section_display REF 1290
analysis_main.get_job_name_and_desc
arbitrary_section_display REF 715
PCL 331
arbitrary_section_modify REF 1290
analysis_main.get_panel_info PCL 333
arbitrary_section_modify REF 716
analysis_main.job_name_lbox 1491
arbitrary_section_report REF 1290
analysis_main.job_name_lbox ACU 361
arbitrary_section_report REF 716
analysis_main.load_job_name_dbox PCL 323
arbitrary_select_surface REF 1290
analysis_main.refresh_jobname_listbox
arbitrary_select_surface REF 717
PCL 323
array_copy_real 1702
analysis_main.set_display_flags PCL 322
array_copy_real ACU 452
analysis_main.set_jobname_blank PCL 323
array_del_zero_int 1703
analysis_main.set_jobname_current PCL 323
array_del_zero_int ACU 452
analysis_main.user_function 1492
array_fill_int 1703 Index
analysis_main.user_function ACU 361
array_fill_int ACU 452
analysis_submit 1494
array_fill_zero_int 1704
analysis_submit ACU 362
array_fill_zero_int ACU 453
analysis_submit_2 1498
array_fill_zero_real 1705
analysis_submit_2 ACU 363
array_fill_zero_real ACU 453
app_count_id_list PCL 217
array_real_fill_null 1706
Main Index
2 INDEX