help with OCAF commands.

I'm reading the OCAF documentation and I would like to understand how create new command for my OCAF enhanced application.
Which are the basic step to set up a simple command?

Svetlozar Kostadinov's picture

Before beginning of the command, call TDocStd_Document::NewCommand() and after it is finished call TDocStd_Document::CommitCommand() (Or AbortCommand()). All the changes you do to the attributes and labels can be undone easily only with one call to TDocStd_Document::Undo(), because OCC manages all data-changes internally by its Delta-mechanism. What exactly your command should do?