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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Translate the entire conversation x

ProInputFileRead crashes creo

SN_10773997
4-Participant

ProInputFileRead crashes creo

I am trying to do a cable parameters export and then import the file back. Even though I try to import the exact same file back, the ProInputFileRead-call crashes Creo without error code. The whole of Creo just dies with a fatal error popup. 

 

I have tried to import the same file manually in the Cable Parameters window using and that works fine.

 

ProError fileExportStatus = ProOutputFileMdlnameWrite(mdl, L"cable.cbl", PRO_CABLE_PARAMS_FILE, globalHarness, (ProAppData)wideString_c, NULL, NULL);


ProError fileImportStatus = ProInputFileRead(mdl, L"cable.cbl", PRO_CABLE_PARAMS_FILE, globalHarness, (ProAppData)wideString_c, NULL, NULL);
3 REPLIES 3
RPN
17-Peridot
17-Peridot
(To:SN_10773997)

extern ProError ProInputFileRead ( ProMdl model,
ProPath filename,
ProImportExportFile file_type,
ProAppData arg1,
ProAppData arg2,
ProAppData arg3,
ProAppData arg4 );
/


If <i>file_type</i> is PRO_CABLE_PARAMS_FILE, <i>arg1</i> is
the <i>ProSolid</i> (part pointer).

If <i>file_type</i> is PRO_CABLE_PARAMS_FILE, <i>arg2</i> is
a <i>wchar_t*</i> to the cable name.

It is odd not to see how you declare your input. 

globalHarness, (ProAppData)wideString_c


Do you check the status?

PRO_NAME size? Or init [0] with ‚\0‘

&globalHarness

Same Name valid?

 

SN_10773997
4-Participant
(To:RPN)

It seems to me that ProOutputFileMdlWrite and ProInputFileRead has the exact same arguments. Since the Write-call succeeds with status PRO_TK_NO_ERROR, I figured that my harness pointer and cable name wide string is ok.

 

For the ProInputFileRead, I get no response since Creo terminates with fatal error and everything just stops. 

 

/Sebastian

RPN
17-Peridot
17-Peridot
(To:SN_10773997)

Did you check if PTC expect a Byte Order Mark. 

Announcements

Top Tags