Non-verbose loading of IGES files

Hi Cascaders,

I was wondering how to make the loading of IGES file non-verbose. When I load any IGES file, what follows is automatically printed to the standard output :

Diagnostics for IGES file read : CAD_test1.igs
Trace level : 0

Total number of loaded entities 63.
Number of fails in memory loading : 0.
Number of warnings in memory loading : 0.
End of loading IGES file to memory (Elapsed time : 0.02s).

Beginning of IGES data translation.
read.precision.mode : 0
read.iges.bspline.continuity : 1
read.surfacecurve.mode : 0

Info: ShapeProcess_Context: Reload Resource_Manager: -> IGES
End of IGES data translation (Elapsed time : 0.03s).

I tried to configure the IGES reader(IGESControl_Reader class) I am using by doing :
IGESControl_Reader reader;

reader.PrintCheckLoad (true, IFSelect_GeneralInfo);
reader.PrintCheckTransfer (true, IFSelect_GeneralInfo);
reader.PrintTransferInfo (IFSelect_FailOnly, IFSelect_GeneralInfo);
reader.PrintStatsTransfer (5, 0);

But it makes the loading crashed.

Any ideas?

Globos's picture

Ok, I've found a way to solve this.
Before you perform loading or writing of IGES, STEP, etc. you should call, for example :

MoniMessage_TraceFile::SetDefault (0, "model-loading.log", false);

First parameter is the trace level of output : '0' is "no messages".
Second parameter is name of a file where to output the trace info.
Last parameter is to indicate whether to append or not trace info to file specified.

You have also to include and link with $(CASROOT)/win32/lib/TKShHealing.lib.

Even if you set trace level to 0, there is some messages ouput, so redirecting them to a file is the only way I found to have my standard output clean.