SilverScreen Solid Modeler

undo_log_open

undo_log_open

Previous topic Next topic  

undo_log_open

Previous topic Next topic JavaScript is required for the print function  

 

SilverScreenAPI

 

BOOLEAN undo_log_open ( char *log_path )

 

char *log_path;   // A pointer to a null-terminated character string

 

 

 




Synopsis

#include "silver.h"

 

The undo_log_open function opens a log file for use by undo_log.

 

 

Parameters

log_path is a pointer to a string that specifies the full path of the log file.

 

 

Return Value

undo_log_open returns TRUE if the file is successfully opened, and FALSE otherwise.

 

 

Remarks

You cannot open a second log file until the first log file has been closed. If you call undo_log_open without closing an open log file a new file will not be opened and the first file will become active.

 

The routines in the undo system will add comments to an open undo log. This can be a great aid when composing commands for the undo or redo mechanism.

 

 

See Also

Undo System Usage, undo_log, undo_log_close

 

 

Example

The following example opens an undo log file, writes text to it, executes an interactive command and closes the log file.

 

C / C++ Code

 

 #include "silver.h

 

 

 if ( undo_log_open("undo.log") )

    {

    undo_log("Undo log test\n");

    undo_log("A man has %d arms and %d limbs\n", 2, 4);

 

    ss_command("icommand draw circle");

 

    undo_log_close();

    }