Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hello,
I'm trying to use a very simple 64bits Pro/toolkit application as synchronous mode (multiprocess to be precise) and connect to ProE (5.0, 64bits).
Everything compile fine on Visual 2008 Express.
I created a protk.dat.
I launch ProE and do Tools/Auxiliary Applications and I Register my protk.dat.
When I start it, it freezes and then crashes.
Do you have an idea? Did I forget anything?
I'm wondering whether my protk.dat is good, here it is :
name ProETest
startup spawn
exec_file C:\ProETest\ProETest\x64\Debug\ProETest.exe
text_dir C:\ProETest\text
allow_stop TRUE
REVISION 18
end
My project is very simple, here is what I have in my main.cpp :
#include "ProToolkit.h"
#include "ProCore.h"
extern "C" int user_initialize()
{
ProError err;
err = ProEngineerStatusGet();
if(err != PRO_TK_NO_ERROR)
{
printf("error %i.\n",err);
}
else
{
printf("no error.\n");
}
return(0);
}
extern "C" void user_terminate()
{
}
Thank you for your help!!
Emilie
Hi,
Please change your code like below and see the results:
#include "ProToolkit.h"
#include "ProCore.h"
extern "C" int user_initialize()
{
ProError status;
ProMdl mdlCurr;
status = ProMdlCurrentGet(&mdlCurr);
if (status != PRO_TK_NO_ERROR)
{
printf("Got current Mdl %d\n",status);
return (0);
}
printf("I am in Pro-engineer\n");
return(0);
}
extern "C" void user_terminate()
{
}
Let me know if it works.
Make sure some model is open when u r running the above.
Regards
Anika
I didn't load any model previously! It works fine now!
You used ProMdlCurrentGet(), is it just for the test or is it something important at the begining?
thank you a lot!!