BRepTools::Read and unicode file path

Hello.
I have a path to BREP-file is stored in UNICODE string CString. How can I convert a UNICODE CString (MFC) in Standard_CString, then used in BRepTools::Read? If there is an easier way to use UNICODE-path, tell me please.

Heinz R.'s picture

Hello,

try it in this way:

CString filename = L".......";
BRepBuilder builder;
TopoDS_Shape shape;

//Before using the filename convert it into Standard_CString by:

Standard_CString FileName = (Standard_CString)(LPCTSTR) filename;

BRepTools::Read(shape,FileName,builder);

There is a fine examples in the samples:
Look for samples\mfc\05_ImportExport ( in the case of OCC 6.5.0)

Regards