- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Problem for a simple project?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-25-2011 10:11 AM
Hello,
I am new to Interop and trying to convert CAD file from other formats to IGES format. My simple project is like below. According to http://doc.spatial.com/index.php/InterOp:Connect , I should be able to convert CAD from file to file. But my project always fails. So my questions are
1. Is there any problem with my code? If I change the dst file to a.sat, it will be running OK.
2. At the end of debug run, there is memory leak. Is this an issue?
Thanks a lot. Attached is the file a.stp.
int main()
{
api_start_modeller(0);
unlock_license();
SPAIConverter converter;
SPAIDocument src( "D:\\projects\\part\\sample_cad_files\\a.stp" );
SPAIDocument dst( "D:\\projects\\part\\sample_cad_files\\a.igs" );
SPAIFile logFile1( "D:\\projects\\part\\sample_cad_files\\a.txt" );
converter.StartLog( logFile1 );
converter.Convert( src, dst );
converter.StopLog( logFile1 );
api_stop_modeller();
return 0;
}
Re: Problem for a simple project?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-25-2011 10:14 AM
Hello amcom.
Direct STEP->IGS translation is not possible. You will have to add an intermediate step i.e. first translate STEP->SAT and then SAT->IGS to achieve the desired result.
Regards,
Yogesh
Re: Problem for a simple project?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-25-2011 11:07 AM
Thanks for the reply.
Now I run the project two times. First time, I converted stp to sat with no problem (other than some memory leak). Second time, I converted the sat to igs. I got a message box on the screen, saying "This application has requested the runtime to terminate it in an unusual way. Please contact the application's support term for more information."
I then clicked "Ignore" and got a lot of memory leaks. The dumping takes about 1~2 minutes to be finished. However, the igs file was still generated.
Could anybody help for this? I really appreciate.
BTW, I am using Visual Studio 2005.
Re: Problem for a simple project?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-25-2011 11:17 AM
Hello amcom,
1) Please note Spatial supports VS 2005 SP1 - http://doc.spatial.com/index.php/Compiler_Flags_an
2) What is the behavior with the samples provided in the InterOp products (http://doc.spatial.com/index.php/InterOp:Connect/U
Regards,
Yogesh
Re: Problem for a simple project?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-25-2011 02:30 PM
Yogesh, thank you for the help.
I was struggling with the VS 2005 settings from the link, mostly the Linker Options. The problems are
/LIB -- warning, unrecognized
/DEF: -- error, no argument specified
/NODEFAULTLIB -- a lot of link errors.
So I have to remove these options. For Compiler Flags, I didn't have SPA_NO_AUTO_LINK before and now I added it. The test results are,
stp to sat -- can finish conversion, no memory leak
catpart to sat (simple sample) -- can finish conversion, some memory leak
sat to ige -- the message box "Debug Error!" still showing up. If ignore, can finish conversion and no memory leak.
Do you have any idea about this? Thanks.
Re: Problem for a simple project?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-25-2011 03:20 PM
Hello amcom,
1) Did you try the standard sample?Are these test results with the standard InterOp sample?
2) The memory leak you are experiencing may be false memory leaks - http://doc.spatial.com/index.php/Understanding_Fal
3) Have you installed the VC runtimes
If the above still does not explain the behavior please create an incident with the support for further analysis.
Regards,
Yogesh

