cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue about ProMdlDataGet() when connected to WindChill

vinaym
1-Newbie

Issue about ProMdlDataGet() when connected to WindChill

I have an issue where ProMdlDataGet() is returning wrong data when
connected to WindChill server and returning correct data when
disconnected from server in the same session.



When connected to WindChill, path of model returned is current
directory.

When disconnected from WindChill, path of model returned is correct.



Please let me know if someone knows the reason for the same.



Code snippet:



ProError err;

ProMdl model;



// Get the current model

int win_Id;

err = ProWindowCurrentGet(&win_Id);

if(err != PRO_TK_NO_ERROR)

return NULL;



err = ProWindowMdlGet(win_Id,&model);

if(err != PRO_TK_NO_ERROR)

return NULL;





ProPath modelNameToCopy = L";



char device[PRO_NAME_SIZE] = ";

char path[PRO_PATH_SIZE] = ";

char name[PRO_NAME_SIZE] = ";

char instanceName[PRO_NAME_SIZE] = ";

char type[PRO_TYPE_SIZE] = ";

ProName wInstanceName = L";



ProMdldata new_mdlData;



err = ProMdlDataGet(model, &new_mdlData);

if(err != PRO_TK_NO_ERROR)

return NULL;



//Convert from wchar_t to char for creating full path

ProWstringToString(device, new_mdlData.device);

ProWstringToString(path, new_mdlData.path);

ProWstringToString(name, new_mdlData.name);

ProWstringToString(type, new_mdlData.type);





Regards,



Vinay




This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1
vinaym
1-Newbie
(To:vinaym)

Thanks Himanshu,



API ProMdlOriginGet returns correct value.

It is hidden API in WildFire 3.0 but will be available in Wildfire 4.0



Regards,



Vinay
Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration