Hi Everyone,
I am new to the ProToolkit Development. I have written some code and created executables. I am trying to execute the exe file on the command prompt, but at the call of ProToolkitMain(), it's giving error.
Insufficient arguments; need 2 arguments 1) own RPC program #. 2) root directory path for Pro/DEVELOP text files.
Can anyone please tellme how to get pass this error or what arguments we need to pass in order to make this executable run.
My code is as follows:
#include <ProToolkit.h>
#include <ProCore.h>
#include <ProWorkspace.h>
#include <ProObjects.h>
#include <ProMdl.h>
#include <ProUtil.h>
int main(int argc,char **argv)
{
printf("\n In main function...\n");
printf("\n Setting up connection to ProE...\n");
//err = ProEngineerConnect("",NULL,NULL,"",PRO_B_TRUE, 100, &random, &proe_handle);
ProToolkitMain(argc,argv);
printf("\n Connection to ProE established successfully...\n");
return(0);
}
int user_initialize()
{
ProError status;
ProName curr_wrkspace;
ProCharName curr_wrkSp_name;
char buff[256];
status = ProCurrentWorkspaceGet(curr_wrkspace);
if(status != PRO_TK_NO_ERROR)
{
memset(buff,'\0',256);
strcpy(buff,"In workspace");
ProWstringToString(curr_wrkSp_name,curr_wrkspace);
strcat(buff,curr_wrkSp_name);
}
printf("\n Current workspace name:<%s>\n",buff);
return (0);
}
Thanks & Regards,
Rocky
I am new to the ProToolkit Development. I have written some code and created executables. I am trying to execute the exe file on the command prompt, but at the call of ProToolkitMain(), it's giving error.
Insufficient arguments; need 2 arguments 1) own RPC program #. 2) root directory path for Pro/DEVELOP text files.
Can anyone please tellme how to get pass this error or what arguments we need to pass in order to make this executable run.
My code is as follows:
#include <ProToolkit.h>
#include <ProCore.h>
#include <ProWorkspace.h>
#include <ProObjects.h>
#include <ProMdl.h>
#include <ProUtil.h>
int main(int argc,char **argv)
{
printf("\n In main function...\n");
printf("\n Setting up connection to ProE...\n");
//err = ProEngineerConnect("",NULL,NULL,"",PRO_B_TRUE, 100, &random, &proe_handle);
ProToolkitMain(argc,argv);
printf("\n Connection to ProE established successfully...\n");
return(0);
}
int user_initialize()
{
ProError status;
ProName curr_wrkspace;
ProCharName curr_wrkSp_name;
char buff[256];
status = ProCurrentWorkspaceGet(curr_wrkspace);
if(status != PRO_TK_NO_ERROR)
{
memset(buff,'\0',256);
strcpy(buff,"In workspace");
ProWstringToString(curr_wrkSp_name,curr_wrkspace);
strcat(buff,curr_wrkSp_name);
}
printf("\n Current workspace name:<%s>\n",buff);
return (0);
}
Thanks & Regards,
Rocky