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.

search hidden item

zwj23232

New member
i hide some features in the feature tree, now i want to find the hidden feature in the model by api tookit,my program is as follow: it works well in wildfire2.0,but when i use it on wildfire3.0 , the wf3.0 crashed. i use vc++6.0 to compile and link. If anybody get any idea ,please tell me,thanks


ProMdlLayerNamesGetR19(mdl, &layer_names, &num_layer);
if ( num_layer > 0 )
{
for (int i1=0; i1<num_layer; i1++)
{
CString featype;
ProCharLine& nbsp; string;
ProWstringToString(string, layer_names[i1]);
featype.Format("%s",string);


if ( featype==".BLACK_HOLE" )
{
ProLayer layer;
ProMdlLayerGet(mdl, layer_names[i1], &layer);
ProLayerItem *layer_items;
ProLayerItemsGet(&layer, &layer_items, &n_item);
............
 
Hello,


It has to work in WF3.0 as well with out crash.Let check by create a file with in the code and print the each error return by the finction so that you can able to find which API cuase the error.Let post what makes the application crash in WF3.0.


Let check the Technical Changes in WF3.0 repsective APIs.


With regards,


Kishore V
 
i have located the error as follow: the function which occurs error is the ProMdlLayerGet,the message box display"-2",that means "bad input".but i dont know which input is bad,
and the function works well in wf2.0.


AfxMessageBox("1");
status = ProMdlLayerGet(mdl, layer_names[i1], &layer);
if(status!=PRO_TK_NO_ERROR)//||(FeatType==PRO_FEAT_DATUM_SUR F)||(FeatType==PRO_FEAT_DATUM_QUILT))
{
CString mes;
mes.Format(_T("%d"),status);//
AfxMessageBox(mes, MB_OK);
}
AfxMessageBox("2");
 
Hello,


I guess your second argument will be the wrong.Can i know how do you pass the array of the Layer names are you passing.Let us try to pass with a hard code value into it and try.Eg: let say the layer name in your model is SAMPLE_LAYER pass the arguement as L"SAMPLE_LAYERT" as a second argument and try and let me know still you got the same error.



With regards,


Kishore V
 
thank you for your advice. i had done this several days ago.the code is as follow


ProName&nbsp ; temp_names;


ProStringToWstring(temp_names, ".BLACK_HOLE");
status = ProMdlLayerGet(mdl,temp_names , &layer);///


the result is same ,proe crashed.
 
i think that the ptc maybe set the "black_hole" layer to be unaccesible for the api user from wf3.0. i want to ask this question to ptc technical support,but i dont know how to communicate with them, any body help me?
 
Hello,


You need to have PTC account i.e User ID and Password created in www.ptc.com.


From this you can able to contact PTC Tech Support.Contact your CAD Administrator for more details he can provide user id and password for you.


kishore V
 

Sponsor

Back
Top