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.

Register Log in

Sketcher window crashes

Sanjay Meher

New member
Hi toolkit developers


I was trying to provide a sketcher windowinteractively using the following
code in the function which is called when I click a custum added menuButton named Sketcher

int SketcherClick()
{
ProSection section;
ProName wname;
int windowid;
ProError status;

status = ProSection2DAlloc (&section);
printf("\n ProSection2DAlloc status %d",status);

ProStringToWstring (wname, "demo");

status = ProSectionNameSet (section, wname);
printf("\n ProSectionNameSet status %d",status);

status = ProObjectwindowCreate(wname,PRO_2DSECTION,&windowid);
printf("\n ProObjectwindowCreate status %d",status);

status = ProWindowActivate(windowid);
printf("\n ProWindowActivate status %d",status);

return 1;
}


Everthing works fine here. Even a new Sketch in a new window is
opened. However when one tries to draw just one line - proe craches
regardless of the exe or dll mode.
However if one draws a rectangle or circle it works perfectly well. But as son as one draws a single line and click middle button to say that no more line required, proe crashes.

When proe craches the error returned is -11 i.e.PRO_TK_COMM_ERROR

I can't understand what the problem is and how to resolve it.

Does anyone know the reason for it


Thanks
 

Sponsor

Top