cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

my Pro/toolkit application makes ProE freeze and crash

Emilie
1-Newbie

my Pro/toolkit application makes ProE freeze and crash

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
2 REPLIES 2
akapoor
1-Newbie
(To: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

Emilie
1-Newbie
(To:akapoor)

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!!

Top Tags