Forum archiveIssue archiveOther usage issues

Archived discussion

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

Other usage issuesTue, 07/17/2007 - 17:303 replies

Browse this forum
QuestionAuthor

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.

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

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

02Author

Hi Bearloga
thanks for help but No result :(

03Commenter-2

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 " <