analysis_get.pset_for_job | (analysis_code, anal_job_name, anal_job_id ) |
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. |
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 |
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. |
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 |
analysis_main.user_function | ( <classname>, <function_name>, <exist_flag>) |
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. |
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. |
MSC.Nastran | MSC.Dytran |
ABAQUS | MSC.Patran Structural Optimization |
ANSYS | MARC K6 |
MARC | LMS CADA-X |
MSC.Patran FEA | FASTRUDL |
MSC.Patran Thermal | SESAM |
MSC.Patran CFD | DYNA3D |
MSC.Patran Advanced FEA | RCS |
MARC K | CFX-F3D |
ANSYS 5 | CFX-FLOW |
MSC.Patran Team | MSC.Droptest |
SAMCEF | MSC.Forging |
PATRAN 2NF | LS-DYNA3D |
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 |
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. Please refer to description of the Function – analysis_submit() for a list of Analysis Codes. |
db_set_pref | (pref_id, data_type, int_pref, log_pref, real_pref, char_pref) |
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 |
db_get_job_info | (analysis_code_id, jobname_id, jobname, description, param_set_id, status) |
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 |
db_set_model_file_suffix | (name, suffix) |
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 |
db_set_results_file_suffix | (name, suffix) |
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 |
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 |
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 |
db_get_anal_code_name | (id, name) |
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 |
db_get_anal_code_id | (name, id) |
Description: | ||
Retrieves the analysis code id associated with the specified analysis code name. | ||
Input: | ||
STRING | name[31] | The name of the analysis code. |
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 |
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 |
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 |
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 |
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 |
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 |
db_get_anal_type_name | (id, name) |
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. |
db_get_anal_type_id | (name, id) |
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. |
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. |
db_count_anal_types | (name, count) |
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. |
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. |
Error Conditions: | ||
13000002 | Unrecoverable database error. | |
13000117 | The query specified has completed | |
13000007 | An unspecified database error occurred. |
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. |
db_get_at_for_ac | (acname, atname) |
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. |
Error Conditions: | ||
13000002 | Unrecoverable database error. | |
13000007 | An unspecified database error occurred. |
db_set_at_for_ac | (anal_code, anal_type) |
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. |
db_create_job_name_for_a_code | (ac_id, jobname, jobdesc, status, jobname_id, param_set_id ) |
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. |
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. |
db_count_job_names_for_a_code | (acode_id, num_acodes) |
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. |
db_get_jobnames_for_a_code | (analysis_code_id, count, jobname, jobname_id, description, param_set_id, status) |
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. |
INTEGER | jobname_id() | The ID of the jobname 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 | 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 |
db_update_jobname_for_a_code | (analysis_code_id, jobname, description, status, jobname_id, param_set_id) |
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 |
db_create_job_name_list | (jobname_id, nbr_of_loadcases, loadcase_ids) |
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. |
db_create_job_name_list_entry | (jobname_id, load_case_id, analysis_step_id) |
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 |
db_get_jobname_list_entries | (jobname_id, count, load_case_id, step_id) |
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 |
db_count_job_name_list_entry | (jobname_id, num_lists) |
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. |
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 |
db_create_job_name | (jobname, id) |
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. |
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. |
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 |
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 |
db_get_job_name_given_id | (id, name) |
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. |
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. |
INTEGER status, num_jobnames, max_jobnames, jobname_ids (VIRTUAL)
db_get_all_job_name_ids | (max_count, nbr_of_jobnames, id) |
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 |
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 |
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 |
db_get_id_given_job_name | (jobname, id) |
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. |
Error Conditions: | ||
None. |
db_get_id_given_job_name_code | (acode, jobname, id) |
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 |
db_get_id_given_load_case_name | (jobname, load_case_id) |
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 |
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 |
db_create_analysis_step | (stepname, stepdesc,ac_id, step_id, param_set_id) |
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 |
db_get_analysis_steps | (analysis_code_id, count, stepname, step_id, description, param_set_id) |
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 |
db_get_steps_for_a_job | (analysis_code_id, jobname_id, count, stepname, step_id, description, param_set_id) |
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. |
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 |
db_get_step_info | (analysis_code_id, step_id, stepname, description, param_set_id) |
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 |
db_count_analysis_steps | (acode_id, num_steps) |
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. |
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. |
db_get_id_given_step_name | (acode, stepname, id) |
Description: | ||
Returns the stepname id given the stepname. | ||
Input: | ||
INTEGER | acode | Analysis code ID. |
STRING | stepname[] | The step name. |
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 |
db_update_analysis_step | (analysis_code_id, analysis_step_id, analysis_step_name, description, param_set_id) |
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 |
db_delete_analysis_step_id | (ac_id, step_id) |
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. |
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 |
db_create_param_set_entry | (param_set_id, param_name, param_type, param_real, param_char , param_int) |
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. DbInteger 1 DbLogical 2 DbReal 3 DbCharacter 4 DbRealArray 5 DbAllTypes 6 |
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 |
db_count_param_set_entries | (param_id, num_params) |
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. |
db_get_param_set_entry | (param_set_id, param_name, param_type, param_real, param_char, param_int) |
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 |
db_get_param_set_ent_pcl | (param_set_id, count, param_name, param_type, param_real, param_char, param_int) |
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 |
db_get_param_set_entries | (param_set_id, count, param_name, param_type, param_real, param_char, param_int) |
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. |
INTEGER | param_int() | Array containing an 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 |
db_delete_param_set_entry | (param_set_id, name) |
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 |
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 |
db_create_pset_matrix_entry | (param_set_id, param_name, nrows, ncols, matrix) |
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 |
db_get_pset_matrix_entry | (param_set_id, param_name, matrix) |
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 |
db_get_pset_matrix_size | (param_set_id, param_name, nrows, ncols) |
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 |
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. |
jobfile.create_matrix | (values, num_values) |
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. |
jobfile.open | ( <jobname> , <job_type> ) |
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” |
jobfile.set_job_status | ( <job_status>, <message_string>) |
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. |
jobfile.writec | ( <label_str> , <char_val > ) |
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. |
jobfile.writei | ( <label_str> , <int_val > ) |
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. |
jobfile.writer | ( <label_str> , <r_val > ) |
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. |
jobfile.write_spl | ( <label_str> , <char_str()> ) |
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. |
msc_delete_old_files | ( <job_name >,<model_suffix>,<results_suffix >) |
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. |
Error Conditions: | ||
None |
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 |
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 |
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. |
INTEGER | num_subcases | Number of subcases. |
STRING | subcase_names[]() | Array of subcase names. |
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. |
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. |
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. |
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. |
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 |