[vtkusers] GetCurrentTime

James C. Robinson j.robinson at kepler.ie
Tue Jun 18 07:07:44 EDT 2002

Dear All,

Thanks for the help in this matter. Probably others of you who didn't reply
realised that there is a simpler solution (one of two that I have
implemented). The first is to create a new .cpp file to separate the methods
that make a call to the offending Ctime::GetCurrentTime from the methods
that use VTK. This will not be possible, though, when the call is being made
in a VTK based class that makes the call. The solution there is to create a
global function that calls the CTime::GetCurrentTime method and passes back
the result:

#include "stdafx.h"

#include "global.h"
// This separate file is created to avoid a compile error associated with
VTK and
// GetCurrentTime.
CTime GetTime()
{   return CTime::GetCurrentTime() ;


Dr. James C. Robinson, BE,MEngSc,PhD,CEng,MIEI,
Kepler Engineering Software Ltd.,
42 Rivergrove,
Glanmire, Co. Cork,

Tel:         +353-21-4822028
Tel:         +353-87-2393010
Fax:        +353-21-4822721
E-mail:     j.robinson at kepler.ie

More information about the vtkusers mailing list