Hello all,
I want to create a External analysis feature which will store some paramter values during result action , but application is crashing in one point of time . my result action call back function is like this
ProError UUsrCurveResultAction(ProAnalysis analysis,
ProBoolean names_only,
ProAnalysisParameter **parameter,
ProAnalysisGeomitem **geometry)
{
ProParamvalue *values,value;
curve_data_t *data;
int selArray_size;
ProBoolean anlattrset=PRO_B_FALSE;
int paramSize;
ProError status;
ProAnalysisParameter An_param;
fprintf(fp,"UUsrCurveResultAction \n");
fflush(fp);
/*---------------------------------------------------------- ----------*\
Get the application data from the analysis
\*---------------------------------------------------------- ----------*/
if(ProAnalysisInfoGet(analysis, (ProAppData*)&data) !=PRO_TK_NO_ERROR)
return(PRO_TK_GENERAL_ERROR);
ProStringToWstring(An_param.name,"Tk1");
An_param.create =PRO_B_TRUE;
ProStringToWstring(An_param.description,"Analysis Param is working");
if(names_only!=PRO_B_TRUE)
{
An_param.values = (ProParamvalue*) calloc(1, sizeof(ProParamvalue*));
An_param.values[0].type = PRO_PARAM_DOUBLE;
An_param.values[0].value.d_val=20.0;
}
ProArrayAlloc (0, sizeof (ProAnalysisParameter), 1, (ProArray*)parameter);
ProArrayObjectAdd((ProArray*)parameter, -1, 1,& An_param);
return(PRO_TK_NO_ERROR);
}
See the attached code also .
2008-10-04_012644_ext_analysis.zip
please give me some idea in this matter .
Edited by: ajoy
I want to create a External analysis feature which will store some paramter values during result action , but application is crashing in one point of time . my result action call back function is like this
ProError UUsrCurveResultAction(ProAnalysis analysis,
ProBoolean names_only,
ProAnalysisParameter **parameter,
ProAnalysisGeomitem **geometry)
{
ProParamvalue *values,value;
curve_data_t *data;
int selArray_size;
ProBoolean anlattrset=PRO_B_FALSE;
int paramSize;
ProError status;
ProAnalysisParameter An_param;
fprintf(fp,"UUsrCurveResultAction \n");
fflush(fp);
/*---------------------------------------------------------- ----------*\
Get the application data from the analysis
\*---------------------------------------------------------- ----------*/
if(ProAnalysisInfoGet(analysis, (ProAppData*)&data) !=PRO_TK_NO_ERROR)
return(PRO_TK_GENERAL_ERROR);
ProStringToWstring(An_param.name,"Tk1");
An_param.create =PRO_B_TRUE;
ProStringToWstring(An_param.description,"Analysis Param is working");
if(names_only!=PRO_B_TRUE)
{
An_param.values = (ProParamvalue*) calloc(1, sizeof(ProParamvalue*));
An_param.values[0].type = PRO_PARAM_DOUBLE;
An_param.values[0].value.d_val=20.0;
}
ProArrayAlloc (0, sizeof (ProAnalysisParameter), 1, (ProArray*)parameter);
ProArrayObjectAdd((ProArray*)parameter, -1, 1,& An_param);
return(PRO_TK_NO_ERROR);
}
See the attached code also .
2008-10-04_012644_ext_analysis.zip
please give me some idea in this matter .
Edited by: ajoy