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.

Sketch of Feature (Pro/E 2001)

Sanjay Meher

New member
Hi guys


Has anyone tried to retrieved the sketch of any feature using the function
ProError ProFeatureSectionCopy(ProFeature *feat_handle,int section_number, ProSection *p_section)


I am trying to use this function to get the sketch of any feature but I think I am not getting the sketch.


If anyone has used it successfully please help me to find my error


I have used the following code to check whether the sketch retrieved is correct or not



ProStringToWstring (wname, "demo");


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


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


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


However I dont get any sketch.

Your Help is really needed


Thanks
Sanjay
 
You don't even use the function in your code. How do you expect to get the sketch?


smiley5.gif
-Hora
 
Actually the entire function is as under


int FeatureSketchViewer(ProFeature feature)
{
ProError status;
ProSection section;
wchar_t wname;
int windowid;

status = ProFeatureSectionCopy(&feature,0, &section);
printf("\n
ProFeatureSectionCopy status %d",status);

ProStringToWstring (wname, "demo");


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



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



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

return 1;
}
 
As far as I know, section and sketch are same and there is no ProSketch in Pro/Toolkit.


If according to you this function gives section then please help us to know how to retrieve the sketch of a feature. Is there any other function.


Also have you successfully able to retrieve the sketch of any feature. If yes then can you share the peice of code with us.


bye
Sanjay Meher
 
Section and sketch can't be the same thing! Take a cylinder for example. What will bethe sketh for your feature? A circle you will extrude or a rectangle you will revolve?


I didn't use this function before and I didn't try to recover the feature's sketch so I cannot help you here. But plan to use the ProFeatureSectionCopy function later.


-Hora
 

Sponsor

Articles From 3DCAD World

Back
Top