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.