Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

How to run the trail file by toolkit?

ecfm

New member
Hi,


This is Kevin, I got a issue while loaded a toolkit application in Pro/Engineer Wildfire2.0, it can't be loaded correctly. The C++ code is belowing:


****************************************Start*************** ***************


#include <ProToolkit.h>
#include <ProMdl.h>
#include <ProSolid.h>
#include <ProObjects.h>
#include <ProUtil.h>
#include <ProWstring.h>
#include <ProMenu.h>
#include <afx.h>


int user_initialize(int argc, char *argv[])
{
CString path = "D:\\test\\OpenModel\\ttrail.txt";
CString trailStr = "~ Activate `main_dlg_cur` `Utilities.psh_util_trail_train`;~ Update `file_open` `Inputname`;" + path +";~ Activate `file_open` `Open`";


ProMacro macro;
ProStringToWstring(macro,(LPSTR)trailStr.GetBuffer(0));
ProMacroLoad(macro);
ProMacroExecute();
return (0);


return (0);
}

void user_terminate()
{
printf("Pro/Toolkit application terminated successfully\n");
return ;
}


****************************************End***************** **************


Itcan be run in VC++ and generate "Trial.exe" filesuccessfully, while loaded by Pro/E, Itdidn't work.


Anyone who can help me to check this, Thanks very much!
 

Sponsor

Back
Top