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.

Round on edge

An easier way might be to do the following.


1. Visit the features of the model filtering out all features except PRO_FEAT_ROUND. Call ProSolidFeatureVisit to do this.


2. Now that you are on the action function of a round, you also have a ProFeature handle to the round. Call ProFeaturegeomitemVisit to visit all geom items of type PRO_EDGE. I would guess there would be many edges in a single round feature. This will visit all of them.


3. Process your edges as you see fit in the action function.


This approach is much easier than traversing the feature definition with ProElement* functions or writing XPath queries into an XML file.
 
Hi David andthank you forthe counsel.


You are right, ProFeaturegeomitemVisit can not get reference edge of round feaure.


Can you give me some code example for the algorithm you've written before?


I tried to do as your instructions but I guess there is something I've been missing.


Thanks again,


Naor.
 
HiNaori,if youknow thename of round feature, you can do it.


ProMdl pmdl;
ProFeature round_feat;
ProElement feat_elemtree;
CString xml_path = "C:\\Temp\\round_feat.xml";


status = ProMdlCurrentGet(&pmdl);
if (status != PRO_TK_NO_ERROR)
return;


status = ProModelitemByNameInit(pmdl,PRO_FEATURE,L"round_feat_name",& amp;round_feat);
if (status != PRO_TK_NO_ERROR)
return;


status = ProFeatureElemtreeCreate (&round_feat, &feat_elemtree);
if (status != PRO_TK_NO_ERROR)
return;


status = ProElemtreeWrite (elemtree, PRO_ELEMTREE_XML,(LPTSTR)(LPCTSTR)xml_path);//create xml
if (status != PRO_TK_NO_ERROR)
return;


status = ProElementFree (&elemtree);


//get edge id from xml by c++
 
Hi David,


This was exactly the problem I've been facing to: getting edge id from xml by PRO EAPI, I succeeded to save the element tree (without the feature name).


I tried the function ProElementChildrenGet but it's not working.


Can you please help me on this?


Thanks,


Naor.
 
HiNaori,


Do you have successfully created a xml?Nopro/eapi can get edgeid from xml.


You can use c++.Here is sample code
 
Hi David,

Do you know how can I read a tolerance using pro/e API?
(such as hole dimension tolerance).

Thanks for your help,
Naor.
 

Sponsor

Articles From 3DCAD World

Back
Top