app->SaveAs(doc, "exemple.caf") : No file resulting

Hi all

I am new to OCC. I am using OCC 6.2 on WinXP.

I have a problem with saving ocaf files. Every thing go sweet but no file was crated.

Can some one help me.

Bearloga's picture

Try adding path prefix to your file name, like "./exemple.caf". It should work.

med's picture

Hi Bearloga
thanks for help but No result :(

Denis Teissandier's picture

some suggestions :

add the two following parameters in you "env.bat" file :
set CSF_ResourceVerbose
set CSF_ResourceDebug

It can help you to find the problem in your "message log".
The most popular problems are:
a wrong path for you file
a denied access to the specified directory

Here an example. It runs on my computer :
Standard_Integer SaveAs (Draw_Interpretor& di, Standard_Integer argc, char** argv)
TCollection_ExtendedString NomFichierTolerancement;

TCollection_ExtendedString Tfichier(argv[1]);

Handle(TDocStd_Application) Dessin= MecanismeIppopXDE::GetMecanismeIppopXDEApplication();
Handle(TDocStd_Document) DocShapeTolerancement= MecanismeIppopXDE::GetTDocStdDocumentTolerancement();

NomFichierTolerancement= TPath;

NomFichierTolerancement= NomFichierTolerancement+Tfichier;

NomFichierTolerancement= NomFichierTolerancement+TextTolerancement;

cout<<"NomFichierTolerancement : "<SaveAs(DocShapeTolerancement, NomFichierTolerancement);
if (theStatus != CDF_SS_OK )
switch ( theStatus ) {
case CDF_SS_DriverFailure: {
cout << " could not store , no driver found to make it " <