Problems with STEP Export in Import/Export Examole

Hi ! I am a beginner in OPENCASCADE.

I tried to recompile the IMPORT/Export Sample

Sande's picture

and when i try to export a shape into a STEP file the programm crash with the folowing error message.
Debug Assertion Failed Program: ...amples\standard\mfc\08_ImportExport\..\Debug\ImportExport.exe File f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\dlgdata.cpp Line 656
Can anyone help me fix this problem ?

Thanks in regards

sergey zaritchny's picture

Hi Alexander,
Save,please the shape to be exported in format
and attach to the post.
Regards
Sergey

Sande's picture

I try to export a cyclinder

Attachments: 
Sande's picture

I figured out that the problem with the export to STEP File is the save dialog. So the error occurs in Prepare Ctrl and a Not Supported Exception is thrown.
Before the m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl) nIDC is 3002 and &hWndCtrl 0x00000bba and after it nIDC 0 and &hWndCtrl 0x00000000

This Problem and this procedure is only called when i try to save a STEP File. IGES and the other Files in the ImportExport Example work. So why does the save Dialog of STEP differs from IGES ?

Any mfc crack out there who can tell me where i have to search next ?

// dlgdata.cpp Prepare Ctrl
HWND CDataExchange::PrepareCtrl(int nIDC)
{
ASSERT(nIDC != 0);
ASSERT(nIDC != -1); // not allowed
HWND hWndCtrl;
COleControlSite* pSite = NULL;
m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl); // <-Result &hWndCtrl == NULL
if (hWndCtrl == NULL)
{
// Could be a windowless OCX
pSite = m_pDlgWnd->GetOleControlSite(nIDC);
if (pSite == NULL)
{
TRACE(traceAppMsg, 0, "Error: no data exchange control with ID 0x%04X.\n", nIDC);
ASSERT(FALSE);
AfxThrowNotSupportedException();
}
}

sergey zaritchny's picture

Hi Alexander,
I have checked Import/Export of the attached file with sample.
It works properly without any exceptions.
See result of export in the attached file.
So, it seems that probably sample application is not well linked in Debug mode.
Check it, please with Dependency Walker.
Regards
Sergey

Attachments: 
Sande's picture

Hi Sergey,
I checked the release version with Dependency Walker

Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

IESHIMS.dll could not be found
IEFRAME.dll unresolved import due to a missing export function in a delay-load dependent module

What are these 2 libs and where can i get IESHIMS ?

Opencascade 6.3.0
Visual Studio 2010
Windows Vista SP2

Could it be possible that i have to use other version of visual studio?

The File Size of the Dependency Walk is too big to attach

sergey zaritchny's picture

Hi Alexander,
As you understand IESHIMS.dll has no connection with Open CASCADE.
It should be in your "Program Files\Internet Explorer" folder if I am not mistaken.
For more information you may check it in internet with key "IESHIMS.dll".

As I see you are using Opencascade 6.3.0 in "Windows Vista SP2 & Visual Studio 2010" environment.
If you will overlook more carefully OCCT Release Notes you will find that 6.3.0 version was checked for compilability with MS VC++ 6.0, VC++ 7.1 and VC++ 8.0 and certified for VC++ 7.1 only.
So, probably you will need to rebuild OCCT libs using VS 2010.
Regards
Sergey