
Tue, 03/18/2008 - 19:30
Forums:
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
Tue, 03/18/2008 - 19:35
You need to initialize the Doc variable:
Handle(TDocStd_Document) Doc;
XCAFApp_Application::GetApplication()->NewDocument("MDTV-XCAF", Doc);
Reader.Transfer(Doc);
Tue, 03/18/2008 - 19:45
I can read the file now. Thanks a lot