/*====================================================================*\ FILE : TestNotify.c PURPOSE : Test functions for Pro/TOOLKIT Notification HISTORY.. DATE BUILD AUTHOR MODIFICATIONS 19 Apr 96 G-03-11 Alistair $$1 Created 10 May 96 G-03-13 Amin $$2 changed some actions to ALL 24 May 96 G-03-15 mgs $$3 Added new tests 09 Sep 96 H-01-08 Xuekai $$4 ProErr => ProError, obsolete protk.h 18 Sep 96 H-01-09 Xuekai $$5 include "ProParamval.h" 09-Oct-96 H-01-11+ mgs $$6 include "prodev_menu.h" 09-Dec-96 H-01-20 amin $$7 Touchups 04-Jun-97 H-01-33 Dennis $$8 Added workspace notice for post save 19-Jun-97 H-03-15 amin $$9 Change PRO_MDL_RETRIEVE_PRE -> PRO_MDL_RETRIEVE_PRE_18 15-Sep-97 H-03-22 Pavel $$10 Replace Pro/D on Pro/E 24-Sep-97 H-03-24 Pavel $$11 Added some calls of new functions 29-Sep-97 H-03-24 Akula $$12 Added TEST_CALL_REPORT to notification callbacks 04-Nov-97 H-03-29 Pavel $$13 Corrected TEST_CALL_REPORTs 04-May-98 I-01-06 Pavel $$14 Updated 07-May-98 I-01-06+Pavel $$15 Temp do not use arg in ProUserFeatRegenPre (reg test fix ) 13-May-98 I-01-07 Pavel $$16 Do not output MdlDisplay into log! different in graph and no graph mode! 13-May-98 I-01-10 Alexey $$17 Added ProUserSolidUnitConvertPre/Post to test PRO_SOLID_UNIT_CONVERT_PRE/POST 03-Jun-98 I-01-10 Pavel $$18 Reg test fix - del 15 28-Jul-98 I-01-15 Alexey $$19 Since PRO_MDL_RETRIEVE_PRE_18 & PRO_MDL_CREATE_PRE_18 removed, remove corresponding test code. 21-Sep-98 I-01-23 Alexey $$20 Added weld-symbol notifications . 11-Dec-98 I-01-28 mka $$21 Fix problem with ProNotificationUnset 28-Dec-98 I-01-28 akh $$22 Don't put #if in the middle of TEST_CALL_REPORT 19-Mar-99 I-01-33 CHI $$23 changed Weld notification 26-Oct-99 I-03-19 ags $$24 Added PRO_FEATURE_*, PRO_DIM_MODIFY_VALUE_PRE and agree/cancel functionality test. \*====================================================================*/ /*--------------------------------------------------------------------*\ Pro/TOOLKIT includes \*--------------------------------------------------------------------*/ #include "ProToolkit.h" #include "ProMdl.h" #include "ProObjects.h" #include "ProFeature.h" #include "ProSizeConst.h" #include "ProNotify.h" #include "ProParamval.h" #include "ProMenu.h" #include "ProClCmd.h" #include "ProUtil.h" #include "ProWorkspace.h" /*--------------------------------------------------------------------*\ C System includes \*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*\ Application includes \*--------------------------------------------------------------------*/ #include "TestError.h" #include "UtilString.h" #include "UtilMenu.h" /*--------------------------------------------------------------------*\ Application types \*--------------------------------------------------------------------*/ typedef struct notifyinfo { ProNotifyType type; /* The type of this notify */ char status; /* The current status */ char name[PRO_NAME_SIZE]; /* The name (also the menu button) */ ProFunction func; /* The function to be called */ } NotifyInfo; /*--------------------------------------------------------------------*\ Static variables NOTE: The defenition of NotifyStatus array moved after notification functions \*--------------------------------------------------------------------*/ static FILE *notify_fp; static int user_notify_cancel = 1;/* 0 - cancel, 1 - agree*/ /*--------------------------------------------------------------------*\ Notification functions \*--------------------------------------------------------------------*/ /*====================================================================*\ FUNCTION : ProTestNotifyReport PURPOSE : write the log file \*====================================================================*/ void ProTestNotifyReport( char *func, char *args) { printf("ProTestNotifyReport() - %s() : %s\n", func, args); fprintf(notify_fp, "ProTestNotifyReport() - %s() - %s\n", func, args); } /*====================================================================*\ FUNCTION : ProUtilModelToStr PURPOSE : Convert ProModel* to str \*====================================================================*/ char *ProUtilModelToStr( ProModel *p_mdldata, char *buff) { ProCharName name; char type[10]; sprintf(buff, "model=%s.%s", ProWstringToString(name, p_mdldata->name), ProWstringToString(type, p_mdldata->type)); return(buff); } /*====================================================================*\ FUNCTION : ProUtilModelFromToStr PURPOSE : Convert ProModel* to str \*====================================================================*/ char *ProUtilModelFromToStr( ProModel *p_from, ProModel *p_to, char *buff) { strcpy(buff, "from "); ProUtilModelToStr(p_from, buff + strlen(buff)); strcat(buff, " to "); ProUtilModelToStr(p_to, buff + strlen(buff)); return(buff); } /*====================================================================*\ FUNCTION : ProUserMdlSavePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlSavePre( ProModel *p_mdldata) { ProModelitem modelitem; ProParameter parameter; static unsigned char cancel = 1; ProError ret = PRO_TK_NO_ERROR; if (user_notify_cancel == 0) { if (cancel == 1) { cancel = 0; ret = PRO_TK_GENERAL_ERROR; } else cancel = 1; } TEST_CALL_REPORT( "ProMdlSavePreAction", "ProUserMdlSavePre", 0, 0 ); ProTestNotifyReport("ProUserMdlSavePre", (ret==PRO_TK_NO_ERROR)?"Agree.": "Cancel."); return (ret); } /*====================================================================*\ FUNCTION : ProUserMdlSavePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlSavePost( ProMdldata *p_mdldata) { ProError status; ProName wksp_wstr; ProCharName wksp_name; char buff[256]; TEST_CALL_REPORT( "ProMdlSavePostAction", "ProUserMdlSavePost", 0, 0 ); ProUtilModelToStr((ProModel*)p_mdldata, buff); if (p_mdldata->path[0] == NULL_WCHAR) { status = ProCurrentWorkspaceGet(wksp_wstr); TEST_CALL_REPORT("ProCurrentWorkspaceGet()", "ProUserMdlSavePost()", status, status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND); if (status == PRO_TK_NO_ERROR) { strcat(buff, " in workspace "); ProWstringToString(wksp_name, wksp_wstr); strcat(buff, wksp_name); } } ProTestNotifyReport("ProUserMdlSavePost", buff); if (p_mdldata->path[0] != NULL_WCHAR) { fprintf(notify_fp, "! path=%s\n", ProWstringToString(buff, p_mdldata->path)); printf("! path=%s\n", buff); } return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlSavePostAll PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlSavePostAll( ProMdldata *p_mdldata) { ProError status; ProName wksp_wstr; ProCharName wksp_name; char buff[256]; TEST_CALL_REPORT( "ProMdlSavePostAllAction", "ProUserMdlSavePostAll", 0, 0 ); ProUtilModelToStr((ProModel*)p_mdldata, buff); if (p_mdldata->path[0] == NULL_WCHAR) { status = ProCurrentWorkspaceGet(wksp_wstr); TEST_CALL_REPORT("ProCurrentWorkspaceGet()", "ProUserMdlSavePost()", status, status != PRO_TK_NO_ERROR && status != PRO_TK_E_NOT_FOUND); if (status == PRO_TK_NO_ERROR) { ProWstringToString(wksp_name, wksp_wstr); sprintf(buff + strlen(buff), " in workspace %s", ProWstringToString(wksp_name, wksp_wstr)); } } ProTestNotifyReport("ProUserMdlSavePostAll", buff); if (p_mdldata->path[0] != NULL_WCHAR) { fprintf(notify_fp, "! path=%s\n", ProWstringToString(buff, p_mdldata->path)); printf("! path=%s\n", buff); } return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlCopyPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlCopyPre( ProModel *p_from, ProModel *p_to) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProMdlCopyPreAction", "ProUserMdlCopyPre", 0, 0 ); strcpy (buff, ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); ProUtilModelFromToStr(p_from, p_to, buff+strlen(buff)); ProTestNotifyReport("ProUserMdlCopyPre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserMdlCopyPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlCopyPost( ProModel *p_from, ProModel *p_to) { char buff[100]; TEST_CALL_REPORT( "ProMdlCopyPostAction", "ProUserMdlCopyPost", 0, 0 ); ProUtilModelFromToStr(p_from, p_to, buff); ProTestNotifyReport("ProUserMdlCopyPost",buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlCopyPostAll PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlCopyPostAll( ProModel *p_from, ProModel *p_to) { char buff[100]; TEST_CALL_REPORT( "ProMdlCopyPostAllAction", "ProUserMdlCopyPostAll", 0, 0 ); ProUtilModelFromToStr(p_from, p_to, buff); ProTestNotifyReport("ProUserMdlCopyPostAll", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlRenamePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlRenamePre( ProModel *p_from, ProModel *p_to) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProMdlRenamePreAction", "ProUserMdlRenamePre", 0, 0 ); strcpy (buff, ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); ProUtilModelFromToStr(p_from, p_to, buff+strlen(buff)); ProTestNotifyReport("ProUserMdlRenamePre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserMdlRenamePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlRenamePost( ProModel *p_from, ProModel *p_to) { char buff[100]; TEST_CALL_REPORT( "ProMdlRenamePostAction", "ProUserMdlRenamePost", 0, 0 ); ProUtilModelFromToStr(p_from, p_to, buff); ProTestNotifyReport("ProUserMdlRenamePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlErasePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlErasePre() { ProError ret = PRO_TK_NO_ERROR; static unsigned char cancel = 1; if (user_notify_cancel==0) { printf ("\tProUserMdlErasePre return %s\n", cancel==1?"PRO_TK_GENERAL_ERROR":"PRO_TK_NO_ERROR"); if (cancel == 1) { cancel = 0; ret=PRO_TK_GENERAL_ERROR; } else cancel = 1; } TEST_CALL_REPORT( "ProMdlErasePreAction", "ProUserMdlErasePre", 0, 0 ); ProTestNotifyReport("ProUserMdlErasePre", ret==PRO_TK_NO_ERROR?"Agree.":"Cancel."); return (ret); } /*====================================================================*\ FUNCTION : ProUserMdlErasePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlErasePost( ProModel *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlErasePostAction", "ProUserMdlErasePost", 0, 0 ); ProUtilModelToStr(p_mdldata, buff); ProTestNotifyReport("ProUserMdlErasePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlErasePostAll PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlErasePostAll( ProMdldata *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlErasePostAllAction", "ProUserMdlErasePostAll", 0, 0 ); ProUtilModelToStr((ProModel*)p_mdldata, buff); ProTestNotifyReport("ProUserMdlErasePostAll", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlPurgePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlPurgePre( ProModel *p_mdldata) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProMdlPurgePreAction", "ProUserMdlPurgePre", 0, 0 ); strcpy (buff, ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); ProUtilModelToStr(p_mdldata, buff+strlen(buff)); ProTestNotifyReport("ProUserMdlPurgePre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserMdlPurgePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlPurgePost( ProModel *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlPurgePostAction", "ProUserMdlPurgePost", 0, 0 ); ProUtilModelToStr(p_mdldata, buff); ProTestNotifyReport("ProUserMdlPurgePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDeletePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlDeletePre() { ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProMdlDeletePreAction", "ProUserMdlDeletePre", 0, 0 ); ProTestNotifyReport("ProUserMdlDeletePre", ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); return ret; } /*====================================================================*\ FUNCTION : ProUserMdlDeletePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlDeletePost( ProModel *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlDeletePostAction", "ProUserMdlDeletePost", 0, 0 ); ProUtilModelToStr(p_mdldata, buff); ProTestNotifyReport("ProUserMdlDeletePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDeletePostAll PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlDeletePostAll( ProMdldata *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlDeletePostAllAction", "ProUserMdlDeletePostAll", 0, 0 ); ProUtilModelToStr((ProModel*)p_mdldata, buff); ProTestNotifyReport("ProUserMdlDeletePostAll", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlRetrievePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlRetrievePre( ProPath path, ProFileName file_name, ProFileRetrieveOpt **p_retr_options_arr) { static ProFileRetrieveOpt arr[]= {PRO_RETRIEVE_OP_NORMAL}; TEST_CALL_REPORT( "ProMdlRetrievePreAction", "ProUserMdlRetrievePre", 0, 0 ); ProStringToWstring(path, ""); ProStringToWstring(file_name, "p1.prt.1"); (*p_retr_options_arr) = arr; ProTestNotifyReport ("ProUserMdlRetrievePre", ""); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlRetrievePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlRetrievePost( ProModel *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlRetrievePostAction", "ProUserMdlRetrievePost", 0, 0 ); ProUtilModelToStr(p_mdldata, buff); ProTestNotifyReport("ProUserMdlRetrievePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlRetrievePostAll PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlRetrievePostAll( ProMdldata *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlRetrievePostAllAction", "ProUserMdlRetrievePostAll", 0, 0 ); ProUtilModelToStr((ProModel*)p_mdldata, buff); ProTestNotifyReport("ProUserMdlRetrievePostAll", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlCreatePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlCreatePre( ProMdlType mdl_type, int sub_type, ProName r_model_name, ProBoolean *r_allow_override) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProMdlCreatePreAction", "ProUserMdlCreatePre", 0, 0 ); *r_allow_override = PRO_B_TRUE; ProStringToWstring(r_model_name, "create_pre"); sprintf (buff, "%s. mdl_type=%d, sub_type=%d", ret==PRO_TK_NO_ERROR?"Agree":"Cancel", mdl_type, sub_type); ProTestNotifyReport ("ProUserMdlCreatePre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserMdlCreatePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlCreatePost( ProModel *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMdlCreatePostAction", "ProUserMdlCreatePost", 0, 0 ); ProUtilModelToStr(p_mdldata, buff); ProTestNotifyReport ("ProUserMdlCreatePost", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDbmsFailure PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlDbmsFailure( char *dbms_action_string, ProMdldata *p_mdl1data, ProMdldata *p_mdl2data, ProError status) { char buff[100]; TEST_CALL_REPORT( "ProMdlDbmsFailureAction", "ProUserMdlDbmsFailure", 0, 0 ); strcpy(buff, dbms_action_string); strcat(buff, " "); ProUtilModelToStr((ProModel*)p_mdl1data, buff+strlen(buff)); ProTestNotifyReport("ProUserMdlDbmsFailure", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDisplayPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlDisplayPre( ProMdl p_model) { TEST_CALL_REPORT( "ProMdlDisplayPreAction", "ProUserMdlDisplayPre", 0, 0 ); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDisplayPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlDisplayPost() { TEST_CALL_REPORT( "ProMdlDisplayPostAction", "ProUserMdlDisplayPost", 0, 0 ); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlBackupPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlBackupPre( ProModel *r_from, ProMdldata *r_to) { char buff[124]; char path[PRO_PATH_SIZE]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProMdlBackupPreAction", "ProUserMdlBackupPre", 0, 0); strcpy (buff, ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); ProUtilModelToStr(r_from, buff+strlen(buff)); strcpy(path, " Path :%s"); ProWstringToString(path+strlen(path), r_to->path); strncpy(buff+strlen(buff), path, sizeof(buff)/sizeof(buff[0]) - 1 - strlen(buff)); buff[sizeof(buff)/sizeof(buff[0]) - 1] = '\0'; ProTestNotifyReport ("ProUserMdlBackupPre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserMdlBackupPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlBackupPost( ProModel *model, ProMdldata *r_to) { char buff[100]; char path[PRO_PATH_SIZE]; TEST_CALL_REPORT( "ProMdlBackupPostAction", "ProUserMdlBackupPost", 0, 0); ProUtilModelToStr(model, buff); strcpy(path, " Path :%s"); ProWstringToString(path+strlen(path), r_to->path); strncpy(buff+strlen(buff), path, sizeof(buff)/sizeof(buff[0]) - 1 - strlen(buff)); buff[sizeof(buff)/sizeof(buff[0]) - 1] = '\0'; ProTestNotifyReport ("ProUserMdlBackupPost", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserSolidRegenPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserSolidRegenPre( ProSolid solid, ProFeature *p_feature) { ProCharName name; char type[10]; char buff[100]; TEST_CALL_REPORT( "ProSolidRegeneratePreAction", "ProUserSolidRegenPre", 0, 0 ); ProUtilModelnameGet((ProMdl*)&solid, name, type); sprintf(buff, "model=%s.%s Feat id=%d", name, type, p_feature->id); ProTestNotifyReport("ProUserSolidRegenPre",buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDeletePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserSolidRegenPost( ProSolid solid, ProFeature *p_feature, ProError status) { ProCharName name; char type[10]; char buff[100]; TEST_CALL_REPORT( "ProSolidRegeneratePostAction", "ProUserSolidRegenPost", 0, 0 ); ProUtilModelnameGet((ProMdl*)&solid, name, type); sprintf(buff, "model=%s.%s Feat id=%d Status=%", name, type, p_feature->id, status); ProTestNotifyReport("ProUserSolidRegenPost",""); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserDirectoryChangePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserDirectoryChangePost( ProPath new_path) { char buff[PRO_PATH_SIZE]; TEST_CALL_REPORT( "ProDirectoryChangePostAction", "ProUserDirectoryChangePost", 0, 0 ); ProWstringToString(buff, new_path); ProTestNotifyReport("ProUserDirectoryChangePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserWindowChangePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserWindowChangePost() { TEST_CALL_REPORT( "ProWindowChangePostAction", "ProUserWindowChangePost", 0, 0 ); ProTestNotifyReport("ProUserWindowChangePost",""); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatCreatePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatCreatePre( ProFeature *p_feature) { char buff[100]; TEST_CALL_REPORT( "ProFeatureCreatePreAction", "ProUserFeatCreatePre", 0, 0 ); sprintf(buff, "Feat Id=%d", p_feature->id); ProTestNotifyReport ("ProUserFeatCreatePre", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatCreatePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatCreatePost( ProFeature *new_feature) { char buff[100]; TEST_CALL_REPORT( "ProFeatureCreatePostAction", "ProUserFeatCreatePost", 0, 0 ); sprintf(buff, "Feat Id=%d", new_feature->id); ProTestNotifyReport("ProUserFeatCreatePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatCopyPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatCopyPost( ProFeature *from_feature, ProFeature *to_feature, ProFeatcopyType type) { char buff[100]; TEST_CALL_REPORT( "ProFeatureCopyPostAction", "ProUserFeatCopyPost", 0, 0 ); sprintf(buff, "from=%d, to=%d", from_feature->id, to_feature->id); ProTestNotifyReport("ProUserFeatCopyPost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatDeletePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatDeletePre( ProFeature *p_feature) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProFeatureDeletePreAction", "ProUserFeatDeletePre", 0, 0 ); sprintf(buff, "%s. Feat Id=%d", ret==PRO_TK_NO_ERROR?"Agree":"Cancel", p_feature->id); ProTestNotifyReport("ProUserFeatDeletePre",buff); return ret; } /*====================================================================*\ FUNCTION : ProUserFeatDeletePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatDeletePost( ProFeature *p_feature) { char buff[100]; TEST_CALL_REPORT( "ProFeatureDeletePostAction", "ProUserFeatDeletePost", 0, 0 ); sprintf(buff, "Feat Id=%d", p_feature->id); ProTestNotifyReport("ProUserFeatDeletePost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatSuppressPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatSuppressPre( ProFeature *p_feature) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProFeatureSuppressPreAction", "ProUserFeatSuppressPre", 0, 0 ); sprintf(buff, "%s. Feat Id=%d", ret==PRO_TK_NO_ERROR?"Agree":"Cancel", p_feature->id); ProTestNotifyReport("ProUserFeatSuppressPre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserFeatSuppressPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatSuppressPost( ProFeature *p_feature) { char buff[100]; TEST_CALL_REPORT( "ProFeatureSuppressPostAction", "ProUserFeatSuppressPost", 0, 0 ); sprintf(buff, "Feat Id=%d", p_feature->id); ProTestNotifyReport("ProUserFeatSuppressPost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatregenPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatRegenPre( ProFeature *p_feature) { char buff[1240]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProFeatureRegenPreAction", "ProUserFeatRegenPre", 0, 0 ); sprintf(buff, "%s. Feat Id=%d", ret==PRO_TK_NO_ERROR?"Agree":"Cancel", p_feature->id); ProTestNotifyReport("ProUserFeatRegenPre",buff); return ret; } /*====================================================================*\ FUNCTION : ProUserFeatRegenPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatRegenPost( ProFeature *p_feature) { char buff[100]; TEST_CALL_REPORT( "ProFeatureRegenPostAction", "ProUserFeatRegenPost", 0, 0 ); sprintf(buff, "Feat Id=%d", p_feature->id); ProTestNotifyReport("ProUserFeatRegenPost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatRegenFailure PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatRegenFailure( ProFeature *p_feature) { char buff[100]; TEST_CALL_REPORT( "ProFeatureRegenFailureAction", "ProUserFeatRegenFailure", 0, 0 ); sprintf(buff, "Feat Id=%d", p_feature->id); ProTestNotifyReport ("ProUserFeatRegenFailure", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatRedefinePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatRedefinePre( ProFeature *p_feature) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProFeatureRedefinePreAction", "ProUserFeatRedefinePre", 0, 0 ); sprintf(buff, "%s. Feat Id=%d", ret==PRO_TK_NO_ERROR?"Agree":"Cancel", p_feature->id); ProTestNotifyReport ("ProUserFeatRedefinePre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserParamCreatePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserParamCreatePre( ProModelitem *p_mdlitem, ProName w_name, ProParamvalue *p_pvalue) { char name[PRO_FILE_NAME_SIZE+24]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProParameterCreatePreAction", "ProUserParamCreatePre", 0, 0 ); strcpy (name, ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); ProWstringToString(name+strlen(name), w_name); ProTestNotifyReport("ProUserParamCreatePre", name); return ret; } /*====================================================================*\ FUNCTION : ProUserParamModifyPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserParamModifyPre( ProParameter *p_param, ProParamvalue *p_pvalue) { ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProParameterModifyPreAction", "ProUserParamModifyPre", 0, 0 ); ProTestNotifyReport("ProUserParamModifyPre", ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); return ret; } /*====================================================================*\ FUNCTION : ProUserParamDeletePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserParamDeletePre( ProParameter *p_param) { ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); TEST_CALL_REPORT( "ProParameterDeletePreAction", "ProUserParamDeletePre", 0, 0 ); ProTestNotifyReport("ProUserParamDeletePre", ret==PRO_TK_NO_ERROR?"Agree. ":"Cancel. "); return ret; } /*====================================================================*\ FUNCTION : ProUserNCSeqCLPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserNCSeqCLPost( ProMdldata *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProNcseqClPostAction", "ProUserNCSeqCLPost", 0, 0 ); ProUtilModelToStr((ProModel*)p_mdldata, buff); ProTestNotifyReport("ProUserNCSeqCLPost",buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDeletePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserOperCLPost( ProMdldata *p_mdldata) { char buff[100]; TEST_CALL_REPORT( "ProMfgoperClPostAction", "ProUserOperCLPost", 0, 0 ); ProUtilModelToStr((ProModel*)p_mdldata, buff); ProTestNotifyReport("ProUserOperCLPost", buff); return(PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserNClCommandExpand PURPOSE : Notification Func \*====================================================================*/ ProError ProUserNClCommandExpand( ProFeature *p_feature, wchar_t (*command)[512], int num_cmd_lines, ProClCmdData **r_output_arr, int *output_num) { char buff[100]; int i; TEST_CALL_REPORT( "ProClCommandExpandAction", "ProUserNClCommandExpand", 0, 0 ); sprintf(buff, "Feat Id=%d", p_feature->id); ProTestNotifyReport ("ProUserNClCommandExpand", buff); for (i = 0; i < num_cmd_lines; i++) { printf ("\t%s\n", command[i]); } *output_num = 0; return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlDeletePost PURPOSE : Notification Func \*====================================================================*/ ProBoolean ProUserNClGetLocation( ProFeature *p_feature, wchar_t (*command)[512], int num_cmd_lines, ProPoint3d location ) { char buff[100]; int i; TEST_CALL_REPORT( "ProClCommandGetLocAction", "ProUserNClGetLocation", 0, 0 ); sprintf(buff, "Feat Id=%d", p_feature->id); ProTestNotifyReport ("ProUserNClCommandExpand", buff); for (i = 0; i < num_cmd_lines; i++) { printf ("\t%s\n", command[i]); } return (PRO_B_FALSE); } /*====================================================================*\ FUNCTION : ProUserMdlDeletePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFileOpenOK ( ProMdlType mdl_type, int sub_type, ProName model_name) { char buff[100]; char name[PRO_NAME_SIZE]; TEST_CALL_REPORT( "ProFileOpenOKAction", "ProUserFileOpenOK", 0, 0 ); sprintf (buff, "mdl_type=%d, sub_type=%d, model=%s", mdl_type, sub_type, ProWstringToString (name, model_name)); ProTestNotifyReport ("ProUserFileOpenOK", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserSolidUnitConvertPre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserSolidUnitConvertPre( ProSolid solid, int convert_numbers ) { char buff[100]; TEST_CALL_REPORT( "ProSolidUnitConvertPreAction", "ProUserSolidUnitConvertPre", 0, 0 ); sprintf( buff, "%s", convert_numbers ? "quantities are converted" : "quantities are reinterpreted" ); ProTestNotifyReport( "ProUserSolidUnitConvertPre", buff ); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserSolidUnitConvertPost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserSolidUnitConvertPost( ProSolid solid, int convert_numbers ) { char buff[100]; TEST_CALL_REPORT( "ProSolidUnitConvertPostAction", "ProUserSolidUnitConvertPost", 0, 0 ); sprintf( buff, "%s", convert_numbers ? "quantities are converted" : "quantities are reinterpreted" ); ProTestNotifyReport( "ProUserSolidUnitConvertPost", buff ); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserWeldSympathGet PURPOSE : Notification Func \*====================================================================*/ ProError ProUserWeldSympathGet( ProDrawing drawing, ProMdl model, int feat_id, ProPath sym_def_file_path, ProPath ptk_sym_def_path) { char buff[100]; sprintf(buff,"Feat Id=%d", feat_id); TEST_CALL_REPORT( "ProDrawingWeldSympathGetAction", "ProUserWeldSympathGet", 0, 0 ); ProTestNotifyReport( "ProUserWeldSympathGet", buff ); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserWeldGroupsGet PURPOSE : Notification Func \*====================================================================*/ ProError ProUserWeldGroupsGet( ProDrawing drawing, ProMdl model, int feat_id, int sym_def_id, ProBoolean left_side, ProName* group_names, int n_groups, ProBoolean* include_groups ) { char buff[100]; sprintf(buff,"Feat Id=%d", feat_id); TEST_CALL_REPORT( "ProDrawingWeldGroupsGetAction", "ProUserWeldGroupsGet", 0, 0 ); ProTestNotifyReport( "ProUserWeldGroupsGet", buff ); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserDrawingWeldSymtexGet PURPOSE : Notification Func \*====================================================================*/ ProError ProUserDrawingWeldSymtexGet( ProDrawing drawing, ProMdl model, int feat_id, int sym_def_id, wchar_t sym_prompt_name[], int sym_prompt_nm_idx, ProParamvalue* p_text, ProParamvalue* p_ptk_text ) { char buff[100]; sprintf(buff,"Feat Id=%d", feat_id); TEST_CALL_REPORT( "ProDrawingWeldSymtextGetAction", "ProUserDrawingWeldSymtexGet", 0, 0 ); ProTestNotifyReport( "ProUserDrawingWeldSymtexGet", buff ); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserMdlCreateCancel PURPOSE : Notification Func \*====================================================================*/ ProError ProUserMdlCreateCancel () { TEST_CALL_REPORT( "ProMdlCreateCancelAction", "ProUserMdlCreateCancel", 0, 0 ); ProTestNotifyReport("ProUserMdlCreateCancel", ""); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserDimModifyValuePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserDimModifyValuePre (ProDimension *dimension) { char buff[124]; ProError ret = (user_notify_cancel==1)? (PRO_TK_NO_ERROR):(PRO_TK_GENERAL_ERROR); sprintf(buff,"%s. Dimension Id=%d", ret==PRO_TK_NO_ERROR?"Agree":"Cancel", dimension->id); TEST_CALL_REPORT( "ProDimModifyValuePreAction", "ProUserDimModifyValuePre", 0, 0 ); ProTestNotifyReport("ProUserDimModifyValuePre", buff); return ret; } /*====================================================================*\ FUNCTION : ProUserFeatureRedefinePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatureRedefinePost(ProFeature *p_feat) { char buff[100]; sprintf(buff,"Feat Id=%d", p_feat->id); TEST_CALL_REPORT( "ProFeatureRedefinePostAction", "ProUserFeatureRedefinePost", 0, 0 ); ProTestNotifyReport("ProUserFeatureRedefinePost", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatureReroutePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatureReroutePre(ProFeature *p_feat) { char buff[100]; sprintf(buff,"Feat Id=%d", p_feat->id); TEST_CALL_REPORT( "ProFeatureReroutePreAction", "ProUserFeatureReroutePre", 0, 0 ); ProTestNotifyReport("ProUserFeatureReroutePre", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatureReroutePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatureReroutePost(ProFeature *p_feat) { char buff[100]; sprintf(buff,"Feat Id=%d", p_feat->id); TEST_CALL_REPORT( "ProFeatureReroutePostAction", "ProUserFeatureReroutePost", 0, 0 ); ProTestNotifyReport("ProUserFeatureReroutePost", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatureReplacePre PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatureReplacePre(ProFeature *p_feat) { char buff[100]; sprintf(buff,"Feat Id=%d", p_feat->id); TEST_CALL_REPORT( "ProFeatureReplacePreAction", "ProUserFeatureReplacePre", 0, 0 ); ProTestNotifyReport("ProUserFeatureReplacePre", buff); return (PRO_TK_NO_ERROR); } /*====================================================================*\ FUNCTION : ProUserFeatureReplacePost PURPOSE : Notification Func \*====================================================================*/ ProError ProUserFeatureReplacePost(ProFeature *p_feat) { char buff[100]; sprintf(buff,"Feat Id=%d", p_feat->id); TEST_CALL_REPORT( "ProFeatureReplacePostAction", "ProUserFeatureReplacePost", 0, 0 ); ProTestNotifyReport("ProUserFeatureReplacePost", buff); return (PRO_TK_NO_ERROR); } static NotifyInfo NotifyStatus[] = { { PRO_MDL_SAVE_PRE, 0, "Save Pre", (ProFunction)ProUserMdlSavePre}, { PRO_MDL_SAVE_POST, 0, "Save Post", (ProFunction)ProUserMdlSavePost}, { PRO_MDL_SAVE_POST_ALL, 0, "Save Post All", (ProFunction)ProUserMdlSavePostAll}, { PRO_MDL_COPY_PRE, 0, "Copy Pre", (ProFunction)ProUserMdlCopyPre}, { PRO_MDL_COPY_POST, 0, "Copy Post", (ProFunction)ProUserMdlCopyPost}, { PRO_MDL_COPY_POST_ALL, 0, "Copy Post All", (ProFunction)ProUserMdlCopyPostAll}, { PRO_MDL_RENAME_PRE, 0, "Rename Pre", (ProFunction)ProUserMdlRenamePre}, { PRO_MDL_RENAME_POST, 0, "Rename Post", (ProFunction)ProUserMdlRenamePost}, { PRO_MDL_ERASE_PRE, 0, "Erase Pre", (ProFunction)ProUserMdlErasePre}, { PRO_MDL_ERASE_POST, 0, "Erase Post", (ProFunction)ProUserMdlErasePost}, { PRO_MDL_ERASE_POST_ALL, 0, "Erase Post All", (ProFunction)ProUserMdlErasePostAll}, { PRO_MDL_PURGE_PRE, 0, "Purge Pre", (ProFunction)ProUserMdlPurgePre}, { PRO_MDL_PURGE_POST, 0, "Purge Post", (ProFunction)ProUserMdlPurgePost}, { PRO_MDL_DELETE_PRE, 0, "Del Pre", (ProFunction)ProUserMdlDeletePre}, { PRO_MDL_DELETE_POST, 0, "Del Post", (ProFunction)ProUserMdlDeletePost}, { PRO_MDL_DELETE_POST_ALL, 0, "Del Post All", (ProFunction)ProUserMdlDeletePostAll}, { PRO_MDL_RETRIEVE_POST, 0, "Retr Post", (ProFunction)ProUserMdlRetrievePost}, { PRO_MDL_RETRIEVE_POST_ALL, 0, "Retr Post All", (ProFunction)ProUserMdlRetrievePostAll}, { PRO_MDL_DBMS_FAILURE, 0, "DBMS Failure", (ProFunction)ProUserMdlDbmsFailure}, { PRO_SOLID_REGEN_PRE, 0, "Regen Pre", (ProFunction)ProUserSolidRegenPre}, { PRO_SOLID_REGEN_POST, 0, "Regen Post", (ProFunction)ProUserSolidRegenPost}, { PRO_DIRECTORY_CHANGE_POST, 0, "Change Dir", (ProFunction)ProUserDirectoryChangePost}, { PRO_WINDOW_CHANGE_POST, 0, "Change Window", (ProFunction)ProUserWindowChangePost}, { PRO_MDL_DISPLAY_PRE, 0, "Repaint Pre", (ProFunction)ProUserMdlDisplayPre}, { PRO_MDL_DISPLAY_POST, 0, "Repaint Post", (ProFunction)ProUserMdlDisplayPost}, { PRO_NCSEQ_CL_POST, 0, "NCSEQ CL Post", (ProFunction)ProUserNCSeqCLPost}, { PRO_MFGOPER_CL_POST, 0, "OPER CL Post", (ProFunction)ProUserOperCLPost}, { PRO_FEATURE_CREATE_POST, 0, "Feat Create Post", (ProFunction)ProUserFeatCreatePost}, { PRO_FEATURE_COPY_POST, 0, "Feat Copy Post", (ProFunction)ProUserFeatCopyPost}, { PRO_FEATURE_DELETE_PRE, 0, "Feat Delete Pre", (ProFunction)ProUserFeatDeletePre}, { PRO_FEATURE_DELETE_POST, 0, "Feat Delete Post", (ProFunction)ProUserFeatDeletePost}, { PRO_FEATURE_SUPPRESS_PRE, 0, "Feat Supp Pre", (ProFunction)ProUserFeatSuppressPre}, { PRO_FEATURE_SUPPRESS_POST, 0, "Feat Supp Post", (ProFunction)ProUserFeatSuppressPost}, { PRO_FEATURE_REGEN_PRE, 0, "Feat Regen Pre", (ProFunction)ProUserFeatRegenPre}, { PRO_FEATURE_REGEN_POST, 0, "Feat Regen Post", (ProFunction)ProUserFeatRegenPost}, { PRO_PARAM_CREATE_PRE, 0, "Parm Create Pre", (ProFunction)ProUserParamCreatePre}, { PRO_PARAM_MODIFY_PRE, 0, "Parm Modify Pre", (ProFunction)ProUserParamModifyPre}, { PRO_PARAM_DELETE_PRE, 0, "Parm Delete Pre", (ProFunction)ProUserParamDeletePre}, { PRO_MDL_CREATE_POST, 0, "Create Post", (ProFunction)ProUserMdlCreatePost}, { PRO_FEATURE_REGEN_FAILURE, 0, "Feat Regen Fail", (ProFunction)ProUserFeatRegenFailure}, { PRO_NCL_COMMAND_EXPAND, 0, "NClCmd Expand", (ProFunction)ProUserNClCommandExpand}, { PRO_NCL_COMMAND_GET_LOC, 0, "NClCmd GetLoc", (ProFunction)ProUserNClGetLocation}, { PRO_FEATURE_CREATE_PRE, 0, "Feat Create Pre", (ProFunction)ProUserFeatCreatePre}, { PRO_FEATURE_REDEFINE_PRE, 0, "Feat Redef Pre", (ProFunction)ProUserFeatRedefinePre}, { PRO_FILE_OPEN_OK, 0, "File open", (ProFunction)ProUserFileOpenOK}, { PRO_MDL_CREATE_PRE, 0, "Create Pre", (ProFunction)ProUserMdlCreatePre}, { PRO_MDL_RETRIEVE_PRE, 0, "Retr Pre", (ProFunction)ProUserMdlRetrievePre}, { PRO_MDL_BACKUP_PRE, 0, "Backup Pre", (ProFunction)ProUserMdlBackupPre}, { PRO_MDL_BACKUP_POST, 0, "Backup Post", (ProFunction)ProUserMdlBackupPost}, { PRO_SOLID_UNIT_CONVERT_PRE, 0, "Unit Convert Pre", (ProFunction)ProUserSolidUnitConvertPre}, { PRO_SOLID_UNIT_CONVERT_POST, 0, "Unit Convert Post", (ProFunction)ProUserSolidUnitConvertPost}, { PRO_DRAWING_WELD_SYMPATH_GET, 0, "Weld Sympath Get", (ProFunction)ProUserWeldSympathGet}, { PRO_DRAWING_WELD_GROUPS_GET, 0, "Weld Groups Get", (ProFunction)ProUserWeldGroupsGet}, { PRO_DRAWING_WELD_SYMTEXT_GET, 0, "Weld Symtext Get", (ProFunction)ProUserDrawingWeldSymtexGet}, { PRO_MDL_CREATE_CANCEL, 0, "Create Cancel", (ProFunction)ProUserMdlCreateCancel}, { PRO_DIM_MODIFY_VALUE_PRE, 0, "Modify Value Pre", (ProFunction)ProUserDimModifyValuePre}, { PRO_FEATURE_REDEFINE_POST, 0, "Feat Redefine Post", (ProFunction)ProUserFeatureRedefinePost}, { PRO_FEATURE_REROUTE_PRE, 0, "Feat Reroute Pre", (ProFunction)ProUserFeatureReroutePre}, { PRO_FEATURE_REROUTE_POST, 0, "Feat Reroute Post", (ProFunction)ProUserFeatureReroutePost}, { PRO_FEATURE_REPLACE_PRE, 0, "Feat Replace Pre", (ProFunction)ProUserFeatureReplacePre}, { PRO_FEATURE_REPLACE_POST, 0, "Feat Replace Post", (ProFunction)ProUserFeatureReplacePost} }; #define MAX_NOTIFY_TYPES (sizeof(NotifyStatus)/sizeof(NotifyStatus[0])) /*====================================================================*\ FUNCTION : ProTestNotifyToggle() PURPOSE : Toggle the status of a specified notification \*====================================================================*/ int ProTestNotifyToggle( char *dummy, int type) { ProError status; int m; for(m=0; m