/*==========================================================================*\ FILE : TestMoldLayout.c PURPOSE: HISTORY: DATE AUTHOR MODIFICATIONS 06-Jul-97 Pavel $$1 Created 06-Jul-97 Amin $$2 Changed ProMFGMoldLayoutGet -> ProMfgMoldLayoutGet 14-Jul-97 Pavel $$3 More return control 12-Oct-97 H-03-26 Pavel $$4 Test more ProRmdt functions. Move ProTestMoldLayoutMenu() from TestMain.c 11-Nov-97 H-03-31 Pavel $$5 Added TEST_CALL_REPORTS 03-Dec-98 I-01-27 Pavel $$6 Move TEST_CALL_REPORTs after error checking 31-May-99 I-03-11 mka $$7 Delete unused variable \***************************************************************************/ #include #include #include #include #include #include /*--------------------------------------------------------------------*\ Application includes \*--------------------------------------------------------------------*/ #include "TestError.h" /*--------------------------------------------------------------------*\ Application macros \*--------------------------------------------------------------------*/ #define USER_ON 1 #define USER_OFF 0 /*--------------------------------------------------------------------*\ Application global/external data \*--------------------------------------------------------------------*/ static FILE *log_file; static int preaction_status = USER_OFF; /*=============================================================*\ FUNCTION: ProTestMoldLayoutInfo PURPOSE: Test Mold Layout info functions \*=============================================================*/ int ProTestMoldLayoutInfo(ProMdl *model) { ProError status; ProMoldLayout mold_layout; FILE *fp; int i, cor, num_p; char **p_par_nam, line[256]; wchar_t **pw_par_val, *w_name; double xyz_p[3], xyz_m[3], xyz_t[3]; ProPath w_path; char fname[PRO_FILE_NAME_SIZE]; ProTestQcrName(model, ".inf", fname); fp = fopen(fname, "w"); ProStringToWstring(w_path, fname); status = ProMfgMoldLayoutGet((ProMfg)*model, &mold_layout); TEST_CALL_REPORT("ProMfgMoldLayoutGet()", "ProTestMoldLayoutInfo()", status, status != PRO_TK_NO_ERROR); if (status != PRO_TK_NO_ERROR) return (0); fprintf(fp, "IMM\n"); status = ProRmdtImmInfoGet(mold_layout, &w_name, &p_par_nam, &pw_par_val, &num_p); TEST_CALL_REPORT("ProRmdtImmInfoGet()", "ProTestMoldLayoutInfo()", status, status != PRO_TK_NO_ERROR); if (status == PRO_TK_NO_ERROR) { if (w_name != NULL) { ProWstringToString(line, w_name); fprintf(fp, " %-20s %s\n", "Name", line); } for (i=0; i