IGES to XDE

Hi,

I try to obtain the colors from a IGES file. First I read the IGES file using IGESCAFControl_Reader,
but there is a error of debugging when I try to transfer le Doc(type of Handle(TDocStd_Document)).I use Visual Studio 2005

code
=====================================
IGESCAFControl_Reader Reader;
Reader.ReadFile("bearing.iges");

Handle(TDocStd_Document) Doc;
Reader.Transfer(Doc);

=====================================

Does somebody have an idea to help me?

Thank you in advance

Regards
Yilin

Rob Bachrach's picture

You need to initialize the Doc variable:

Handle(TDocStd_Document) Doc;
XCAFApp_Application::GetApplication()->NewDocument("MDTV-XCAF", Doc);
Reader.Transfer(Doc);

LIU's picture

I can read the file now. Thanks a lot